nRF5 SDK for Thread and Zigbee v4.1.0
BLE Eddystone and Zigbee Light Bulb Example

Table of Contents

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.

This dynamic multiprotocol example application is based on the ble_app_eddystone example available in nRF5 SDK v16.0.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 nRF52 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 with BLE/Bluetooth 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.


Setup

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

LED assignments

The example uses LED assignments as described in Thread BSP LED and button reference for the following LEDs:

The following LEDs reserved for user application purposes are assigned in this example:

Note
If you are 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

The following buttons reserved for user application purposes are assigned in this example


Testing

Precondition
To test this example, prepare three nRF52 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 (edit the SoC and PCA numbers if you use nRF52833):
    $ cd <InstallFolder>/examples/zigbee/light_control/light_coordinator/hex
    $ nrfjprog -f nrf52 -r --program nrf52840_xxaa_pca10056.hex --chiperase
  3. Run the following commands to flash the Zigbee dimmable light switch example to another board (edit the SoC and PCA numbers if you use nRF52833):
    $ cd <InstallFolder>/examples/zigbee/light_control/light_switch/hex
    $ nrfjprog -f nrf52 -r --program nrf52840_xxaa_pca10056.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 LED4 on the light bulb board in the network by pressing buttons on the light switch board. Android phones will detect Eddystone beacons using the Nearby service, but you can also use nRF Connect.
  7. Press Button 1 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