1. Presentation
This page describes how to quickly handle BLE-MeshLightingPRFNode example.
This project can be found on latest STM32CubeWB MCU Package[1], and generates a basic Node supporting Proxy-Relay-Friend features.
It is a good introduction to handle and have a first approach of ST BLE-Mesh solution.
PRF Node project directory |
---|
Some of the following information can be retrieved in the STM32WB BLE-mesh hands-on[2] video .
2. Functioning
BLE-MeshLightingPRFNode project demonstrates STM32WB application capabilities using ST BLE-Mesh with basic models.
PRF-Node project description |
---|
3. Getting Started
BLE-MeshLightingPRFNode project implement a BLE-mesh Node supporting Proxy, Relay and Friend features, these features are sufficient to setup a first mesh Network, see BLE mesh page.
3.1. Requirements
Software and System requirements
Software and System requirements are listed in the ST BLE-Mesh Application Note[3].
Hardware requirements
A Nucleo board[4] is necessary to setup the demonstration.
STM32WB Nucleo board |
---|
More details about the board and other hardware required are available in the Application Note[3], or in the online ST BLE-Mesh MOOC[5].
3.2. UART Interface
The board is connected to a PC via a USB connection. Use any convenient software terminal to open the serial communication port of the PC to check the messages from the board. Select your Serial port and setup your connection as follow (example done with Tera Term software).
Set a new serial connection to the ST platform:
Tera Term setup (1/2) |
---|
Setup your serial connection as below:
Tera Term setup (2/2) |
---|
Once the board is connected and the terminal window setup, press the reset button of the board. The following messages are printed to the virtual COM window when the firmware starts successfully:
Terminal logs at startup |
---|
3.3. Build and install the application
Details about application build and installation are given into the Application Note[3].
However, some more details about the build process using STM32Cube IDE are available below.
Launch the Cube IDE .project of the demonstration, ensure your project is correctly visible into Project Explorer view.
CubeIDE: project file |
---|
Build you project by reproducing the following steps:
CubeIDE: build project |
---|
Flash it on the board:
CubeIDE: flash project |
---|
3.4. Install the application from Cube Programmer
It is either possible to flash the previously build binary using STM32CubeProgrammer software[6].
Select your device and connect to it:
CubeProgrammer: board connection |
---|
Once connected, device information is displayed on Cube Programmer interface.
Click on programming icon, in the left column, and select the project binary to flash (here BLE_MeshLightingPRFNode.hex).
Then, click ok Start Programming button:
CubeProgrammer: flash project |
---|
When the programming is complete the following logs are displayed:
CubeProgrammer: logs |
---|
3.5. Application Handle
A full description of the smartphone applications can be found on the Android Application User Manual[7], and the iOS Application User Manual[8].
Ensure the board is un-provisioned by pressing RESET (1) and SW1 (2) buttons simultaneously, release RESET and keep SW1 pressed until the LED1 (3) is blinking:
STM32WB Nucleo un-provisioning process |
---|
Launch the ST BLE Mesh smartphone application, the illustrations below are based on the Android version of the application.
Provision the device:
BLE mesh application: provisioning steps |
---|
Configure the device using Quick Configuration Button, select the App Key and set the publication and subscription addresses:
BLE mesh application: configuration steps |
---|
The node is now provisioned. You can click on the first settings button to rename the node. The second button to access the elements and models setup. This allows to change the subscription and publication addresses for each model.
BLE mesh application: node renaming |
---|
If an issue occurs during provisioning, for example the App Key binding failed for one or more models, you can bind the App Key from this interface, and change the publication/subscription addresses.
BLE mesh application: address binding |
---|
From the Node interface, you can send a Generic OnOff command to pilot the board LED (1). You can also switch to the model interface, where you can select the model available on the nodes of your network. Generic Model interface allows to play with the Generic OnOff (2), Generic Level (3) and Generic Power OnOff (4) commands. Lighting Model interface allows to play with the Light Lightness Commands (5) and (6).
BLE mesh application: Generic and Lightness interfaces |
---|
You can add several nodes to your network by repeating the provisioning process on other boards.
BLE mesh application: nodes interface |
---|
You can find complementary information in the Hands-on[2] video.
4. References
- ↑ STM32CubeWB MCU Package
- ↑ 2.0 2.1 STM32WB BLE MESH hands-on
- ↑ 3.0 3.1 3.2 AN5292 - How to build a Bluetooth® Low Energy mesh application for STM32WBx5 line microcontrollers
- ↑ P-NUCLEO-WB55 Pack
- ↑ STM32WB Networking – BLE MESH MOOC
- ↑ STM32CubeProgrammer
- ↑ UM2180 - Getting started with the ST BLE-Mesh Android application
- ↑ UM2361 - Getting started with the ST BLE-Mesh iOS application