ST FP-SNS-FLIGHT1 User manual

March 2017
DocID029047 Rev 4
1/50
www.st.com
UM2026
User manual
Getting started with the STM32 ODE function pack for IoT node with NFC,
BLE connectivity and environmental, motion and Time-of-Flight sensors
Introduction
FP-SNS-FLIGHT1 is an STM32 ODE function pack for connecting an IoT node to a smartphone via
Bluetooth low energy and view real time humidity, pressure, motion, proximity and ambient light sensor
data (for X-NUCLEO-6180XA1 only).
It uses the NDEF standard for simple and secure Bluetooth pairing, storing the necessary information on
the NFC tag and thus simplifying the device configuration. It includes the functionality to perform
firmware over-the-air updating (FOTA) with the ST BlueMS application for Android/iOS devices.
This package lets you jump-start your sensor node development so that you can focus on adding
desired functions.
The expansion is built on STM32Cube software technology to ease portability across different STM32
microcontrollers.
The software comes with sample driver implementations running on the X-NUCLEO-IKS01A2 (or X-
NUCLEO-IKS01A1), X-NUCLEO-53L0A1 (or X-NUCLEO-6180XA1), X-NUCLEO-NFC01A1 and the X-
NUCLEO-IDB05A1 (or X-NUCLEO-IDB04A1) boards connected to a NUCLEO-F401RE or NUCLEO-
L476RG development board.

Contents
UM2026
2/50
DocID029047 Rev 4
Contents
1Acronyms and abbreviations .........................................................5
2FP-SNS-FLIGHT1 software description..........................................6
2.1 Overview...........................................................................................6
2.2 Architecture.......................................................................................7
2.3 Folder structure.................................................................................9
2.4 Flash organization...........................................................................10
2.5 The boot process ............................................................................11
2.6 The installation process ..................................................................12
2.7 Firmware-over-the-air (FOTA) update.............................................17
2.8 APIs ................................................................................................17
2.9 Sample application description........................................................17
2.10 Android and iOS sample client application......................................23
2.11 Firmware over-the-air (FOTA) update with BlueMS........................35
3System setup guide.......................................................................39
3.1 Hardware description......................................................................39
3.1.1 STM32 Nucleo platform.................................................................... 39
3.1.2 X-NUCLEO-IDB04A1 expansion board............................................ 40
3.1.3 X-NUCLEO-IDB05A1 expansion board............................................ 40
3.1.4 X-NUCLEO-NFC01A1 expansion board.......................................... 41
3.1.5 X-NUCLEO-IKS01A1 expansion board............................................ 42
3.1.6 X-NUCLEO-IKS01A2 expansion board............................................ 43
3.1.7 X-NUCLEO-6180XA1 expansion board........................................... 44
3.1.8 X-NUCLEO-53L0A1 expansion board.............................................. 45
3.2 Software description........................................................................46
3.3 Hardware and software setup .........................................................47
3.3.1 Hardware setup ................................................................................ 47
3.3.2 Software setup.................................................................................. 47
3.3.3 System setup guide.......................................................................... 47
4Revision history ............................................................................49

UM2026
List of tables
DocID029047 Rev 4
3/50
List of tables
Table 1: Acronyms and abbreviations ........................................................................................................5
Table 2: Document revision history ..........................................................................................................49

