nRF5 SDK v11.0.0
Experimental: Search Uplink
This example requires the following SoftDevice: S212

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

Search uplink messaging, available in some ANT devices such as the nRF52, allows sending uplink messages on a channel while it is searching. On a standard slave channel, this feature allows sending a message to a device as soon as it is synchronized, thereby reducing the latency for that first message transmission. Background scanning channels enable many-to-one topologies where a single receiver can receive data from multiple devices over a single channel without synchronizing to them by performing a continuous search operation, and can support bidirectional communication on parts that include the search uplink feature.

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

ant_search_uplink.png
Search Uplink Topology

After start up, this example will configure and open an ANT master channel with the following channel parameters.

Parameter Value
Channel Type Slave (0x00)
Extended assignment EXT_PARAM_ALWAYS_SEARCH
Network Public
Radio Frequency 66
Device Number 0
Device Type 2
Transmission Type 1

No messages will be transmitted by default. Pressing BSP_BUTTON_0 will start sending uplink messages to any devices matching the Device Type and Transmission Type on Table 1, regardless of their device number. Pressing BSP_BUTTON_1 will send a single uplink message to the first device discovered after pressing the button. Messages from other devices will stop being received until the message is transmitted. BSP_LED_0 will toggle every time a message is received by the background scanning channel, while BSP_LED_1 will toggle every time an uplink message is transmitted. The format of the message transmitted is as follows:

Bytes Description
0-6 Reserved (0xFF)
7 Sequence number

A sequence number is used to differentiate between transmitted messages.

Testing the search uplink example using AntWare II

  1. Compile and program the search uplink example.
  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\experimental\ant_search_uplink\ant_search_uplink_test.xml. Alternatively, you can configure the device channel manually:
    1. On channel number 0:
      1. Set the channel assignment to master.
      2. Set the channel ID to "1, 2, 1".
      3. Keep the default for all other settings.
    2. On channel number 1:
      1. Set the channel assignment to master.
      2. Set the channel ID to "2, 2, 1".
      3. Keep the default for all other settings.
  3. Click the Auto-Open button on both channels.
  4. As messages are received in the background scanning channel, the development board will toggle BSP_LED_0.
  5. Press BSP_BUTTON_1 on the development board. ANTware will show a single received broadcast message on either Channel 0 or Channel 1. BSP_LED_1 will turn on to indicate the message was transmitted.
  6. Press BSP_BUTTON_0 on the development board. ANTware will show received broadcast messages with an increasing sequence number in both Channel 0 and Channel 1, and BSP_LED_1 will toggle on the development board as uplink messages are transmitted.

Documentation feedback | Developer Zone | Updated