This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

ANT background scanning network key issue

Hi all,
I have a little problem regarding "background scanning" example.

Setup:
- SDK 17.0.2, softdevice s212, Segger
- Master ANT+ = Nordic DK PCA1040 with ANT+ Tx profiles/simulators (e.g. HRM)
- Slave ANT = Nordic DK PCA1040 with background scanning example

Parameters:
- RF = 57
- Device type = 0 (wildcard) or 120 (e.g. HRM)
- Trans type and channel as in datasheet

Results:
- when ANT_PLUS_NETWORK_KEY (master and slave) = 0, 0, 0, 0, 0, 0, 0, 0 it works
- when ANT_PLUS_NETWORK_KEY (master and slave) = 0xB9,... it does NOT work
- With ANT_PLUS_NETWORK_KEY (master and slave)  = 0xB9... my Garmin watch can detect Nordic DK simulator, when it is 0,... it can not (logical)

Change of setup:
- Both DK are using "background scanning" example and ANT_PLUS_NETWORK_KEY  = ANT+ (0xB9,...)
- in this case it works normally

My question is what am I doing wrong, when I am using correct ANT_PLUS_NETWORK_KEY with "background scanning" + "ANT+ HRM_Tx", it does not work, but it does with a public key. But at the same time when I am using 2 "background scanners" it works fine with ANT+ key.
Thank you :)

Ram

Parents
  • Hi,

    Not sure where the problem is, but you can look into this:

    I would assume you would need to call sd_ant_network_address_set() on both master and slave, for instance network_number = 0 and network_key = ant_plus_key. You can call sd_ant_network_address_set() multiple times to add several network keys, just make sure that network_number is incrementing for each key added.

    Once keys are set, then make sure that when you later call sd_ant_channel_assign() that the network_number equal the network_key you want to use.

    I can't really think what may cause this to go wrong, maybe the byte order in keys are reversed or wrong, but that seems a bit odd.

    Best regards,
    Kenneth

  • Just to inform you, sd_ant_network_address_set() is what it is needed, thank you.

Reply Children
No Data
Related