STM32WB BLE MESH Vendor Model

Revision as of 16:53, 24 August 2021 by Registered User (→‎Vendor Model Code Description TODO)

1. Technical Description

This page describes the functioning of the BLE Mesh Vendor Model Project and how to handle it.

A quick description of the BLE Mesh Vendor Model is available in the following Application Note:

Further information about the Vendor Model are available in chapter 3 of this page.

This project demonstrates STM32WB application capabilities using BLE-Mesh solution and with a sensor module and using specific Vendor commands. The goal of the application is to indicate the temperature measured by the discovery kits using the STM32WB55 and a LED bar connected on it.

Project Overview

To realize this project, we use two Discovery Kits including temperature and time of flight sensors, and two STM32WB55 boards. In addition, we have the possibility to add USB dongles as relay nodes.

The temperature is sent periodically on the Mesh network by the discovery kits. The LED bar changes color regarding the temperature, from blue for cold temperature to red for high temperature.

BLE Mesh Vendor Project Description

Each Nucleo boards have a RGB LED bar connected to it, which reflect the temperature measured in their respective rooms, and implement a Vendor Server Model.
The Discovrery Kits include temperature sensors and can be placed far from the user, for example in different rooms, and implement a Vendor Server Model.
The temperature is measured and sent to the STM32WB through BLE-Mesh Vendor Commands to update the LEDs status periodically.

2. Demonstration Setup

2.1. Device Requirement

Required material to setup the demonstration is the following:

  • 2 STM32WB55RG : as temperature information boards
  • 2 Blinkt! LED: RGB LED bar
  • 2 Discovery Kit : As temperature sensing boards
  • 1 or more USB Dongles (Optional) : As relay nodes. Can be bought with the in the Nucleo boards in the ST Nucleo Pack.
  • 1 Smartphone with Android or iOS

Click on Component Hyperlink to see resellers.

2.2. BLINKT LED Connection

Connect the LED bar to CN7 connector (left side of the board). The rounded edges of the LED bar must be placed towards the inside of the board. Let 7 Pins free from the beginning of CN7 connector, the LED will be connected from PIN15.

LED Bar Connection

2.3. Software Patch

Thermometer Application for Discovery Kit can be found on latest STM32CubeWB release :

Project BLE Mesh Thermometer - STM32WB5MM-DK



The Nucleo LED Indicator project is not included in this package as it required external Drivers.

A patch is available to include the Nucleo LED Indicator project and his dependencies to the Firmware package v1.12.0: STM32Cube_FW_WB_BLEMeshVendorThermometer_DEMO_V1.12.0.exe

Launch this .exe file and follow the instructions. In the Select Destination Location step, select the path to your Firmware Package.

Note: be careful to remove the \New Folder added automatically at the end of the path you selected

3. Architecture

3.1. Firmware Architecture

3.2. Vendor Model Code Architecture

4. Vendor Model Code Description TODO

  1. Setup your nodes and enable the Vendor Model
  2. Define your Vendor Command
  3. Publish a Vendor Command

5. Demonstration Handle TODO

  1. Flash your boards with the different node projects.
    Ensure your boards are un-provisioned by pressing RESET (1) and B1 (2) buttons simultaneously, release RESET and keep B1 pressed until the LED1 (3) is blinking:
  2. Launch the Smartphone application and add the different nodes to the network:
    Sensor Server Node:
    - Provision and Configure:

    - Rename the node:

    Sensor Client Node:
    - Provision and Configure:

    - Select the Client Subscription and Publication Addresses:

    - Rename the node:
  3. Launch the Smartphone application and add the different nodes to the network:
    - Pressing user button 1 of the Client board send a SENSOR_GET request to the Sensor Server
    - The Sensor Server receive the request and Reply with the required sensor data
    - The Client decode the data and displays it on his terminal