STMicroelectronics UM2295 User manual

Introduction
BlueNRG-Mesh connects multiple BLE (Bluetooth Low Energy) devices in Mesh networking for IoT (Internet of Things)
solutions. It integrates BlueNRG products with embedded Bluetooth Low Energy communication in a powerful, range-extending
Mesh network with true full-duplex communication.
The solution contains the core functionality for secure communication and provides the flexibility you need to build applications.
It uses BlueNRG-2, BlueNRG-1, BlueNRG-MS devices with Mesh stack APIs and related event callbacks. The SDK provides
the Mesh stack in library form and a sample application in source code to demonstrate how to use the library.
BlueNRG-Mesh can be used in several applications requiring infrequent data transfer in a mesh network over Bluetooth Low
Energy, to create distributed control systems such as:
• smart lighting
• home and building automation
• industrial automation
A demo example is available for the device evaluation boards. You can use it to change the application interface and use the
library for the required hardware and software functionalities. The demo application is available for the following evaluation
boards:
•STEVAL-IDB008V1 and STEVAL-IDB008V2 for BlueNRG-2
•STEVAL-IDB007V1 for BlueNRG-1
•X-NUCLEO-IDB05A1 and NUCLEO-L152RE for BlueNRG-MS
The sample application implements Smart Light control scenario, which you may modify according to your requirements.
Getting started with the ST BlueNRG-Mesh embedded firmware
UM2295
User manual
UM2295 - Rev 1 - February 2018
For further information contact your local STMicroelectronics sales office.
www.st.com

1Getting started
The sample application implements a smart lighting control scenario. To modify the application, you need to follow
the sequence below.
Step 1. Connect the board to the PC
Step 2. Compile the firmware in IDE
Step 3. Flash the firmware to the board
Step 4. Provision the board in the BlueNRG-Mesh app
Step 5. Toggle LED on board using the app
1.1 Hardware requirements
The following boards can be used for evaluation of the ST BlueNRG-Mesh solution.
Table 1. Hardware requirements
Devices Evaluation boards Description
BlueNRG-2 STEVAL-IDB008V1 and
STEVAL-IDB008V2
Evaluation platform based on the BlueNRG-2
BlueNRG-1 STEVAL-IDB007V1 Evaluation platform based on the BlueNRG-1
BlueNRG-MS X-NUCLEO-IDB05A1 Bluetooth Low Energy expansion board based on the SPBTLE-RF module
for STM32 Nucleo
NUCLEO-L152RE STM32 Nucleo-64 development board with the STM32L152RE MCU,
supports Arduino™ and ST morpho connectivity
1.2 Board interfaces
The following table explains the details of the evaluation boards for the power requirement, programming and
user interface, for example LEDs and buttons.
Table 2. Evaluation board details
Devices Evaluation
boards
Powered by Programmed by LEDs Buttons
BlueNRG-2 STEVAL-
IDB008V1 and
STEVAL-
IDB008V2
Micro-B
USB Cable
Or AAA x 2 battery
External ST-LINK/V2 or
USB port
3x user LEDs +1
power indication
Reset button + 2 x
user buttons
BlueNRG-1 STEVAL-
IDB007V1
Micro-B USB cable
or AAA x 2 battery
External ST-LINK/V2 or
USB port
3x user LEDs +1
power indication
Reset button +2 x
user buttons
BlueNRG-MS X-NUCLEO-
IDB05A1
Mini-USB cable In-Built STLINK on the
STM32 Nucleo board
1 user LED +1
power indication
Reset button + 1 x
user buttons
NUCLEO-
L152RE
1.3 STEVAL-IDB008V1 or STEVAL-IDB008V2 BlueNRG2 board setup
To connect the STEVAL-IDB008V1 or STEVAL-IDB008V2 (BlueNRG-2 evaluation board) and PC, a USB port is
required to provide power supply to the board. To connect the ST-Link/V2 debugger, an additional USB port is
needed.
UM2295
Getting started
UM2295 - Rev 1 page 2/35