List of figures
UM2026
4/50
DocID029047 Rev 4
List of figures
Figure 1: FP-SNS-FLIGHT1 software architecture.....................................................................................9
Figure 2: FP-SNS-FLIGHT1 package folder structure................................................................................9
Figure 3: FP-SNS-FLIGHT1 Flash structure ............................................................................................11
Figure 4: Bootloader folder content ..........................................................................................................12
Figure 5: FP-SNS-FLIGHT1 Flash structure ............................................................................................12
Figure 6: Binary folder content..................................................................................................................13
Figure 7: Content of a project folder.........................................................................................................14
Figure 8: BootLoader and FP-SNS-FLIGHT1 installation.........................................................................15
Figure 9: FP-SNS-FLIGHT1 dump process..............................................................................................16
Figure 10: Terminal setting.......................................................................................................................18
Figure 11: Initialization phase...................................................................................................................19
Figure 12: UART console output when the BLE services are started ......................................................20
Figure 13: UART console output when a device first connects with the board ........................................22
Figure 14: UART console output when one device are already trusted...................................................23
Figure 15: BlueMS (android version) main page (after BLE connection).................................................24
Figure 16: BlueMS (Android version) MotionFX sensor fusion page .......................................................25
Figure 17: BlueMS (Android version) popup windows..............................................................................26
Figure 18: BlueMS (android version) example of plot value.....................................................................27
Figure 19: BlueMS (android version) menu selection...............................................................................28
Figure 20: BlueMS (android version) Serial console (stdout/stderr).........................................................29
Figure 21: BlueMS (android version) Debug console (stdin/stdout/stderr)...............................................30
Figure 22: BlueMS (android version) Debug console - change transmission frequency .........................31
Figure 23: BlueMS (Android version) MotionAR activity recognition page...............................................32
Figure 24: BlueMS (Android version) MotionCP carry position recognition page ....................................33
Figure 25: BlueMS (Android version) MotionGR gesture recognition page .............................................34
Figure 26: BlueMS (Android version) gesture detection page..................................................................35
Figure 27: BlueMS (Android version) firmware upgrade page .................................................................36
Figure 28: BlueMS (Android version) firmware update file selection........................................................37
Figure 29: Terminal window information during FOTA.............................................................................38
Figure 30: BlueMS (Android version) application page during FOTA and on completion........................38
Figure 31: STM32 Nucleo board...............................................................................................................39
Figure 32: X-NUCLEO-IDB04A1 expansion board...................................................................................40
Figure 33: X-NUCLEO-IDB05A1 expansion board...................................................................................41
Figure 34: X-NUCLEO-NFC01A1 M24SR64-Y dynamic NFC tag expansion board ...............................42
Figure 35: X-NUCLEO-IKS01A1 expansion board...................................................................................43
Figure 36: X-NUCLEO-IKS01A2 MEMS and environmental sensor expansion board ............................44
Figure 37: X-NUCLEO-6180XA1 expansion board ..................................................................................45
Figure 38: X-NUCLEO-53L0A1 expansion board.....................................................................................46
Figure 39: STM32 Nucleo development board plus X-NUCLEO-IDB05A1, X-NUCLEO-NFC01A1, X-
NUCLEO-IKS01A1 and X-NUCLEO-6180XA1 expansion boards...........................................................48

UM2026
Acronyms and abbreviations
DocID029047 Rev 4
5/50
1 Acronyms and abbreviations
Table 1: Acronyms and abbreviations
Acronym
Description
BLE
Bluetooth low energy
NFC
Near field communication
NDEF
NFC data exchange format

FP-SNS-FLIGHT1 software description
UM2026
6/50
DocID029047 Rev 4
2 FP-SNS-FLIGHT1 software description
2.1 Overview
The key features of the FP-SNS-FLIGHT1 package are:
For STM32 Nucleo board with X-NUCLEO-IKS01A1 expansion boards, complete
middleware to build applications using temperature and humidity sensors (HTS221),
pressure sensor (LPS25HB), motion sensors (LIS3MDL and LSM6DS0), motion
sensor LSM6DS3 mounted on a DIL24 expansion component, VL53L0X proximity
sensor (or VL6180X proximity and ambient light sensing) module and M24SR64-Y
dynamic NFC/RFID tag (using the NDEF standard).
For STM32 Nucleo board with X-NUCLEO-IKS01A2 expansion boards, complete
middleware to build applications using temperature and humidity sensor (HTS221),
pressure sensor (LPS22HB), motion sensors (LSM303AGR and LSM6DSL), VL53L0X
proximity sensor (or VL6180X proximity and ambient light sensing) module and
M24SR64-Y Dynamic NFC/RFID tag (using the NDEF standard).
Very low power Bluetooth low energy (BlueNRG) single-mode network processor,
compliant with Bluetooth specifications core for transmitting information to one client.
MotionFX (iNEMOEngine PRO) real-time motion sensor data fusion to combine the
output from multiple MEMS sensors.
MotionAR (iNEMOEngine PRO) real-time activity-recognition algorithm based only on
accelerometer data.
MotionCP (iNEMOEngine PRO) carry position detection algorithm based only on
accelerometer data.
MotionGR (iNEMOEngine PRO) gesture recognition algorithm based only on
accelerometer data.
Proximity-based hand gesture detection algorithm based on VL53L0X (or VL6180X)
proximity sensors.
Easy portability across different MCU families, thanks to STM32Cube.
Compatible with BlueMS application for Android/iOS (ver. 2.0.0 or higher) available on
the respective online Google Play™/iTunes™ stores.
Over-the-air firmware update using the BlueMS application version 3.0.0 or higher (for
X-NUCLEO-IDB05A1 Bluetooth low energy expansion board only).
Free, user-friendly license terms.
Sample implementation on X-NUCLEO-NFC01A1, X-NUCLEO-IKS01A2 (or X-
NUCLEO-IKS01A1), X-NUCLEO-53L0A1 (or X-NUCLEO-6180XA1) and X-NUCLEO-
IDB05A1 (or X-NUCLEO-IDB04A1) expansion boards when connected to a NUCLEO-
F401RE or NUCLEO-L476RG development board.
This software creates the following Bluetooth services:
the first service exposes all the hardware features and contains the following
characteristics:
temperature
pressure
humidity
luminosity (for X-NUCLEO-6180XA1 only)
proximity
3D gyroscope, 3D magnetometer, 3D accelerometer
the second service exposes all the software features and contains the following
characteristics:
quaternions generated by the MotionFX library in short precision
recognized activity using the MotionAR algorithm

