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 within 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)

The Firmware Package for the STM32WBA series is also available on STM32CubeWBA github[2].

2. STM32WBA Bluetooth® LE software architecture

The single Core Arm® Cortex®-M33 STM32WBA Bluetooth® low energy solution is designed to develop application firmware including Profiles & Services on top of the Bluetooth® Low Energy Firmware Stack (Controller & Host) handling the link layer up to the generic attribute profile and generic access profile layers.

STM32WBA Bluetooth® LE architecture
Connectivity WBA SW Architecture.png
Info white.png Information
For more information regarding the STM32CubeWBA Software architecture, please visit this page.

3. STM32WBA Bluetooth® LE applications

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.
BLE_HID_Mouse Application supporting the Human Interface Device as specified by the Bluetooth® SIG.
Bluetooth® LE Audio BLE_Audio_PBP Public Broadcast Profile as specified by the Bluetooth® SIG
BLE_Audio_TMAP Telephony and Media Audio Profile 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 update 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_p2pServer_TZ Application similar to BLE_p2pServer with the TrustZone being activated and the Blue LED being connected to the Secure side of the MCU.
BLE_Power_Peripheral & BLE_Power_Central Simple ST proprietary applications to measure low power system consumption with different configurations (Advertising, Connected, Packets transfer)
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. Manufacturer Advertising Data & BlueST SDK v2

4.1. Background and motivations

BlueST SDK v1 development started in 2015 and 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[3] 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 bytes 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 to allow a client to recognize the board type and the firmware capabilities of the board in proximity and to be future proof.
The mapping between Board ID / Firmware ID and the actual description of the firmware capabilities relies on a JSON document[4].

BlueST SDK v1 vs BlueST SDK v2
BlueST SDK v1 vs BlueST SDK v2

4.2. BlueST SDK v2 & STM32WBA Bluetooth® LE Applications

As described below, some of the 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 --
0x81
0x82
0x83
0x84
0x85
0x8B
0x8C
Board ID
Nucleo - WB55
DiscoveryKit - WB5M
USB-Dongle-WB55
Nucleo - WB15
DiscoveryKit - WB1M
Nucleo - WBA5x
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 Bluetooth Device Adress

5. References