Note: The BlueNRG-2 device on these boards is clocked at 32 MHz XTAL. These settings are performed in project
configurations.
Figure 1. Connection between the STEVAL-IDB008V1 or STEVAL-IDB008V2 and PC
RELATED LINKS
4.1 BlueNRG cold start configuration on page 14
1.4 STEVAL-IDB007V1 BlueNRG1 board setup
To connect the STEVAL-IDB007V1 (BlueNRG-1 evaluation board) and PC, one USB port is required to provide
power supply to the board. To connect the ST-Link/V2 debugger, an additional USB port is needed.
Note: Please note that the BlueNRG-1 on this evaluation board is clocked by 16 MHz XTAL. These settings are
performed in project configurations.
UM2295
STEVAL-IDB007V1 BlueNRG1 board setup
UM2295 - Rev 1 page 3/35

Figure 2. Connection between the STEVAL-IDB007V1 and PC
RELATED LINKS
4.1 BlueNRG cold start configuration on page 14
1.5 NUCLEO-L152RE plus X-NUCLEO-IDB05A1 board setup
Connect the STM32 NUCLEO-L152RE + X-NUCLEO-IDB05A1 (BlueNRG-MS board) thanks to a USB cable. The
USB cable is used for two purposes:
1. Providing power supply to the NUCLEO-L152RE + X-NUCLEO-IDB05A1 board
2. Helping in serial communication of data between the PC and the boards NUCLEO-L152RE + X-NUCLEO-
IDB05A1
The STM32 NUCLEO-L152RE board integrates the ST-LINK/V2-1 debugger/ programmer. You can download the
relevant version of the STSW-LINK009 ST-LINK/V2-1 USB driver (according to your version of Windows).
Note: Ensure that BlueNRG-MS is updated with BLE stack version 7.2 c or higher. You can use BlueNRG GUI to
manage the update.
UM2295
NUCLEO-L152RE plus X-NUCLEO-IDB05A1 board setup
UM2295 - Rev 1 page 4/35

Figure 3. STM32 NUCLEO-L152RE plus X-NUCLEO-IDB05A1 connection with PC
1.6 System requirements
The minimum requirements to set up the software environment and run the BlueNRG-Mesh smart lighting
application are:
• PC with Intel or AMD processor running one of the following Microsoft operating systems: Win XP SP3 Vista/
Windows 7
– At least 128 MB of RAM
–2 x USB ports
UM2295
System requirements
UM2295 - Rev 1 page 5/35

– 40 MB of hard disk space
•Development toolchains and compilers:
–Keil µVision v5.23
– IAR Embedded Workbench v7.80.4
Please read the system requirements and setup information provided by the IDE provider.
1.7 Installing STSW-BNRG-Mesh
1. Extract the contents of the package in a temporary directory
2. Launch the installer and follow the on-screen instructions
3. Install in suitable folder in your disk-drive
UM2295
Installing STSW-BNRG-Mesh
UM2295 - Rev 1 page 6/35

2Firmware structure
Figure 4. Firmware architecture
Applications
Middleware
Drivers
Utilities
C M S I S
Hardware Abstraction
Layer API
LED light demo
Custom applications
Cryptographic
library
BlueNRG-Core
stack
BlueNRG-Mesh
library
Board Support
Packages
NUCLEO-L152RE
X-NUCLEO-IDB05A1
BlueNRG-MS
STEVAL-IDB007V1 STEVAL-IDB008V1/V2
H a r d w a r e
BlueNRG-2
BlueNRG-1
The following folders are included in the package firmware folder:
• A Documentation folder with a compiled HTML file generated from the source code and detailed
documentation of the software components and APIs.
• A Drivers folder with HAL drivers and specific drivers for supported boards, hardware platforms, and
components, and the CMSIS vendor-independent hardware abstraction layer for the Cortex-M processor
series.
•A Middleware folder with libraries for Mesh and BLE communication.
Horizontal interaction between layer components is handled directly by calling the feature APIs, while
vertical interaction with the low level drivers is managed through specific callbacks and static macros
implemented in the library system call interface.
• A Projects folder contains the workspaces for IAR Embedded Workbench and Keil µVision integrated
development environments for the STEVAL-IDB008V1, STEVAL-IDB007V1 board and NUCLEO-L152RE
plus X-NUCLEO-IDB05A1 board.
The EWARM folder contains the workspace for IAR Embedded Workbench and MDK-ARM folder contains
the workspace for Keil µVision.
The source files in the folder bind the firmware layers to implement the functions that demonstrate Mesh
over BLE functionality.
UM2295
Firmware structure
UM2295 - Rev 1 page 7/35

