
Version 2.4 (September 05, 2018)
Quick Start Guide
STM32Cube function pack for IoT node with Wi-Fi, NFC and sensors for
vibration analysis, connected to IBM Watson IoT cloud
(FP-CLD-WATSON1)

Quick Start Guide Contents
2
FP-CLD-WATSON1: STM32Cube function pack for IoT node with Wi-Fi,
NFC and sensors for vibration analysis, connected to IBM Watson IoT
cloud
Setup & Demo Examples
Documents & Related Resources
STM32 Open Development Environment: Overview

Key products on board
LSM6DSL
MEMS 3D accelerometer (±2/±4/±8/±16 g) + 3D
gyroscope (±125/±245/±500/±1000/±2000 dps)
LSM303AGR
MEMS 3D magnetometer (±50 gauss) + MEMS 3D
accelerometer (±2/±4/±8/±16 g)
LPS22HB
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 (UV index)
DIL 24-pin
Motion MEMS and environmental sensor expansion board
(X-NUCLEO-IKS01A2)
Hardware overview (1/4)
3
X-NUCLEO-IKS01A2 Hardware description
• The X-NUCLEO-IKS01A2 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
HTS221
LPS22HB
LSM6DSL
LSM303AGR
Latest info available at www.st.com
X-NUCLEO-IKS01A2

Dynamic NFC tag expansion board
Hardware Overview (2/4)
4

NUCLEO-F429ZI board
Hardware Overview (3/4)
5
NUCLEO-144 Hardware Description
The STM32 Nucleo-144 boards (NUCLEO-F207ZG, NUCLEOF303ZE, NUCLEO-F412ZG, NUCLEO-F413ZH, NUCLEO-F429ZI,
NUCLEO-F446ZE, NUCLEO-F722ZE, NUCLEOF746ZG, NUCLEOF767ZI and NUCLEO-H743ZI) provide an affordable and flexible
way for users to try out new concepts and build prototypes, by
choosing from the various combinations of performance and power
consumption features provided by the STM32 microcontroller.
Key Product on board
• 2 types of extension resources:
• ST Zio connector including: support for Arduino™ Uno V3
connectivity (A0 to A5,D0 to D15) and additional signals exposing
a wide range of peripherals
• ST morpho extension pin header footprints for full access to all
STM32 I/Os
• USB OTG or full-speed device with Micro-AB connector (depending
on STM32 support)
• IEEE-802.3-2002 compliant Ethernet connector
• Flexible board power supply:
• 5 V from ST-LINK/V2-1 USB VBUS
• External power sources: 3.3 V and 7 - 12 V on ST Zio or ST
morpho connectors, 5 V on ST morphoconnector
• On-board ST-LINK/V2-1 debugger/programmer with SWD connector
Latest info available at www.st.com
NUCLEO-F429ZI

STM32L4 Discovery Board for IoT node (B-L475E-IOT01A)
Hardware Overview (4/4)
6
STM32L4 Discovery Board for IoT node (B-L475E-IOT01A)
Hardware Description
The STM32L4 Discovery kit for the IoT node (B-L475E-IOT01A) allows users to
develop applications with direct connection to cloud servers. The STM32L4 Discovery
kit enables a wide diversity of applications by exploiting low-power multilink
communication (BLE, Sub- GHz), multiway sensing (detection, environmental
awareness) and ARM® Cortex®-M4 core-based STM32L4 Series features. Arduino™
Uno V3 and PMOD connectivity provide unlimited expansion capabilities with a large
choice of specialized add-on boards.
Key Product on board
• Ultra-low-power STM32L4 Series MCUs based on ARM® Cortex® -M4 core with 1
Mbyte of Flash memory and 128 Kbytes of SRAM, in LQFP100 package
• Bluetooth® V4.1 module (SPBTLE-RF)
• Sub-GHz (868 or 915 MHz) low-power-programmable RF module (SPSGRF-868 or
SPSGRF-915)
• Wi-Fi® module Inventek ISM43362-M3G-L44 (802.11 b/g/n compliant)
• Dynamic NFC tag based on M24SR with its printed NFC antenna
• 2 digital omnidirectional microphones (MP34DT01)
• Capacitive digital sensor for relative humidity and temperature (HTS221)
• High-performance 3-axis magnetometer (LIS3MDL), 3D accelerometer and 3D
gyroscope (LSM6DSL), 260-1260 hPa absolute digital output barometer (LPS22HB),
Time-of-Flight and gesture-detection sensor (VL53L0X)
• USB OTG FS with Micro-AB connector
• Expansion connectors: Arduino™ Uno V3, PMOD
• Flexible power-supply options: ST LINK USB VBUS or external sources
• On-board ST-LINK/V2-1 debugger/programmer with USB re-enumeration capability:
mass storage, virtual COM port and debug port
Latest info available at www.st.com
B-L475E-IOT01A

