This information applies to the nRF52840 SoC only.
The following examples demonstrate different features of a Zigbee stack running on the nRF52840 SoC.
Before running the examples, see Running precompiled examples.
To control Zigbee network and devices using Python language, you can use the Zigbee CLI Agent example and a Python CLI wrapper library.
- SoftDevice usage
- Zigbee examples do not use the SoftDevice, with the exception of multiprotocol examples.
- Zigbee example parameters
- All Zigbee examples use the following parameters: For production firmware or for use with 3rd party devices, such as Amazon Echo Plus, it is strongly advised to set the IEEE_CHANNEL_MASK (located in files named
main.c
of each example) to cover multiple channels. For example, set IEEE_CHANNEL_MASK to 0x07fff800U, in order to use all 802.15.4 defined channels.
Testing
You can find the source code and the project file of the examples in the following folder: <InstallFolder>/examples/zigbee
Use the following steps to test the Zigbee examples:
- Build the example according to the instructions in Building examples.
- Use nrfjprog (from nRF5x Command Line Tools v9.2.0 or newer) to program the hex file that was created in the
_build
folder to the board.
- Use an UART viewer to see the log messages produced by the application. All Zigbee examples use 1 000 000 baud rate.
Zigbee BSP LED reference
All Zigbee examples use the same LED assignments:
- LED1 and LED2 (BSP_LED_0 and BSP_LED_1) – used only inside multiprotocol examples to indicate the BLE status:
- Blinking – BLE advertising.
- Continuously on – Connected over BLE.
- Note
- Zigbee Multi Sensor with FreeRTOS Example is an exception, as it uses LED1 (BSP_LED_0) as a simple blinking-alive indicator. This example is not multiprotocol.
- LED3 (BSP_LED_2) – network connection state:
- Disabled – Node is disconnected or is currently connecting to a Zigbee mesh network.
- Solid – Node is connected to a Zigbee mesh network.
- LED4 (BSP_LED_3) – user application LED.
Persistent storage erase method
All Zigbee examples have a method to erase the Zigbee persistent storage at boot. When using the nRF52840 Development Kit, short the pin 1.09 to the ground. This pin is configurable in the zigbee_helpers.c
file.
- Warning
- This feature clears all the NVRAM used by the Zigbee stack, including the NWK frame counter. This has severe consequences in the production. For clearing all the network information data except the frame counter, use the
zb_nvram_clear
function.