UM2026
FP-SNS-FLIGHT1 software description
DocID029047 Rev 4
7/50
recognized carry position using the MotionCP algorithm
recognized gesture using the MotionGR algorithm
the hand gesture recognized by the gesture detection middleware
the third is the Console service that includes two characteristics:
stdin/stdout with bi-directional communication between client and server
stderr for a mono-directional channel from the STM32 Nucleo board to an
Android/iOS device
the last service is for transmitting/resetting the calibration status.
This software gathers:
the temperature, humidity, pressure, light (for X-NUCLEO-6180XA1 only), distance
and motion sensor drivers for the HTS221, LPS25H, VL53L0A1 (or VL6180X),
LSM6DS0 (or LSM6DS3) and LIS3MDL devices for STM32 Nucleo expansion boards
with X-NUCLEO-IKS01A1.
the temperature, humidity, pressure, light (with only X-NUCLEO-6180XA1), distance
and motion sensor drivers for the HTS221, LPS22H, VL53L0A1 (or VL6180X),
LSM6DSL and LSM303AGR devices for STM32 Nucleo expansion boards with X-
NUCLEO-IKS01A2.
This package is compatible with the BlueMS Android/iOS (ver. 2.2.0 or higher) application,
available at the respective Google Play/iTunes stores, which can be used for displaying
information sent via the Bluetooth low energy protocol. BlueMS version 3.0.0 and above is
required for Over-The-Air firmware updates (for X-NUCLEO-IDB05A1 Bluetooth low energy
expansion board only).
2.2 Architecture
This software is based on the STM32CubeHAL hardware abstraction layer for the STM32
microcontroller. The package extends STM32Cube by providing a board support package
(BSP) for the BlueNRG-1 sensor expansion board, proximity and ambient light sensing (for
X-NUCLEO-6180XA1 only) module and the dynamic NFC tag expansion boards, and some
middleware components for communication with other Bluetooth low energy devices: it also
enables data exchange with an NFC-ready device using the NDEF standard.
BlueNRG is a very low power Bluetooth low energy (BLE) single-mode network processor.
The MotionFX (iNEMOEngine PRO) filtering and predictive suite uses advanced algorithms
to intelligently integrate multiple MEMS sensor outputs, regardless of environmental
conditions achieving an optimal performance. Real-time motion sensor data fusion is set to
increase accuracy, resolution, stability and response time.
The MotionAR (iNEMOEngine PRO) real-time software acquires data from the
accelerometer to recognize user activities. The software can also be combined with other
human motion recognition algorithms and can significantly improve user experience in
advanced motion-based applications in consumer, computer, industrial and medical fields.
The MotionCP (iNEMOEngine PRO) real-time software acquires data from the
accelerometer to recognize board positions (on desk, on head, near head, shirt pocket,
trousers pocket and in swinging arm).
The MotionGR (iNEMOEngine PRO) real-time software acquires data from the
accelerometer and recognizes user gestures (pick up, glance and wake up).
The gesture detect software library uses the X-NUCLEO-53L0A1 (or X-NUCLEO-
6180XA10) on-board sensor plus two additional satellites to detect tap and swipe (from left
to right and from right to left) gestures.
Activity recognition, carry position and gesture recognition are managed through a specific
software for mobile and wearable applications, and the exclusive use of the accelerometer

