Zigbee BLE Smart Home Mesh Solution

Revision as of 15:20, 18 July 2022 by Registered User (→‎References)

1. Overall description

This page describes the functioning of the Zigbee BLE Smart Home Mesh Solution and how to handle it.

This project demonstrates the STM32WB application capabilities using Zigbee-BLE mesh solutions in a smart home application, with the additional use of a smartphone and the Alexa Amazon virtual assistant.

Zigbee Bluetooth® LE-mesh connects multiple Zigbee and BLE devices with mesh networking capability for internet of things (IoT) solutions.


Zigbee Bluetooth® mesh illustration
Connectivity mesh-illustration 2.png


Mesh network has a many-to-many topology, with each device able to communicate with every other device in the network.

The Bluetooth® LE-mesh communication is done using messages relayed by devices which are part of the Mesh network (called nodes). In this way, the end-to-end communication range is extended far beyond the radio range of each individual node.

A quick description of the BLE Mesh vendor model is available in the ST BLE-Mesh application note[1].


Project overview


To realize this project, seven STM32WB5MM-DK Discovery kits[2] were used. In addition, one Amazon Alexa assistant and two Android or iOS phones have to be included.

The 3 Zigbee nodes, the 3 BLE nodes and the BLE/Zigbee bridge node can be controlled with the Zigbee hub built-in to the new Echo Show 10 Alexa assistant, or with a smartphone for the the BLE mesh part.

2. Demonstration setup

2.1. Device requirement

Required material to set up the demonstration is as follows:

  • Seven STM32WB5MM-DK Discovery kits[2]: three as Zigbee routers, one as BLE mesh proxy, one as BLE mesh node, one as BLE Mesh bridge, and one as Zigbee/BLE dynamic concurrent mode router.
  • One Amazon Alexa Echo assistant.
  • One smartphone to use the Alexa app using an Alexa account.
  • One smartphone with ST BLE Mesh application

2.2. Network setup

The different node are the following:

• 3x BLE Mesh Node o 1x BLE Mesh Bridge – GATT Server Proxy that connects to the Zigbee/BLE Bridge GATT Client o 1x BLE Mesh Proxy Node – Connects with the Smartphone app, "ST BLE Mesh" o 1x BLE Mesh Node – Generic BLE Mesh Node

• 1x BLE/Zigbee Bridge Node – BLE GATT Client and Zigbee Server node

• 3x Zigbee Nodes – Zigbee Server Router node


Zigbee Ble Smart home network



3. Device Programming

Three STM32WB5MM-DK boards will be used as BLE Mesh nodes.

a. 1x STM32WB5MM-DK as the BLE Mesh Bridge

b. 1x STM32WB5MM-DK as the BLE Mesh Proxy Node

c. 1x STM32WB5MM-DK as the BLE Mesh Node


Zigbee Ble Smart home network



With CubeProgrammer, program the following firmware images on the respective STM32WB5MM-DK being used. But before programming these, perform a Flash Mass Erase on each of the boards.

• 3x BLE Mesh Node



For reference, below is a trace log that the user should see after the BLE Mesh firmware is loaded on the BLE Mesh nodes.



• 1x BLE/Zigbee Bridge Node – BLE GATT Client and Zigbee Server node



For reference, below is a trace log that the user should see after the BLE/Zigbee bridge firmware is loaded.



• 3x Zigbee Nodes – Zigbee Server Router node





4. BLE Mesh Node Setup (Provisioning)

Provision the three BLE Mesh Nodes from the iOS or Android ST BLE Mesh app following procedure below for all:

• BLE Mesh Bridge

• BLE Mesh Proxy Node

• BLE Mesh Node

Start by powering on the boards from a USB Power hub.




Start the provisioning process from the ST BLE Mesh app.








When the three devices are provisioned, they will appear under the devices window of the app.



For reference, below is the trace log (115200 baud rate) from the BLE Mesh nodes during provisioning.



For reference, below is the trace log (115200 baud rate) from the BLE Mesh Proxy Node in operation when being connected and controlled by the smartphone ST BLE Mesh app.



5. Zigbee/BLE Bridge Node Setup (Provisioning)

It is important that the Zigbee/BLE Bridge node setup be performed after setting up the BLE Mesh Nodes, since the Zigbee/BLE Bridge will be connecting to the BLE Mesh Bridge Proxy node. Also, it is recommended to perform this step before running the rest of the Zigbee nodes, to prevent the Zigbee nodes from interfering.




Note that it is critical that the BLE/Zigbee Bridge node is connected and powered by a PC to connect to the board from a Serial Terminal (baudrate 115200) to see the trace logs, since the user will have to visually verify if the BLE and Zigbee connections were established successfully. Note that this is the most complex step in the demo!

Note that while all other Zigbee and BLE Mesh nodes can be powered from a USB power hub, the “BLE/Zigbee Bridge” will have to be powered from a PC or equivalent that permits you to run a serial terminal to view its traces.





Power on “Zigbee/BLE Bridge” board, and it will come up in BLE Client mode and begin scanning for the BLE Mesh Proxy Server device. It should discover it and connect to it automatically, as shown in trace log below. However, if the GATT service and characteristic discovery fails and does not show as highlighted in the trace below, the user should retry by resetting the board to retry the connection.





Once the BLE Client establishes the connection with the BLE Mesh Proxy Server, the user should then manually start the Zigbee network scan, by pressing the User Button 1 on the board to start the Zigbee network Scan and join request.





The User Button 1 press action will show up in the log as highlighted below.





The user can now command Alexa to start the device discovery with one of two methods:

1. Using the Amazon Echo’s voice assistant by saying “Alexa, discover devices”

2. Using the Alexa app, as shown below:













From the trace log, the user should verify that the device joined the network successfully by verifying the highlighted trace.

If this trace is not displayed, the user should reset the “Zigbee/BLE Bridge” board and retry the process.

Note that the Zigbee part in the “Zigbee/BLE Bridge” device does not support Data Persistence, thus it will have to be added to the Alexa Zigbee network after every power cycle (in other words repeat the ).






Note: In the event that the BLE/Zigbee Bridge is power cycled or reset, the process to connect to the BLE Mesh and Zigbee networks, described in this section 6, will have to be repeated.

The previous added device would have to be deleted from the Alexa app, as shown below.





6. Zigbee Note Setup (Provisioning)

7. References