Welcome Guest,Register Now
Log In

ANT Forum

Welcome guest, please Login or Register

You are here: Forum Home → ANT+ Forums → Miscellaneous → Thread

   

Various questions about Ant+ pairing

Rank

Total Posts: 6

Joined 2023-04-17

PM

Hi,

I have a prototype running in C++ with AntLib for cycling data but I'm still struggling with some topics :

-After finding devices with a background search, I want to show its values of power, cadence or heart rate but I'm not receiving consistent data on the background search channel. I mean if I try to show the live power effort, I won't receive enough power frames to build the power value. It seems it is normal in background search but how could I do otherwise ?

-With my problems of background scanning, I also tried to create 4 channels with a wildcard as deviceNumber. This time I can retrieve the correct values of one device but I wonder if it is better to create another channel dedicated to the device selected ?
My question here is, is it better to have a continuous channel with a wild card to catch potential new devices at any time or is it better to only focus on the device that has been selected ?
If I have 10 power devices around, will it overload the wildcard channel ? Can I have one channel for my chosen device and one channel for continuous search (or will it conflict) ?

-I also struggle to detect disconnections. If I remove the USB Dongle or if I power off the device, i'm not sure to detect the disconnection properly. My only way is to setup timeouts on every device ?
     
RankRankRankRank

Total Posts: 370

Joined 2012-06-27

PM

Typical approach is to use a search to discover nearby devices and allow a user to select which they want to connect to, then open up a channel specifically to track that device. See ANT AN Device Paring document (https://www.thisisant.com/resources/an02-device-pairing/)      

Signature

Ian Haigh

RankRankRankRank

Total Posts: 370

Joined 2012-06-27

PM

From ANT AN ANT Channel Search (https://www.thisisant.com/resources/an11-ant-channel-search-and-background-scanning-channel/) "The slave device will synchronize with the first
matching transmission it finds. Once the slave has
found a matching master, it will receive at the
configured channel period (i.e. message rate). For
the channel to maintain synchronization, the
master and slave channel periods must either
match, or be multiples of each other. " A background scan or continuous scan channel does not synchronize to a single transmitter. Background will not see all the transmissions in the area as the radio is duty cycled. Continuous scan will see almost all of the transmissions, but will use 100% of the ANT resources of the radio and draw significant power (only a concern for embedded implementations).      

Signature

Ian Haigh

Rank

Total Posts: 6

Joined 2023-04-17

PM

Thanks for your answer.
I managed to open another channel for the device but in this case, I don't receive input on this channel until I close the background search. So at this point I can't have a background search running (to detect other devices) with other channels because those channel won't receive data. As soon as I close the background search, all the data appears normally.

On your last message, does it mean that having continuous scans is greedy but not really a concern for a PC software ?      
RankRankRankRank

Total Posts: 370

Joined 2012-06-27

PM

The behavior you describe for a background search is not correct. See figure 5-1 Backgound Scanning Channel in the search AN. See "Provided the search
parameters are configured for low priority mode
only (See Section 1)," for where your configuration is likely not correct.

Continuous scan takes all of the ANT radio resources, so you can only have this one channel per radio, and draws considerable power as the radio is constantly in use. For a PC the only consideration is if you need multiple USB sticks so that you can have more than one channel. However, in most cases you can setup the continuous scan to retrieve data from all the sensors because they are on the same network and channel number (ANT+ network sensors are all on ch 57 for 2457 MHz).      

Signature

Ian Haigh

Rank

Total Posts: 6

Joined 2023-04-17

PM

I've missed setting the Low priority search Timeout on the background search, that may explain the problem.

I managed to improve my continuous scan and it now finds my devices pretty well. I might try to use the scan only when i'm on my pairing page.

Thanks for your answers.      
Rank

Total Posts: 6

Joined 2023-04-17

PM

It appears that I can't use continous scanning outside of pairing because I won't be able to send any resistance to the continuous scan channel (which is logic). I will only use continuous scan on the pairing page and then create dedicated channels for the riding session