Figure 5. Folders, sub-folders and contents of the package
2.1 Root folder
The figure below shows the root folder structure of the firmware package.
Figure 6. Root folder structure
2.2 Driver folder
This folder contains all low level drivers including peripheral drivers and HAL drivers corresponding to the
hardware.
UM2295
Root folder
UM2295 - Rev 1 page 8/35

Figure 7. Driver folder
2.3 Project folder
This folder contains the projects for IAR and Keil.
Figure 8. Project folder
2.4 Middleware folder
This folder contains the middleware for the project including pre-compiled Mesh library for the BlueNRG-2,
BlueNRG-1 and BlueNRG-MS + STM32L1.
UM2295
Project folder
UM2295 - Rev 1 page 9/35

Figure 9. Middleware folder
UM2295
Middleware folder
UM2295 - Rev 1 page 10/35

3Using the BlueNRG-Mesh demo
IAR Embedded Workbench and Keil µVision are used to debug and burn the firmware into the flash memory of
the STEVAL-IDB008V1, STEVAL-IDB007V1 and NUCLEO-L152RE+ X-NUCLEO-IDB05A1 boards.
3.1 Using binaries for BlueNRG-1 and BlueNRG-2
1. The pre-compiled binaries are available in Project\<Platform>\Application\<Demo>\Binary folder.
For example for BlueNRG-1, the path is “Projects\BlueNRG-1\Applications\Lighting_Demo\Binary”
2. These can be programmed in the device using different utilities available for the devices, such as the
BlueNRG-1 Flasher tool or ST-LINK Utility
3. Use "BlueNRG-1 Flasher" tool to program the (STEVAL-IDB007V1 or STEVAL-IDB008V1) boards
connected via micro-USB cable
4. Use "STSW-BNRG1STLINK: BlueNRG-1 ST-LINK utility for BlueNRG-1, BlueNRG-2 MCU” utility to program
boards via ST-LINK
Figure 10. Binaries for BlueNRG-1 and BlueNRG-2
3.2 Using binaries for the STM32L152 used with the BlueNRG-MS
1. The pre-compiled binaries are available in Project\<Platform>\Application\<Demo>\Binary folder
– For example, for BlueNRG-MS, the path is “Projects\BlueNRG-MS\Applications\Lighting_Demo\Binary
\STM32L152RE-Nucleo”
2. These can be programmed in the device using different utilities
3. Use “ST-LINK Utility” tool to program the boards (NUCLEO-L152RE) connected via mini-USB cable
4. Or, simply drag and drop the .bin file in the drive created by ST-LINK on the STM32 Nucleo board. The
binary will be programmed in the STM32L152 device on the Nucleo board
UM2295
Using the BlueNRG-Mesh demo
UM2295 - Rev 1 page 11/35