FP-CLD-WATSON1
Software Overview
7
FP-CLD-WATSON1 Software Description
FP-CLD-WATSON1 is an STM32Cube function pack. It can
connect an IoT node based on the STM32L4 Discovery kit IoT
node (B-L475E-IOT01A) or theNUCLEOF429ZI to IBM Watson
IoT, transmit sensor data and receive commands from remote
applications. This package lets you jump-start end-to-end IoT
development so that you can focus on adding desired functions..
Key features
• Complete middleware to build applications based on Wi-
Fi/Ethernet connectivity, inertial and environmental sensors, and
to connect an STM32 Nucleo-144 development board with
STM32F429ZI MCU, or an STM32L4 Discovery kit IoT node (BL475E-IOT01A) to IBM Watson IoT Cloud.
• Provide software interface to access temperature and humidity
sensor (HTS221), pressure sensor (LPS25HB), motion sensors
(LIS3MDL, LSM303AGR, LSM6DS0, LSM6DSL) and to write
and read the RFID/NFC tag (ST25DV04K)
• Integrated mbedTLS and MQTT protocol middleware
• Integrated Fast Fourier Transform (FFT) algorithm for vibration
analysis
• Sample implementation based on Wi-Fi connectivity available
for STM32L4 Discovery kit IoT node (B-L475E-IOT01A), based
on Ethernet connectivity available for X-NUCLEO-IKS01A2, and
X-NUCLEO-NFC04A1, when both connected to a NUCLEOF429ZI
• Easy access to IBM Watson IoT Cloud services for sensors
data visualization and processing.
Overall Software Architecture
FP-CLD-WATSON1
Latest SW available at www.st.com

Quick Start Guide Contents
8
FP-CLD-WATSON1: STM32Cube function pack for IoT node with Wi-Fi,
NFC and sensors for vibration analysis, connected to IBM Watson IoT
cloud
Setup & Demo Examples
Documents & Related Resources
STM32 Open Development Environment: Overview

Setup & Demo Examples
HW prerequisites (1/2)
9
• 1x Motion MEMS and environmental sensor expansion board for STM32 Nucleo (X-NUCLEO-
IKS01A2)
• Note: the vibration analysis application is available only when using the X-NUCLEO-
IKS01A2 board
• 1x Dynamic NFC tag expansion board expansion board for STM32 Nucleo (X-NUCLEO-
NFC04A1) (optional)
• 1x STM32 Nucleo development board (NUCLEO-F429ZI)
• NFC-enabled Android™ device (optional)
• Windows 7 or higher - Laptop/PC
• Ethernet port for connectivity supporting DHCP
• 1 x micro USB cable
X-NUCLEO-NFC04A1
(optional)
NUCLEO-F429ZI
Micro USB Cable
X-NUCLEO-IKS01A2

