nRF5 SDK v17.1.0
ANT Multi Channels Encrypted
This example requires the following SoftDevice: S212

Important: Before you run this example, make sure to program the SoftDevice.

The Multi Channels Encrypted example shows how to set up and use up to 15 encrypted ANT channels on one board.

The example consists of a Transmitter application and a Receiver application. Both applications use the Encryption configuration module. The Receiver application uses the Encryption negotiation module in addition.

Transmitter

The Transmitter application creates the defined number of master channels, configures the encryption settings, and encrypts the channels.

The pattern of the LEDs indicates the number of open transmitting encrypted channels. For example, if four channels are transmitting, the LED pattern is 0100.

You can find the source code and the project file of the example in the following folder: <InstallFolder>\examples\ant\ant_multi_channels_encrypted\tx

Receiver

The Receiver application creates the defined number of slave channels, configures the encryption settings, and starts tracking the respective master channels, which requires negotiating the encryption parameters.

The pattern of the LEDs indicates the number of decrypted channels. For example, if four channels are tracking encrypted master channels, the LED pattern is 0100.

You can find the source code and the project file of the example in the following folder: <InstallFolder>\examples\ant\ant_multi_channels_encrypted\rx

Testing

Note: You can use a custom channel or encryption when running any of the ANT examples. When adding a new channel or encryption, remember to update SoftDevice ANT event handler configuration.

You can test the Encrypted Channels example in different ways:

Testing the Transmitter with the Receiver

  1. Compile and program the Transmitter application on one board. Observe that the LED pattern on the board indicates the number of encrypted transmitting channels.
  2. Compile and program the Receiver application on another board. Observe that the LED pattern on the board indicates the number of channels that have been decrypted.

Testing the Transmitter using ANTware II

  1. Compile and program the Transmitter application on a board.
  2. Run ANTware II. Select your ANT PC dongle (for example, ANTUSB-m) from the available devices. Configure the device channel by loading the device profile configuration from the following file: <InstallFolder>\examples\ant\ant_multi_channels_encrypted\tx\ant_multi_channels_encrypted_tx_test.xml. Alternatively, you can configure the device channels manually:
    1. Set the channels assignment to slave.
    2. Set the channel ID for each channel according to the following table:
      Parameter Value
      Device number Channel number + 1
      Device type 2
      Transmission type 1
    3. Set the radio frequency to 2476 MHz.
    4. Use the default values for all other configuration parameters.
  3. Open the device panel and enable advanced burst.

    ant_encrypted_channels_1.png
    Advanced burst settings

  4. Set the encryption key to 03-01-04-01-05-09-02-06-05-03-05-08-09-07-09-03.

    ant_encrypted_channels_2.png
    Set the encryption key

  5. Open each channel to start transmission.
  6. Observe that each channel is receiving garbage broadcast messages.
  7. While each channel is open, enable encryption for the channel.

    ant_encrypted_channels_3.png
    Enable encryption

  8. Observe that the broadcast messages are decrypted.

Documentation feedback | Developer Zone | Subscribe | Updated