FP-SNS-FLIGHT1 software description
UM2026
8/50
DocID029047 Rev 4
by MotionAR, MotionCP, and MotionGR facilitates the low power consumption required in
this field of application, in compliance with Bluetooth specifications core 4.0 (X-NUCLEO-
IDB04A1) or 4.2 (X-NUCLEO-IDB05A1) for STM32 Nucleo boards. The drivers abstract
low-level hardware details and allow the middleware components and applications to
access the Dynamic NFC tag and all the other sensors in a hardware-independent manner.
The package includes a sample application that the developer can use to start
experimenting with the code. The sample application was developed to enable NFC pairing
and to transmit the values read from all the sensors (temperature, humidity, pressure,
luminosity, proximity, accelerometer, magnetometer and gyroscope) to a Bluetooth low
energy-enabled device such as an Android™ or iOS™-based smartphone.
You can use the BlueMS Android/iOS application (version 2.2.0 or higher), from the
respective Google Play™ and iTunes™ stores, to visualize the results of the MotionFX,
MotionAR, MotionCP, MotionGR and gesture detection algorithms and display the values
read from the accelerometer, magnetometer, gyroscope, temperature, humidity, pressure,
luminosity and proximity sensors.
Version 3.0.0 or higher allows over-the-air firmware update (with X-NUCLEO-IDB05A1
Bluetooth low energy expansion boards only).
The ST BlueMS Android/iOS application was developed to enable NFC pairing prior to
sensor data transmission.
The software layers used by the application software to access and use the Sensors
expansion boards are:
STM32Cube HAL driver layer: provides a simple, generic, multi-instance set of APIs
(application programming interfaces) to interact with the upper layers (application,
libraries and stacks). It is composed of generic and extension APIs and is directly built
around a generic architecture and allows the layers built on top of it, such as the
middleware layer, to implement their functions without dependending on the specific
hardware configuration for a given microcontroller unit (MCU). This structure improves
library code reusability and guarantees an easy portability across other devices.
Board Support Package (BSP) layer: provides support for the peripherals (excluding
the MCU) on the STM32 Nucleo board through the board support package (BSP). The
BSP is a limited set of APIs which provides a programming interface for certain board-
specific peripherals like the LED, the user button, etc.

UM2026
FP-SNS-FLIGHT1 software description
DocID029047 Rev 4
9/50
The next figure outlines the software architecture of the package:
Figure 1: FP-SNS-FLIGHT1 software architecture
2.3 Folder structure
Figure 2: FP-SNS-FLIGHT1 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 the on-board components and the CMSIS vendor-
independent hardware abstraction layer for the Cortex-M processor series.
Middlewares: contains libraries and protocols for BlueNRG-1 Bluetooth low energy
and NDEF devices, the Meta Data Manager, MotionFX (iNEMOEngine PRO) sensor

FP-SNS-FLIGHT1 software description
UM2026
10/50
DocID029047 Rev 4
fusion library, MotionAR (iNEMOEngine PRO) activity-recognition library, MotionCP
(iNEMOEngine PRO) carry-position recognition library, MotionGR (iNEMOEngine
PRO) gesture recognition library and for the gesture detection algorithm.
Projects: contains a sample application used to transmit the sensor data and
MotionFX sensor fusion output, MotionAR activity-recognition, MotionCP carry-
position, MotionGR gesture recognition and for the gesture detection algorithm via the
Bluetooth low energy protocol provided for the NUCLEO-F401RE/NUCLEO-L476RG
platforms through the IAR Embedded Workbench for ARM, RealView Microcontroller
Development Kit (MDK-ARM) and System Workbench for STM32 development
environments.
Utilities: contains the boot loader binary ready to be flashed for the STM32F401RE
and STM32L476RG Nucleo boards.
2.4 Flash organization
Apart from storing its code, FP-SNS-FLIGHT1 uses the Flash memory to allow the
Firmware-Over-The-Air update.
To enable this feature the Flash memory is divided into three different regions (see Figure
3: "FP-SNS-FLIGHT1 Flash structure"):
1. the first region contains a custom boot loader
2. the second region contains the FP-SNS-FLIGHT1 firmware
3. the third region is used to store the FOTA before the update
Even if the STM32F401RE (512 KB) and the STM32L476RG (1024 KB) cache sizes and
arrangements differ, the same Flash arrangement has been used for both.
For further information, refer to:
(RM0368) Reference manual STM32F401xB/C and STM32F401xD/E advanced
ARM®-based 32-bit MCUs
(RM0351) Reference manual STM32L4x6 advanced ARM®-based 32-bit MCUs

