Getting started with FP-SNS-6LPNODE1 software for IoT sensor node connection to 6LoWPAN networks using sub-1ghz RF

Similar documents
Getting started with the FP-NET-6LPBLE1 function pack for 6LoWPAN IoT node connection to a smartphone via BLE interface

Quick Start Guide STM32 ODE Function Pack for IoT sensor node connection to 6LoWPAN networks through sub-1ghz RF communication (FP-SNS-6LPNODE1)

Getting started with the FP-SNS-ALLMEMS1 Bluetooth low energy and sensors software expansion for STM32Cube

Running a simple 6LowPAN network consisting of one receiver node and one or more sensor nodes in a Sub-1GHz RF band

Getting started with the X-CUBE-MEMS1 motion MEMS and environmental sensor software expansion for STM32Cube

Getting started with X-CUBE-LED channel LED driver software expansion based on LED1642GW for STM32Cube

Quick Start Guide. STM32 ODE Function Pack for connecting 6LoWPAN IoT Nodes to smartphone through a BLE interface (FP-NET-6LPBLE1)

Getting started with the FP-IND-PLCWIFI1 function pack for PLC management via Wi-Fi

NUCLEO-L496ZG. STM32 Nucleo-144 board. Features. Description

Version (Apr 28, 2016)

UM2045 User manual. Getting started with the X-CUBE-NFC3 near field communication transceiver software expansion for STM32Cube.

NUCLEO-L433RC-P NUCLEO-L452RE-P

Getting started with the X-CUBE-NFC5 high performance HF reader / NFC initiator IC software expansion for STM32Cube

Getting started with MotionPM real-time pedometer library in X-CUBE-MEMS1 expansion for STM32Cube

Getting started with osxmotiongc gyroscope calibration library for X-CUBE-MEMS1 expansion for STM32Cube

Getting started with MotionPM real-time pedometer library in X CUBE-MEMS1 expansion for STM32Cube

Getting started with the FP-CLD-AWS1 software package for IoT node with Wi-Fi and sensors, connected to Amazon AWS IoT cloud

UM2350. Getting started with MotionPW real-time pedometer for wrist library in X-CUBE-MEMS1 expansion for STM32Cube. User manual.

UM2216 User manual. Getting started with MotionFA fitness activity library in X CUBE MEMS1 expansion for STM32Cube. Introduction

Quick Start Guide. High power stepper motor driver expansion board based on powerstep01 for STM32 Nucleo (X-NUCLEO-IHM03A1)

STM32 Open Development Environment

AN4624 Application note

Getting started with the X-CUBE-IKA02A1 multifunctional software expansion for STM32Cube

UM2276. Getting started with MotionSD standing vs sitting desk detection library in X-CUBE-MEMS1 expansion for STM32Cube. User manual.

UM2194. Getting started with MotionAW activity recognition for wrist library in X-CUBE-MEMS1 expansion for STM32Cube. User manual.

Getting started with the X-CUBE-53L1A1 Time-of-Flight long distance ranging sensor software expansion for STM32Cube

Quick Start Guide. Bipolar stepper motor driver expansion board based on L6208 for STM32 Nucleo (X-NUCLEO-IHM05A1) Version 1.1.

Quick Start Guide. Long distance ranging ToF sensor expansion board based on VL53L1X for STM32 Nucleo (X-NUCLEO-53L1A1) Version (February 20, 2018)

Quick Start Guide. Stepper motor driver expansion board based on L6474 for STM32 Nucleo (X-NUCLEO-IHM01A1) Version 1.2.

Quick Start Guide. Bluetooth low energy, sensors and NFC tag software for STM32Cube (BLUEMICROSYSTEM3) Version (September 15, 2016)

Getting started with osxmotionmc magnetometer calibration library for X-CUBE-MEMS1 expansion for STM32Cube

IoT node with BLE connectivity, digital microphone, environmental and motion sensors, motion and audio middleware libraries.

Getting started with MotionAR activity recognition library in X-CUBE-MEMS1 expansion for STM32Cube

Quick Start Guide. STM32Cube function pack for IoT sensor node with telemetry and device control applications for Amazon AWS Cloud (FP-CLD-AWS1)

Getting started with osxmotionar activity recognition library for X-CUBE-MEMS1 expansion for STM32Cube

Quick Start Guide. Version 3.0 (June 12, 2017)

Getting started with MotionAR activity recognition library in X-CUBE-MEMS1 expansion for STM32Cube

P-NUCLEO-6180X2. Proximity, gesture, ambient light sensor expansion board based on VL6180X for STM32L053R8. Description. Features

Quick Start Guide. Dual-channel high side driver expansion board based on VPS2535H for STM32 Nucleo (X-NUCLEO-IPS02A1) Version 1.0 (Sept.

Quick Start Guide. Sound terminal expansion board based on STA350BW for STM32 NUCLEO (X-NUCLEO-CCA01M1) Version 1.1.

P-NUCLEO-IKA02A1. STM32 Nucleo pack: electrochemical toxic gas sensor expansion board with CO sensor. Description. Features

Quick Start Guide. Contiki OS and 6LoWPAN sub-1ghz RF communication software expansion for STM32 Cube (Contiki6LP) Version 1.3 (December 10, 2018)

Getting started with MotionMC magnetometer calibration library in X-CUBE-MEMS1 expansion for STM32Cube

32L476GDISCOVERY. Discovery kit with STM32L476VG MCU. Features. Description

Quick Start Guide. Bluetooth Low Energy expansion board based on SPBTLE-RF module for STM32 Nucleo (X-NUCLEO-IDB05A1) Version 1.

Quick Start Guide. STM32 ODE Function Pack for Building a PLC controlled via Wi-Fi (FP-IND-PLCWIFI1) Version 1.1 (Oct 16, 2017)

Quick Start Guide. Dynamic NFC/RFID tag IC expansion board based on ST25DV04K for STM32 Nucleo (X-NUCLEO-NFC04A1) Version 1.

Quick Start Guide. GNSS expansion board based on Teseo-LIV3F module for STM32 Nucleo (X-NUCLEO-GNSS1A1) Version 2.1 (Nov 9, 2018)

Quick Start Guide. STM32Cube function pack for IoT node with dynamic NFC tag, environmental and motion sensors (FP-SNS-SMARTAG1)

P-NUCLEO-USB001. STM32 Nucleo pack for USB Type-C and Power Delivery. Features. Description

X-NUCLEO-53L0A1. Ranging and gesture detection sensor expansion board based on VL53L0X for STM32 Nucleo. Description. Features

Getting started with STEVAL-IDB007V1 and STEVAL-IDB008V1 evaluation boards

P-NUCLEO-USB001. STM32 Nucleo pack for USB Type-C and Power Delivery Data brief. Features. Description

X-NUCLEO-53L1A1. Long distance ranging Time-of-Flight sensor expansion board based on VL53L1X for STM32 Nucleo. Description.

Quick Start Guide. Bluetooth Low Energy expansion board based on BlueNRG for STM32 Nucleo (X-NUCLEO-IDB04A1) Version 1.

EVALKITSTKNX. Miniature transceiver STKNX evaluation and development kit. Features

Getting started with the STSW-BCNKT01 software package for STEVAL-BCNKT01V1 based on STM32Cube

Bluetooth low energy profiles for the X-CUBE-BLE1 expansion for STM32Cube. Description

EVALKIT-VL6180X. VL6180X plug-in and STM32 F401RE Nucleo board explorer kit. Description. Features

UM1853 User manual. STM32CubeF1 Nucleo demonstration firmware. Introduction

STM32 Open Development Environment

UM2192. Getting started with MotionMC magnetometer calibration library in X-CUBE-MEMS1 expansion for STM32Cube. User manual.

P-NUCLEO-53L1A1. VL53L1X nucleo pack with X-NUCLEO-53L1A1 expansion board and STM32F401RE nucleo board. Description. Features

Quick Start Guide STM32Cube function pack for creating a BLE star network connected via Wi-Fi to IBM Watson IoT cloud (FP-NET-BLESTAR1)

Getting started with VL53L0X ranging and gesture detection sensor software expansion for STM32Cube

32F412GDISCOVERY. Discovery kit with STM32F412ZG MCU. Features. Description

Getting started with the STM32 Nucleo pack for USB Type-C and Power Delivery with the Nucleo-F072RB board and the STUSB1602

P-NUCLEO-53L0A1. VL53L0X Nucleo pack with ranging, gesture detection sensor expansion board and STM32F401RE. Description. Features

Quick Start Guide. Version 3.1 (August 8, 2018)

USB Type-C and Power Delivery Nucleo pack with NUCLEO-F072RB expansion board based on STUSB1602. Description

Getting started with the X-CUBE-SPN3 high power stepper motor driver software expansion for STM32Cube

STM32L4R9I-EVAL. Evaluation board with STM32L4R9AI MCU. Features

Quick Start Guide. Stepper motor driver expansion board based on L6474 for STM32 Nucleo (X-NUCLEO-IHM01A1) Version 1.

32F469IDISCOVERY. Discovery kit with STM32F469NI MCU. Features. Description

Quick Start Guide. STM32 ODE function pack for IoT node with BLE connectivity and environmental and motion sensors (FP-SNS-MOTENV1)

UM1727 User manual. Getting started with STM32 Nucleo board software development tools. Introduction

Getting started with the STM32 ODE function pack for IoT node with NFC, BLE connectivity and environmental, motion and Time-of-Flight sensors

Quick Start Guide. Wi-Fi expansion board based on SPWF01SA module for STM32 Nucleo (X-NUCLEO-IDW01M1) Version 1.0 (November 18, 2015)

32F746GDISCOVERY. Discovery kit with STM32F746NG MCU. Features. Description

STEVAL-STLKT01V1. SensorTile development kit. Description. Features

USB Type-C and Power Delivery Nucleo pack with NUCLEO-F072RB expansion board based on the STUSB1602

STEVAL-STLKT01V1. SensorTile development kit. Description. Features

Getting started with the software package for STEVAL-STLKT01V1 based on STM32Cube

Getting started with the X-CUBE-SPN2 two-axis stepper motor driver software expansion for STM32Cube

Quick Start Guide (V1.0 May2015) Dynamic NFC tag expansion board based on M24SR for STM32 NUCLEO (X-NUCLEO-NFC01A1)

Getting started with the P-NUCLEO-IKA02A1 STM32 Nucleo pack for electrochemical toxic gas sensor expansion board with CO sensor

Quick Start Guide. NFC card reader expansion board based on ST25R3911B for STM32 Nucleo (X-NUCLEO-NFC05A1) Version (July 14 th, 2017)

Getting started with the software package for L6474 stepper motor driver X-CUBE-SPN1 expansion for STM32Cube

STSW-BLUENRG1-DK. BlueNRG-1, BlueNRG-2 DK SW package

Quick Start Guide. STM32 ODE function pack for MEMS microphones acquisition, advanced audio processing and audio output (FP-AUD-SMARTMIC1)

X-NUCLEO-53L0A1 ranging and gesture detection sensor expansion board based on VL53L0X for STM32 Nucleo

Sub-1 GHz RF expansion board based on the SPSGRF-868 module for STM32 Nucleo. Description

UM1982 User manual. Multi-Sensor RF 868 MHz platform. Introduction

Getting started with X-NUCLEO-IHM06A1 low voltage stepper motor driver expansion board based on STSPIN220 for STM32 Nucleo

UM2084 User manual. Getting started with the ultra-low-power STM32 and LoRa Nucleo pack. Introduction

Getting started with the digital MEMS microphone expansion board based on MP34DT01-M for STM32 Nucleo

Wi-Fi expansion board based on SPWF01SA module for STM32 Nucleo. Description

STEVAL-BCNKT01V1. BlueCoin Starter kit. Features. Description

Quick Start Guide. Version 2.4 (September 05, 2018)

Getting started with the software package for digital MEMS microphones in X-CUBE-MEMSMIC1 expansion for STM32Cube

Transcription:

User manual Getting started with FP-SNS-6LPNODE1 software for IoT sensor node connection to 6LoWPAN networks using sub-1ghz RF Introduction FP-SNS-6LPNODE1 is an STM32 ODE function pack. Thanks to this package, you can connect your IoT node to a 6LoWPAN wireless sensor network and expose the sensor and actuator resources using standard application layer protocols. This package helps you jumpstart IoT development and save time when integrating the various underlying functions. This software package provides a sample application allowing RESTful access to the sensors and actuators on the IoT node through the OMA Lightweight M2M (LWM2M) standard, using the IPSO Smart Object Guidelines for data representation. The software runs on the STM32 microcontroller and includes drivers for the SPIRIT1 based sub-1ghz RF communication modules (SPSGRF-868 or SPSGRF-915), as well as the motion, environmental, and time-of-flight sensors. February 2017 DocID029628 Rev 2 1/26 www.st.com

Contents Contents UM2100 1 Acronyms and abbreviations... 5 2 FP-SNS-6LPNODE1 software package... 6 2.1 Overview... 6 2.2 Architecture... 6 2.3 Folder structure... 8 2.4 APIs... 8 2.5 End-to-end system description and setup... 8 2.5.1 End-to-end system overview... 8 2.5.2 End-to-end connectivity scenario using a 6LoWPAN-to-WiFi bridge and remote application server... 9 2.5.3 End-to-end connectivity scenario using an IPv6 host PC and local application server... 10 2.5.4 LWM2M application server (Leshan)... 10 2.5.5 Wireless sensor node applications... 10 2.5.6 Wireless sensor node setup... 12 3 System setup guide... 16 3.1 Hardware description... 16 3.1.1 STM32 Nucleo platform... 16 3.1.2 X-NUCLEO-IDS01A4 or X-NUCLEO-IDS01A5 expansion board... 17 3.1.3 X-NUCLEO-IKS01A1 or X-NUCLEO-IKS01A2 expansion board... 18 3.1.4 X-NUCLEO-6180XA1 expansion board... 20 3.2 Software requirements... 20 3.3 Hardware setup... 21 3.3.1 Hardware setup guide... 21 4 References... 24 5 Revision history... 25 2/26 DocID029628 Rev 2

List of tables List of tables Table 1: List of acronyms... 5 Table 2: IPSO objects supported by the ipso-nosensors application... 11 Table 3: IPSO objects supported by the ipso-mems application... 11 Table 4: IPSO objects supported by the ipso-flightsense application... 12 Table 5: Document revision history... 25 DocID029628 Rev 2 3/26

List of figures List of figures UM2100 Figure 1: FP-SNS-6LPNODE1 software architecture... 7 Figure 2: FP- SNS-6LPNODE1 package folder structure... 8 Figure 3: End-to-end connectivity using a 6LoWPAN-WiFi bridge... 9 Figure 4: End-to-end connectivity scenario using a host PC... 10 Figure 5: Serial line terminal configuration parameters... 13 Figure 6: Client node registered on the remote server... 13 Figure 7: Leshan server homepage... 13 Figure 8: Leshan server, client homepage... 14 Figure 9: Leshan server observing and reading resources belonging to IPSO objects... 15 Figure 10: STM32 Nucleo board... 16 Figure 11: X-NUCLEO-IDS01A4 / X-NUCLEO-IDS01A5 expansion board... 17 Figure 12: X-NUCLEO-IKS01A1 expansion board... 18 Figure 13: X-NUCLEO-IKS01A2 MEMS and environmental sensor expansion board... 19 Figure 14: X-NUCLEO-6180XA1 expansion board... 20 Figure 15: STM32 Nucleo plus the SPIRIT1 expansion board... 21 Figure 16: STM32 Nucleo plus the SPIRIT1 expansion board plus the MEMS expansion board... 22 Figure 17: STM32 Nucleo plus the SPIRIT1 expansion board plus the FlightSense expansion board... 23 4/26 DocID029628 Rev 2

Acronyms and abbreviations 1 Acronyms and abbreviations Table 1: List of acronyms Acronym Description IDE integrated development environment BSP board support package HAL hardware abstraction layer UDP user datagram protocol 6LoWPAN IPv6 over low power wireless personal area networks RPL routing protocol for low power and lossy networks MCU microcontroller unit RF radio frequency OS operative system CoAP constrained application protocol LWM2M lightweight machine to machine IoT internet of things IPSO IP for smart objects MEMS micro electro-mechanical systems Wi-Fi wireless LAN based on IEEE 802.11 GUI graphical user interface DocID029628 Rev 2 5/26

FP-SNS-6LPNODE1 software package UM2100 2 FP-SNS-6LPNODE1 software package 2.1 Overview FP-NET-6LPNODE1 is a software package which expands the functionality of STM32Cube. The key features of the package are: Complete firmware to connect an IoT node with sensors and actuators to a 6LoWPAN network, using sub-1ghz RF communication technology Middleware library with Contiki OS and Contiki 6LoWPAN protocol stack 3.0 Support for mesh networking technology through the standard RPL protocol IPSO Smart Object data representation of the node resources (sensors and actuators) Access to the node from a remote server with the OMA Lightweight M2M (LWM2M) standard Sample implementation available for X-NUCLEO-IDS01A4 or X-NUCLEO-IDS01A5 RF boards, X-NUCLEO-IKS01A1 or X-NUCLEO-IKS01A2, and X-NUCLEO-6180X1 sensor boards, when connected to a NUCLEO-F401RE or a NUCLEO-L152RE board Easy portability across different MCU families, thanks to STM32Cube Free, user-friendly license terms This software uses Contiki OS to develop applications that can connect our node to a 6LoWPAN network. Communication in the 6LoWPAN network is handled by the SPIRIT1 sub-1ghz RF transceiver (on an X-NUCLEO-IDS01A4 or X-NUCLEO-IDS01A5 expansion board). Sensor data from motion and environmental sensors boards (X-NUCLEO-IKS01A1 or X-NUCLEO-IKS01A2) and proximity sensor, gesture and ALS sensor board (X- NUCLEO-6180XA1) can be accessed from a remote device via RESTful transactions (HTTP or CoAP protocol). The software enables the exposure of sensor and actuator resources on the node with standard routines based on the OMA Lightweight M2M (LWM2M) specification, through an object model implemented according to the IPSO Smart Object Guidelines (see http://www.ipso-alliance.org/ipso-community/resources/smart-objects-interoperability/). Technical details on the Contiki OS/6LoWPAN stack can be found at https://github.com/contiki-os/contiki/wiki, in the Internals section of the wiki. Information regarding Contiki APIs is available in the doxygen documentation in the FP- SNS-6LPNODE1 package. 2.2 Architecture This software is based on the STM32CubeHAL hardware abstraction layer for the STM32 microcontroller. it extends STM32Cube by providing a board support package (BSP) for the sub-1ghz RF communication expansion boards, the environmental and motion MEMS sensors expansion board, and for the proximity, ranging and light sensing sensors expansion board. The drivers abstract low-level details of the hardware and allow the middleware components and applications to access sensor data in a hardwareindependent manner, and to access and control the SPIRIT1 based sub-1ghz RF communication modules (SPSGRF-868 or SPSGRF-915). 6/26 DocID029628 Rev 2

FP-SNS-6LPNODE1 software package The software layers used by the application software to access and use the X-NUCLEO expansion boards are the following: STM32Cube HAL layer: consists of a simple, generic and multi-instance set of APIs (application programming interfaces) to interact with the upper application, library and stack layers. These generic and extension APIs are directly built around a generic architecture and allows layers like the middleware layer built on top of them to implement their functions without requiring specific hardware configuration information for given microcontroller units (MCU). This structure improves library code reusability and guarantees easy portability across other devices. Board support package (BSP) layer: supports the peripherals on the STM32 Nucleo board, except the MCU. This limited set of APIs provides a programming interface for certain board specific peripherals like the LED and user button. This interface also helps in identifying the specific board version. Figure 1: FP-SNS-6LPNODE1 software architecture DocID029628 Rev 2 7/26

FP-SNS-6LPNODE1 software package 2.3 Folder structure Figure 2: FP- SNS-6LPNODE1 package folder structure UM2100 The folders in the software package are: 2.4 APIs Documentation: with a compiled HTML file generated from the source code, which details the software components and APIs. Drivers: the HAL drivers, the board-specific drivers for each supported board or hardware platform (including those for the onboard components) and the CMSIS vendor-independent hardware abstraction layer for the Cortex-M processor series. Middlewares: contains the full porting of the Contiki OS for the STM32 platform. The ST subfolder contains STM32-specific files to configure both the Contiki OS and the SPIRIT1 radio, while the Third_Party folder contains Contiki source files. Projects: contains several example applications that implement application-level functions to expose the node sensor and actuator resources through the LWM2M standard using the data model described in the IPSO Smart Object Guidelines. The projects are provided for the NUCLEO-F401RE and NUCLEO-L152RE platforms under the IAR Embedded Workbench for ARM, RealView Microcontroller Development Kit (MDK-ARM), and System Workbench for STM32 (SW4STM32) development environments. Detailed user API function and parameter descriptions are available in a compiled HTML file in the package Documentation folder. 2.5 End-to-end system description and setup 2.5.1 End-to-end system overview In a typical end-to-end deployment scenario, a node runs a lightweight embedded web server that enables access from a remote system to the hosted resources representing the physical sensors and actuators on the node board. Resources can be accessed via RESTful transactions, which is performed with the CoAP application protocol in the context of constrained resource environments. 8/26 DocID029628 Rev 2

FP-SNS-6LPNODE1 software package 2.5.2 End-to-end connectivity scenario using a 6LoWPAN-to-WiFi bridge and remote application server In this scenario, a 6LoWPAN-to-WiFi bridge forwards the traffic between the 6LoWPAN and Wi-Fi networks, allowing connectivity between a node in the 6LoWPAN network and an application server on the Internet. An implementation of the 6LoWPAN-to-WiFi bridge can be performed with the FP-NET- 6LPWIFI1 software package (STM32 ODE Function Pack) running on a NUCLEO-F401RE or a NUCLEO-L152RE equipped with an X-NUCLEO-IDS01A4 or X-NUCLEO-IDS01A5 sub-1ghz RF expansion board, and a X-NUCLEO-IDW01M1 Wi-Fi expansion board. The FP-NET-6LPWIFI1 software package (STM32 ODE Function Pack) implementing a 6LoWPAN-to-Wi-Fi bridge is available at www.st.com/stm32ode-fp. Figure 3: End-to-end connectivity using a 6LoWPAN-WiFi bridge For details explaining how to set up the 6LoWPAN-to-Wifi bridge and to establish the connection with a public application server implementing the OMA Lightweight M2M (LWM2M) standard, see Reference [1]. This server can be used for evaluation purposes. DocID029628 Rev 2 9/26

FP-SNS-6LPNODE1 software package 2.5.3 End-to-end connectivity scenario using an IPv6 host PC and local application server UM2100 In this scenario, a 6LoWPAN border router is connected to a PC (IPv6 host). The wireless sensor node is connected to a 6LoWPAN border router that sends and receives IPv6 packets to and from the host PC. In our sample implementation, the border router system runs on an STM32 Nucleo board connected to the PC through a USB serial link. The application server could run on the internet or on the local PC itself, but we will assume a local application server implementation for the sake of simplicity. Figure 4: End-to-end connectivity scenario using a host PC See reference [2], section 2.5, for a detailed description of the IPv6 host and 6LoWPAN border router setup. 2.5.4 LWM2M application server (Leshan) The system has been tested with the Leshan Java based open source implementation of the OMA Lightweight M2M server. Leshan runs on a public Internet-connected server (as shown in Figure 3: "End-to-end connectivity using a 6LoWPAN-WiFi bridge ") and can be used for evaluation purposes, alternatively it can be installed on a local host, as shown in Figure 4: "End-to-end connectivity scenario using a host PC". Refer to http://www.eclipse.org/leshan/, for information on setting up the Leshan server on the host PC. The README file in the GitHub repository of the Leshan project at https://github.com/eclipse/leshan also contains installation information. 2.5.5 Wireless sensor node applications The FP-SNS-6LPNODE1 software package Projects folder contains several sample applications for the X-NUCLEO-IDS01A4 or X-NUCLEO-IDS01A5 sub-1ghz RF expansion board, X-NUCLEO-IKS01A1 or X-NUCLEO-IKS01A2, and X-NUCLEO-6180XA1 sensor expansion boards used on top of a NUCLEO-F401RE board. 10/26 DocID029628 Rev 2

FP-SNS-6LPNODE1 software package These applications can configure the wireless node as a REST server and expose the sensor and actuator resources using the OMA Lightweight M2M standard (LWM2M) and the IPSO Smart Objects Guidelines [3]. The applications differ by the type of sensors used. 2.5.5.1 ipso-nosensors application This sample application allows device configuration as a simple wireless node without any sensors. It exposes common resources like LEDs and user buttons. The device can be implemented using a NUCLEO-F401RE or NUCLEO-L152RE board equipped with an X-NUCLEO-IDS01A4 or X-NUCLEO-IDS01A5 sub-1ghz RF expansion board. Table 2: IPSO objects supported by the ipso-nosensors application Object ID Instances Notes Server 1 1 Device 3 1 IPSO Digital Input 3200 1 The instance maps the STM32 Nucleo board user button IPSO Light Control 3311 2 The instances map the STM32 Nucleo and X-NUCLEO- IDS01A4/5 board LEDs 2.5.5.2 ipso-mems application This sample application allows device configuration as a wireless node with motion and environmental sensors. It exports resources from the MEMS sensor expansion board (temperature, humidity and acceleration sensors). The device can be implemented using a NUCLEO-F401RE or NUCLEO-L152RE board equipped with an X-NUCLEO-IDS01A4 or X-NUCLEO-IDS01A5 sub-1ghz RF expansion board, and an X-NUCLEO-IKS01A1 or X-NUCLEO-IKS01A2 expansion board, featuring temperature, humidity, pressure and motion MEMS sensors. Table 3: IPSO objects supported by the ipso-mems application Object ID Instances Notes Server 1 1 Device 3 1 IPSO Digital Input 3200 1 The instance maps the STM32 Nucleo board user button IPSO Temperature 3303 1 IPSO Humitidy 3304 1 IPSO Light Control 3311 1 The instance maps the STM32 Nucleo board LED IPSO Accelerometer IPSO Magnetometer 3313 1 3314 1 IPSO Barometer 3315 1 DocID029628 Rev 2 11/26

FP-SNS-6LPNODE1 software package 2.5.5.3 ipso-flightsense application UM2100 This sample application allows device configuration as a wireless node with a time-of-flight sensor (VL6180X proximity, gesture and ALS sensor, based on ST s FlightSense technology). The node exports resources from the FlightSense sensor expansion board. The device can be implemented using a NUCLEO-F401RE board equipped with a X- NUCLEO-IDS01A4 or X-NUCLEO-IDS01A5 sub-1ghz RF expansion board, and a X- NUCLEO-6180XA1 expansion board, featuring the VL6180X proximity, gesture and ALS sensor. Table 4: IPSO objects supported by the ipso-flightsense application Object ID Instances Notes Server 1 1 Device 3 1 IPSO Digital Input 3200 1 IPSO Presence Sensor 3302 1 The instance maps the STM32 Nucleo board user button IPSO Light Control 3311 2 The instances map the STM32 Nucleo and X-NUCLEO- IDS01A4/5 board LEDs 2.5.6 Wireless sensor node setup All the sample applications provided demonstrate how a node can connect to a server by means of the OMA Lightweight M2M (LWM2M) standard. By default, the three sample applications are configured to implement the scenario where the wireless node attempt connection with a public online server (located at: http://leshan.eclipse.org/; it is is a Java implementation of a LWM2M server). Leshan also implements a GUI that communicates with the server through a REST API, more information about the Leshan server can be found at http://www.eclipse.org/leshan/. The Leshan public LWM2M server is used for evaluation purposes only. The sample applications can also be made to implement the scenario enabling connection to a Leshan LWM2M server that runs locally on a host PC. In this case, the URL of the local server must be inserted in the application code. To do this, undefine USE_PUBLIC_LWM2M_SERVER from the project properties (preprocessor symbols) and set the desired address in client.c file, e.g.: #define LWM2M_SERVER_ADDRESS_v6 aaaa::1 or #define LWM2M_SERVER_ADDRESS_v4 192.168.0.1 12/26 DocID029628 Rev 2

FP-SNS-6LPNODE1 software package 2.5.6.1 Connecting the wireless node to the LWM2M server 1 Power the STM32 Nucleo board using a Mini-B USB cable connected to the PC. 2 Program the firmware on the STM32 Nucleo board by copying (drag and drop) the binary file on the USB mass storage that is automatically created when plugging the STM32 Nucleo board to the PC. Ready-to-be-flashed binary firmware can be found for each of the three supported applications in the Binary subdirectory of each sample application folder. Alternatively, each application can be built to generate binaries using the provided projects, with one of the supported IDEs. 3 Open a serial line monitor utility, select the serial port name to which the board is connected and configure it with the parameters shown below (example uses Tera Term utility with the device connected to COM port 19). Figure 5: Serial line terminal configuration parameters 4 Press the black RESET button on the STM32 Nucleo board and wait for the node to complete the registration Figure 6: Client node registered on the remote server 5 Open your web browser and insert the URL of the public Leshan server (http://leshan.eclipse.org) for the default remote application server scenario, or insert the URL of the local Leshan server for the PC server scenario. Figure 7: Leshan server homepage DocID029628 Rev 2 13/26

FP-SNS-6LPNODE1 software package UM2100 6 Click on the corresponding Client Endpoint Figure 8: Leshan server, client homepage 14/26 DocID029628 Rev 2

FP-SNS-6LPNODE1 software package 7 Start observing or reading one or more resources Figure 9: Leshan server observing and reading resources belonging to IPSO objects DocID029628 Rev 2 15/26

System setup guide UM2100 3 System setup guide 3.1 Hardware description This section summarizes the hardware components needed for developing a sensor-based application. Visit www.st.com for more detailed information on all the associated boards. 3.1.1 STM32 Nucleo platform STM32 Nucleo development boards provide an affordable and flexible way for users to test solutions and build prototypes with any STM32 microcontroller line. The Arduino connectivity support and ST morpho connectors make it easy to expand the functionality of the STM32 Nucleo open development platform with a wide range of specialized expansion boards to choose from. 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 various packaged software examples. Figure 10: STM32 Nucleo board Information regarding the STM32 Nucleo board is available at www.st.com/stm32nucleo 16/26 DocID029628 Rev 2

3.1.2 X-NUCLEO-IDS01A4 or X-NUCLEO-IDS01A5 expansion board System setup guide The X-NUCLEO-IDS01A4 and X-NUCLEO-IDS01A5 expansion boards provide a platform to test the features and capabilities of the SPSGRF modules, based on the SPIRIT1 low data rate, low power, sub-1 GHz transceiver device. These expansion boards can be plugged into the Arduino UNO R3 connectors of any STM32 Nucleo board. The user can mount ST morpho connectors if required. Other expansion boards can easily be stacked to allow evaluation of different devices using sub-1 GHz communication. The boards are equipped with the following features: Onboard SPSGRF module based on the SPIRIT1 sub-1 GHz transceiver device SPI EEPROM for saving parameters LED for user interface Jumper at 3V3 for checking the current consumption of the expansion board Figure 11: X-NUCLEO-IDS01A4 / X-NUCLEO-IDS01A5 expansion board DocID029628 Rev 2 17/26

System setup guide 3.1.3 X-NUCLEO-IKS01A1 or X-NUCLEO-IKS01A2 expansion board UM2100 3.1.3.1 X-NUCLEO-IKS01A1 expansion board The X-NUCLEO-IKS01A1 is a sensor expansion board for the STM32 Nucleo board. It is also compatible with Arduino UNO R3 connector layout and is designed around humidity (HTS221), pressure (LPS25HB) and motion (LIS3MDL and LSM6DS0) sensing devices. The X-NUCLEO-IKS01A1 interfaces with the STM32 MCU via the I²C pin, and the user can change the default I²C port and the device IRQ by changing a resistor on the evaluation board. You can attach the LSM6DS3 DIL24 expansion component and use it instead of the one of the LSM6DS0 sensors. Figure 12: X-NUCLEO-IKS01A1 expansion board 18/26 DocID029628 Rev 2

3.1.3.2 X-NUCLEO-IKS01A2 expansion board System setup guide The X-NUCLEO-IKS01A2 is a motion MEMS and environmental sensor expansion board for the STM32 Nucleo. It is equipped with Arduino UNO R3 connector layout, and is designed around the LSM6DSL 3D accelerometer and 3D gyroscope, the LSM303AGR 3D accelerometer and 3D magnetometer, the HTS221 humidity and temperature sensor and the LPS22HB pressure sensor. The X-NUCLEO-IKS01A2 interfaces with the STM32 microcontroller via the I²C pin, and it is possible to change the default I²C port. Figure 13: X-NUCLEO-IKS01A2 MEMS and environmental sensor expansion board DocID029628 Rev 2 19/26

System setup guide 3.1.4 X-NUCLEO-6180XA1 expansion board The X-NUCLEO-6180XA1 is an expansion board for the STM32 Nucleo system, also compatible with Arduino UNO R3 connector layout and designed around STMicroelectronics VL6180X proximity, gesture and ALS sensor, based on the ST FlightSense Time-of-Flight technology. UM2100 The board allows the user to test VL6180X functionality and develop relevant applications. It includes: a 4-Digit display to render either the range value in mm or the ambient light value in lux a switch to select the value type to be displayed a 2.8 V regulator to supply the VL6180X two level shifters to adapt the I/O level to the microcontroller main board the necessary connectivity for the application For applications which implement gesture recognition, you need to plug two additional satellite sensors to the connectors marked LEFT and RIGHT. The third connector (BOTTOM) is not used. Figure 14: X-NUCLEO-6180XA1 expansion board 3.2 Software requirements The following software components are needed in order to set up a suitable development environment for creating applications with the STM32 Nucleo plus RF expansion and optional sensor expansion boards: FP-SNS-6LPNODE1 software, available at www.st.com. One of the following development tool-chain and compilers: IAR Embedded Workbench for ARM (EWARM) toolchain + ST-LINK RealView Microcontroller Development Kit (MDK-ARM) toolchain + ST-LINK System Workbench for STM32 (SW4STM32) + ST-LINK 20/26 DocID029628 Rev 2

3.3 Hardware setup System setup guide 3.3.1 Hardware setup guide This section describes how to setup different hardware parts before writing and executing an application on the STM32 Nucleo board with the RF expansion board. 3.3.1.1 Configuration for ipso-nosensors sample application Required components: One STM32 Nucleo development platform (order code: NUCLEO-F401RE or NUCLEO-L152RE) One SPIRIT1 expansion board (order code: X-NUCLEO-IDS01A4 (for 868 MHz), or X- NUCLEO-IDS01A5 (for 915 MHz) One USB type A to Mini-B USB cables to connect each STM32 Nucleo to the PC In the figure below, an X-NUCLEO-IDS01A4 or X-NUCLEO-IDS01A5 SPIRIT1 expansion board is connected to the STM32 Nucleo board. Figure 15: STM32 Nucleo plus the SPIRIT1 expansion board DocID029628 Rev 2 21/26

System setup guide 3.3.1.2 Configuration for ipso-mems sample application Required components: UM2100 One STM32 Nucleo development platform (order code: NUCLEO-F401RE or NUCLEO-L152RE) One SPIRIT1 expansion board (order code: X-NUCLEO-IDS01A4 (for 868 MHz), or X NUCLEO-IDS01A5 (for 915 MHz) One MEMS sensors expansion board (order code: X-NUCLEO-IKS01A1 or X NUCLEO-IKS01A2) One USB type A to Mini-B USB cables to connect each STM32 Nucleo to the PC In the figure below, a X-NUCLEO-IKS01A1 MEMS expansion board is connected to the STM32 Nucleo over the X-NUCLEO-IDS01A4 or X-NUCLEO-IDS01A5 SPIRIT1 expansion board. Figure 16: STM32 Nucleo plus the SPIRIT1 expansion board plus the MEMS expansion board 22/26 DocID029628 Rev 2

3.3.1.3 Configuration for ipso-flightsense sample application Required components: System setup guide One STM32 Nucleo development platform (order code: NUCLEO-F401RE) One SPIRIT1 expansion board (order code: X-NUCLEO-IDS01A4 (for 868 MHz), or X NUCLEO-IDS01A5 (for 915 MHz) One FlightSense expansion board (order code: X-NUCLEO-6180XA1) One USB type A to Mini-B USB cables to connect each STM32 Nucleo to the PC In the figure below, an X-NUCLEO-IKS01A1 FlightSense expansion board is connected to the STM32 Nucleo development board over the X-NUCLEO-IDS01A4 or X NUCLEO IDS01A5 SPIRIT1 expansion board. Figure 17: STM32 Nucleo plus the SPIRIT1 expansion board plus the FlightSense expansion board DocID029628 Rev 2 23/26

References UM2100 4 References [1] UM2080 User Manual - Getting started with the FP-NET-6LPWIFI1 software package connecting 6LoWPAN IoT nodes to the Internet via Wi-Fi networks, available at www.st.com. [2] UM2040 User Manual - Getting started with osxcontiki6lp, Contiki OS and 6LoWPAN sub-1 GHz RF software expansion for STM32Cube, available at www.st.com. [3] IPSO Alliance Smart Object Guidelines IPSO Smart Object Starter Pack, available at http://www.ipso-alliance.org/ipso-community/resources/smart-objects-interoperability/. 24/26 DocID029628 Rev 2

Revision history 5 Revision history Date Version Changes 17-Oct-2016 1 Initial release. 22-Feb-2017 2 Table 5: Document revision history Throughout document: added NUCLEO-L152RE board compatibility information DocID029628 Rev 2 25/26

IMPORTANT NOTICE PLEASE READ CAREFULLY STMicroelectronics NV and its subsidiaries ( ST ) reserve the right to make changes, corrections, enhancements, modifications, and improvements to 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. Purchasers are solely responsible for 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 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. 2017 STMicroelectronics All rights reserved 26/26 DocID029628 Rev 2