Features
BlueNRG-1 and BlueNRG-2 (STEVAL-IDB007V1
and STEVAL-IDB008V1)
BlueNRG-MS (X-NUCLEO-I 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