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

ant_custom_key_set S310 on nRF5144

I tried to set a custom key in this way:

... ANT INIT
uint8_t network_number = 2;
uint8_t p_network_key[8] = {0xa1, 0x15, 0xb3, 0x66, 0x60, 0xef, 0x19, 0xa1};

err_code = ant_custom_key_set	(network_number, p_network_key );
APP_ERROR_CHECK(err_code);
...

... ANT INIT CHANNEL
   ant_channel_config_t config;
   config.network_number = 2;
...
   err_code = ant_channel_init(&config);
  APP_ERROR_CHECK(err_code);
...

But with ANT Ware, also if I don't set the custom key, I can send or receive message to the module anyway.

What's I missed?

Thanks

Parents
  • From Section 9.5.2.7 in ANT Message Protocol and Usage Rev 5.1:

    Only valid network keys will be accepted by ANT. Note, if a Set Network Key (0x46) command is sent with an invalid key, a RESPONSE_NO_ERROR may be received, but the network key will be unchanged; it will retain the value it held prior to the command being issued.

    Note that network keys, transmission type, device type IDs and RF channels are assigned and regulated to maintain network integrity, and interoperability, except for the default public network. Please visit www.thisisant.com for more details on available standard network types or on how to obtain your own network key.

    It seems that using an unvalid network key (a key not distributed by ANT) may or may not return an error. The network key may remain the same even though no error is returned.

    If you want your own network key I think you need to contact ANT.

Reply
  • From Section 9.5.2.7 in ANT Message Protocol and Usage Rev 5.1:

    Only valid network keys will be accepted by ANT. Note, if a Set Network Key (0x46) command is sent with an invalid key, a RESPONSE_NO_ERROR may be received, but the network key will be unchanged; it will retain the value it held prior to the command being issued.

    Note that network keys, transmission type, device type IDs and RF channels are assigned and regulated to maintain network integrity, and interoperability, except for the default public network. Please visit www.thisisant.com for more details on available standard network types or on how to obtain your own network key.

    It seems that using an unvalid network key (a key not distributed by ANT) may or may not return an error. The network key may remain the same even though no error is returned.

    If you want your own network key I think you need to contact ANT.

Children
No Data
Related