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 project file of the example in the following folder: <InstallFolder>\examples\ant\ant_broadcast\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 project file of the example in the following folder: <InstallFolder>\examples\ant\ant_broadcast\broadcast_rx
Both applications allow the user to trace the load of the CPU. Every time when the processor enters sleep state, BSP_LED_0 is turned off. When the processor is woken up by an interrupt (RF or other), BSP_LED_0 is turned on.
This example uses the default channel configuration:
Parameter | Transmitter | Receiver |
---|---|---|
Channel type | Master TX Only (0x50) | Slave RX Only (0x40) |
Network key | Public {0, 0, 0, 0, 0 , 0, 0, 0} | Public {0, 0, 0, 0, 0 , 0, 0, 0} |
RF channel | 66 (2466 MHz) | 66 (2466 MHz) |
Transmission type | 0x01 | 0x00 (Wildcard) |
Device type | 0x02 | 0x00 (Wildcard) |
Device number | 0x02 | 0x00 (Wildcard) |
Channel period | 8192 (4 Hz) | 8192 (4 Hz) |
You can test the Broadcast example in different ways:
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