UM2026
FP-SNS-FLIGHT1 software description
DocID029047 Rev 4
11/50
Figure 3: FP-SNS-FLIGHT1 Flash structure
2.5 The boot process
The FP-SNS-FLIGHT1 cannot be flashed at the beginning of the Flash memory (address
0x08000000); therefore it is compiled to run from the beginning of the second Flash region
(0x08004000).
To enable this behavior, the vector table offset has been set in Src/system_stm32f4xx.c
(for STM32F401) and Src/system_stm32l4xx.c (for STM32L476) thus: #define
VECT_TAB_OFFSET 0x4000.
The linker script has also been changed.
For example, the linker script for SP-SNS-FLIGHT1 running on STM32F401RE and
compiled using IAR Embedded Workbench for ARM is:
define symbol __ICFEDIT_intvec_start__ = 0x08004000;
/*-Memory Regions-*/
define symbol __ICFEDIT_region_ROM_start__ = 0x08004000;
define symbol __ICFEDIT_region_ROM_end__ = 0x0803FFFF;
define symbol __ICFEDIT_region_RAM_start__ = 0x20000000;

FP-SNS-FLIGHT1 software description
UM2026
12/50
DocID029047 Rev 4
define symbol __ICFEDIT_region_RAM_end__ = 0x20017FFF;
/*-Sizes-*/
define symbol __ICFEDIT_size_cstack__ = 0x8000;
define symbol __ICFEDIT_size_heap__ = 0x800;
Using the above linker script, the maximum usable code size is fixed at 240 KB.
You must flash the appropriate bootloader binary for STM32F401RE or STM32L476RG ,
found in the Utilities\BootLoader folder, to the first Flash region (address 0x08000000).
Figure 4: Bootloader folder content
At any board reset:
if there is a FOTA in the third Flash region, the bootloader overwrites the second Flash
region (with FP-SNS-FLIGHT1 firmware) and replaces its content with the FOTA
restarting the board;
if there is no FOTA, the bootloader jumps to the FP-SNS-FLIGHT1 firmware.
Figure 5: FP-SNS-FLIGHT1 Flash structure
2.6 The installation process
The package Binary directory contains an image (in .bin and .hex format) for each platform
(NUCLEO-F401RE, NUCLEO-L476RG), including:
pre-compiled FLIGHT1 firmware that may be flashed with ST-LINK to the correct
memory address (0x08004000) of a supported STM32 Nucleo development
boardNote that this pre-compiled binary is compatible with the FOTA update
procedure
pre-compiled FLIGHT1 plus BootLoader firmware that may be directly flashed to a
supported STM32 Nucleo development board with the ST-LINK or via a Drag & Drop