Setup & Application Examples
HW prerequisites for Nucleo and expansion
board with Ethernet connectivity (2/2)
10
X-NUCLEO-IKS01A2
X-NUCLEO-NFC04A1
NUCLEO-F429ZI
STM32 Nucleo-144
Sensors
Dynamic NFC
+
+

Setup & Application Examples (Azure_Sns_DM)
HW prerequisites for B-L475E-IOT01A
11
• 1x B-L475E-IOT01A development board
• NFC-enabled Android™ device (optional)
• Laptop/PC with Windows 7, 8 or 10
• 1 x microUSB cable
• Wi-Fi Router or access to a Wi-Fi network
B-L475E-IOT01A
MicroUSB Cable

Setup & Demo Examples
SW prerequisites
12
• STSW-LINK009
• ST-LINK/V2-1 USB driver
• STSW-LINK007:
• ST-LINK/V2-1 firmware upgrade
• FP-CLD-WATSON1
• Copy the .zip file content into a folder on your PC. The package will contain source
code example (Keil, IAR, System Workbench) based only on NUCLEO-F429ZI
• Serial line terminal (e.g. TeraTerm, https://ttssh2.osdn.jp/ )
• A mobile application for Android/iOS capable to read/write NFC tag (i.e. ST25 NFC
https://play.google.com/store/apps/details?id=com.st.demo)

FP-CLD-WATSON1
Wi-Fi, NFC and sensors software for Cloud connectivity
13
Download & unpack
www.st.com
1
FP-CLD-WATSON1
Select Function Pack:
2
3
FP-CLD-WATSON1 package structure
Docs
BSP, HAL and drivers
FFT, NDEF, MQTT, Wi-Fi lib.
IBM Quickstart sample
application
4
5
Compile/Flash and
Run the project
6
www.st.com/stm32ode-fp
.\Projects\Multi\Applications\MQTT_IBM
NFC-enabled
smartphone
Visualize sensors data
Chrome
Web browser

Quickstart mode configuration
14

FP-CLD-WATSON1
Configure IBM Cloud Configuration Parameters
via serial interface(1/2)
15
1. Configure a serial terminal with the following parameters to view log messages and write AP
parameters. Tested with Teraterm version 4.96
• BaudRate : 115200
• Data : 8 bit
• Parity : none
• Stop : 1 bit
2. B-L475E-IOT01A requires Wi-Fi connectivity, provide Wi-Fi Credentials using terminal. This
step is not needed for Nucleo-F429ZI based configuration:
• Flow Control : none
• NewLine RX AUTO
• NewLine TX : CR+LF
• Local echo: Enabled

FP-CLD-WATSON1
Configure IBM Cloud Configuration Parameters
via serial interface(1/2)
16
3. Configure a serial terminal with the following parameters to view log messages and write AP
parameters. Tested with Teraterm version 4.96
• BaudRate : 115200
• Data : 8 bit
• Parity : none
• Stop : 1 bit
4. Press RESET (Black) button on STM32 Nucleo to trigger initialization phase. Enter the root
CA when firmware asks for it:
• (copy-paste from Projects\Common\Bluemix\comodo_bluemix.pem):
• Flow Control : none
• NewLine RX AUTO
• NewLine TX : CR+LF
• Local echo: Enabled

FP-CLD-WATSON1
Configure IBM Cloud Configuration Parameters
via serial interface(2/2)
17
3. Enter Registration mode.
4. Enter Bluemix Configuration String.
5. Device will start streaming sensor data to IBM Watson IoT platform service.

FP-CLD-WATSON1
Provision of device credentials using NFC (optional)(1/2)
18
This feature is only available for NUCLEO-F429ZI based configuration. NFC Usage for device credential
provisioning is optional. And it requires usage of the X-NUCLEO-NFC04A1 expansion board.
1. Write Bluemix Configuration parameters to X-NUCLEO-NFC04A1 using a mobile
application. E.g. with ST25 NFC mobile application for Android devices:
2. 7
Bring
Android
phone
near
NFC tag