1. Introduction
The concurrent mode Zigbee-Bluetooth® LE (as well as the Thread-Bluetooth® LE; see the STM32WB-WBA Thread-BLE concurrent mode wiki page), is a feature supported on all STM32WB-STM32WBA products. Concurrent Zigbee–Bluetooth® LE mode is very compelling because it allows a single STM32WB/STM32WBA device to run a Zigbee mesh network while simultaneously offering BLE connectivity for commissioning, control, firmware updates, or mobile-app integration. This reduces BOM cost and complexity, improves user experience (easy smartphone pairing and diagnostics), and enables flexible product features without additional hardware. Both the STM32WB product and the STM32WBA product handle seamlessly the dynamic transitions between BLE and Zigbee.
In this wiki, we are listing the concurrent applications using Zigbee and BLE on STM32WB-WBA boards.
On STM32WB, concurrent applications BLE-Zigbee can be static or dynamic.
- Dynamic means simultaneously using BLE and Zigbee.
- Static means that, at startup, the concurrent static application starts either the BLE application (BLE stack) or the Zigbee application (Zigbee stack). Then via an action from the User, it can switch from BLE to Zigbee or vice versa.
A static configuration allows to keep the same performances of each stack in term of network complexity, data throughput, latency, number of nodes, etc...The static concurrent mode is available only on STM32WB.
On STM32WB and on STM32WBA, the dynamic concurrent mode BLE-Zigbee is obtained with a dynamic switching between BLE and Zigbee with a single radio using time-sharing mechanism. When using the dynamic mode, the same radio is shared between BLE and Zigbee.
On STM32WBA, all examples of concurrent applications BLE-Zigbee are dynamic and are available on the NUCLEO-WBA65RI inside the Cube firmware package. Nevertheless, these applications can run as well on NUCLEO-WBA5x devices.
The CSA has specified a new standard named ZigbeeDirect which is based on the concurrent mode BLE-Zigbee.
Zigbee Direct allows direct communication between a BLE device (like smartphone) and a Zigbee device without needing a dedicated BLE-to-Zigbee gateway or bridge. Zigbee Direct is designed to bridge the gap between Zigbee and BLE ecosystems, facilitating integration with mobile apps and smart home platforms and leveraging the widespread presence of BLE in consumer devices.Zigbee direct require a specific Zigbee stack named ZigBeeProR23_FFD_ZDD.a or ZigBeeProR23_RFD_ZDD.a.
A dedicated wiki page explains Zigbee direct : Ubisys Smart Home Application Zigbee Direct Setup - stm32mcu.
The following STM32WBA Zigbee-Bluetooth® LE concurrent mode applications are delivered as source code for the NUCLEO-WBA65RI board. To build and install them, follow the steps described in Bluetooth® LE Build and Install Application STM32WBA page or use the README of the listed application.
| Application | Description | |
|---|---|---|
| WBA Concurrent Dynamic | BLE_HeartRate_Zigbee | Application supporting concurrently the Bluetooth® Heart Rate Sensor application and Zigbee OnOff application. |
| ZigbeeDirect_OnOff | On this Application, the ZVD joins the ZDD Zigbee network and controls the Zigbee device by sending On/Off and level control commands application. ZVD stands for ZigbeeDirect Virtual Device and runs on a Phone. ZDD runs on the STM32WBA. |
The followingSTM32WB Zigbee-Bluetooth® LE concurrent mode applications are delivered as source code for the NUCLEO-WB55 board. To build and install them, follow the steps described in Bluetooth® LE Build and Install Application STM32WB page or use the README of the listed application.
| Application | Description | |
|---|---|---|
| WB Concurrent Dynamic | BLE_Zigbee_Dyn | Simple ST proprietary application to use the STM32WB as a Peripheral and GATT Server on BLE side and concurrently setting a Zigbee OnOff application on Zigbee side. |
| BLE_Zigbee_Dyn_SED | Same as the above BLE_Zigbee_Dyn application with a Zigbee RFD SED OnOff application allowing to demonstrate the low power capability of the concurrent Zigbee BLE solution. | |
| Zigbee BLE_Smart Home mesh solution | BLE mesh solution has been enhanced to add Zigbee on a demo with a total of 15 devices (6 BLE devices, 6 Zigbee devices, 1 bridge Zigbee-BLE, 1 Alexa, 1 smartphone). | |
| WB Static Zigbee Bluetooth® | BLE_Zigbee_Static | Same as the above BLE_Zigbee_Dyn application with a static choice of the application to be used (Either BLE or Zigbee). |
The concurrent ZigbeeDirect (ZigbeeDirect_OnOff) application is plug and play using this smartphone infrastructure application:
- Ubisys Smart Home Application
The concurrent Zigbee-BLE applications are plug and play using those smartphone ST infrastructure Applications:
- ST BLE Toolbox Application[1]
- ST BLE Sensor Application
More BLE information is available on ST website: BLE smartphone applications stm32mcu[2]
2. STM32WB-WBA BLE_Zigbee Concurrent Application Footprint
2.1. STM32WBA6 BLE_Zigbee Concurrent Application Footprint
For BLE_Zigbee Memory allocation using the Advanced Memory Manager (AMM) is described on this page: STM32CubeWBA: Memory management - stm32mcu.
For the BLE_HeartRate_Zigbee application and the ZigbeeDirect_OnOff application on NUCLEO-WBA65RI, here are the details of the memory footprint. A BLE application and two Zigbee applications are also provided for an easy comparison. Table has been generated with STM32WBA Cube release v1.8.
| Project | LL_stack | LL_stack | BLE_Host_stack | BLE_Host_stack | BLE_stack | Application | Application | CSTACK | Heap | |
| Application NUCLEO-WBA65RI | IDE | Application | ROM Size (kb) | Ram Size (kb) | BLE_Host_Stack Name | ROM Size (kb) | Ram Size (kb) | ROM Size (kb) | Ram Size (kb) | Ram Size (kb) |
| BLE_HeartRate | EWARM | BLE_HeartRate | 75.698 | 7.961 | Full | 36.218 | 12.299 | 5.515 | 0.176 | 4.0 |
| BLE_HeartRate_Zigbee | EWARM | BLE_HeartRate_Zigbee | 126.401 | 11.269 | Full | 38.831 | 14.404 | 17.787 | 0.176 | 4.0 |
| ZigbeeDirect_OnOff | EWARM | ZigbeeDirect_OnOff | 126.669 | 11.262 | Full | 41.181 | 17.116 | 29.622 | 0.0 | 40.0 |
| ZigbeeDirect_OnOff_Server_Router_Identify | EWARM | ZigbeeDirect_OnOff_Server_Router_Identify | 51.899 | 5.968 | 0 | 0 | 6.022 | 0.176 | 4.0 | |
| Zigbee_OnOff_Client_Router | EWARM | Zigbee_OnOff_Client_Router | 52.196 | 5.968 | 0 | 0 | 5.443 | 0.176 | 4.0 |
| Framework | Framework | HEAP | MAC lib | MAC lib | ZIGBEE_Middleware | ZIGBEE_R23_STACK | ZIGBEE_R23_STACK | NVM | Total | Total | |
| Application NUCLEO-WBA65RI | ROM Size (kb) | Ram Size (kb) | Ram Size (kb) | ROM Size (kb) | Ram Size (kb) | ROM Size (kb) | ROM Size (kb) | Ram Size (kb) | ROM Size (kb) | ROM Size (kb) | Ram Size (kb) |
| BLE_HeartRate | 21.837 | 0.857 | 0 | 0 | 0 | 0 | 0 | 0 | 2.706 | 142.477 | 28.577 |
| BLE_HeartRate_Zigbee | 52.849 | 9.585 | 0 | 9.381 | 3.265 | 0.551 | 227.034 | 1.034 | 4.229 | 477.674 | 133.466 |
| ZigbeeDirect_OnOff | 73.036 | 10.273 | 0 | 9.385 | 3.265 | 3.519 | 229.451 | 2.187 | 4.742 | 518.341 | 146.014 |
| ZigbeeDirect_OnOff_Server_Router_Identify | 47.42 | 73.374 | 64.0 | 9.383 | 3.265 | 2.984 | 227.044 | 1.034 | 0 | 345.373 | 152.805 |
| Zigbee_OnOff_Client_Router | 53.856 | 73.374 | 64.0 | 9.383 | 3.265 | 0.5 | 227.044 | 1.034 | 0 | 349.04 | 152.746 |
2.2. STM32WB BLE_Zigbee Concurrent Stack Footprint link
STM32WB Zigbee memory requirements - stm32mcu is the dedicated WB page where you find the footprint of the M0 stm32wb5x_BLE_Zigbee_FFD_dynamic_fw (for BLE_Zigbee_Dyn), for the M0 stm32wb5x_BLE_Zigbee_RFD_dynamic_fw (for BLE_Zigbee_Dyn_SED), and for the stm32wb5x_BLE_Zigbee_FFD_static_fw (for BLE_Zigbee_Static).
3. Going further based on available application
3.1. BLE_HeartRate_Zigbee Application on STM32WBA65RI-Nucleo
The BLE_HeartRate_Zigbee application is a dual-protocol demonstration for the STM32WBA65RI-Nucleo board, showcasing the microcontroller’s ability to run both Bluetooth® Low Energy (BLE) and Zigbee stacks concurrently. The application simulates a Heart Rate Sensor over BLE and a Zigbee Device (ZD), allowing developers to explore wireless interoperability and resource sharing on a single MCU.
3.1.1. Architecture
1. Hardware Platform
- Board: STM32WBA65RI-Nucleo
- MCU: STM32WBA65 (Arm Cortex-M33, integrated BLE/Zigbee radio)
- Peripherals: LEDs, push-buttons, UART (for debugging)
2. Software Components
- BLE Stack: Implements the BLE standrad stack :stm32wba_ble_stack_basic.a
- Zigbee Stack: Implements Zigbee standard stack : ZigBeeProR23_FFD.a
- RTOS: bare-metal scheduling
- Application Layer: Manages both BLE and Zigbee
3.1.2. Functional Description
1. BLE Heart Rate Service
- Role: Peripheral (Heart Rate Sensor)
- Profile: Heart Rate Profile (HRP)
- Services:
- Heart Rate Service (UUID: 0x180D)
- Heart Rate Measurement (notifies clients)
- Body Sensor Location (read)
- Heart Rate Control Point (write)
- Heart Rate Service (UUID: 0x180D)
- Operation:
- On startup, advertises as a Heart Rate Sensor.
- It accepts connections from BLE Central devices (e.g., smartphone).
- It periodically sends simulated heart rate measurements via notifications.
2. Zigbee End Device
- Role: Zigbee End Device (ZED)
- Cluster: OnOff cluster (for demonstration)
- Operation:
- On startup, joins a Zigbee network (requires a Zigbee Coordinator).
- Can send/receive basic Zigbee commands (e.g., attribute reporting).
- May use push-buttons to trigger Zigbee messages and OnOff LED toggling.
3. Dual-Protocol Operation
- Radio Time-Sharing: The application uses a scheduler to alternate radio access between BLE and Zigbee, ensuring both stacks can operate without interference.
- Event Handling: Interrupts and callbacks are used to handle BLE events (connections, notifications) and Zigbee events (network join, data received).
- Resource Management: Shared resources (e.g., radio, RAM) are managed to prevent conflicts.
3.1.3. Workflow
- Initialization
- System clock, peripherals, and radio are initialized.
- BLE and Zigbee stacks are started.
- Application state machines are set up.
- BLE Advertising & Zigbee Network Join
- BLE: Starts advertising as a Heart Rate Sensor. Note that Zigbee can start first.
- Zigbee: Attempts to join a Zigbee network as an End Device.
- Connection & Communication
- BLE: When a central device connects, periodic heart rate notifications are sent.
- Zigbee: After joining, the device can send/receive Zigbee messages (e.g., on button press).
- Concurrent Operation
- The scheduler ensures BLE and Zigbee events are processed in a timely manner.
- Radio is dynamically switched between BLE and Zigbee as needed.
- User Interaction
- LEDs indicate BLE/Zigbee status (e.g., advertising, connected, network joined).
- Push-buttons can trigger Zigbee messages or simulate heart rate changes.
- Debugging & Logging
- UART output provides real-time logs for BLE and Zigbee events.
3.1.4. Key Features
- Simultaneous BLE and Zigbee operation on a single MCU.
- Heart Rate Profile simulation for BLE interoperability testing.
- Zigbee Device functionality for mesh networking demonstrations.
- Efficient radio time-sharing and resource management.
- User feedback via LEDs and push-buttons.
- Extensible codebase for further development and integration.
3.1.5. Typical Use Case
- Power on the Nucleo board.
- BLE: Connect with a smartphone app (e.g., ST BLE Toolbox) to receive heart rate notifications.
- Zigbee: Join a Zigbee network (with a coordinator running, e.g., on another STM32 board or a PC dongle).
- Observe: Both BLE and Zigbee operate concurrently, with status indicated by LEDs and logs.
3.2. STM32WBA Zigbee_Direct_OnOff
The Zigbee Direct application is available in STM32CubeWBA release on the NUCLEO-WBA65RI board. The whole application Zigbee_Direct_OnOff is detailed on a specific ZigbeeDirect chapter with Ubisys Smart Home Application Zigbee Direct Setup - stm32mcu.
The next chapters allow to compare Zigbee Direct versus a Concurrent BLE-Zigbee method.
3.3. STM32WB BLE-Zigbee Dynamic
Details for the BLE_Zigbee Dynamic application are available in this bellow table, with dedicated existing wiki pages.
| Application | Link to dedicated page or Detailled Description | |
|---|---|---|
| WB Concurrent Dynamic | BLE_Zigbee_Dyn | Link to the STM32WB55 concurrent application using Zigbee: BLE_Zigbee_Dyn
Other wiki pages are available for BLE and Zigbee on STM32WB dual core. Introduction to Bluetooth® LE with STM32 - stm32mcu |
| BLE_Zigbee_Dyn_SED | Same as the above BLE_Zigbee_Dyn application with a Zigbee RFD SED OnOff application allowing to demonstrate the low power capability of the concurrent Zigbee BLE solution. | |
| Zigbee BLE_Smart Home mesh solution | BLE mesh solution has been enhanced to add Zigbee on a demo with a total of 15 devices (6 BLE devices, 6 Zigbee devices, 1 bridge Zigbee-BLE, 1 Alexa, 1 smartphone). Link to the demo: Zigbee BLE_Smart Home mesh solution |
3.4. STM32WB BLE-Zigbee static
This chapter is adding additional details on the BLE_Zigbee_static application.
3.4.1. BLE_Zigbee_static Software Components
- BLE Stack: Handles Bluetooth Low Energy communication.
- Zigbee Stack: Manages Zigbee protocol operations.
- Middleware: Manages inter-protocol communication and resource sharing.
- Application Layer: Implements user logic for both BLE and Zigbee.
3.4.2. BLE_Zigbee_static Application Workflow
Initialization
- System Initialization: Hardware abstraction layer (HAL) and system clocks are configured.
- Wireless Stack Initialization: The M0+ core is started, and the wireless firmware is loaded.
- BLE and Zigbee Stack Initialization: Both stacks are initialized with static memory allocation.
BLE Operation
- Advertising: The device advertises itself as a BLE peripheral.
- Connection Handling: On connection, it exposes GATT services (e.g., LED control, sensor data).
- Notification/Indication: Supports sending notifications to connected BLE clients.
Zigbee Operation
- Network Join: The device attempts to join a Zigbee network as an end device.
- Command Handling: Receives and processes Zigbee commands (e.g., toggle LED).
Inter-Protocol Coordination
- Setup Switching: Application layer process cleanup in case of switching from BLE to Zigbee or from Zigbee to BLE
Example Use Case
Scenario: A user connects to the STM32WB device via BLE using a smartphone app to read sensor data, while the device is also part of a Zigbee network, receiving commands from a Zigbee coordinator to control an onboard LED.
Workflow:
- Device powers up, initializes both stacks.
- BLE advertises; user connects via smartphone.
- Zigbee joins the network; coordinator sends a command.
- Device receives Zigbee command to toggle LED.
- Device notifies BLE client of LED state change.
3.4.3. BLE_Zigbee_static Building and Running the Application
Prerequisites
- STM32CubeIDE or IAR Embedded Workbench
- STM32WB Nucleo-55 board
- STM32CubeWB firmware package
- Smartphone with BLE app (e.g., ST BLE Sensor)
- Zigbee coordinator (e.g., another STM32WB board or a Zigbee USB dongle)
Steps
- Import the BLE_Zigbee_static project from the STM32CubeWB firmware package.
- Build the project in your IDE.
- Flash the binary to the Nucleo-55 board.
- Monitor output via UART or debugger.
- Test BLE: Connect with a BLE app, interact with GATT services.
- Test Zigbee: Join a Zigbee network, send commands from the coordinator.
4. References