UM2026
FP-SNS-FLIGHT1 software description
DocID029047 Rev 4
13/50
operation (STM32 Nucleo boards only)Note that this pre-compiled binary is not
compatible with the FOTA update procedure
Figure 6: Binary folder content
To flash modified FLIGHT1 firmware, simply flash the compiled FP-SNS-FLIGHT1 firmware
to the correct address (0x08004000).
A batch script has been provided to simplify this operation by saving the firmware and the
BootLoader on the right position; it is available for each platform (NUCLEO-F401RE,
NUCLEO-L476RG) and for each IDE (IAR/RealView/System Workbench):
IAR toolchain Embedded Workbench V7.70.2:
For Nucleo F4:
CleanFLIGHT1_IAR_53L0A1_NF401
CleanFLIGHT1_IAR_6180XA1_NF401.bat
For Nucleo L4:
CleanFLIGHT1_IAR_53L0A1_NL476.bat
CleanFLIGHT1_IAR_6180XA1_NL476.bat
µVision toolchain - MDK-ARM Professional Version: 5.21.1:
For Nucleo F4:
CleanFLIGHT1_MDK_ARM_53L0A1_NF401.bat
CleanFLIGHT1_MDK_ARM_6180XA1_NF401.bat
For Nucleo L4:
CleanFLIGHT1_MDK_ARM_53L0A1_NL476.bat
CleanFLIGHT1_MDK_ARM_6180XA1_NL476.bat
System Workbench for STM32 Version 1.13.1.201701200843:
For Nucleo F4:
CleanFLIGHT1_SW4STM32_53L0A1_NF401.bat
CleanFLIGHT1_SW4STM32_6180XA1_NF401.bat
For Nucleo L4:
CleanFLIGHT1_SW4STM32_53L0A1_NL476.bat
CleanFLIGHT1_SW4STM32_6180XA1_NL476.bat

FP-SNS-FLIGHT1 software description
UM2026
14/50
DocID029047 Rev 4
Figure 7: Content of a project folder
This script:
performs a full Flash erase to start from a clean system
flashes the BootLoader to the correct position 0x08000000
flashes the firmware to the correct position 0x08004000

UM2026
FP-SNS-FLIGHT1 software description
DocID029047 Rev 4
15/50
Figure 8: BootLoader and FP-SNS-FLIGHT1 installation
The script also dumps an image containing the BootLoader and the firmware. This image
file can be directly flashed to the beginning of the Flash memory like in the same way as
the image provided in the Binary folder.

FP-SNS-FLIGHT1 software description
UM2026
16/50
DocID029047 Rev 4
Figure 9: FP-SNS-FLIGHT1 dump process
For the Linux or iOS operating systems, there is a similar script that uses OpenOCD
instead of the ST-LINK command line. The script is available for each platform, but is only
included in the System Workbench IDE:
CleanFLIGHT1_SW4STM32_53L0A1_NF401.sh
CleanFLIGHT1_SW4STM32_6180XA1_NF401.sh
CleanFLIGHT1_SW4STM32_53L0A1_NL476.sh
CleanFLIGHT1_SW4STM32_6180XA1_NL476.sh
To function, the script must be modified with:
the installation path for OpenOCD
the installation path for STM32 OpenOCD scritps
the Library path for OpenOCD
TheOpenOCD script section to be edited is:
# 1) Set the Installation path for OpenOCD
# example:
#OpenOCD_DIR="C:/Ac6/SystemWorkbench/plugins/fr.ac6.mcu.externaltools.openocd.win32_
1.13.0.201701121612/tools/openocd/"
OpenOCD_DIR=""
# 2) Set the installation path for stm32 OpenOCD scritps
# example:
#OpenOCD_CFC="C:/Ac6/SystemWorkbench/plugins/fr.ac6.mcu.debug_1.12.0.201701121612/re
sources/openocd/scripts"
OpenOCD_CFC=""
# 3) Only for Linux/iOS add openocd library path to _LIBRARY_PATH:
# For iOS example:
#export DYLD_LIBRARY_PATH=${DYLD_LIBRARY_PATH}:${OpenOCD_DIR}"lib/"

