nRF5 SDK v17.1.0
Encryption negotiation
This information applies to the following SoftDevice: S212

The ANT encryption negotiation module provides functions that can be used by the slave node to negotiate encryption parameters with an encrypted ANT master channel and to use the cryptographic functionality that is provided by the ANT stack.

Encryption negotiation starts after the slave has connected to an encrypted master channel. The negotiation is event-driven. Therefore, it requires full attention from the application.

This module should be used as extension to the Encryption configuration module. The API for the module is available here: ANT encryption configuration

See ANT Message Protocol and Usage for detailed information about ANT's encryption capabilities.

The following steps are required to use this module:

  1. Declare the macro ANT_ENCRYPT_SLAVE_NEGOTIATION_USED globally in the project, so that the module is automatically initialized when you configure the Cryptographic settings of the ANT stack.
  2. Optionally, you can implement an application-specific event handler of type ant_encryp_user_handler_t that deals with encryption events like negotiation success, negotiation failure, or channel loss. Call ant_enc_event_handler_register to register this event handler.
  3. When initializing the slave channel, make sure to configure the encryption settings. See Channel initialization.
  4. Use ant_enc_event_handler_register to register an event handler for encryption events to react to changes in the encryption state of the channel.

To quickly get started, use the sample code from the ANT Encrypted Channels Receiver example.


Documentation feedback | Developer Zone | Subscribe | Updated