1. Introduction
The transparent mode or DTM (direct test mode) application is used to:
- receive commands on UART RX and propagate them to the Bluetooth® Low Energy stack.
- transmit events from Bluetooth®Low Energy stack on UART TX.
A set of commands/events are sent though the STM32WB0 UART to control the Bluetooth® Low Energy stack via the transparent mode application.
Level shifter, VCP ST-LINK or applicative VCP can be used to manage transmission and reception.
2. Requirements
2.1. Software and Hardware requirements
For software and hardware requirements refer to STM32WB0 Build BLE Project wiki page.
3. Transparent mode example description
3.1. Project directory
The "BLE_TransparentMode" and "BLE_TransparentMode_C_O" applications are available by downloading the STM32CubeWB0 MCU Package[1].
Refer to the How to Build a Bluetooth® LE project wiki page for information on the project directory.
3.2. Project description
3.2.1. Bluetooth® Low Energy host stack
The transparent mode application (BLE_TrasparentMode) uses the Bluetooth® LE Host + Controller Stack library (stm32wb0x_ble_stack.a). It also requires libcrypto.a binary library to work.
This configuration supports all the available ACI and HCI commands, as well as Bluetooth® Low Energy features.
There is also a variant of the transparent mode application (BLE_TrasparentMode_C_O) which uses the Bluetooth® LE Controller Only Stack library (stm32wb0x_ble_stack_controller_only.a).
This configuration supports all the available HCI commands.
For further information on the Bluetooth® Low Energy host stack library and the different Bluetooth® Low Energy stack configurations for STM32WB0 projects, refer to Bluetooth® Low Energy stack v4.x programming guidelines
3.2.2. Software project structure
Find below the software project structure and its main parts:
Transparent mode project structure | |
---|---|
BLE_TrasparentMode | BLE_TrasparentMode_C_O |
WARNING: Do not modify the files in the Middlewares folder |
3.2.3. Application initialization
Find below the different steps of the application initialization:
3.3. Build and install
Follow the steps described in Bluetooth® LE Build and Install Application page, and apply them to the STM32WB0 BLE_TransparentMode project.
3.4. How to use the Bluetooth® Low Energy transparent mode application
Once the Bluetooth® Low Energy transparent mode application is installed on the STM32WB0 platform, launch the STM32CubeMonitor-RF [2] application on the computer connected to the platform via USB.
3.4.1. STM32CubeMonitor-RF interface
From the STM32CubeMonitor-RF interface, select the COM port of the STM32WB0 Nucleo board, and click the CONNECT button:
Information on the platform and software is available under HCI_READ_LOCAL_VERSION_INFORMATION and ACI_HAL_GET_FIRMWARE_DETAILS:
ACI utilities allows the user to easily launch an advertising or a scan sequence:
STM32CubeMonitor-RF advertising and scan sequences |
---|
3.4.2. Vendor-specific commands
Vendor-specific commands have been developed to read the device information, and read/write registers from the command interface:
- ACI_HAL_GET_FIRMWARE_DETAILS
Transparent mode vendor-specific commands | ||||
---|---|---|---|---|
Command name | HCI packet indicator | OCF | Description | Parameter |
ACI_HAL_GET_FIRMWARE_DETAILS | 0x01 | 0xFC01 | Return BLE_TransparentMode/DTM version & variant; Return Bluetooth LE stack version & variant. |
N/A |
4. References