This information applies to the following SoCs: nRF52833 and nRF52840.
This example requires the following SoftDevice: S140
Important: Before you run this example, make sure to program the SoftDevice.
The dynamic BLE-Zigbee Template example demonstrates the usage of the dynamic multiprotocol method. This example is a merge of a simplified version of BLE Peripheral Template and the simple Zigbee application.
The nRF52 device operates simultaneously on Zigbee and BLE. It joins the Zigbee network as a Zigbee Router device. It also acts as a BLE Peripheral device sending BLE connectable advertisements.
The Zigbee part of the application implements the Zigbee Range Extender functionality. It is a Zigbee device which basically provides no other functionality except extending the range of the Zigbee network. It is populated by the two Zigbee ZCL clusters: Basic and Identify.
Setup
You can find the source code in the following folder: <InstallFolder>\examples\multiprotocol\experimental\ble_zigbee_dynamic_template
LED assignments
The example uses LED assignments as described in Thread BSP LED and button reference for the following LEDs:
- LED1 – Used inside multiprotocol examples to indicate the BLE connection state.
- LED3 – Used to indicate the Zigbee network connection state.
Button assignments
The following buttons reserved for user application purposes are assigned in this example:
- Button 1 – Wake up from the BLE sleep mode.
Testing
The following testing procedure uses the nRF52840 device.
- Precondition
- To test the example, prepare at least one nRF52840 Development Kit and an Android smartphone.
- On the smartphone, install nRF Connect for Mobile.
- Compile and program the SoftDevice and the application. Observe that the BSP_INDICATE_ADVERTISING state is indicated.
- Connect to the device from nRF Connect (the device is advertising as 'Nordic_Template'). Observe that the BSP_INDICATE_CONNECTED state is indicated.
- Disconnect the device in nRF Connect and observe that the BSP_INDICATE_ADVERTISING state is indicated.
- Prepare the Zigbee coordinator using the Zigbee CLI agent. Refer to Zigbee CLI Reference for complete reference of the Zigbee Command Line Interface.
- Run the
role
command to set the role of the CLI device in the Zigbee network and then start it: > bdb role zc
Coordinator set
Done
> bdb start
Started coordinator
Done
- Check that the device with the the Basic and Identify Clusters is present in the network.
> zdo match_desc ffff ffff 0104 2 0 3 0
src_addr=D9D2 ep=7
Done
- Note
- The short address of the device returned by the Match Descriptor Request may differ in your case.