ST UM1870 User Manual
ST UM1870 User Manual

ST UM1870 User Manual

Bluenrg-ms development kits
Table of Contents

Advertisement

Quick Links

UM1870
User manual
BlueNRG-MS development kits
Introduction
This document describes the BlueNRG-MS development kits and related hardware and
®
software components. The BlueNRG-MS is a very low power Bluetooth
low energy (BLE)
single-mode network processor, compliant with Bluetooth specifications core 4.1. The
BlueNRG-MS can support multiple roles simultaneously.
The following BlueNRG-MS kits are available:
1.
BlueNRG-MS development platform (order code: STEVAL-IDB005V1)
The BlueNRG-MS software package includes a graphical user interface application to
control the BlueNRG-MS through a simple ACI protocol.
May 2015
DocID027602 Rev 1
1/58
www.st.com
58

Advertisement

Table of Contents
loading
Need help?

Need help?

Do you have a question about the UM1870 and is the answer not in the manual?

Questions and answers

Subscribe to Our Youtube Channel

Summary of Contents for ST UM1870

  • Page 1 UM1870 User manual BlueNRG-MS development kits Introduction This document describes the BlueNRG-MS development kits and related hardware and ® software components. The BlueNRG-MS is a very low power Bluetooth low energy (BLE) single-mode network processor, compliant with Bluetooth specifications core 4.1. The BlueNRG-MS can support multiple roles simultaneously.
  • Page 2: Table Of Contents

    Contents UM1870 Contents Getting started ..........5 STEVAL-IDB005V1 kit contents .
  • Page 3 UM1870 Contents BlueNRG-MS app for smartphones ......34 BlueNRG-MS sensor profile demo: connection with a central device . . . 35 5.3.1...
  • Page 4 Contents UM1870 8.2.4 Connection with a BLE Central device ......48 List of acronyms ......... . . 49 Available board schematics .
  • Page 5: Getting Started

    UM1870 Getting started Getting started This section describes all the software and hardware requirements for running the BlueNRG-MS GUI utility as well as the related installation procedure. STEVAL-IDB005V1 kit contents This kit is composed of the following items: • 1 development motherboard •...
  • Page 6: Bluenrg-Ms Development Kit Setup

    Getting started UM1870 BlueNRG-MS development kit setup • Extract the content of the BlueNRG_DK_-x.x.x-Setup.zip file into a temporary directory. • Launch the BlueNRG-DK-x.x.x-Setup.exe file and follow the on-screen instructions. Note: EWARM Compiler 6.60 version is required for building the BlueNRG_DK_x.x.x demonstration applications.
  • Page 7: Hardware Description

    UM1870 Hardware description Hardware description The following sections describe the components of the kits. STEVAL-IDB005V1 motherboard The motherboard included in the development kit allows testing of the functionality of the BlueNRG-MS processor. The board can be used as a simple interface between the BlueNRG-MS and a GUI application on the PC.
  • Page 8: Microcontroller And Connections

    Hardware description UM1870 2.1.1 Microcontroller and connections The board features an STM32L151RB microcontroller, which is an ultra low-power microcontroller with 128 KB of Flash memory, 16 KB of RAM, 32-bit core ARM cortex-M3, 4 KB of data EEPROM, RTC, LCD, timers, USART, I C, SPI, ADC, DAC and comparators.
  • Page 9 UM1870 Hardware description Table 1. MCU pin description versus board function (continued) Board function Buttons / Temp. Ext. name LEDs DB connector Acceler. JTAG joystick sensor conn JOY_RIGHT PB10 INT1 PB11 INT2 VSS_1 VDD_1 PB12 DB_CSN PB13 DB_SCLK PB14 DB_SDO...
  • Page 10: Power

    Figure 2.1.6 JTAG connector A JTAG connector on the board (H in Figure 2) allows the programming and debugging of the STM32L microcontroller on board , using an in-circuit debugger and programmer such as the ST-LINK/V2. 10/58 DocID027602 Rev 1...
  • Page 11: Leds

    UM1870 Hardware description 2.1.7 LEDs Five LEDs are available (I in Figure – DL1: green – DL2: orange – DL3: red – DL4: blue – DL5: yellow 2.1.8 Daughterboard interface The main feature of the motherboard is the capability to control an external board,...
  • Page 12: Bluenrg-Ms Daughterboard

    Hardware description UM1870 BlueNRG-MS daughterboard The BlueNRG-MS daughterboard (Figure 3) included in the development kit is a small circuit board to be connected to the main board. It contains the BlueNRG-MS network processor (in a QFN32 package), an SMA antenna connector, discrete passive components...
  • Page 13: Current Measurements

    UM1870 Hardware description Table 2. Connections between BlueNRG-MS board and motherboard on left connector J4 motherboard J3 daughterboard DB_PIN1 DB_PIN3 DB_PIN2 U2 pin 1 DB_SDN_RST U2 pin 1 Table 3. Connections between BlueNRG-MS board and motherboard on right connector J5 motherboard...
  • Page 14: Gui Software Description

    GUI software description UM1870 GUI software description The BlueNRG-MS GUI included in the software package is a graphical user interface that can be used to interact and evaluate the capabilities of the BlueNRG-MS network processor. This utility can send standard and vendor-specific HCI commands to the controller and receive events from it.
  • Page 15: Gui Main Window

    UM1870 GUI software description 3.2.1 GUI main window Figure 4. BlueNRG-MS GUI main window The BlueNRG-MS GUI main window is characterized by different zones. Some of these zones can be resized. Port and interface selection The uppermost zone allows the user to open the COM port associated to the BLE controller.
  • Page 16 GUI software description UM1870 Figure 5. Command packet table The command packet table contains four columns: • Parameter: name of the packet field as they are named in volume 2, part E of Bluetooth specification. • Value: field value represented in hexadecimal format (right-click on a cell to change its representation format).
  • Page 17: Tools

    UM1870 GUI software description Figure 7. Raw packet dump Some events (displayed in yellow cells) can provide other information. HCI packets sent towards the BLE controller are displayed in gray cells while received packets are shown inside white cells. The Sent/received packets table can be cleared by clicking on clear list button. Update and...
  • Page 18 GUI software description UM1870 • C view: displays the C language structure related to the IFR configuration data region matching the View/Edit and Memory view. Figure 8. BlueNRG GUI IFR tool: View/Edit view In the View/Edit view, the following operations are available: •...
  • Page 19 UM1870 GUI software description • Change HS startup time parameter. This parameter control the time offset between the wakeup of the device and the start of RX/TX phase. It must be big enough to allow the device to be ready to transmit or receive after wakeup from sleep. This time depends on the startup time of the high speed crystal.
  • Page 20: Gui Scripts Window

    GUI software description UM1870 Go to Settings --> select FW 7.1 for BlueNRG-MS device Go to Settings --> select Set Baud Rate… and choose the value (default is 9600) 3.2.3 GUI scripts window The BlueNRG-MS GUI scripts window provides several tabs to allow testing of some BlueNRG-MS application scenarios.
  • Page 21 UM1870 GUI software description Table 4. GUI scripts window: available general operations Operation Associated actions Notes Allows to initialize a device by selecting: - Role - Stack Mode (1,2,3); Init Device… - Address type (Public, Random) and value - Tx power level...
  • Page 22 GUI software description UM1870 Table 5. GUI scripts window: available central operations Operation Associated actions Notes Allows to put device in scanning mode by selecting: - GAP Procedure (Limited, general, general-connection establishment and terminate general-connection establishment procedures) Scanning - Enable or Disable filters...
  • Page 23 UM1870 GUI software description Table 6. GUI Scripts window: available peripheral operations Operation Associated actions Notes Allows to put a Peripheral device in Advertising mode by selecting: - Discoverable mode (limited, non discoverable and general discoverable) - Type (ADV_IND, ADV_SCAN_IND,...
  • Page 24 GUI software description UM1870 Figure 10. BlueNRG-MS GUI script engine section Moreover, the script engine supports other utility commands: Table 7. GUI script engine: utility commands Command name Parameters Description HW_BOOTLOADER None Hardware bootloader activation HW_RESET None HW reset Open a message window and show the input...
  • Page 25 UM1870 GUI software description Table 7. GUI script engine: utility commands (continued) Command name Parameters Description Convert the integer value to an array of Number of bytes. Example: Integer, Number of GET_LIST bytes X = 0x2233 GET_LIST(X, 2) = [0x33,0x22]...
  • Page 26 GUI software description UM1870 Table 8. WAIT_EVENT macro-command Command name Parameters Description event_code = None (default) It waits an event with ‘Event Code’ parameter timeout = None (default) equal to event_code. If no event_code is continueOnEvtMiss = False WAIT_EVENT indicated, the macro-command waits any event.
  • Page 27 UM1870 GUI software description Table 9. WAIT_EVENT: event_code types (continued) event param. event_code event parameter name name EVT_BLUE_INITIALIZED EVT_BLUE_GAP_LIMITED_DISCOVERABLE EVT_BLUE_GAP_PAIRING_CMPLT EVT_BLUE_GAP_PAIRING_CMPLT EVT_BLUE_GAP_PASS_KEY_REQUEST EVT_BLUE_GAP_AUTHORIZATION_REQUEST EVT_BLUE_GAP_SLAVE_SECURITY_INITIATED EVT_BLUE_GAP_BOND_LOST EVT_BLUE_GAP_DEVICE_FOUND EVT_BLUE_GAP_PROCEDURE_COMPLETE EVT_BLUE_GAP_ADDR_NOT_RESOLVED EVT_BLUE_L2CAP_CONN_UPDATE_RESP EVT_BLUE_L2CAP_PROCEDURE_TIMEOUT EVT_BLUE_L2CAP_CONNECTION_UPDATE_REQ EVT_BLUE_GATT_ATTRIBUTE_MODIFIED EVT_BLUE_GATT_PROCEDURE_TIMEOUT EVT_BLUE_EXCHANGE_MTU_RESP HCI_VENDOR Ecode EVT_BLUE_ATT_FIND_INFORMATION_RESP EVT_BLUE_ATT_FIND_BY_TYPE_VAL_RESP EVT_BLUE_ATT_READ_BY_TYPE_RESP EVT_BLUE_ATT_READ_RESP...
  • Page 28 GUI software description UM1870 Table 9. WAIT_EVENT: event_code types (continued) event param. event_code event parameter name name HCI_DISCONNECTION_COMP LETE HCI_ENCRYPTION_CHANGE HCI_READ_REMOTE_VERSIO N_INFORMATION_COMPLETE HCI_COMMAND_COMPLETE HCI_COMMAND_STATUS HCI_HARDWARE_ERROR HCI_NUMBER_OF_COMPLET ED_PACKETS HCI_DATA_BUFFER_OVERFL HCI_ENCRYPTION_KEY_REF RESH_COMPLETE Below are some code examples using the WAIT_EVENT() macro-command: Example 1...
  • Page 29 UM1870 GUI software description Example 3 # Wait HCI_VENDOR event_code evt = WAIT_EVENT(HCI_VENDOR) #Using evt.get_param('Ecode').val it's possible to verify the type of HCI_VENDOR #event. evtCode = evt.get_param('Ecode').val if (evtCode == EVT_BLUE_GATT_NOTIFICATION): conn_handle=evt.get_param('Connection_Handle').val Example 4 # Wait the Ecode EVT_BLUE_GATT_PROCEDURE_COMPLETE (HCI_VENDOR #event_code).
  • Page 30: Gui Beacon Window

    GUI software description UM1870 In the BlueNRG-MS GUI, Scripts window, Script Engine section, click on tab “…”, browse to the script location and select the script Click on the “Run Script” tab to run the script. The execution flow (commands and events) will be displayed in the BlueNRG-MS GUI “Sent/Received Packets”...
  • Page 31 UM1870 GUI software description Table 10. BlueNRG GUI beacon window configuration parameters Data field Description Notes Address Device address Public or Random Device address type Company Identifier Code SIG company identifier Default is 0x0030 (STMicroelectronics) Beacon ID Fixed value Used to distinguish specific beacons...
  • Page 32: Programming With Bluenrg-Ms Network Processor

    Programming with BlueNRG-MS network processor UM1870 Programming with BlueNRG-MS network processor The BlueNRG-MS provides a high level interface to control its operation. This interface is called ACI (application-controller interface). The ACI is implemented as an extension to the standard Bluetooth HCI interface. Since BlueNRG-MS is a network processor, the stack runs inside the device itself.
  • Page 33: Bluenrg-Ms Sensor Profile Demo

    UM1870 BlueNRG-MS sensor profile demo BlueNRG-MS sensor profile demo The software development kit contains an example, which implements a proprietary Bluetooth profile: the sensor profile. This example is useful for building new profiles and applications that use the BlueNRG-MS network processor. This GATT profile is not compliant to any existing specification.
  • Page 34: Supported Platforms

    BlueNRG-MS sensor profile demo UM1870 Figure 13. BlueNRG-MS sensor demo GATT database Supported platforms The BlueNRG-MS sensor profile demo is supported only on the BlueNRG-MS development platform (STEVAL-IDB005V1). BlueNRG-MS app for smartphones An application is available for smartphones (iOS and android), that works with the sensor profile demo.
  • Page 35: Bluenrg-Ms Sensor Profile Demo: Connection With A Central Device

    UM1870 BlueNRG-MS sensor profile demo Figure 14. BlueNRG-MS app BlueNRG-MS sensor profile demo: connection with a central device This section describes how to interact with a central device, while BlueNRG-MS is acting as a peripheral. The central device can be another BlueNRG-MS acting as a master, or any other Bluetooth smart or smart-ready device.
  • Page 36: Set Security Requirements

    BlueNRG-MS sensor profile demo UM1870 Security_Permissions=0x00, GATT_Evt_Mask=0x01, Enc_Key_Size=0x07, Is_Variable=0x01) With this command a variable-length characteristic has been added, with read, write and notify properties. The characteristic handle is also returned (Char_Handle). 5.3.3 Set security requirements BlueNRG-MS exposes a command that the application can use to specify its security requirements.
  • Page 37: Bluenrg-Ms Sensor Demo: Central Profile Role

    UM1870 BlueNRG-MS sensor profile demo BlueNRG-MS can send notifications of the characteristic that has been previously added, with UUID 0xA002 (after notifications have been enabled). This can be done using the following command: – ACI_GATT_UPD_CHAR_VALUE(Service_Handle=0x000C, Char_Handle=0x000D, Val_Offset=0, Char_Value_Length=0x05, Char_Value='hello') Once this ACI command has been sent, the new value of the characteristic will be displayed on the phone.
  • Page 38: Discovery A Sensor Peripheral Device

    BlueNRG-MS sensor profile demo UM1870 5.4.2 Discovery a sensor peripheral device In order to discover a Sensor Peripheral device, a discovery procedure has to be started with the master library command: – Master_DeviceDiscovery(&devDiscParam); devDiscParam variable allows to set the discovery parameters (discovery procedure, interval, window, …).
  • Page 39: Enable Sensor Peripheral Acceleration And Free Fall Notifications

    UM1870 BlueNRG-MS sensor profile demo 5.4.5 Enable sensor peripheral acceleration and free fall notifications Once the Sensor Peripheral device sensor acceleration and free fall characteristics have been discovered, the Sensor Central device can enable the related characteristics notification by using the following master library command: –...
  • Page 40: Bluenrg-Ms Chat Demo Application

    BlueNRG-MS chat demo application UM1870 BlueNRG-MS chat demo application The software development kit contains another example, which implements a simple 2-way communication between two BlueNRG-MS devices. It shows a simple point-to-point wireless communication using the BlueNRG-MS product. This demo application exposes one service: chat service.
  • Page 41: Initialization

    UM1870 BlueNRG-MS chat demo application First, BlueNRG-MS must be set up on both devices. In order to do this, a series of ACI commands need to be sent to the processor. 6.2.1 Initialization BlueNRG-MS’s stack must be correctly initialized before establishing a connection with another Bluetooth LE device.
  • Page 42: Enter Connectable Mode

    BlueNRG-MS chat demo application UM1870 initiated by the central in order to access that characteristic. On BLE chat demo, a fixed pin (123456) is used as follows: aci_gap_set_auth_requirement(MITM_PROTECTION_REQUIRED,OOB_AUTH_DATA_AB SENT,NULL,7,16, USE_FIXED_PIN_FOR_PAIRING,123456,BONDING); 6.2.4 Enter connectable mode On BLE chat, server role device uses GAP ACI commands to enter into general...
  • Page 43 UM1870 BlueNRG-MS chat demo application Figure 16. BLE chat client example Figure 17. BLE chat server example DocID027602 Rev 1 43/58...
  • Page 44: Bluenrg-Ms Beacon Demonstration Application

    BlueNRG-MS Beacon demonstration application UM1870 BlueNRG-MS Beacon demonstration application The software development kit contains another example, which shows how to configure a BlueNRG-MS device to advertise specific manufacturing data and allow another BLE device to know if it is in the range of the BlueNRG-MS beacon device.
  • Page 45: Entering Non-Connectable Mode

    UM1870 BlueNRG-MS Beacon demonstration application 7.2.3 Entering non-connectable mode The BLE Beacon device uses the GAP ACI command to enter non-connectable mode as follows: aci_gap_set_discoverable(ADV_NONCONN_IND, 160, 160, PUBLIC_ADDR, NO_WHITE_LIST_USE,0, NULL, 0, NULL, 0, 0); In order to advertise the specific selected manufacturer data, the BLE Beacon application...
  • Page 46: Ble Remote Control Demo Application

    BLE remote control demo application UM1870 BLE remote control demo application This demo application shows how to control a remote device (like an actuator) using a BlueNRG-MS device.This application periodically sends broadcast data (temperature values) that can be read by any device. The broadcast data is encapsulated in a manufacturer-specific AD type.
  • Page 47: Ble Remote Control Application Setup

    UM1870 BLE remote control demo application BLE remote control application setup This section describes how to configure a BlueNRG-MS device to acting as a remote control device. 8.2.1 Initialization The BlueNRG-MS's stack must be correctly initialized before establishing a connection with another Bluetooth LE device.
  • Page 48: Connection With A Ble Central Device

    BLE remote control demo application UM1870 #else ret = aci_gatt_add_char(RCServHandle, UUID_TYPE_128, controlPointUuid, 1, CHAR_PROP_READ|CHAR_PROP_WRITE|CHAR_PROP_WRITE_WITHOUT_RESP, ATTR_PERMISSION_NONE, GATT_NOTIFY_ATTRIBUTE_WRITE, 16, 1, &controlPointHandle); #endif Where controlPointUuid is the private characteristic 128-bit UUID allocated for BLE Remote Control characteristic (ed0efb1a-9b0d-11e4-89d3-123b93f75cba). If security is enabled, the characteristic properties must be set accordingly to enable authentication on controlPointUuid characteristic read and write.
  • Page 49: List Of Acronyms

    UM1870 List of acronyms List of acronyms Table 13. List of acronyms used in this document Term Meaning Bluetooth low energy Information register Universal serial bus DocID027602 Rev 1 49/58...
  • Page 50: Available Board Schematics

    Available board schematics UM1870 Available board schematics Figure 18. STEVAL-IDB005V1 BlueNRG-MS daughterboard 50/58 DocID027602 Rev 1...
  • Page 51 UM1870 Available board schematics Figure 19. STEVAL-IDB005V1 temperature sensor Figure 20. STEVAL-IDB005V1 accelerometer DocID027602 Rev 1 51/58...
  • Page 52 Available board schematics UM1870 Figure 21. STEVAL-IDB005V1 MCU 52/58 DocID027602 Rev 1...
  • Page 53 UM1870 Available board schematics Figure 22. STEVAL-IDB005V1 JTAG/SWD Figure 23. STEVAL-IDB005V1 USB DocID027602 Rev 1 53/58...
  • Page 54 Available board schematics UM1870 Figure 24. STEVAL-IDB005V1 LED 54/58 DocID027602 Rev 1...
  • Page 55 UM1870 Available board schematics Figure 25. STEVAL-IDB005V1 power supply DocID027602 Rev 1 55/58...
  • Page 56 Available board schematics UM1870 Figure 26. STEVAL-IDB005V1 button and joystick Figure 27. STEVAL-IDB005V1 daughterboard connectors 56/58 DocID027602 Rev 1...
  • Page 57: Revision History

    UM1870 Revision history Revision history Table 14. Document revision history Date Revision Changes 14-May-2015 Initial release DocID027602 Rev 1 57/58...
  • Page 58 ST products and/or to this document at any time without notice. Purchasers should obtain the latest relevant information on ST products before placing orders. ST products are sold pursuant to ST’s terms and conditions of sale in place at the time of order acknowledgement.

Table of Contents