Revision as of 16:23, 8 October 2021 by Registered User (Copied from ST BLE-Mesh Lighting Example, revision 14891)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

1. BLE-Mesh Lighting Example

1.1. Presentation

This page describes how to quickly handle a first ST BLE-Mesh example.

Some of the following information can be retrieved in the linked video: STM32WB BLE MESH hands-on
ST BLE-Mesh examples can be found on latest STM32Cube_FW_WB package:

BLE-MeshLightingPRFNode project generates a basic Node supporting Proxy-Relay-Friend features, this project is the easier to handle and have a first approach of ST BLE-Mesh solution.

BLE-MeshLightingLPN project generates a basic Low Power Node, which requires a Friend Node into the network to receive messages, see Friendship page for more information.

BLE-MeshLightingProvisioner project generates a basic node managing ST proprietary solution of Embedded Provisioner, this Node can configurate itself and provision other nodes into the mesh network.

1.2. Functioning

For the project description, we focus on the BLE-MeshLightingPRFNode project as it is the simplest demonstration to handle.

This project demonstrates STM32WB application capabilities using ST BLE-Mesh with basic models.


1.3. Getting Started

For a first test of the ST BLE-Mesh solution, BLE-MeshLightingPRFNode project should be the best demonstration to handle.

1.3.1. Requirements

Software and System requirements Software and System requirements are listed in the ST BLE-Mesh Application Note: AN5292 - How to build a Bluetooth® Low Energy mesh application for STM32WBx5 line microcontrollers

Hardware requirements A Nucleo board ( STM32WB55RG) is necessary to setup the demonstration.

More details about the board and other hardware required are available in the Application Note: AN5292 - How to build a Bluetooth® Low Energy mesh application for STM32WBx5 line microcontrollers
Or in the online ST BLE-Mesh MOOC: STM32WB Networking – BLE MESH MOOC

1.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:

Setup your serial connection as below:

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:

1.3.3. Build and install the application

Details about application build and installation are given into the Application Note: AN5292 - How to build a Bluetooth® Low Energy mesh application for STM32WBx5 line microcontrollers
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.

Build you project by reproducing the following steps:

Flash it on the board:


1.3.4. Install the application from Cube Programmer

It is either possible to flash the previously build binary using STM32CubeProgrammer software: STM32CubeProgrammer

Select your device and connect to it:

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:

When the programming is complete the following logs are displayed:


1.3.5. Application Handle

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:

Launch the ST BLE Mesh smartphone application, the illustrations below are based on the Android version of the application.

Provision the device:

Configure the device using Quick Configuration Button, select the App Key and set the publication and subscription addresses:

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.

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.


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

You can add several nodes to your network by repeating the provisioning process on other boards.

You can find complementary information in the following video: STM32WB BLE MESH hands-on