Figure 11. Overview of how to program the binary in the STM32L152RE MCU
3.3 Using the IAR and Keil projects
Figure 12. Overview
3.3.1 Using IAR project
1. Choose file→open→workspace. Select the project.eww file from the appropriate location. For example, for
the BlueNRG-1, the location is as follows:
–Embedded\Projects\BlueNRG-1\Applications\Lighting_Demo\EWARM\STEVAL-IDB007V1.
2. A project opens in the workspace. This project contains the information regarding your project files and
folders (driver files, application files, middleware, output files, etc.).
3. Build the program with Project→Make Option.
4. Press (download and debug) button to debug the code and flash it to the board.
UM2295
Using the IAR and Keil projects
UM2295 - Rev 1 page 12/35

5. Press go button to run the program.
Similarly, to use the BlueNRG-MS with boards X-NUCLEO-IDB05A1 and NUCLEO-L152RE, select the
project.eww from: Embedded\Projects\ BlueNRG-MS\Applications\Lighting_Demo\EWARM\STM32L152RE-
Nucleo.
3.3.2 Using Keil project
1. Click on File→Open. Select the project.uvprojx file from: Embedded\Projects\BlueNRG-1\Applications
\Lighting_Demo\MDK-ARM\STEVAL-IDB007V1.
2. To build the program, select Project→Build Target or simply click on the Build Target icon.
To debug the program, select Debug→Start/Stop Debug Session or click on the Start/Stop Debug Session icon.
To flash the program to the flash memory on the board click on the icon.
UM2295
Using the IAR and Keil projects
UM2295 - Rev 1 page 13/35

