Welcome Guest,Register Now
Log In

ANT Forum

Welcome guest, please Login or Register

   

Getting started with DEMO_NET

Rank

Total Posts: 4

Joined 2015-04-05

PM

I would like to communicate with my Speed and Cadence sensor via a C# .NET application. So I have tried to start with DEMO_NET. My sensor interacts with Simulant perfectly so I know it is working.

I have read all the relevant documentation about pairing and have tried to use the correct settings. But all I get is a "search timeout". Could someone advise me on how to modify demo.cs so that it will pair with a speed and cadence sensor?

Or is there another .NET demo that I should be starting with?

Thanks      
Avatar
RankRankRankRank

Total Posts: 296

Joined 0

PM

fenboy - 17 April 2015 06:16 PM
I would like to communicate with my Speed and Cadence sensor via a C# .NET application. So I have tried to start with DEMO_NET. My sensor interacts with Simulant perfectly so I know it is working.

I have read all the relevant documentation about pairing and have tried to use the correct settings. But all I get is a "search timeout". Could someone advise me on how to modify demo.cs so that it will pair with a speed and cadence sensor?

Or is there another .NET demo that I should be starting with?

Thanks

You should double check that all channel config parameters in the device profile (see chap. 4.1.1) are properly set. Don't forget to use the proper Network Key!.
You could as well use ANTWare to create a first connection to the sensor. You'll have to enter all parameters manually - if and when you succeed, you know that your set of params is correct and can proceed to using them in your C# code.

Cheers,
OMB      
Rank

Total Posts: 4

Joined 2015-04-05

PM

I have just tried Antware II without success.

Can you tell me more about the network key? I thought the value just needed to be set to zero(s)? I just have an off the shelf speed and cadence sensor that I am trying to pair with.

From AntwareII:

Channel Id Set: 0,121,0, pairing
Set msg period to 8086/32768 sec
Set freq to 2457Mhz
Auto-Open Initiated...
> Opening Channel...
EVENT_RX_SEARCH_TIMEOUT_0x01
:: 40, 00-01-01
EVENT_CHANNEL_CLOSED_0x07
:: 40, 00-01-07

What is Simulant doing automatically that I am missing?

Thanks for your reply,

FenBoy      
Rank

Total Posts: 4

Joined 2015-04-05

PM

By the way, I am signed up as an adopter, so I have the key information. I just can't see any good information about using the network key correctly.      
Rank

Total Posts: 4

Joined 2015-04-05

PM

Just an update. I have got DEMO_NET working. I just needed to set the parameters correctly for the profile and also change the network key to the ANT+ key published at:

http://www.thisisant.com/developer/ant-plus/ant-plus-basics/network-keys.

Thanks for your help,

FenBoy      
Rank

Total Posts: 1

Joined 2022-01-09

PM

Hi,

6 years after smile I hope you're still connected smile

I've the same issue to connect to HR ant.

I've set the value reads from simulant for my HR sensor (attached file):
static readonly byte USER_ANT_CHANNEL 1;         // ANT Channel to use
static readonly ushort USER_DEVICENUM 0;        // Device number    
static readonly byte USER_DEVICETYPE 120;          // Device type
static readonly byte USER_TRANSTYPE 0;           // Transmission type 


no change:
static readonly byte USER_RADIOFREQ 35;          // RF Frequency + 2400 MHz
static readonly ushort USER_CHANNELPERIOD 8192;  // Channel Period (8192/32768)s period = 4Hz 


set up the network key (public key):
static readonly byte[] USER_NETWORK_KEY { 0xE80xE40x330xA90xDD0x560xC10x43 };
static 
readonly byte USER_NETWORK_NUM 1;         // The network key is assigned to this network number 


Can you send me the configuration (static declarations) you set to use DEMO_NET as slave.

Tks      

Image Attachments

HR_simulant.jpg

Click thumbnail to see full-size image