Important: Before you run this example, make sure to program the SoftDevice.
The Broadcast example consists of basic example applications that can be used to test ANT connectivity between a master and a slave.
The transmitter application transmits a packet four times per second. Each transmission is indicated by BSP_INDICATE_SENT_OK.
Packet layout: {0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, X}
The last byte of the packet (X) is incremented each time.
You can find the source code and the project file of the example in the following folder: <InstallFolder>\examples\ant\ant_broadcast\tx
The receiver application receives a packet four times per second. Each successful transmission is indicated by BSP_INDICATE_RCV_OK.
You can find the source code and the project file of the example in the following folder: <InstallFolder>\examples\ant\ant_broadcast\rx
This example uses the default channel configuration:
Parameter | Transmitter | Receiver |
---|---|---|
Channel type | Master (0x10) | Slave (0x00) |
Network key | Public | Public |
RF channel | 66 (2466 MHz) | 66 (2466 MHz) |
Device number | 0x02 | 0x00 (Wildcard) |
Device type | 0x02 | 0x00 (Wildcard) |
Transmission type | 0x01 | 0x00 (Wildcard) |
Channel period | 8192 (4 Hz) | 8192 (4 Hz) |
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 Broadcast example in different ways:
<InstallFolder>\examples\ant\ant_broadcast\tx\ant_broadcast_tx_test.xml
. Alternatively, you can configure the device channels manually:Received BROADCAST_DATA_0x4E :: 4e, 00-00-00-00-00-00-00-00-01 Received BROADCAST_DATA_0x4E :: 4e, 00-00-00-00-00-00-00-00-02 Received BROADCAST_DATA_0x4E :: 4e, 00-00-00-00-00-00-00-00-03 Received BROADCAST_DATA_0x4E :: 4e, 00-00-00-00-00-00-00-00-04 Received BROADCAST_DATA_0x4E :: 4e, 00-00-00-00-00-00-00-00-05 Received BROADCAST_DATA_0x4E :: 4e, 00-00-00-00-00-00-00-00-06
<InstallFolder>\examples\ant\ant_broadcast\rx\ant_broadcast_rx_test.xml
. Alternatively, you can configure the device channels manually: