This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts
This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

How to implement selecting one ANT+ master device pair if multiple master deice exist.

Hi,

Our device is slave device with LCD displaying.We need to implement the function as below:

Within range of our slave device, if multiple master device like combined bike speed and cadence senor or speed and distance sensor are found.

They will be displaying on our device to the user asking which device to pair with.

How to implement it.

May I get the related document or apply note even demo code? Thanks.

Now our project is developed base on nRF52832 SDK11.0.0,SD ANT_s332_nrf52_0.9.1.alpha.hex and example demo path: Nordic BLE\nRF5_SDK_11.0.0_89a8197\examples\ant\ant_plus\ant_bsc\bsc_rx\combined

  • How would you identify the master device you want receive data from?

  • My initial idea is that identifying the master device by channel ID like divice number,device type. for example: case 1 : if the user operate the menu of pairing bike speed and cadence sensor . our device will display all bike speed and cadence sensors within range of our device. case 2 : if the user operate the menu of pairing speed and distance sensor . our device will display all speed and distance sensors within range of our device. case 3 : if the user operate the menu of pairing Heart rate monitor sensor . our device will display all Heart rate monitor sensors within range of our device. of course, I want receiving data from master device when scaning stage.

  • I think you can use background scanning for this.

    We have an example in the SDK, see this.

    Dynastream also have a relevant app note, ANT Channel Search, available here.

  • Thanks you for your information. I is studying the relevant app note and demo code. Now, base on the demo code, We can search multiple master sensor device . So i have some question as below:

    a) how many master devices can be found for each channel ? if there is a max limit value? We use tool ANT ware II as master device simulators. it can simulate max 8 master device and slave device can search them all. but if 8 is the max limit value or more than 8 master device?

    b)how to pair the selected master device? The demo code is not included it . Before, We configure the channel ID parameter and call lib sd_ant_channel_open to open the channel. They will pair automaticaly.Now, it have openned the channel when searching device. we should call which lib to pair it when selecting the device number of the master device?

  • a) If you don't use the radio for anything else, process the events quickly, and set the search waveform to ANT_WAVEFORM_FAST you should be able to find much more than 8 masters, but I would recommend testing this.

    b) Can't you just do it the same way? I would just open a new channel with the Channel ID that identifies the channel. You can use the extended message format to get the device number, device type and transmission type, see Section 7.1.1 in the ANT Message Protocol for more information.

Related