UM2026
FP-SNS-FLIGHT1 software description
DocID029047 Rev 4
17/50
# For Linux example:
#export LD_LIBRARY_PATH=${LD_LIBRARY_PATH}:${OpenOCD_DIR}"lib/"
2.7 Firmware-over-the-air (FOTA) update
For the X-NUCLEO-IDB05A1 Bluetooth low energy expansion board only, the FP-SNS-
FLIGHT1 firmware may be updated over-the-air (FOTA) through the connected
Android/iOS device via Bluetooth using the BlueMS application (ver. 3.0.0 and above)
available at their respective application web stores.
The application sends the update and associated CRC (cyclic-redundancy-check) value
that the FP-SNS_FLIGHT1 checks against the hardware cyclic redundancy check
calculation unit on the STM32F401/STM32L476 processor to ensure update integrity.
If the CRC calculation matches the BlueMS CRC value, the new firmware is written from
the beginning of the third Flash region.
A “magic number” prompts the boot loader that a firmware update has been received,
checked and is ready to replace the current FP-SNS-FLIGHT1 firmware (see Section 2.11:
"Firmware over-the-air (FOTA) update with BlueMS").
2.8 APIs
Detailed technical information regarding the APIs available to the user can be found in a
compiled HTML file located inside the “Documentation” folder of the software package,
where all the functions and parameters are fully described.
2.9 Sample application description
A sample application using the X-NUCLEO-NFC01A1, X-NUCLEO-IKS01A2 (or X-
NUCLEO-IKS01A1), X-NUCLEO-53L0A1 (or X-NUCLEO-6180XA1) and X-NUCLEO-
IDB05A1 (or X-NUCLEO-IDB04A1) expansion boards with the NUCLEO-F401RE or
NUCLEO-L476RG board is provided in the “Projects” directory. Ready-to-build projects are
available for multiple IDEs.
You can set up a terminal window for the appropriate UART communication port (using the
baud, data, parity and stop settings below) to control the initialization phase.

FP-SNS-FLIGHT1 software description
UM2026
18/50
DocID029047 Rev 4
Figure 10: Terminal setting
When you first press the reset button, the application:
1. starts initializing the UART, I²C
2. declares which MEMS sensor expansion board is plugged and if all the sensors are
working
3. with X-NUCLEO-IKS01A1, checks whether the LSM6DS3 DIL24 extension is present
4. with the NDEF protocol, writes the www.st.com/stm32ode URI to the M24SR dynamic
NFC tag on the X-NUCLEO-NFC01A1 expansion board
5. declares whether the firmware is compiled for X-NUCLEO-53L0A1 or X-NUCLEO-
6180XA1

UM2026
FP-SNS-FLIGHT1 software description
DocID029047 Rev 4
19/50
Figure 11: Initialization phase
When reading the NFC tag content with an Android device, the browser automatically starts
and tries to connect to that URI.
When the user presses the blue user button (see Figure 12: "UART console output when
the BLE services are started"), the program:
1. initializes the proximity sensor and discovery of the satellites
2. initializes the SPI interface used for communicating with the BlueNRG-1 expansion
board
3. determines which BlueNRG-1 expansion board (X-NUCLEO-IDB04A1 or X-
NUCLEOIDB05A1) is connected to the STM32 Nucleo board and the hardware and
firmware versions
4. creates the random BLE MAC address and PIN necessary for the connection
5. initializes the BLE hardware service (adding the temperature, humidity, pressure,
ambient light for VL6180X only, distance, 3D gyroscope, 3D magnetometer and 3D
accelerometer characteristics)
6. initializes the BLE console service adding the stdin/stdout and stderr characteristics
7. initializes the BLE configuration service
8. changes the content of the M24SR64-Y dynamic NFC tag (using NDEF) in order to
write all the information necessary to automatically launch the BlueMS Android
application (name of application, BLE advertise data, BLE MAC address and BLE
connection PIN).

FP-SNS-FLIGHT1 software description
UM2026
20/50
DocID029047 Rev 4
Figure 12: UART console output when the BLE services are started
When reading the above NFC content on an Android device with the BlueMS application
installed, it is possible to automatically launch the BlueMS application to connect the device
Other manuals for FP-SNS-FLIGHT1
1
Table of contents
Other ST Control Unit manuals
Popular Control Unit manuals by other brands

Adeunis RF
Adeunis RF ARF26 user guide

Lutron Electronics
Lutron Electronics GRAFIK Eye QS Quick installation and operation guide

Tritech
Tritech Seanet SCU v5 product manual

Baker Hughes
Baker Hughes Masoneilan 31000 Series instruction manual

Tektronix
Tektronix DPO3PWR user manual

Suttle
Suttle SAM-VTC user guide

Congatec
Congatec COM Express conga-TS175 user guide

Watts
Watts FP-53L-M1 installation instructions

Rifox
Rifox WU-1550 operating manual

Hyperion
Hyperion HY-DH144P8 installation manual

VAT
VAT 25740-QE99-0001 TRANSLATION OF INSTALLATION AND OPERATING INSTRUCTIONS

Dometic
Dometic Elite Control Series Installation and operating manual