4Firmware initialization and configuration
This section describes the available function APIs for application development based on Mesh network over
Bluetooth Low Energy devices.
The Mesh over BLE library manages the following features:
•Creates the Mesh network between nodes
•Handles the unicast, broadcast addressing
• Manages the relay feature: all the packets whose destination address is for another node are re-transmitted
• Communication with devices for advanced features, such as provisioning and proxy service
• Handles the platform specific communication
The user application handles the following
• Initialization of the Mesh stack
• User callbacks required for the application
• Application handling
The following sections describe the requirements for initialization and configuration of the firmware.
4.1 BlueNRG cold start configuration
Concerning the BlueNRG-1 and BlueNRG-2 devices, certain parameters must be defined on BLE device
controller registers during the device initialization phase, after the device powers on:
•High speed crystal configuration: 32 or 16 MHz
• Low speed crystal source: external 32 kHz oscillator or internal RO
• SMPS: on or off (if on: 4.7 μH or 10 μH SMPS inductor)
The BlueNRG-1, BlueNRG-2 controllers are configured in the project C/C++ Preprocessor settings.
For example:
• for IAR, go to Project → Options → C/C++ Compiler → Preprocessor → Defined Symbols
• For Keil, go to Project → Options → C/C++ → Preprocessor Symbols → Define
The following symbols are used in the project: USER_DEFINED_PLATFORM=STEVAL_IDB007V1:
• HS_SPEED_XTAL=HS_SPEED_XTAL_16MHZ
• LS_SOURCE=LS_SOURCE_EXTERNAL_32KHZ
• SMPS_INDUCTOR=SMPS_INDUCTOR_10 uH.
These can be changed to suit your hardware design.
RELATED LINKS
1.3 STEVAL-IDB008V1 or STEVAL-IDB008V2 BlueNRG2 board setup on page 2
1.4 STEVAL-IDB007V1 BlueNRG1 board setup on page 3
4.2 Setting the transmit power of a node
You can define the transmit power of a node by initializing a callback to the Mesh library. It runs in the following
manner:
{
Appli_BleStackInitCb,
Appli_BleSetTxPowerCb,
Appli_BleGattConnectionCompleteCb,
Appli_BleGattDisconnectionCompleteCb,
Appli_BleUnprovisionedIdentifyCb,
UM2295
Firmware initialization and configuration
UM2295 - Rev 1 page 14/35

Appli_BleSetUUIDCb,
};
The Appli_BleSetTxPowerCb() calls the aci function to set the power aci_hal_set_tx_power_level(ui
nt8_t En_High_Power, uint8_t PA_Level);
By default, +4 dbm is configured in the nodes for BlueNRG-1 and BlueNRG-2; this can be changed by the user.
For BlueNRG-1 and BlueNRG-2, the following different settings are available in the firmware:
/* MACROS for Power Level definitions */
#define POWER_LEVEL_LOW 0
#define TX_POWER_LEVEL_MINUS_18DBM 0 // = -18 dBm,
#define TX_POWER_LEVEL_MINUS_15DBM 1 // = -15 dBm,
#define TX_POWER_LEVEL_MINUS_12DBM 2 // = -12 dBm,
#define TX_POWER_LEVEL_MINUS_9DBM 3 // = -9 dBm,
#define TX_POWER_LEVEL_MINUS_6DBM 4 // = -6 dBm,
#define TX_POWER_LEVEL_MINUS_2DBM 5 // = -2 dBm,
#define TX_POWER_LEVEL_0DBM 6 // = 0 dBm,
#define TX_POWER_LEVEL_PLUS_5DBM 7 // = 5 dBm.
#define POWER_LEVEL_HIGH 1
#define TX_POWER_LEVEL_MINUS_14DBM 0 // = -14 dBm,
#define TX_POWER_LEVEL_MINUS_11DBM 1 // = -11 dBm,
#define TX_POWER_LEVEL_MINUS_8DBM 2 // = -8 dBm,
#define TX_POWER_LEVEL_MINUS_5DBM 3 // = -5 dBm,
#define TX_POWER_LEVEL_PLUS_2DBM 5 // = 2 dBm,
#define TX_POWER_LEVEL_PLUS_4DBM 6 // = 4 dBm,
#define TX_POWER_LEVEL_PLUS_8DBM 7 // = 8 dBm
4.3 UART interface on the firmware
The boards can be connected to a PC via USB connection. Any terminal software (HyperTerminal, Hercules,
Putty, etc.) can be used to open the serial communication port on the PC to check the messages from the board.
The UART of the controller on the board is connected to the PC via a VCOM (virtual communication) port. The
settings to open the communication port are:
• Baud: 115200
• data size: 8
• parity: none
• stop bits: 1
• no hardware control
From the firmware main.c file, it can be seen that certain messages are printed to the VCOM
#if !defined(DISABLE_TRACES)
printf("BlueNRG-Mesh lighting demo v%s\n\r", MOBLE_VERSION);
printf("MAC Address = [%02x]:[%02x]:[%02x]:[%02x]:[%02x]:[%02x]
\n\r",bdaddr[5],bdaddr[4],bdaddr[3],bdaddr[2],bdaddr[1],bdaddr[0] );
#endif
After the board is connected and the terminal window is opened, press the reset button. If the firmware starts
successfully, the following messages are printed to the virtual com window
UM2295
UART interface on the firmware
UM2295 - Rev 1 page 15/35

Figure 13. VCOM window
In some evaluation boards, an error can be received. In this case, MAC address management section of the
document helps to meet this issue. Examples of bad MAC address are provided below
Figure 14. Bad MAC address
4.4 MAC address management
MAC address is required to be unique in each node for the Mesh network. The following options are available to
configure the MAC addresses of the node
Table 3. MAC address management
Number MAC address
management
Comments
1 Using external MAC
address
User can program the nodes with desired unique MAC address. This is stored at specific
location in the flash. It is user’s responsibility to make sure that the MAC address
programmed in the device is compliant to the requirements of the Bluetooth
communication.
To configure this, define the following macro in the project pre-processor.
EXTERNAL_MAC_ADDR_MGMT
2 Using unique serial
number of the device
It is possible to configure the MAC address of the device using the unique serial number
available in each device.
This is the default setting.
4.5 Button usage
Features
BlueNRG-1 and BlueNRG-2 (STEVAL-IDB007V1
and STEVAL-IDB008V1)
BlueNRG-MS (X-NUCLEO-IDB05A1 + NUCLEO-
L152RE)
Buttons LEDs Buttons LEDs
Mesh Lib error DL3 Blinks continuously LD2 Blinks continuously
Mesh Lib
library
successful
start
2 Blinks on DL3 NO Blinks
Provisioning DL3 Blinks for few times DL3 Blinks for few times
UM2295
MAC address management
UM2295 - Rev 1 page 16/35

Features
BlueNRG-1 and BlueNRG-2 (STEVAL-IDB007V1
and STEVAL-IDB008V1)
BlueNRG-MS (X-NUCLEO-IDB05A1 + NUCLEO-
L152RE)
Buttons LEDs Buttons LEDs
Un-
Provisioning
1. RESET + PUSH1
button pressed
2. Release RESET
button
3. Long press of
PUSH1 button
causes un-
provisioning
4. Reset the board
1. DL3 blinks and then
keeps glowing
during un-
provisioning
1. RESET + USER
button pressed
2. Release RESET
button
3. Long press USER
button causes un-
provisioning
4. Reset the board
LD2 Blinks and then
keeps glowing during un-
provisioning
Running the
demo from
board
1. Press PUSH1
button on any board
2. It will send the
command on
Publication Address
1. DL3 on the board
toggles (If
Subscribed for the
Published Address)
2. DL3 on other boards
(if subscribed for the
Published address)
will also toggle
1. Press USER
button on any
board
2. It will send the
command on
Publication
Address
1. LD2 on the board
toggles (If
Subscribed for the
Published Address)
2. LD2 on other
boards (if
subscribed for the
Published address)
will also toggle
OTA
(1)
1. Long Press PUSH2
2. RESET the Board
1. ONLY on BlueNRG-2
4.6 Initialization of application callbacks
The configuration of the application starts by initializing the callbacks required for the different events and
functionalities. These callbacks are used in the BlueNRG-Mesh library to call the functions based on specific
events or the library state machine.
{
Appli_LedBlinkCb,
Appli_LedStateCtrlCb,
Appli_WriteLocalDataCb,
Appli_ReadLocalDataCb
};
/* Callbacks used by BlueNRG-Mesh library */
BluenrgMesh_SetVendorCbMap(&vendor_cb);
The structure MOBLE_VENDOR_CB_MAP is used to initialize the vendor model for the application
implementation. The function BluenrgMesh_SetVendorCbMap(&vendor_cb);is used to initialize the different
callbacks in the library.
4.7 Initialization and main application loop
This procedure develops an application for Mesh over BLE on the BlueNRG platforms.
The following steps are for the BlueNRG-2 and BlueNRG-1 platforms. The procedure is similar for the BlueNRG-
MS platform, but with a few minor differences.
Step 1. Call the InitDevice() API.
This in turn calls the SystemInit() API to initialize the BlueNRG-1 device vector table, interrupt
priorities and clock. The initialization is run similarly for the BlueNRG-MS platform.
Step 2. Call the Appli_CheckBdMacAddr() API to check the validity of the MAC address.
UM2295
Initialization of application callbacks
UM2295 - Rev 1 page 17/35

If the MAC address is not valid, then the firmware is stuck in while(1) loop with LED blinking
continuously.
Step 3. Initialize the hardware callback functions for the BLE hardware.
You do this by updating MOBLE_USER_BLE_CB_MAP user_ble_cb =
{
Appli_BleStackInitCb,
Appli_BleSetTxPowerCb,
Appli_BleGattConnectionCompleteCb,
Appli_BleGattDisconnectionCompleteCb,
Appli_BleUnprovisionedIdentifyCb,
Appli_BleSetUUIDCb,
};
Step 4. These APIs are useful to have an application interface for BLE radio initialization and TxPower
configuration.
–Initialize GATT connection and disconnection callbacks for the application interface.
–BluenrgMesh_BleHardwareInitCallBack(&user_ble_cb) can be called to complete the
initialization of hardware callbacks.
Step 5. Initialize the BlueNRG-Mesh library by calling BluenrgMesh_Init(bdaddr).
In the event of an error, the demo firmware prints a message on the terminal window opened for the
VCOM port created by the USB connection available on the boards, and the Appli_LedBlinkCb()
API causes the LED to blink continuously.
Step 6. Check whether the device has been provisioned or not. A provisioned device has network keys and
other parameters configured in the internal flash memory.
Checks can be performed with BluenrgMesh_IsUnprovisioned() API.
If the Node is unprovisioned, BluenrgMesh_InitUnprovisionedNode() API initializes it.
If the device is already provisioned , then BluenrgMesh_InitprovisionedNode() API helps to
initialize the device.
Step 7. Print the messages to the terminal window for the nodes that are being initialised.
The message also prints the MAC address assigned to the node.
Step 8. Check the button state. To initialize the node to the unprovisioned state, hold down the user button.
When the unprovisioning button sequence is detected, the BluenrgMesh_Unprovision() API
erases all the network parameters configured in the internal memory of the device.
Once unprovisioning is complete, you need to reset the board.
Step 9. Initialize the vendor model callback functions that are triggered by the events.
BluenrgMesh_SetVendorCbMap(&vendor_cb);
Step 10. Process MoBLE and HCI events in while(1) loop.
The application must call BluenrgMesh_Process() in while(1) loop as frequently as possible.
This function calls BLE_StackTick() internally to process BLE communication.
Any application implementation shall be performed in the state-machine by non-blocking functions with
frequent calls to BluenrgMesh_Process().
Step 11. Check for user-inputs or buttons regularly for any action to take.
UM2295
Initialization and main application loop
UM2295 - Rev 1 page 18/35

5Mesh networking information
5.1 Local and remote concept
Remote actions or operations refer to other nodes in the network, while local actions refer to the resources on the
same node in the network.
For example, if you want to control the LEDs of nodes on the BlueNRG-Mesh app, click the icon button to invoke
the _SetRemoteData action from the app. This causes a _WriteLocalDataCb action on the node.
This is also the case when you wants to control the LEDs of the nodes of a group from the board. The LEDs on
the nodes subscribed to the Publish address will toggle when the button on the board is pressed.
The same message received on the node which needs to turn on the LEDs requires a WriteLocal action on
that node. This is shown in the figure below for the SetRemote/WriteLocal actions on different nodes in the
network.
Figure 15. SetRemote/WriteLocal actions
SetRemoteData ReadLocalData
Mesh LibraryMesh Library
Source Destination
LED ON
User-Action to
switch on remote
node lights
Appli_ReadLocalDataCb
5.2 Acknowledged and unacknowledged messages
By default, all messages in the Mesh network are configured as unacknowledged. The difference between
acknowledged and unacknowledged messages is the response to the message. For example, a write message to
a node may have a response in acknowledged communication. Whereas, in unacknowledged communication, the
response may not be there.
You should use unacknowledged messages in the mesh network to avoid the exchange of multiple messages in
the network, which may take time to the process.
5.3 Provisioning process
The process of configuring a devices in a network is called provisioning. The process is started by a “Provisioner”,
which is a BlueNRG-Mesh app running on the smartphone.
UM2295
Mesh networking information
UM2295 - Rev 1 page 19/35

Figure 16. Provisioning process
Unconfigured
mesh node
Configured
mesh node
Unprovisioned
device
Provisioning with data: network key, Key index
Flags, IV index, unicast address
Unprovisioning
Configuration information
The BlueNRG-Mesh app can be installed on the smartphone with BLE 4.0 or higher. During installation, the app
asks for some user permissions, refer to the appropriate BlueNRG-Mesh user manual for your device type
(Android or iOS) on www.st.com . The steps required for the provisioning are shown in the figure below.
UM2295
Provisioning process
UM2295 - Rev 1 page 20/35
Table of contents