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

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

Standard ANT search is able to search for devices in one network and radio frequency at a time. For applications intending to connect to devices on different networks/frequencies, this means that the second slave channel will only be able to start searching for a master once the first slave channel has either acquired a master or timed out its search. Search sharing enables two or more channels to search concurrently on different radio frequencies or networks, by alternating which channel uses the radio for searching.

The purpose of this example is to demonstrate how to use search sharing to perform concurrent searches for two devices transmitting in different radio frequencies. This example also shows how to configure the search waveform to limit the impact on acquisition time from switching between multiple frequencies during search. This example can be paired with ANTware, with two master channels in two different radio frequencies.

After start up, this example will configure and open two slave channels with the following parameters.

Parameter Slave 0 Slave 1
Channel Type Slave (0x10) Slave (0x10)
Extended Assignment 0 0
Network Public Public
Radio Frequency 50 70
Device Number 0(wildcard) 0(wildcard)
Device Type 2 3
Transmission Type 1 1
Channel Period 8192 (4 Hz) 8192 (4 Hz)
High Priority Search Timeout 0 (disabled) 0 (disabled)
Low Priority Search Timeout 12 (30 seconds) 12 (30 seconds)
Search sharing cycles 1 1
Search waveform ANT_WAVEFORM_FAST ANT_WAVEFORM_FAST

The high priority search timeout is disabled in both channels to reduce the impact of search on tracking channels. Low priority search timeout is configured to the desired timeout, 30 seconds. Search sharing cycles is set to 1, so that search alternates between the two channels every search cycle. Finally, to reduce the impact in acquisition time from switching back and forth between two radio frequencies, the search waveform is configured to the fast waveform.

ant_seach_sharing.png
ANT Search Sharing example topology

Testing the Search Sharing Example using AntWare II:

  1. Compile and program the Search Sharing 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_sharing\search_sharing_test.xml. Alternatively, you can configure the device channel manually:
    1. Channe number 0:
      1. Set the channel assignment to master.
      2. Set the channel ID to "1, 2, 1".
      3. On the Basic tab, set radio frequency to 2450 MHz.
      4. Keep the default for all other settings.
    2. Channe number 1:
      1. Set the channel assignment to master.
      2. Set the channel ID to "2, 3, 1".
      3. On the Basic tab, set radio frequency to 2470 MHz.
      4. Keep the default for all other settings.
  3. Click the Auto-Open button on both channels.
  4. On the development board, BSP_LED_0 will turn on to indicate master 0 has been acquired, and BSP_LED_1 will turn on when master 1 has been acquired.
  5. Close both channels on ANTware.
  6. Reset the development board.
  7. Press “AutoOpen” only on channel 1.
  8. On the development board, BSP_LED_1 will turn on when master 1 has been acquired. Notice that slave channel 1 was able to acquire the master channel 1 without needing to wait for the search on channel 0 to time out.

Documentation feedback | Developer Zone | Updated