+ All Categories
Home > Documents > User manual - UM2061 - Getting started with the FP-NET ... · MQTT Message queuing telemetry...

User manual - UM2061 - Getting started with the FP-NET ... · MQTT Message queuing telemetry...

Date post: 21-May-2020
Category:
Upload: others
View: 22 times
Download: 0 times
Share this document with a friend
21
Introduction FP-NET-BLESTAR1 is an STM32Cube function pack which lets you connect your IoT node in a BLE sensor network to the Internet via a Wi-Fi network. Sensor data from a device in the BLE star network can be transparently sent to the IBM Watson IoT cloud platform and visualized on a client connected to the cloud. The software, together with the suggested combination of STM32 and ST devices, can be used, for example, to develop smart home or remote monitoring applications. The included sample application configures either an STM32 Nucleo board (equipped with the Wi-Fi and BLE expansion boards) or an STM32L4 Discovery Board as a BLE master connected to several BLE peripherals, or nodes, in a star network topology. The BLE central device can simultaneously connect to a Wi-Fi network and export data from other nodes to the IBM Watson IoT cloud platform. The BLE master also acts as a slave by accepting connection with a BLE client (typically an Android™/iOS™ device) which can be used to monitor and control the BLE network. Getting started with the FP-NET-BLESTAR1 software package for Bluetooth low energy and Wi-Fi to create a BLE star network UM2061 User manual UM2061 - Rev 4 - July 2018 For further information contact your local STMicroelectronics sales office. www.st.com
Transcript
Page 1: User manual - UM2061 - Getting started with the FP-NET ... · MQTT Message queuing telemetry transport ODE Open development environment SPI Serial peripheral interface SSID Service

IntroductionFP-NET-BLESTAR1 is an STM32Cube function pack which lets you connect your IoT node in a BLE sensor network to theInternet via a Wi-Fi network. Sensor data from a device in the BLE star network can be transparently sent to the IBM WatsonIoT cloud platform and visualized on a client connected to the cloud.

The software, together with the suggested combination of STM32 and ST devices, can be used, for example, to develop smarthome or remote monitoring applications.

The included sample application configures either an STM32 Nucleo board (equipped with the Wi-Fi and BLE expansionboards) or an STM32L4 Discovery Board as a BLE master connected to several BLE peripherals, or nodes, in a star networktopology. The BLE central device can simultaneously connect to a Wi-Fi network and export data from other nodes to the IBMWatson IoT cloud platform.

The BLE master also acts as a slave by accepting connection with a BLE client (typically an Android™/iOS™ device) which canbe used to monitor and control the BLE network.

Getting started with the FP-NET-BLESTAR1 software package for Bluetooth low energy and Wi-Fi to create a BLE star network

UM2061

User manual

UM2061 - Rev 4 - July 2018For further information contact your local STMicroelectronics sales office.

www.st.com

Page 2: User manual - UM2061 - Getting started with the FP-NET ... · MQTT Message queuing telemetry transport ODE Open development environment SPI Serial peripheral interface SSID Service

1 Acronyms and abbreviations

Acronym Description

AP Access point

BLE Bluetooth low energy

BSP Base support package

FOTA Firmware update over-the-air

GPIO General purpose input/output

HAL Hardware abstraction layer

HTML Hypertext markup language

HTTP Hyper text transfer protocol

IDE Integrated development environment

IoT Internet of things

I2C Inter-integrated circuit

MCU Microcontroller unit

MEMS Micro electro-mechanical systems

MQTT Message queuing telemetry transport

ODE Open development environment

SPI Serial peripheral interface

SSID Service set identifier

UART Universal asynchronous receiver/transmitter

URL Uniform resource locator

Wi-Fi Wireless LAN based on IEEE 802.11

WLAN Wireless local area network

UM2061Acronyms and abbreviations

UM2061 - Rev 4 page 2/21

Page 3: User manual - UM2061 - Getting started with the FP-NET ... · MQTT Message queuing telemetry transport ODE Open development environment SPI Serial peripheral interface SSID Service

2 FP-NET-BLESTAR1 software description

