STM32CubeWBA Bluetooth® LE MCU Package


Click here for Bluetooth® Low Energy Overview

1. Introduction

The STM32CubeWBA MCU Package[1] provides software components running on STM32WBA Series MCUs.
For all examples provided with the package, the following integrated development environments are supported:

  • STMicroelectronics integrated development environment for STM32 products (STM32CubeIDE)
  • IAR Systems® IAR Embedded Workbench® for Arm® (EWARM)
  • Keil® Microcontroller Development Kit (MDK-ARM)


2. STM32WBA Bluetooth® LE software architecture

The single Core Arm® Cortex®-M33 STM32WBA Bluetooth® low energy solution is designed over a 3-level organization architecture:

  • Application firmware including Profiles & Services
  • Bluetooth® Low Energy Firmware Stack (Controller & Host) handling the link layer up to the generic attribute profile and generic access profile layers
  • STM32 Platform resources

more information regarding STM32WBA SW Architecture

separates the Bluetooth® Low Energy Profile and application, running on the application Cortex®-M4, from the Bluetooth® low energy real-time aspects residing in the Bluetooth® Low Energy Peripheral.

The Bluetooth® Low Energy peripheral incorporates a Cortex®-M0+ processor containing the Bluetooth® Low Energy STACK handling the link layer up to the generic attribute profile and generic access profile layers. The STM32WBA Bluetooth® low energy architecture Link to WBA SW Architecture


3. STM32WBA Bluetooth® LE application

The following Bluetooth® LE applications are delivered as source code

Application Description
Bluetooth® LE SIG BLE_Beacon Application advertising different types of beacon: ibeacon, eddystone (tlm, uuid, url)
BLE_HealthThermometer Application supporting the Health Thermometer Sensor as specified by the Bluetooth® SIG
BLE_HeartRate Application supporting the Heart Rate Sensor as specified by the Bluetooth® SIG.
Operating System BLE_HeartRate_ThreadX Application supporting the Heart Rate Sensor with ThreadX implementation
Bluetooth® LE ST proprietary BLE_p2pServer & Multi Slave BLE_p2pClient Simple ST proprietary applications to manipulate proprietary Services & Characteristics with single connection or multi slave connections
BLE_p2pRouter ST proprietary application to use the STM32WBA as a GAP Central & Peripheral" and "GATT Client & Server with multi link connection
BLE_DataThroughput ST proprietary application to measure data throughput between 2 STM32WBA or with the dedicated ST Bluetooth® LE toolbox smartphone application (Android and IOS)
BLE_Fuota (Firmware Update Over The Air) ST proprietary application to upgrade the STM32WBA firmware
BLE_SerialCom ST proprietary application to simulate the previous Bluetooth® protocol "Serial Port Profile". The application is based on L2CAP Connection Oriented Channel (CoC)
BLE_p2pServer_Ext Application to configure up to 8 advertising extended sets
BLE_p2pClient_Ext Application to scan the extended advertising frames with extended API’s
BLE_TransparentMode ST proprietary application to support the Direct Test Mode for RF certification. Standard host controller interface (HCI) and application (vendor) controller interface (ACI) can be sent by means of STM32CubeMonitor-RF

4. Going further based on available application

Application Description
Bluetooth® LE Feature power consumption Measurement Explanation how to measure the power consumption with NUCLEO-WBA52CG development board
BlueST SDK v2


5. Manufacturer Advertising Data & BlueST SDK v2

5.1. Background and motivations

BlueST SDK v1 development has started in 2015 and it has grown over time with the addition of more and more functionalities that enable microcontroller firmware to advertise its capabilities and exchange data with mobile applications as well as industrial gateways via Bluetooth Low Energy.
BlueST SDK is shared as opensource code on multiple github repositories for Android, iOS and Python.
The STMicroelectronics vendor-specific advertisement allows declaring characteristics that are implemented by the device. A 4 byte feature mask is a bitfield where each bit represents a feature, e.g. accelerometer, temperature, freefall, compass etc. In the vendor-specific advertisement, 1 byte is used to indicate the evaluation board model.
As firmware packages and board models grow in number and supported functionalities, a new mechanism is needed to overcome the 4 bytes feature mask limitations.
The main purpose of the BlueST SDK v2 protocol is allowing a client to recognize the board type and the firmware capabilities of the board in proximity and be future proof.
The mapping between Device ID / Firmware ID and the actual description of the firmware capabilities relies on a JSON document.

BlueST SDK v2 ^ BlueST SDK v1
STM32WBA Heart Rate Profile

5.2. BlueST SDK v2 & STM32WBA Bluetooth® LE Applications

The following STM32WBA Bluetooth® LE Applications use the BlueST SDK v2 protocol

BlueST SDK v2 protocol & STM32WBA Bluetooth® LE Applications
Byte Value Description
0 0x0F Length of STM specific advertisement data
1 0xFF Manufacturer specific advertisement data flag
2 0x30
3 0x00 0x0030 = STMicroelectronics
4 0x02 BlueSTSDK protocol version
5 --
0x8B
0x8C
Device ID
Nucleo-WBA
DiscoveryKit -WBA
6 --
0x83
0x85
0x87
0x88
0x89
Firmware ID
P2P Server
P2P Router
SerialCom Peripheral
DataThroughput Server
Heart Rate
7 0x00-0xFF Custom option byte 1
8 0x00-0xFF Custom option byte 2
9 0x00-0xFF Custom option byte 3
10-15 6 byte device MAC

6. References