nRF5 SDK for Thread and Zigbee v2.0.0
BLE Eddystone and Zigbee Light Bulb Example
This example requires the following SoftDevice: S140

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

This dynamic multiprotocol example application is based on the ble_app_eddystone example available in nRF5 SDK v15.2.0. It has been extended to support dynamic switching between two protocols, BLE and Zigbee, at the same time (concurrently). From the Zigbee protocol perspective, this example implements a dimmable light bulb, as described in the Light bulb example.

To support both protocols at the same time, the Zigbee stack uses the 802.15.4 radio during the Bluetooth low energy radio's inactive time (using Timeslot API). Depending on the Bluetooth low energy connection interval, the nRF52840 SoC can spend up to 99% of the radio time on the Zigbee protocol. This is the same mechanism as the one used inside Thread Dynamic multiprotocol examples. For more information on multiprotocol operation, refer to the Multiprotocol support support section.

Note
Transmitting and receiving data does not break connections from any of the used radio protocols (BLE or Zigbee).

This BLE Zigbee multiprotocol example requires running two other examples containing Zigbee coordinator and Zigbee light switch that can be found in Zigbee Light Control example.

LED assignments:

Note
If using this light bulb example on the nRF52840 Dongle (PCA10059), it is the LED1 that informs about the successful joining the Zigbee network, while the LED2 indicates the other states – see the example source code for clarification.

Button assignments:

Setup

You can find the source code in the following folder: <InstallFolder>\examples\multiprotocol\ble_zigbee\ble_zigbee_dynamic_light_bulb_eddystone

Testing

Precondition
To test this example, prepare three nRF52840 Preview Development Kits and a smartphone (Android or iOS).
  1. On the smartphone, install nRF Beacon for Eddystone.
  2. Run the following commands to flash the Zigbee coordinator example to one of the boards:
    $ cd <InstallFolder>/examples/zigbee/light_control/light_coordinator/hex
    $ nrfjprog -f nrf52 -r --program nrf52840_xxaa.hex --chiperase
  3. Run the following commands to flash the Zigbee dimmable light switch example to another board:
    $ cd <InstallFolder>/examples/zigbee/light_control/light_switch/hex
    $ nrfjprog -f nrf52 -r --program nrf52840_xxaa.hex --chiperase
  4. Build the example according to the instructions in Building examples.
  5. Flash SoftDevice and the example according to the instructions in Running examples.
  6. You can toggle BSP_LED_3 on the light bulb board in the network by pressing BSP_BUTTON_0 and BSP_BUTTON_1 on the light switch board. Android phones will detect Eddystone beacons using the Nearby service, but you can also use nRF Connect.
  7. Press BSP_BUTTON_0 and open nRF Beacon for the Eddystone app.
  8. Go to Update tab and tap Connect.
  9. Select nRF5x_Eddys and tap Unlock when prompted.

Now you can configure your Eddystone beacon.


Documentation feedback | Developer Zone | Subscribe | Updated