2.1 OverviewFP-NET-BLESTAR1 STM32Cube function pack runs on the STM32 microcontroller and includes drivers thatrecognize both BLE and Wi-Fi modules (the SPWF01SA mounted on the X-NUCLEO-IDW01M1 and theISM43362-M3G-L44, by Inventek Systems, mounted on the B-L475E-IOT01), as well as a middleware packageimplementing the MQTT protocol to facilitate interaction between the STM32 MCU-based system and cloudservices. The expansion software is built on STM32Cube software technology to ease portability across differentSTM32 microcontrollers, and includes a sample routine for creating a BLE star-topology network and controllingits nodes through both BLE client and the IBM Watson IoT cloud services.Some key features of the FP-NET-BLESTAR1 package include:

2.2 ArchitectureThis software is based on the STM32Cube HAL (Hardware Abstraction Layer) for the STM32 microcontroller, andextends STM32Cube with a board support package (BSP) for the BLE and the Wi-Fi expansion boards.The drivers abstract low-level hardware details so middleware components and applications can access andcontrol the BLE module (SPBTLE-RF) and the Wi-Fi module (SPWF01SA). The driver for the Wi-Fi ISM43362-M3G-L44 (by Inventek Systems), mounted on the B-L475E-IOT01A Discovery Kit IoT node, is also provided.

Figure 1. FP-NET-BLESTAR1 software architecture

The software is built on the following layers:• STM32Cube HAL layer: the HAL driver layer provides a generic multi instance simple set of APIs

(application programming interfaces) to interact with the upper layers (application, libraries and stacks). It iscomposed of generic and extension APIs. It is directly built around a generic architecture and allows thelayers that are built upon, such as the middleware layer, to implement their functionalities without

UM2061FP-NET-BLESTAR1 software description

UM2061 - Rev 4 page 3/21

Page 4: User manual - UM2061 - Getting started with the FP-NET ... · MQTT Message queuing telemetry transport ODE Open development environment SPI Serial peripheral interface SSID Service

dependencies on the specific hardware configuration for a given Microcontroller Unit (MCU). This structureimproves the library code reusability and guarantees an easy portability on other devices.

• Board Support Package (BSP) layer: the software package needs to support the peripherals on the STM32Nucleo board apart from the MCU. This software is included in the board support package (BSP). This is alimited set of APIs which provides a programming interface for certain board specific peripherals, e.g. theLED, the user button etc. This interface also helps in identifying the specific board version.

