background image

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

Summary of Contents for UM2295

Page 1: ...ions 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 de...

Page 2: ...ho 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 Eva...

Page 3: ...age 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...

Page 4: ...O 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 debugge...

Page 5: ...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 S...

Page 6: ...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 th...

Page 7: ...dor 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 handle...

Page 8: ...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 dr...

Page 9: ...s 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 Bl...

Page 10: ...Figure 9 Middleware folder UM2295 Middleware folder UM2295 Rev 1 page 10 35...

Page 11: ...B008V1 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 Blue...

Page 12: ...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 projec...

Page 13: ...n 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 th...

Page 14: ...ase 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 Blu...

Page 15: ...DBM 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...

Page 16: ...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 pro...

Page 17: ...n 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...

Page 18: ...lash 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 Blu...

Page 19: ...ferent nodes in the network Figure 15 SetRemote WriteLocal actions SetRemoteData ReadLocalData Mesh Library Mesh Library Source Destination LED ON User Action to switch on remote node lights Appli_Rea...

Page 20: ...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 Me...

Page 21: ...h smartphone is managed by the following callbacks Appli_BleGattConnectionCompleteCb Appli_BleGattDisconnectionCompleteCb These are initialized during the main loop It can be interesting sometimes to...

Page 22: ...command from a remote node or from a smartphone to an addressed node to get some information invokes the ReadLocalData callback This callback can be used to read some information that a remote node as...

Page 23: ...OBLE_RESULT status of result 5 7 2 User and button interface Table 6 Appli_ShortButtonPress Function API parameters Description Prototype Static void Appli_ShortButtonPress void Behaviour description...

Page 24: ...SetTxPowerCb Behaviour description This callback sets the transmission power of BLE radio IN turns this function call aci_hal_set_tx_power_level By default the power level is set to 2 dbm Input parame...

Page 25: ...RESS dst_peer destination address of the command This address can be the address of Group to which the node is subscribed or the unicast address of element MOBLEUINT16 command command received for the...

Page 26: ...put parameter MOBLE_RESULT status of result 5 7 5 MAC address configuration Table 15 Appli_CheckBdMacAddr Function Description Prototype int Appli_CheckBdMacAddr void Behaviour description Checks MAC...

Page 27: ...17 References Name Title description Bluetooth specifications Specification of the Bluetooth system v4 0 v4 1 v4 2 v5 0 Bluetooth specifications Mesh profile specifications v1 0 UM2295 References UM22...

Page 28: ...tial BlueNRG Mesh is built over Motorola s Mesh Over Bluetooth Low Energy MoBLE technology The present solution is developed and maintained for both Mesh library and Applications solely by STMicroelec...

Page 29: ...Revision history Table 18 Document revision history Date Revision Changes 09 Feb 2018 1 Initial release UM2295 UM2295 Rev 1 page 29 35...

Page 30: ...11 3 1 Using binaries for BlueNRG 1 and BlueNRG 2 11 3 2 Using binaries for the STM32L152 used with the BlueNRG MS 11 3 3 Using the IAR and Keil projects 12 3 3 1 Using IAR project 12 3 3 2 Using Kei...

Page 31: ...ons and callbacks 22 5 7 1 User interface and indications 22 5 7 2 User and button interface 23 5 7 3 Device BLE configuration type interface 23 5 7 4 Network data communication functions 25 5 7 5 MAC...

Page 32: ...r structure 8 Figure 7 Driver folder 9 Figure 8 Project folder 9 Figure 9 Middleware folder 10 Figure 10 Binaries for BlueNRG 1 and BlueNRG 2 11 Figure 11 Overview of how to program the binary in the...

Page 33: ...eButtonState 23 Table 9 Appli_BleStackInitCb 24 Table 10 Appli_SetTxPowerCb 24 Table 11 Appli_BleGattConnectionCompleteCb 24 Table 12 Appli_BleGattDisconnectionCompleteCb 24 Table 13 Appli_WriteLocalD...

Page 34: ...ow Energy BSP Board support package DFU Device firmware upgrade GUI Graphical user interface HAL Hardware abstraction layer HW Hardware IDE Integrated development environment LED Light emitting diode...

Page 35: ...the choice selection and use of ST products and ST assumes no liability for application assistance or the design of Purchasers products No license express or implied to any intellectual property righ...

Reviews: