quick start guide - stmicroelectronics...• nexus 5, • nexus 7, • nexus 9, • nexus 6p, •...
TRANSCRIPT
Version 1.1 (Jan. 30, 2017)
Quick Start GuideSTM32 ODE Function Pack for connecting 6LoWPAN IoT Nodes to
smartphone through a BLE interface
(FP-NET-6LPBLE1)
Quick Start Guide Contents2
FP-NET-6LPBLE1: STM32 ODE Function Pack for connecting 6LoWPAN IoT Nodes to smartphone through a BLE interface
Hardware and Software overview
Setup & Demo Examples
Documents & Related Resources
STM32 Open Development Environment: Overview
Bluetooth Low Energy Expansion Board (X-NUCLEO-IDB05A1)
Hardware Overview (1/3)3
Hardware Description
• The X-NUCLEO-IDB05A1 is a Bluetooth Low Energy
(BLE) evaluation and development board system,
designed around ST’s SPBTLE-RF Bluetooth Low
Energy module based on BlueNRG-MS.
• The BlueNRG-MS processor hosted in the SPBTLE-RF
module communicates with the STM32 Nucleo developer
board host microcontroller though an SPI link available
on the Arduino UNO R3 connector.
Key Products on board
SPBTLE-RF
Bluetooth Low Energy, FCC and IC certified, module
based on Bluetooth® Low Energy wireless network
processor BlueNRG-MS, BLE4.2 compliant.
SPBTLE-RF integrates a BALF-NRG-01D3 balun and
a chip antenna. It embeds 32 MHz and 32.768 kHz
crystal oscillators for the BlueNRG-MS.
M95640-R
64-Kbit serial SPI bus EEPROM with high-speed clock
interface
Latest info available at www.st.com
X-NUCLEO-IDB05A1
Sub-1 GHz RF expansion boards
Hardware Overview (2/3) 4
SPSGRF-868 or
SPSGRF-915 (*)
X-NUCLEO-IDS01A4/5 Hardware description
• The X-NUCLEO-IDS01A4, X-NUCLEO-IDS01A5
are evaluation boards based on the SPIRIT1 RF
modules SPSGRF-868 and SPSGRF-915
• The SPIRIT1 module communicates with the
STM32 Nucleo developer board host
microcontroller though an SPI link available on the
Arduino UNO R3 connector.
EEPROM
Arduino UNO R3 connector
Key products on board
SPSGRF
Sub-GHz (868 or 915 MHz) low power
programmable RF transceiver modules
SPIRIT1
Low data-rate, low-power sub-1GHz transceiver)
module
M95640-R
64 Kbit SPI bus EEPROM with high-speed clock
Latest info available at www.st.com
X-NUCLEO-IDS01A4
X-NUCLEO-IDS01A5
(*) Identification of the operating frequency of the X-NUCLEO-IDS01Ax (x=4 or 5)
is performed through two resistors (R14 and R15).
LPS25HB
HTS221
Key Product on board
LSM6DS0: MEMS 3D accelerometer (±2/±4/±8 g) + 3D gyroscope
(±245/±500/±2000 dps)
LIS3MDL: MEMS 3D magnetometer (±4/ ±8/ ±12/ 16 gauss)
LPS25HB: MEMS pressure sensor, 260-1260 hPa absolute digital
output barometer
HTS221: capacitive digital relative humidity and temperature
DIL 24-pin: socket available for additional MEMS adapters and
other sensors
DIL 24-pin
Motion MEMS and environmental sensors expansion board
Hardware Overview (3/3) 5
X-NUCLEO-IKS01A1 Hardware Description
• The X-NUCLEO-IKS01A1 is a motion MEMS and environmental sensor
evaluation board system.
• It is compatible with the Arduino UNO R3 connector layout, and is
designed around ST’s latest sensors.
Arduino UNO R3 connector
ST morpho connector**
** Connector for the STM32 Nucleo Board
LSM6DS0
LIS3MDL
Latest info available at www.st.com
X-NUCLEO-IKS01A1
Key Features
• The X-NUCLEO-IKS01A1 is a motion MEMS and environmental sensor
evaluation board system.
• All sensor sensors are connected on a single I²C bus
• Sensor I²C address selection
• Each sensor has separate power supply lines allowing power
consumption measurement
• Sensor disconnection (disconnect the I²C bus as well as the power
supply)
• Interrupt and DRDY signals from sensors
• DIL24 socket (Compatible to STEVAL-MKI***V* MEMS adapter boards,
i.e. STEVAL-MKI160V1)
OPTIONAL
BLE & 6LoWPAN software (FP-NET-6LPBLE1)
Software Overview 6
FP-NET-6LPBLE1 Software Description
FP-NET-6LPBLE1 is an STM32 ODE Function Pack. This
package provides application layer bridging functionality to
connect a 6LoWPAN network made of SPIRIT1 based sub-1
GHz RF communication sensor nodes to a device in a BLE
network, such as a smartphone or tablet, allowing the control of
the sensor nodes by an app. This package allows jumpstarting
end-to-end IoT development so user can save time in the
integration of the different basic functions needed to have a
6LoWPAN node connected to smart phone using BLE interface.
Key features
• Firmware package with Contiki 6LoWPAN protocol stack 3.x
and related applications running on a STM32 Nucleo board
equipped with sub-1 GHz RF,BLE connectivity and optionally,
a sensors expansion board. Middleware library with BLE and
Contiki 6LoWPAN protocol stack 3.x.
• Sample application to connect a Border Router to sensor node
using 6LoWPAN mesh network technology and display mesh
network tree and sensors data on android phone.
• Example implementation available for X-NUCLEO-IDS01A4 or
X-NUCLEO-IDS01A5 and X-NUCLEO-IDB05A1 boards
connected to a NUCLEO-F401RE board and sensor board X-
NUCLEO-IKS01A1.
• Easy portability across different MCU families.
FP-NET-6LPBLE1
Latest info available at www.st.com
Overall Software Architecture
Quick Start Guide Contents7
FP-NET-6LPBLE1: STM32 ODE Function Pack for connecting 6LoWPAN IoT Nodes to Smartphone through a BLE Interface
Hardware and Software overview
Setup & Demo Examples
Documents & Related Resources
STM32 Open Development Environment: Overview
Setup & Demo Examples
H/W prerequisites 8
Mini USB Cable
• 1x Sub-1GHz RF expansion board
(X-NUCLEO-IDS01A4 or X-NUCLEO-IDS01A5)
• 1x Bluetooth Low Energy Expansion Board
(X-NUCLEO-IDB05A1)
• 1x STM32 Nucleo development board (NUCLEO-F401RE)
• 1x BLE-enabled Android™ device
• 1x PC with Windows 7, 8 or 10
• 1x USB type A to Mini-B USB cable
X-NUCLEO-IDB05A1X-NUCLEO-IKS01A1X-NUCLEO-IDS01A4
or
X-NUCLEO-IDS01A5
NUCLEO-F401RE
Setup & Demo Examples
S/W prerequisites 9
• STSW-LINK009
• ST-LINK/V2-1 USB driver
• STSW-LINK007
• ST-LINK/V2-1 firmware upgrade
• FP-NET-6LPBLE1
• Copy the zip file content into a folder on your PC
• The package will contain source code example (Keil, IAR, System Workbench for STM32 for NUCLEO-F401RE
• Binary files for Border Router and Sensor Node application
• Border Router : Applications/STM32_Nucleo_BorderRouter/Binary/STM32F401RE-Nucleo/ STM32F401RE-Nucleo_BorderRouter.bin
• Sensor Node : Applications/STM32_Nucleo_SensorNode/Binary/STM32F401RE-Nucleo/ STM32F401RE-Nucleo_SensorNode.bin
FP-NET-6LPBLE1
Bluetooth low energy & 6LoWPAN software 10
Download &
unpack
www.st.com/stm32ode-fp
www.st.com
1
FP-NET-6LPBLE1
Select
2
3
FP-NET-6LPBLE1 package structure
Docs
Application example
5
Compile / Flash and Run the project
BSP, HAL and drivers
4
Android™ smartphone application
6
Sub-GHz 6LoWPAN
BLE
Wireless Sensor Network Scenario
Sub GHz 6lowpan
BTLE
Border router
Sensor
Node
Sensor
Node
Sensor
Node
Sensor Node
Android Application
Sensor Nodes BLE Border Router User Interface
11
Sensors Data Transmission
Border Router(NUCLEO-F401RE
+
X-NUCLEO-IDS01A4 (868 MHz)
or
X-NUCLEO-IDS01A5 (915 MHz)
+
X-NUCLEO-IDB05A1)
Sensors Node(NUCLEO-F401RE
+
X-NUCLEO-IDS01A4 (868 MHz)
or
X-NUCLEO-IDS01A5 (915 MHz)
+
X-NUCLEO-IKS01A1)
LED Indicates
Ongoing Data
Transmission
12
Install Android Application(1/2)
• Copy Smart_Sensor.apk in Android Smart Phone Memory.
• With the File explorer, user can locate the Smart_Sensor.apk and install on
the phone.
• Once installed, launch the application on the mobile phone.
• The application validated on following Smart Phones :
• Samsung galaxy S5,
• Nexus 5,
• Nexus 7,
• Nexus 9,
• Nexus 6P,
• Redmi Note3
• Gionee s plus
13
Install Android Application(2/2)
• User needs to download File Explorer from Google Play store.
14
Power ON Border Router And Nodes15
Border Router Sensors Nodes
Mini USB
Execute Android Application(1/5)16
Smart Sensor App Go to Settings & Select BLE
Module
Execute Android Application(2/5)17
Select BT DeviceScan BT Devices
Execute Android Application(3/5)18
As soon as node connects to Border router, LED “LD2”
will Toggle Select 6LoWPAN Option
19
Select Node IP address See the Sensor Values
Execute Android Application(4/5)
Execute Android Application(5/5)20
Select 6LoWPAN Mesh Option See the Mesh Network Tree
Documents & Related Resources
FP-NET-6LPBLE1
• DB3011: STM32 ODE function pack for connecting 6LoWPAN IoT nodes to smartphones via BLE interface – data brief
• UM2102: Getting started with the FP-NET-6LPBLE1 function pack for 6LoWPAN IoT node connection to a smartphone via BLE interface – user
manual
• Software Setup
X-NUCLEO-IDS01A4:
• Gerber files, BOM, Schematic
• DB2552: Sub-1 GHz RF expansion board based on the SPSGRF-868 module for STM32 Nucleo– data brief
• UM1872: Getting started with the Sub-1 GHz expansion board based on SPSGRF-868 and SPSGRF-915 modules for STM32 Nucleo– user
manual
X-NUCLEO-IDB05A1:
• Gerber files, BOM, Schematic
• DB2592: Bluetooth Low Energy expansion board based on SPBTLE-RF module for STM32 Nucleo – data brief
• UM1912: Getting started with X-NUCLEO-IDB05A1 Bluetooth low energy expansion board based on SPBTLE-RF module for STM32 Nucleo–
user manual
X-NUCLEO-IKS01A1:
• Gerber files, BOM, Schematic
• DS10619: Motion MEMS and environmental sensor expansion board for STM32 Nucleo – data brief
• UM1820: Getting started with motion MEMS and environmental sensor expansion board for STM32 Nucleo – user manual
21
All documents are available in the DESIGN tab of the related products webpage
Quick Start Guide Contents22
FP-NET-6LPBLE1: STM32 ODE Function Pack for connecting 6LoWPAN IoT Nodes to Smartphone through a BLE Interface
Hardware and Software overview
Setup & Demo Examples
Documents & Related Resources
STM32 Open Development Environment: Overview
STM32 Open Development Environment
Fast, affordable Prototyping and Development 23
• The STM32 Open Development Environment (ODE) consists of a set of stackable boards
and a modular open SW environment designed around the STM32 microcontroller family.
www.st.com/stm32ode
Function Packs
(FP)
STM32Cube
development software
STM32 Nucleo
expansion boards
(X-NUCLEO)
STM32 Nucleo
development boards
STM32Cube
expansion software
(X-CUBE)
Power supply
through USB or
external source
Integrated debugging
and programming
ST-LINK probe
STM32 microcontroller
Complete product range
from ultra-low power to high-performance
ST morpho extension header
STM32 Nucleo
Development Boards (NUCLEO)
• A comprehensive range of affordable development boards for all the STM32
microcontroller series, with unlimited unified expansion capabilities and integrated
debugger/programmer functionality.
24
www.st.com/stm32nucleo
Arduino™ UNO R3 extension headers
Move/ActuatePower InteractConnect
Sense
STM32 Nucleo
Expansion Boards (X-NUCLEO)
• Boards with additional functionality that can be plugged directly on top of the STM32
Nucleo development board directly or stacked on another expansion board.
25
DIL24 support for
new devices
Motion MEMS sensors
Environmental sensors
www.st.com/x-nucleo
Example of STM32 expansion board (X-NUCLEO-IKS01A1)
STM32 Open Development Environment
Software components
• STM32Cube software (CUBE) - A set
of free tools and embedded software bricks
to enable fast and easy development on
the STM32, including a Hardware
Abstraction Layer and middleware bricks.
• STM32Cube expansion software
(X-CUBE) - Expansion software provided
free for use with the STM32 Nucleo
expansion board and fully compatible with
the STM32Cube software framework. It
provides abstracted access to expansion
board functionality through high-level APIs
and sample applications.
26
www.st.com/x-cube
• Compatibility with multiple Development Environments - The STM32 Open Development
Environment is compatible with a number of IDEs including IAR EWARM, Keil MDK, and GCC-based
environments. Users can choose from three IDEs from leading vendors, which are free of charge and
deployed in close cooperation with ST. These include Eclipse-based IDEs such as Ac6 System
Workbench for STM32 and the MDK-ARM environment.
Tools& IDEs
Application examples(e.g. basedonSTOpenSoftwareX)
Hardware
SampleapplicationsApplications
IAREWARM,Keil MDK-ARM,GCC-basedIDEs(e.g. Ac6System Workbenchfor STM32)
STM32CubeHardware Abstraction Layer (HAL)
STM32Cubemiddleware
Upper level middleware(e.g. STOpenSoftwareX)
Middleware
HardwareAbstraction
STM32Cubeexpansion middleware
STM32 Nucleo expansion boards (X-NUCLEO)
STM32 Nucleo developer boards
OPEN LICENSE MODELS: STM32Cube software and sample applications are covered by a
mix of fully open source BSD license and ST licenses with very permissive terms.
www.st.com/stm32cube
STM32 Open Development Environment
Building block approach 27
The building blocks Your need Our answer
Move /
Actuate
Connect
Power
Sense
Process
Inertial modules, magnetometer
Proximity, microphone
Pressure, temperature, humidity
Bluetooth LE, Sub-GHz radio
NFC, Wi-Fi, GNSS
Energy management & battery
General-purpose microcontrollers
Stepper motor driver
DC & BLDC motor driver
Audio amplifier
COLLECT
TRANSMIT
ACCESS
CREATE
POWER
PROCESS
Software
Secure microcontrollers
Touch controller
Operation Amplifier
Accelerometer, gyroscope
Translate
Industrial input / output
www.st.com/stm32ode