An open source implementation of the MQTT protocol (http://www.eclipse.org/paho/) ported to STM32 isintegrated in the package middleware so the STM32-based system can connect with IBM Watson IoT cloudservices. MQTT is a lightweight messaging protocol with a small code footprint and low power and bandwidthusage. It is particularly suitable for sensor data telemetry and implementation in embedded systems. Moreinformation regarding the MQTT protocol is available at www.mqtt.org).

2.3 Folder structure

Figure 2. FP-NET-BLESTAR1 package folder structure

The following folders are included in the software package:• Documentation: contains a compiled HTML file generated from the source code, detailing the software

components and APIs.• Drivers: contains the HAL drivers, the board specific drivers for each supported board or hardware platform,

including those for on-board components, and the CMSIS vendor-independent hardware abstraction layerfor the Cortex-M processor series.

• Middlewares: contains middleware interface for BLE and Wi-Fi expansion software, together with the MQTTimplementation.

• Projects: contains a sample application to create a BLE star-topology network and connect STM32 Nucleowith a BLE client and IBM Watson IoT cloud via Wi-Fi.

• Utilities: contains the firmware in binary format for NUCLEO-F401RE, NUCLEO-L053R8 and NUCLEO-L476RG. This firmware must be used on the peripheral nodes of the BLE star network. It accepts connectionfrom the central node and sends environmental data to it via BLE. Further details can be found in the sampleapplication included in the FP-SNS-ALLMEMS1, FP-SNS-FLIGHT1 and FP-SNS-MOTENV1 function packs,available at www.st.com.

2.4 APIsFull API function and parameter descriptions are found in a compiled HTML file in the package “Documentation”folder.The main APIs used by the BLESTAR1 sample application to connect the device to the BLE star-topologynetwork peripheral nodes and the BLE client are described in the X-CUBE-BLE1 documentation, while those forconnecting to the IBM Watson IoT cloud services are described in the FP-CLD-WATSON1 documentation, bothavailable at www.st.com.

UM2061Folder structure

UM2061 - Rev 4 page 4/21

Page 5: User manual - UM2061 - Getting started with the FP-NET ... · MQTT Message queuing telemetry transport ODE Open development environment SPI Serial peripheral interface SSID Service

2.5 Sample application descriptionA sample application for both NUCLEO-F401RE (equipped with X-NUCLEO-IDB05A1 and X-NUCLEO-IDW01M1expansion boards) and B-L475E-IOT01A Discovery Kit implementing a simultaneous BLE master/slave and Wi-Figateway device is available in the "Projects" directory. Ready-to-build projects are available for multiple IDEs.This application lets the device create a BLE star-topology network with up to seven peripheral nodes, and readenvironmental data from the nodes (where the firmware in directory Utilities\Node_Firmware is running). Thedevice can also send data from peripheral nodes to a BLE client and the IBM Watson IoT cloud services via Wi-Fi.The data received (e.g. environmental temperature, humidity and pressure values, ambient light level, ambientnoise level) are detected by the sensor devices on the expansion boards connected to the STM32 Nucleo boardsacting as peripheral nodes. Peripheral nodes also send the BLE star network central device node ON/OFF statusinformation for LED LD2 on the STM32 Nucleo board.The application is configured by default to send data via Wi-Fi to the IBM Watson IoT cloud in quickstart mode fordata visualization only. However it can be quickly modified in order to use the device in register mode. The lattermode requires an account on IBM Watson IoT cloud (if the user wants to command the device; e.g., turn LED LD2on or off).Further details are in the FP-CLD-WATSON1 function pack documentation at www.st.com.Along with the Wi-Fi connection, the device is also able to accept a connection request from a BLE client (typicallyan AndroidTM/iOSTM smartphone with BLE v4.0 or above), meaning that the device is able to function as master(central node of the BLE star network) and slave (accepting connection from a BLE client) simultaneously.

2.5.1 Sensor data visualization on BLE appTo monitor and control the BLESTAR1 network, the ST SensNet app can be used, which is available for Androidand iOS devices, respectively on Google Play Store (https://play.google.com/store/apps/details?id=com.st.SensNet&hl=it) and Apple Store (https://itunes.apple.com/it/app/st-sensnet/id1108449985?mt=8).Following installation, launch the app and press the “START SCANNING” icon.

Figure 3. ST SensNet start page

After scanning the BLE network, the BLESTAR1 device appears in the device list.

UM2061Sample application description

UM2061 - Rev 4 page 5/21

Page 6: User manual - UM2061 - Getting started with the FP-NET ... · MQTT Message queuing telemetry transport ODE Open development environment SPI Serial peripheral interface SSID Service

Figure 4. List of discovered BLE devices

Selecting the BLESTAR1 device to display all the data from the peripherals connected to the central BLE starnetwork node.

Figure 5. BLE star network data from all peripherals

The toggle button beside the lamp icon turns on the BLE star network peripheral node LEDs; the yellow color ofthe icon confirms the ON status.

UM2061Sample application description

UM2061 - Rev 4 page 6/21

Page 7: User manual - UM2061 - Getting started with the FP-NET ... · MQTT Message queuing telemetry transport ODE Open development environment SPI Serial peripheral interface SSID Service

Figure 6. LED status ON

2.5.2 Sensor data visualization on IBM QuickstartThe BLESTAR1 sample application contains a default configuration to connect the STM32 Nucleo board to IBMWatson IoT cloud to display sensor data on an IBM web page ( https://quickstart.internetofthings.ibmcloud.com),according to the device MAC address.Once the application is configured and running as per Section 2.6 System setup guide, use a serial line monitor toview messages from the STM32 Nucleo board and configure the SSID and Password for board connection withan available Wi-Fi network.

Figure 7. Serial line interface for Wi-Fi configuration

UM2061Sample application description

UM2061 - Rev 4 page 7/21

Page 8: User manual - UM2061 - Getting started with the FP-NET ... · MQTT Message queuing telemetry transport ODE Open development environment SPI Serial peripheral interface SSID Service

On connection with a Wi-Fi access point, the application prints the MAC address of the Wi-Fi expansion boardand IBM Quickstart URL to the screen.

Figure 8. URL for IBM Quickstart printed on serial interface

Paste the URL in a web browser address bar to view real time sensor data.

Figure 9. Sensor data in IBM Quickstart web page

2.5.3 Connect to IBM Watson IoT cloud as registered deviceTo register the STM32 based microsystem to IBM Watson IoT cloud, you must first create an account on IBMWatson cloud by following these instructions: https://www.ibm.com/marketplace/cloud/internet-of-things-cloud/us/en-us.Once signed in IBM Watson IoT platform and selected the Internet of Things service, it is possible to register adevice. During the device registration procedure, several device properties are provided (also used to configurethe hardware setup):• Organization ID (e.g., “1w8a05”).• Device type (e.g., “stm32_nucleo”).• Authentication Method (only “use-token-auth” supported).

UM2061Sample application description

UM2061 - Rev 4 page 8/21

Page 9: User manual - UM2061 - Getting started with the FP-NET ... · MQTT Message queuing telemetry transport ODE Open development environment SPI Serial peripheral interface SSID Service

• Authentication token (e.g., “uUURNRbeQQaX+Fvi&8”).

These properties must then be copied into the Config_MQTT_IBM function in Projects\STM32F401RE-Nucleo\Applications\BLESTAR1\Src and ibm_mode must be set to “REGISTERED” as shown below.

Figure 10. Configuration for registering the STM32 device on IBM Watson IoT cloud

Once registered and connected to IBM Watson IoT cloud, the STM32-based system can send and receiveinformation to and from IBM cloud applications and IoT services. More information about how to develop cloudapplications and services can be be found at https://www.ng.bluemix.net/docs/starters/Node-RED/nodered.html

2.6 System setup guide

2.6.1 Hardware descriptionThis section describes the hardware components needed to run the BLESTAR1 sample application by creating aBLE star-topology network and connecting the STM32 Nucleo board to IBM Watson IoT cloud and to a BLEAndroidTM/iOSTM client.

2.6.1.1 STM32 Nucleo platform

STM32 Nucleo development boards provide an affordable and flexible way for users to test solutions and buildprototypes with any STM32 microcontroller line.The Arduino™ connectivity support and ST morpho connectors make it easy to expand the functionality of theSTM32 Nucleo open development platform with a wide range of specialized expansion boards to choose from.

UM2061System setup guide

UM2061 - Rev 4 page 9/21

Page 10: User manual - UM2061 - Getting started with the FP-NET ... · MQTT Message queuing telemetry transport ODE Open development environment SPI Serial peripheral interface SSID Service

The STM32 Nucleo board does not require separate probes as it integrates the ST-LINK/V2-1 debugger/programmer.The STM32 Nucleo board comes with the comprehensive STM32 software HAL library together with variouspackaged software examples.

Figure 11. STM32 Nucleo board

Information regarding the STM32 Nucleo board is available at www.st.com/stm32nucleo

2.6.1.2 X-NUCLEO-IDB05A1 expansion board

The X-NUCLEO-IDB05A1 is a Bluetooth low energy expansion board based on the SPBTLE-RF BlueNRG-MSRF module to allow expansion of the STM32 Nucleo boards. The SPBTLE-RF module is FCC (FCC ID:S9NSPBTLERF) and IC certified (IC: 8976C-SPBTLERF). The BlueNRG-MS is a very low power Bluetooth lowenergy (BLE) single-mode network processor, compliant with Bluetooth specification v4.2. X-NUCLEO-IDB05A1is compatible with the ST morpho and Arduino™ UNO R3 connector layout. This expansion board can be pluggedinto the Arduino UNO R3 connectors of any STM32 Nucleo board.

UM2061System setup guide

UM2061 - Rev 4 page 10/21

Page 11: User manual - UM2061 - Getting started with the FP-NET ... · MQTT Message queuing telemetry transport ODE Open development environment SPI Serial peripheral interface SSID Service

Figure 12. X-NUCLEO-IDB05A1 expansion board

Information about the X-NUCLEO-IDB05A1 expansion board is available on www.st.com at http://www.st.com/x-nucleo

2.6.1.3 X-NUCLEO-IDW01M1 expansion board

The X-NUCLEO-IDW01M1 is a Wi-Fi evaluation board based on the SPWF01SA module, which expands theSTM32 Nucleo boards.The CE, IC and FCC certified SPWF01SA module has an embedded STM32 MCU, a low-power Wi-Fi b/g/n SoCwith integrated power amplifier and power management and an SMD antenna.The SPWF01SA module is also equipped with 1 MByte of external FLASH for firmware update over-the-air(FOTA).The firmware features a complete software IP stack to open up to 8 TCP/UDP sockets, as well as dynamic webpages with SSI to interact with the module and a REST API (get & post) for conveniently transferring files to/fromservers in the cloud. The module can simultaneously behave as a socket server and socket client.The firmware supports secure sockets with TLS/SSL encryption, ensuring secure end-to-end communicationswith the cloud, with or without authentication. The module operates as a client STA, IBSS, or miniAP (with up to 5client STAs).The X-NUCLEO-IDW01M1 interfaces with the MCU on the STM32 Nucleo board via the UART serial port; theuser can easily access the stack functions using the AT command. X-NUCLEO-IDW01M1 is compatible with boththe ST morpho and Arduino UNO R3 connector layout.

UM2061System setup guide

UM2061 - Rev 4 page 11/21

Page 12: User manual - UM2061 - Getting started with the FP-NET ... · MQTT Message queuing telemetry transport ODE Open development environment SPI Serial peripheral interface SSID Service

Figure 13. X-NUCLEO-IDW01M1 Wi-Fi expansion board

Information regarding the expansion board is available on www.st.com at http://www.st.com/x-nucleo.

2.6.1.4 STM32L4 Discovery kit IoT node

The B-L475E-IOT01A Discovery kit for IoT node allows you to develop applications to directly connect to cloudservers.The Discovery kit enables a wide variety of applications by exploiting low-power communication, multi-waysensing and ARM® Cortex® -M4 core-based STM32L4 series features.It supports Arduino Uno R3 and PMOD connectivity providing unlimited expansion capabilities with a large choiceof dedicated add-on boards.

UM2061System setup guide

UM2061 - Rev 4 page 12/21

Page 13: User manual - UM2061 - Getting started with the FP-NET ... · MQTT Message queuing telemetry transport ODE Open development environment SPI Serial peripheral interface SSID Service

Figure 14. B-L475E-IOT01A Discovery kit

2.6.2 Software requirementsThe following software components are required to set up a suitable development environment for compiling andrunning the BLESTAR1 sample application included in the FP-NET-BLESTAR1 package:• FP-NET-BLESTAR1 software, available on www.st.com• One of the following development tool-chain and compilers supported by the STM32Cube expansion

software:– IAR Embedded Workbench for ARM® (EWARM) toolchain + ST-LINK– RealView Microcontroller Development Kit (MDK-ARM) toolchain + ST-LINK– System Workbench for STM32 + ST-LINK

• Serial line monitor (for example, Termite)• Google Chrome, Mozilla Firefox or MS Internet Explorer web browser

2.6.3 Hardware setupThe following hardware components are required:• For the central node where the BLESTAR1 sample application runs:

1. One STM32 Nucleo development platform (order code: NUCLEO-F401RE)2. One BLE expansion board (order code: X-NUCLEO-IDB05A1)3. One Wi-Fi expansion board (order code: X-NUCLEO-IDW01M1). If not available, the Wi-Fi features

can be disabled in the C code of the BLESTAR1 sample4. One USB type A to Mini-B USB cable to connect the STM32 Nucleo to the PC5. Alternatively, one B-L475E-IOT01 Discovery kit for Iot node, equipped with the Wi-Fi ISM43362-M3G-

L44 (by Inventek Systems), and one BLE expansion board (order code: X-NUCLEO-IDB05A1) can beused.

• For the peripheral nodes running the peripheral firmware:1. One to seven STM32 Nucleo development platforms (order code: NUCLEO-F401RE or NUCLEO-

L053R8 or NUCLEO-L476RG)2. One to seven BLE expansion boards (order code: X-NUCLEO-IDB05A1)

UM2061System setup guide

UM2061 - Rev 4 page 13/21

Page 14: User manual - UM2061 - Getting started with the FP-NET ... · MQTT Message queuing telemetry transport ODE Open development environment SPI Serial peripheral interface SSID Service

3. One to seven sensor expansion boards (order code: X-NUCLEO-IKS01A1 or X-NUCLEO-IKS01A2).4. One to seven USB type A to Mini-B USB cables to connect each STM32 Nucleo to the PC5. One to seven MEMS microphone expansion boards (order code: X-NUCLEO-CCA02M1)6. One to seven proximity and ambient light sensor expansion boards (order code: X-NUCLEO-6180XA1)7. One USB type A to Micro USB cable to connect the B-L475E-IOT01 Discovery kit (if used as central

node) to the PC

2.6.4 Software setupThis section lists the minimum requirements for the developer to set up the FP-NET-BLESTAR1 function pack, runthe sample testing scenario and customize applications.

2.6.4.1 Development tool-chains and compilers

Select one of the integrated development environments supported by the STM32Cube expansion software inSection 2.6.2 Software requirements, and refer to the system and setup information provided by the selected IDEprovider. Project files for each IDE can be found in the Projects/<Board_Name>/Applications/BLESTAR1 folder ofthe FP-NET-BLESTAR1 function pack package.

2.6.5 System setup guideThis section describes how to set up the hardware before writing and executing any applications.

2.6.5.1 STM32 Nucleo and sensor expansion board setup

The STM32 Nucleo board integrates the ST-LINK/V2-1 debugger/programmer. The developer can download therelevant version of the ST-LINK/V2-1 USB driver by searching STSW-LINK008 or STSW-LINK009 on www.st.com(for the appropriate Microsoft Windows OS).The X-NUCLEO-IDW01M1 Wi-Fi expansion board can be connected to the STM32 Nucleo board through the STmorpho extension connector, as shown below.

Figure 15. STM32 Nucleo plus X-NUCLEO-IDW01M1 Wi-Fi expansion board

UM2061System setup guide

UM2061 - Rev 4 page 14/21

Page 15: User manual - UM2061 - Getting started with the FP-NET ... · MQTT Message queuing telemetry transport ODE Open development environment SPI Serial peripheral interface SSID Service

The BlueNRG-MS expansion board (X-NUCLEO-IDB05A1) can be connected to X-NUCLEO-IDW01M1expansion board through the Arduino UNO R3 extension connector, as shown below.

Note: This is the hardware configuration for the central node of the BLE star network.

Figure 16. STM32 Nucleo plus X-NUCLEO-IDW01M1 plus X-NUCLEO-IDB05A1 expansion boards

2.6.5.2 B-L475E-IOT01A Discovery kit for IoT node configuration

When using the B-L475E-IOT01A Discovery kit IoT node, the provided sample application can be used only ascentral node of the BLE star topology network.Since the on-board devices use same peripheral (SPI3), an external BLE module is necessary to use both BLEand the Wi-Fi connectivity with the B-L475E-IOT01A Discovery kit and thus to connect the board to the IBMWatson IoT Cloud platform.The X-NUCLEO-IDB05A1, equipped with the BLE SPBTLE-RF module, can be used on top of the B-L475E-IOT01A Discovery kit.Since the X-NUCLEO-IDB05A1 is not fully Arduino compatible, it is necessary to remove the zero ohm resistor R4and solder the zero ohm resistor R6.Alternatively, pins D13 and D3 must be bridged as shown in the following picture.

UM2061System setup guide

UM2061 - Rev 4 page 15/21

Page 16: User manual - UM2061 - Getting started with the FP-NET ... · MQTT Message queuing telemetry transport ODE Open development environment SPI Serial peripheral interface SSID Service

Figure 17. Discovery kit IoT node connected to X-NUCLEO-IDB05A1 expansion board

UM2061System setup guide

UM2061 - Rev 4 page 16/21

Page 17: User manual - UM2061 - Getting started with the FP-NET ... · MQTT Message queuing telemetry transport ODE Open development environment SPI Serial peripheral interface SSID Service

Revision history

Table 1. Document revision history

Date Version Changes

22-Apr-2016 1 Initial release.

16-May-2016 2 Minor text edits.

18-Jan-2017 3

Changed IBM cloud name to Watson IoT.

Updated Section 2.3: "Folder structure", Section 2.5: "Sample application description", Section 2.5.1:"Sensor data visualization on BLE app", Section 3.2: "Software requirements" and Section 3.3.1:"Hardware setup".

19-Jul-2018 4

Updated Section ● Introduction, Section 2.1 Overview, Section 2.2 Architecture and Section2.6.3 Hardware setup.

Added Section 2.6.1.4 STM32L4 Discovery kit IoT node and Section 2.6.5.2 B-L475E-IOT01ADiscovery kit for IoT node configuration.

UM2061

UM2061 - Rev 4 page 17/21

Page 18: User manual - UM2061 - Getting started with the FP-NET ... · MQTT Message queuing telemetry transport ODE Open development environment SPI Serial peripheral interface SSID Service

Contents

1 Acronyms and abbreviations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .2

2 FP-NET-BLESTAR1 software description . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .3

2.1 Overview . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3

2.2 Architecture . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3

2.3 Folder structure . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4

2.4 APIs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4

2.5 Sample application description . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4

2.5.1 Sensor data visualization on BLE app. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5

2.5.2 Sensor data visualization on IBM Quickstart . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7

2.5.3 Connect to IBM Watson IoT cloud as registered device . . . . . . . . . . . . . . . . . . . . . . . . . . . 8

2.6 System setup guide . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9

2.6.1 Hardware description . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9

2.6.2 Software requirements . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13

2.6.3 Hardware setup. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13

2.6.4 Software setup . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14

2.6.5 System setup guide. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14

Revision history . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .17

UM2061Contents

UM2061 - Rev 4 page 18/21

Page 19: User manual - UM2061 - Getting started with the FP-NET ... · MQTT Message queuing telemetry transport ODE Open development environment SPI Serial peripheral interface SSID Service

List of tablesTable 1. Document revision history . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17

UM2061List of tables

UM2061 - Rev 4 page 19/21

Page 20: User manual - UM2061 - Getting started with the FP-NET ... · MQTT Message queuing telemetry transport ODE Open development environment SPI Serial peripheral interface SSID Service

List of figuresFigure 1. FP-NET-BLESTAR1 software architecture . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3Figure 2. FP-NET-BLESTAR1 package folder structure . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4Figure 3. ST SensNet start page . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5Figure 4. List of discovered BLE devices . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6Figure 5. BLE star network data from all peripherals . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6Figure 6. LED status ON . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7Figure 7. Serial line interface for Wi-Fi configuration . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7Figure 8. URL for IBM Quickstart printed on serial interface . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8Figure 9. Sensor data in IBM Quickstart web page . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8Figure 10. Configuration for registering the STM32 device on IBM Watson IoT cloud . . . . . . . . . . . . . . . . . . . . . . . . . . . 9Figure 11. STM32 Nucleo board . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10Figure 12. X-NUCLEO-IDB05A1 expansion board . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11Figure 13. X-NUCLEO-IDW01M1 Wi-Fi expansion board . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12Figure 14. B-L475E-IOT01A Discovery kit . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13Figure 15. STM32 Nucleo plus X-NUCLEO-IDW01M1 Wi-Fi expansion board . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14Figure 16. STM32 Nucleo plus X-NUCLEO-IDW01M1 plus X-NUCLEO-IDB05A1 expansion boards. . . . . . . . . . . . . . . . 15Figure 17. Discovery kit IoT node connected to X-NUCLEO-IDB05A1 expansion board. . . . . . . . . . . . . . . . . . . . . . . . . 16

UM2061List of figures

UM2061 - Rev 4 page 20/21

Page 21: User manual - UM2061 - Getting started with the FP-NET ... · MQTT Message queuing telemetry transport ODE Open development environment SPI Serial peripheral interface SSID Service

IMPORTANT NOTICE – PLEASE READ CAREFULLY

STMicroelectronics NV and its subsidiaries (“ST”) reserve the right to make changes, corrections, enhancements, modifications, and improvements to STproducts and/or to this document at any time without notice. Purchasers should obtain the latest relevant information on ST products before placing orders. STproducts are sold pursuant to ST’s terms and conditions of sale in place at the time of order acknowledgement.

Purchasers are solely responsible for the choice, selection, and use of ST products and ST assumes no liability for application assistance or the design ofPurchasers’ products.

No license, express or implied, to any intellectual property right is granted by ST herein.

Resale of ST products with provisions different from the information set forth herein shall void any warranty granted by ST for such product.

ST and the ST logo are trademarks of ST. All other product or service names are the property of their respective owners.

Information in this document supersedes and replaces information previously supplied in any prior versions of this document.

© 2018 STMicroelectronics – All rights reserved

UM2061

UM2061 - Rev 4 page 21/21


Recommended