nRF5 SDK v17.1.0
ANT Scan and Forward
This example requires the following SoftDevice: S212

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

The Scan and Forward example application demonstrates how to construct a mesh network of nodes that can be used to forward messages throughout the network.

Each node in the network uses a background scanning channel to listen for messages and an ANT master channel to repeat the messages. All nodes listen for updates to a message, so that whenever a node updates a message, the other nodes notice and start repeating the updated message. See the commands.h file in the example directory for the catalog of messages that are available in this example.

According to ANT's isochronous adaptive coexistence, a channel for broadcasting and a channel for listening coexist on the same device in this example. The broadcasting channels on all devices in the network synchronously re-broadcast the messages and thus fill up the timeslots in the airspace. The listening channels, however, try to use free timeslots to notice message updates.

ant_scan_and_forward.svg
ANT Scan and Forward example topology

Setup

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

The example uses the following button assignment:

Button Command
Button 1 Current node – LED on
Button 2 Current node – LED off
Button 3 All nodes – LED on
Button 4 All nodes – LED off

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.

Test the ANT Scan and Forward example application by performing the following steps:

  1. Compile the application and program it on at least two nodes to form a mesh network.
  2. Press the buttons on any of the nodes to interact with the network.

Documentation feedback | Developer Zone | Subscribe | Updated