Getting started with the STM32Cube function pack for IoT ... them to the Microsoft Azure IoT Hub via...

39
Introduction FP-CLD-AZURE1 is an STM32Cube function pack which lets you safely connect a B-L475E-IOT01A or STEVAL-STWINKT1 node to Microsoft Azure IoT, transmit sensor data and receive commands from Azure cloud applications. It fully supports Azure device management primitives and includes a sample implementation for firmware update over the air (FOTA). The package also contains a sample application for data telemetry/device management and firmware update to be connected to Azure IoT Central PnP application. This software, together with the suggested combination of STM32 and ST devices, can be used, for example, to develop sensor-to-cloud applications for a broad range of use cases, such as smart home or smart industry. The software runs on the STM32 microcontroller and includes drivers for the Wi-Fi connectivity, and motion and environmental sensors. RELATED LINKS Visit the STM32Cube ecosystem web page on www.st.com for further information Getting started with the STM32Cube function pack for IoT sensor node with telemetry and device management applications for Microsoft Azure cloud UM2043 User manual UM2043 - Rev 8 - April 2020 For further information contact your local STMicroelectronics sales office. www.st.com

Transcript of Getting started with the STM32Cube function pack for IoT ... them to the Microsoft Azure IoT Hub via...

Page 1: Getting started with the STM32Cube function pack for IoT ... them to the Microsoft Azure IoT Hub via Wi-Fi. The sample application also fully supports Azure device management primitives

IntroductionFP-CLD-AZURE1 is an STM32Cube function pack which lets you safely connect a B-L475E-IOT01A or STEVAL-STWINKT1node to Microsoft Azure IoT, transmit sensor data and receive commands from Azure cloud applications.

It fully supports Azure device management primitives and includes a sample implementation for firmware update over the air(FOTA).

The package also contains a sample application for data telemetry/device management and firmware update to be connected toAzure IoT Central PnP application.

This software, together with the suggested combination of STM32 and ST devices, can be used, for example, to developsensor-to-cloud applications for a broad range of use cases, such as smart home or smart industry.

The software runs on the STM32 microcontroller and includes drivers for the Wi-Fi connectivity, and motion and environmentalsensors.

RELATED LINKS Visit the STM32Cube ecosystem web page on www.st.com for further information

Getting started with the STM32Cube function pack for IoT sensor node with telemetry and device management applications for Microsoft Azure cloud

UM2043

User manual

UM2043 - Rev 8 - April 2020For further information contact your local STMicroelectronics sales office.

www.st.com

Page 2: Getting started with the STM32Cube function pack for IoT ... them to the Microsoft Azure IoT Hub via Wi-Fi. The sample application also fully supports Azure device management primitives

1 Acronyms and abbreviations

Table 1. List of acronyms

Acronym Description

AP Access point

BSP Base support package

FOTA Firmware update over-the-air

DICE Device identifier composition engine

DPS Device provisioning system

GPIO General purpose input/output

HAL Hardware abstraction layer

HTML Hypertext markup language

HTTP Hypertext transfer protocol

IDE Integrated development environment

IoT Internet of things

I²C Inter-integrated circuit

MCU Microcontroller unit

MEMS Micro electro-mechanical systems

ODE Open development environment

PnP IoT Central Plug and Play

REST API Representational state tranfer apis

RIoT Robust Intenet of Things

SDK Software development kit

SMD Surface mount device

SSID Service set identifier

STM32UID STM32 unique device ID

UART Universal asynchronous receiver/transmitter

URL Uniform resource locator

Wi-Fi Wireless LAN based on IEEE 802.11

WLAN Wireless local area network

UM2043Acronyms and abbreviations

UM2043 - Rev 8 page 2/39

Page 3: Getting started with the STM32Cube function pack for IoT ... them to the Microsoft Azure IoT Hub via Wi-Fi. The sample application also fully supports Azure device management primitives

2 FP-CLD-AZURE1 software description

2.1 Overview

The package features:

• Complete firmware to safely connect a node with sensors to Microsoft Azure IoT using Wi-Fi communicationtechnology

• A sample application for data telemetry/device management to be connected to ST web dashboard or toAzure IoT Central PnP application

• Middleware libraries featuring Microsoft Azure IoT software development, transport-level security (mbedTLS)and meta-data management

• Ready-to-use binaries to connect the node to ST web dashboard running on Microsoft Azure or to Azure IoTCentral PnP application for sensor data visualization and device management (FOTA)

• Sample implementations available for STM32L4 Discovery Kit for IoT node (B-L475E-IOT01A) and forSTWIN SensorTile Wireless Industrial Node development kit (STEVAL-STWINKT1)

• Easy portability across different MCU families, thanks to STM32Cube• Free, user-friendly license terms

2.2 Architecture

The software layers used by the application to access and use the STM32 microcontroller and the Wi-Fi andsensors are:• STM32Cube HAL driver layer: a simple, generic, multi-instance set of APIs (application programming

interfaces) to interact with the upper layer applications, libraries and stacks. The APIs are based on acommon framework so that overlying software like middleware can implement functions and routines withoutspecific microcontroller unit (MCU) hardware configurations. This structure improves library code reusabilityand guarantees easy portability across other devices.

• Board support package (BSP) layer: drives the STM32 Nucleo board peripherals like the LED, userbutton, etc. (not the MCU), with a specific set of APIs. This interface also helps in identifying the specificboard version.

• Middleware layer: contains the MetaDataManager to save Meta Data in the STM32 Flash memory,mbedTLS and the Microsoft Azure IoT device SDK (https://github.com/Azure/azure-iot-sdks) to facilitate theconnection of STM32 Nucleo with Azure IoT services.

Figure 1. FP-CLD-AZURE1 software architecture

Applications

STM32Cube Hardware Abstraction Layer (HAL)

Middleware

HardwareAbstraction

Azure IoT SDK Meta Data Mgr

Hardware STEVAL-STWINKT1evaluation board

mbedTLS

Network Library

Azure1 PNPAzure1 BootLoader

Azure IoT SDK Public Review

B-L475E-IOT01ADiscovery kit IoT node

UM2043FP-CLD-AZURE1 software description

UM2043 - Rev 8 page 3/39

Page 4: Getting started with the STM32Cube function pack for IoT ... them to the Microsoft Azure IoT Hub via Wi-Fi. The sample application also fully supports Azure device management primitives

2.3 Folder structure

Figure 2. Package folder structure

The following folders are included in the software package:• Documentation: with two compiled HTML files generated from the source code detailing the software

components and APIs (one for each project).• Drivers: the HAL drivers and the board-specific drivers for each supported board or hardware platform,

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

• Middlewares: the middleware interface for MetaDataManager, mbedTLS and the porting of Microsoft AzureIoT device SDK.

• Utilities: contains BootLoader for B-L475E-IOT01A and for STEVAL-STWINKT1.• Projects contains:

– the Azure sample application (for B-L475E-IOT01A/STEVAL-STWINKT1) that reads sensor data andtransmits them to Micorosft Azure IoT Hub via Wi-Fi, enabling device remote control thanks to the fullsupport for Microsoft Azure primitive device management with a simple example of remote firmwareupdate procedure

– the AzurePnP sample application (for B-L475E-IOT01A/STEVAL-STWINKT1) to transmit sensor dataand receive commands via a personal Azure account using IoT Central PnP accessible through the linkin the documentation included in the source package that allows importing the application templateused for this example

– the BootLoader project used in FP-CLD-AZURE1 for the firmware update procedure– sample applications that can be compiled with IAR Embedded Workbench for ARM, RealView

Microcontroller Development Kit (MDK-ARM-STM32) or STM32CubeIDE development environments– for each sample application, a configurable pre-compiled binary to connect devices to the Azure web

dashboards

2.4 Flash memory management

The sample application uses the Flash memory to:1. save the Wi-Fi credentials and the IoT Central PnP information in the Meta Data Manager;2. allow the Firmware-Over-The-Air updateTo enable these features the Flash is divided in different regions (see Figure 3. Azure1 Flash structure forSTM32L475VG):1. the first region contains a custom boot loader (required for firmware update);2. the second region contains the application firmware;3. the third region is used in a firmware update procedure to store the new downloaded firmware before

updating it, and to save data inside the Meta Data Manager.

UM2043Folder structure

UM2043 - Rev 8 page 4/39

Page 5: Getting started with the STM32Cube function pack for IoT ... them to the Microsoft Azure IoT Hub via Wi-Fi. The sample application also fully supports Azure device management primitives

The STEVAL-STWINKT1 embeds the STM32L4R9ZI microcontroller with 2 MBytes of Flash divided in pages of 4KBytes. The B-L475E-IOT01A embeds the STM32L475VG microcontroller with 1 MByte of Flash divided in pagesof 2 KBytes. In this section the STM32L475VG is used as example, even if the STM32L4R9ZI has a similar Flashorganization.The Meta Data Manager is placed at the end of the Flash (0x080FF000 for STM32L475VG). For more informationon the Flash memory management, refer to RM0351: "STM32L4x5 and STM32L4x6 advanced Arm®-based 32-bitMCUs" on www.st.com.

Figure 3. Azure1 Flash structure for STM32L475VG

2.5 The boot process for the firmware update over-the-air (FOTA) application

To enable the firmware update procedure, the Azure1 application binary cannot be flashed at the beginning of theFlash memory (address 0x08000000), and is therefore compiled to run from the beginning of the second Flashregion (at 0x08004000).To enable this procedure, a vector table offset is set in Src/system_stm32l4xx.c (for B-L475E-IOT01A or STEVAL-STWINKT1): #define VECT_TAB_OFFSET 0x4000.The linker script also requires changes; in this section, considering the B-L475E-IOT01A as example, the Linkerscript for Azure, compiled using IAR Embedded Workbench for ARM, is modified as follows:

UM2043The boot process for the firmware update over-the-air (FOTA) application

UM2043 - Rev 8 page 5/39

Page 6: Getting started with the STM32Cube function pack for IoT ... them to the Microsoft Azure IoT Hub via Wi-Fi. The sample application also fully supports Azure device management primitives

/*-Specials-*/define symbol __ICFEDIT_intvec_start__ = 0x08004000;/*-Memory Regions-*/define symbol __ICFEDIT_region_ROM_start__ = 0x08004000;define symbol __ICFEDIT_region_ROM_end__ = 0x0807FFFF;define symbol __ICFEDIT_region_RAM_start__ = 0x20000000;define symbol __ICFEDIT_region_RAM_end__ = 0x20017FFF;define symbol __ICFEDIT_region_SRAM2_start__ = 0x10000000;define symbol __ICFEDIT_region_SRAM2_end__ = 0x10007FFF;/*-Sizes-*/ define symbol __ICFEDIT_size_cstack__ = 0x6000;define symbol __ICFEDIT_size_heap__ = 0x12000;

Using the above linker script, the maximum usable code size is fixed at 496 KB.Before flashing the compiled Azure1 firmware, you must flash the appropriate bootloader binary for B-L475E-IOT01A, available in the Utilities\BootLoader folder, in the first Flash region (address 0x08000000).

Figure 4. BootLoader folder content

When the firmware update procedure is activated, the new firmware is downloaded and copied in the third Flashregion.After board reset, the following procedure applies:• if there is a new firmware downloaded in the third Flash region, the BootLoader overwrites the second Flash

region (containing the current firmware), replaces its content with the new firmware and restarts the board;• if there is no new firmware downloaded, the BootLoader jumps to the firmware stored in region 2.

Figure 5. Azure1 boot sequence

2.6 The installation process for the firmware update over-the-air (FOTA) application

The flashing procedure is simplified by a script available for each IDE (IAR/RealView/STM32CubeIDE).

UM2043The installation process for the firmware update over-the-air (FOTA) application

UM2043 - Rev 8 page 6/39

Page 7: Getting started with the STM32Cube function pack for IoT ... them to the Microsoft Azure IoT Hub via Wi-Fi. The sample application also fully supports Azure device management primitives

The script uses the command line of STM32CubeProgrammer.

Figure 6. Project folder content example

In particular, the script:• erases the full Flash;• flashes the BootLoader at the correct position (0x08000000);• flashes the Azure1 firmware at the correct position (0x08004000).

UM2043The installation process for the firmware update over-the-air (FOTA) application

UM2043 - Rev 8 page 7/39

Page 8: Getting started with the STM32Cube function pack for IoT ... them to the Microsoft Azure IoT Hub via Wi-Fi. The sample application also fully supports Azure device management primitives

Figure 7. BootLoader and Azure installation

The same script also dumps a unique image file (containing the BootLoader and the Azure firmware) that can bedirectly flashed to the beginning of the Flash memory.

UM2043The installation process for the firmware update over-the-air (FOTA) application

UM2043 - Rev 8 page 8/39

Page 9: Getting started with the STM32Cube function pack for IoT ... them to the Microsoft Azure IoT Hub via Wi-Fi. The sample application also fully supports Azure device management primitives

Figure 8. BootLoader and Azure Dump process

2.7 Azure IoT sample application description

Azure sample application for B-L475E-IOT01A and STEVAL-STWINKT1 is provided in the Projects directory.The board uses a Wi-Fi module (which is integrated in the B-L475E-IOT01A but not in the STEVAL-STWINKT1,so in the latter case an additional STEVAL-STWINWFV1 Wi-Fi adpater module is needed) and the sampleapplication reads data values from the temperature, humidity, accelerometer and gyroscope sensors andtransmits them to the Microsoft Azure IoT Hub via Wi-Fi.The sample application also fully supports Azure device management primitives to remotely control the device,and includes a sample to trigger firmware update over-the-air procedure.For each board there is also an AzurePnP project to transmit/receive data from Azure IoT Central PnP.

RELATED LINKS For further information on how to register a free sample account in Azure connect to Microsoft Azure website

2.7.1 Launch sample applicationOnce you have set up your system as per Section 3.3 Hardware and software setup, you can proceed to launchthe sample application provided with FP-CLD-AZURE1.Pre-compiled binaries are available, together with the project files to rebuild the solution.A serial terminal interface is necessary to monitor the log of the sample application and can be used for deviceconfiguration.

UM2043Azure IoT sample application description

UM2043 - Rev 8 page 9/39

Page 10: Getting started with the STM32Cube function pack for IoT ... them to the Microsoft Azure IoT Hub via Wi-Fi. The sample application also fully supports Azure device management primitives

2.7.1.1 Serial terminal interface setup

Set up a serial terminal (i.e. TeraTerm) with the parameters reported in the figure below. In particular, set theproper baudrate (115200) and a Transmit delay (10 msec/char).

Figure 9. Serial port configuration

2.7.1.2 Use pre-compiled binaries

Pre-compiled binaries are contained in Projects\BoardType\Applications\Azure1\Binaries:• Azure1_BL.bin: configurable with custom parameters for Wi-Fi using a serial terminal and must be used

jointly with IoT Web Dashboard as described in Section 2.8 STM32 ODE web dashboard for FP-CLD-AZURE1. This binary contacts the STM32 ODE device provisioning system (DPS) to register the board andretrieve the connection rights to contact the STM32 IoT Web dashboard

• Azure_BL.bin: contains a program and the BootLoader, and can be directly flashed on the board (not usedlike FOTA firmware)

• Azure.bin: contains a program without the BootLoader and cannot be directly flashed on the board (used likeFOTA firmware)

UM2043Azure IoT sample application description

UM2043 - Rev 8 page 10/39

Page 11: Getting started with the STM32Cube function pack for IoT ... them to the Microsoft Azure IoT Hub via Wi-Fi. The sample application also fully supports Azure device management primitives

Step 1. Connect your board to the laptop using a Micro-B USB cable for B-L475E-IOT01A (or 2 Micro-B USBcables plus STLINK-V3MINI for STEVAL-STWINKT1) when the board appears as a mass storagedevice, drag the binary as shown in the picture below.

Figure 10. Drag the binary to the connected board

Step 2. After copying the binary, open the serial terminal to view the device message log (see Section 2.7.2 Device configuration to know how to enter credentials).

2.7.2 Device configurationIt is possible to configure the sample application via serial terminal interface or by modifying the source code toadd Wi-Fi access point credentials: SSID, password and security (WEP,WPA,WPA2).After configuration, parameters are permanently stored in the Flash memory and can be re-used or changed afterboard reset.

2.7.2.1 Wi-Fi access point configuration via serial terminal

Step 1. Open the serial terminal and press Reset.The very first time the board is flashed and the application is launched, the default SSID and passwordare used as written in the code.

Step 2. Press the blue User Button within 3 seconds.

UM2043Azure IoT sample application description

UM2043 - Rev 8 page 11/39

Page 12: Getting started with the STM32Cube function pack for IoT ... them to the Microsoft Azure IoT Hub via Wi-Fi. The sample application also fully supports Azure device management primitives

Step 3. Enter the requested parameters.Wi-Fi credentials inserted are stored in the Flash memory and used after each board reset, unless theUser Button is pressed.

Figure 11. Configure Wi-Fi credentials

2.7.2.2 Configuration in source code

Wi-Fi configuration and Azure IoT Hub connection string can be directly entered in the source code beforerecompiling the solution file, as described below.

Step 1. Open the solution file according to the selected IDE and platform used.

Step 2. Open the file azure_config.h and add a custom value for AZURE_DEFAULT_SSID,AZURE_DEFAULT_SECKEY, AZURE_DEFAULT_PRIV_MODE.

Step 3. Rebuild the solution file according to the selected IDE and flash the microcontroller.Follow the procedure described in Section 2.6 The installation process for the firmware update over-the-air (FOTA) application.

2.7.3 IoT Central PnP sample for Azure applicationFor B-L475E-IOT01A/STEVAL-STWINKT1, the AzurePnP application can send sensor data, receive commandsand make a Firmware-Over-the-Air Update (FOTA) with a private subscription to Microsoft SaaS (software-as-a-service) IoT Central PnP.The AzurePnP application uses a device application template. To use the same application template inside apersonal account on Microsoft IoT Central, it is necessary to copy the link contained in the FP-CLD-AZURE1documentation.

UM2043Azure IoT sample application description

UM2043 - Rev 8 page 12/39

Page 13: Getting started with the STM32Cube function pack for IoT ... them to the Microsoft Azure IoT Hub via Wi-Fi. The sample application also fully supports Azure device management primitives

Figure 12. Azure IoT Central PnP: create a new application

Choose the application name and the "Pricing Plan".

UM2043Azure IoT sample application description

UM2043 - Rev 8 page 13/39

Page 14: Getting started with the STM32Cube function pack for IoT ... them to the Microsoft Azure IoT Hub via Wi-Fi. The sample application also fully supports Azure device management primitives

Figure 13. Azure IoT Central PnP: Application created

Create a real device using the [Devices] tab. Select the Right "Device template" for the board that you are usingand Select "+" for creating a new device.It is possible to choose another the device name instead of the proposed one.

UM2043Azure IoT sample application description

UM2043 - Rev 8 page 14/39

Page 15: Getting started with the STM32Cube function pack for IoT ... them to the Microsoft Azure IoT Hub via Wi-Fi. The sample application also fully supports Azure device management primitives

Figure 14. Azure IoT Central: real device creation

Selecting the created real device, you can view the connection parameters. To find them, select [Connect] insidethe [Device explorer] after having selected the real device created.

Figure 15. Azure IoT Central: retrieve the connection parameters

The connection parameters are:1. Scope ID: the scope of the DPS instance for the created application. This value is the same for all the real

devices created under the same application.2. Device ID: the device identification. This value is different for each device created.3. Primary Key: the primary device SAS token. This value is different for each device created.

UM2043Azure IoT sample application description

UM2043 - Rev 8 page 15/39

Page 16: Getting started with the STM32Cube function pack for IoT ... them to the Microsoft Azure IoT Hub via Wi-Fi. The sample application also fully supports Azure device management primitives

After having retrieved these parameters, you can run the pre-compiled binary Azure_PnP_BL.bin on the node (B-L475E-IOT01A/STEVAL-STWINKT1). After inserting the Wi-Fi credential access, the board waits for theconnection parameters in the UART console.

Figure 16. Azure IoT Central: connection parameters insertion in the UART console

Note: Parameters are saved in the Flash memory using the MetaData Manager. You can change them anytime bypressing the [User button] at the boot when the UART asks whether to keep or change the saved values.

Note: With a single device provisioning as shown in the above example, digit y if you already have configured theAutomatic Group Enrollment.The board contacts the DPS identified by the Scope ID and retrieves the IoT hub and the device name to connectthe application template instantiated. You can view the sensor data sent by the board to the IoT Central.

UM2043Azure IoT sample application description

UM2043 - Rev 8 page 16/39

Page 17: Getting started with the STM32Cube function pack for IoT ... them to the Microsoft Azure IoT Hub via Wi-Fi. The sample application also fully supports Azure device management primitives

Figure 17. Azure IoT Central: sensor data

Under [Commands] you can send commands to the board (pause/play/resume/stop/reboot of firmware update)or set the output data rate or full scale, or enable/disable each board sensor.

UM2043Azure IoT sample application description

UM2043 - Rev 8 page 17/39

Page 18: Getting started with the STM32Cube function pack for IoT ... them to the Microsoft Azure IoT Hub via Wi-Fi. The sample application also fully supports Azure device management primitives

Figure 18. Azure IoT Central: change settings and send commands

The [Board Status] tab shows a report for the real device created.

Figure 19. Azure IoT Central: board status

UM2043Azure IoT sample application description

UM2043 - Rev 8 page 18/39

Page 19: Getting started with the STM32Cube function pack for IoT ... them to the Microsoft Azure IoT Hub via Wi-Fi. The sample application also fully supports Azure device management primitives

2.7.4 DICE emulator for robust Internet of ThingsThe device provisioning service (DPS) from Azure IoT uses device identifier composition engine (DICE) androbust Internet of Things (RIoT) for secure device identity and attestation.DPS X.509-based protocols rely on cryptographic keys and certificates produced by RIoT and the root of trust formeasurement provided by the DICE in the hardware.The Azure1 application contains an adpater to implement the DICE emulator/RIoT included inside the AzureSDK.The adapter is in the dps_hsm_riot_STM32Cube.c file in the Projects\Multi\BoardType\Azure1\Src folder andcontains two different versions of certifications-chains:• one in Azure SDK• one used by Azure application to connect the FP-CLD-AZURE1 package with the STM32 ODE web

dahsboard.

This adapter contains a define called AZURE_USE_STM_CERT to choose between using ST certificates or thestandard Azure one.The global configuration file azure_config.h has two different defines that works with this adapter:• AZURE_PRINT_CERTIFICATES: if this define is enabled, the Azure application prints on the UART console

the three certificates used in the certification chains: root, intermediate and device certificates with theirpublic and private key;

• AZURE_PRODUCE_LEAF_CERTIFICATES: if this define is enabled, the Azure application is able to createleaf certificates to validate the root and intermediate certificates for group unrolling with Azure DPS systems.

To add and validate new certificates on a personal instance of Azure DPS, it is necessary to modify the adapter(dps_hsm_riot_STM32Cube.c) to create the desired new certificates creating a new public and private key forthe root certificate and to re-compile the code enabling AZURE_PRINT_CERTIFICATES andAZURE_PRODUCE_LEAF_CERTIFICATES.

Figure 20. DPS instance in the Azure portal

After having re-compiled the code and flashed the B-L475E-IOT01A or STEVAL-STWINKT1, it is possible tovisualize the new certificate chain created on the UART console.

UM2043Azure IoT sample application description

UM2043 - Rev 8 page 19/39

Page 20: Getting started with the STM32Cube function pack for IoT ... them to the Microsoft Azure IoT Hub via Wi-Fi. The sample application also fully supports Azure device management primitives

Figure 21. DPS certification chain on the UART console

It is now possible to copy the root and intermediate certificates to the personal DPS instance.

UM2043Azure IoT sample application description

UM2043 - Rev 8 page 20/39

Page 21: Getting started with the STM32Cube function pack for IoT ... them to the Microsoft Azure IoT Hub via Wi-Fi. The sample application also fully supports Azure device management primitives

Figure 22. Root intermediate certificates loaded on the DPS instance

After that, you have to validate the new certificates by creating a leaf certificate to boot the root and intermediatecertificate. The Azure compiled with the AZURE_PRODUCE_LEAF_CERTIFICATES allows creating the leafcertifcates in sequence for root and intermediate (or signer) ones: for each certificate, it is necessary to select thecertificate inside the DPS instance on the Azure portal and follow the procedure below.1. Generate the verification code.2. Copy and paste the verification code on the UART console: the Azure creates the leaf certificate for this

verification code to be saved on a .cer file. This verification code has a very limited life time; so, it isnecessary to execute the steps fast to ensure certificate validation by DPS.

3. Load the created .cer file for leaf certificates on the DPS instance in the Azure portal.4. Press the [Verify] button to verify the certificate.

UM2043Azure IoT sample application description

UM2043 - Rev 8 page 21/39

Page 22: Getting started with the STM32Cube function pack for IoT ... them to the Microsoft Azure IoT Hub via Wi-Fi. The sample application also fully supports Azure device management primitives

Figure 23. Validate a certificate on DPS instance

UM2043Azure IoT sample application description

UM2043 - Rev 8 page 22/39

Page 23: Getting started with the STM32Cube function pack for IoT ... them to the Microsoft Azure IoT Hub via Wi-Fi. The sample application also fully supports Azure device management primitives

Figure 24. UART terminal after leaf certiticates creation

The figure below shows the certificate status inside the DPS instance on the Azure portal after the validationphase.

UM2043Azure IoT sample application description

UM2043 - Rev 8 page 23/39

Page 24: Getting started with the STM32Cube function pack for IoT ... them to the Microsoft Azure IoT Hub via Wi-Fi. The sample application also fully supports Azure device management primitives

Figure 25. Validated certificates on DPS instance

After that, you can move the Manage enrollments section to create a single or a group enrollment policy.

Figure 26. Enrollment on DPS instance

To enroll a group, you have to select the validated root and intermediate certificates, select the IoT hub connectedto this group enrollments and define an initial twin configuration for the devices enrolled with this certificate chain.

UM2043Azure IoT sample application description

UM2043 - Rev 8 page 24/39

Page 25: Getting started with the STM32Cube function pack for IoT ... them to the Microsoft Azure IoT Hub via Wi-Fi. The sample application also fully supports Azure device management primitives

Figure 27. Group enrollment on DPS instance

Any device created from now on has a device certificate starting from this certification chain: it can contact theDPS and obtain the credentials to establish the connection with the decided IoT hub without a connection string.

UM2043Azure IoT sample application description

UM2043 - Rev 8 page 25/39

Page 26: Getting started with the STM32Cube function pack for IoT ... them to the Microsoft Azure IoT Hub via Wi-Fi. The sample application also fully supports Azure device management primitives

Figure 28. UART output when the device contacts the DPS

With IoT Central PnP it is possible to enable a similar group enrolling procedure by:1. recompiling the code to print and create the leaf certificates2. taking from the UART the root and the intermediate certificates3. loading the certificates on the IoT Central PnP application under [Administration]>[Device Connection]

UM2043Azure IoT sample application description

UM2043 - Rev 8 page 26/39

Page 27: Getting started with the STM32Cube function pack for IoT ... them to the Microsoft Azure IoT Hub via Wi-Fi. The sample application also fully supports Azure device management primitives

Figure 29. IoTCentralPnP Enable Group Enrollment

2.8 STM32 ODE web dashboard for FP-CLD-AZURE1

A web dashboard based on Microsoft Azure has been created to offer developers a quickstart evaluation offeatures available in FP-CLD-AZURE1.Specific ready-to-use pre-compiled binaries is provided in the FP-CLD-AZURE1 package to connect your boardwith the web dashboard: Azure_BL.bin.You can access STM32 ODE web dashboard at .

2.8.1 Overview of Microsoft Azure servicesThe web dashboard is implemented mainly on top of the Microsoft Azure services detailed below.

Figure 30. Overview of the main Azure services used

• Azure DPS: to automate board registration to a predefined IoT Hub.• Azure IoT Hub: created to collect sensor data from connected boards when FP-CLD-AZURE1 binaries are

used (azure.microsoft.com/en-us/services/iot-hub/).• Azure Function: to transform real-time sensor data received through IoT Hub and store them in the database

(azure.microsoft.com/en-us/services/functions/).

UM2043STM32 ODE web dashboard for FP-CLD-AZURE1

UM2043 - Rev 8 page 27/39

Page 28: Getting started with the STM32Cube function pack for IoT ... them to the Microsoft Azure IoT Hub via Wi-Fi. The sample application also fully supports Azure device management primitives

• Azure Cosmos DB: NoSQL database containing data sent by devices in the last 48 hours(azure.microsoft.com/en-us/services/cosmos-db/).

• Azure Web Apps: developed using Azure Web Apps to visualize real-time sensor data and to remotelycontrol the connected device (azure.microsoft.com/en-us/services/app-service/web/).

2.8.2 Device provisioningThe pre-compiled binary Azure_BL.bin includes a procedure to automate registration of your device to IoT Hub bycontacting DPS (see Section 2.7.4 DICE emulator for robust Internet of Things for details).The STM32 Unique ID is used to register and identify univocally the device in the IoT Hub and can be read fromthe serial terminal.After the initialization phase, the application contacts DPS to be registered to the IoT Hub: it receives the deviceID and the URL for the IoT hub from DPS.After these steps the board closes the connection with the DPS and opens a new connection with the IoT hub(see Section 2.7.4 DICE emulator for robust Internet of Things for details).

2.8.3 Usage of web dashboard for sensor data visualizationOnce your board is registered with the IoT Hub, you can use STM32 ODE web dashboard to visualize sensordata and control the device.

2.8.3.1 Add a device to the dashboard

To control and monitor a device using the dashboard, you have to create a device group and add the device to it.

Step 1. Open https://stm32ode-v2.azurewebsites.net.

Step 2. Create a new group (or login with an existing one) with group name and password.

Step 3. Add your device to the group by clicking the [Add device] button and insert the device ID (STM32UID)and the device custom name.

Step 4. Alternatively, copy and paste the URL shown in the serial terminal to directly access the registerdevice.

Figure 31. STM32 ODE IoT web dashboard: create/login group and add device

2.8.3.2 Monitor and control the device

By clicking the device [Settings] button you can monitor the device state, configure and control it.The [Overview] tab contains:• Device custom name: custom name• Device ID: STM32UID

UM2043STM32 ODE web dashboard for FP-CLD-AZURE1

UM2043 - Rev 8 page 28/39

Page 29: Getting started with the STM32Cube function pack for IoT ... them to the Microsoft Azure IoT Hub via Wi-Fi. The sample application also fully supports Azure device management primitives

• State:– Connection: green if the device is connected to the IoT Hub, red otherwise– Activity: yellow if the device is not sending data for more than the telemetry interval configured, green

otherwise– Application: firmware application state reported by the device and firmware version

It is possible to change the trasmission sensor data frequency.

Figure 32. STM32 ODE IoT web dashboard: device details - overview tab

The [Control] tab provides two ways of controlling the device:• Direct methods: methods supported by the device are listed and can be invoked by clicking the [Play]

button. If a method needs input parameters, an input form pops up.• Message cloud to device: provides a tool to send messages to the device (mainly for the command feature

offered by previous FP-CLD-AZURE1 firmware versions).

UM2043STM32 ODE web dashboard for FP-CLD-AZURE1

UM2043 - Rev 8 page 29/39

Page 30: Getting started with the STM32Cube function pack for IoT ... them to the Microsoft Azure IoT Hub via Wi-Fi. The sample application also fully supports Azure device management primitives

Figure 33. STM32 ODE IoT web dashboard: device details - control tab

The [Configuration] tab allows a Firmware-Over-the-Air Update (FOTA) by sending to the board the firmwarealready loaded in the [Settings] page.

Figure 34. STM32 ODE IoT web dashboard: device details - configuration tab

From the dashboard you can start the FOTA invoking the related direct method [FirmwareUpdate] as per theprocedure below.

UM2043STM32 ODE web dashboard for FP-CLD-AZURE1

UM2043 - Rev 8 page 30/39

Page 31: Getting started with the STM32Cube function pack for IoT ... them to the Microsoft Azure IoT Hub via Wi-Fi. The sample application also fully supports Azure device management primitives

Step 1. Click the play button associated to the [FirmwareUpdate] method.

Step 2. From the input form, choose a binary file.

Step 3. Select the file just uploaded and start FOTA clicking [Send].The device starts downloading the binary file from the cloud and, at completion, updates its firmware.

2.8.3.3 Telemetry data visualizationSTM32 ODE web dashboard allows visualization of telemetry data sent by devices to the cloud. To visualize it,click the [Telemetry] tab on the web application right bar.

Figure 35. STM32 ODE IoT web dashboard: telemetry visualization

From the device list, you can choose the device and measures to visualize environmental and inertial sensorsembedded in B-L475E-IOT01A or STEVAL-STWINKT1.You can select the measure type, the time window and then press the [Play] button.

2.8.4 Service limitations• Usage of STM32 ODE web dashboard is provided free of charge for evaluation purposes only of FP-CLD-

AZURE1; it does not require user registration.• STM32 ODE web dashboard offers only a limited set of features and functions intended to provide a

quickstart evaluation of STM32 Nucleo, expansion boards, and functionalities available in FP-CLD-AZURE1.The service is provided without warranties of any kind. Any use of the web dashboard in a productionenvironment or for commercial purposes is not recommended or supported; any such use is therefore atproper risk.

• ST may at any time suspend, revoke, or limit the usage of the service.

UM2043STM32 ODE web dashboard for FP-CLD-AZURE1

UM2043 - Rev 8 page 31/39

Page 32: Getting started with the STM32Cube function pack for IoT ... them to the Microsoft Azure IoT Hub via Wi-Fi. The sample application also fully supports Azure device management primitives

3 System setup guide

3.1 Hardware description

3.1.1 STM32L4 Discovery kit for IoT nodeThe STM32L4 Discovery kit for the IoT node (B-L475E-IOT01A) allows users to develop applications with directconnection to cloud servers. The STM32L4 Discovery kit enables a wide diversity of applications by exploitinglow-power multilink communication (BLE, Sub-GHz), multiway sensing (detection, environmental awareness) andARM® Cortex®-M4 core-based STM32L4 Series features. Arduino™ Uno V3 and PMOD connectivity provideunlimited expansion capabilities with a large choice of specialized add-on boards.The STM32L4 Discovery kit includes an ST-LINK debugger/programmer and comes with the comprehensiveSTM32Cube software libraries together with packaged software samples for a smooth connection to cloudservers.

Figure 36. STM32L4 Discovery kit for IoT node

Information regarding the STM32L4 Discovery kit for the IoT node is available at

3.1.2 STEVAL-STWINKT1 development kitThe STWIN SensorTile wireless industrial node (STEVAL-STWINKT1) is a development kit and reference designthat simplifies prototyping and testing of advanced industrial IoT applications such as condition monitoring andpredictive maintenance.The kit features a core system board with a range of embedded industrial-grade sensors and an ultra-low-powermicrocontroller for vibration analysis of 9-DoF motion sensing data across a wide range of vibration frequencies,including very high frequency audio and ultrasound spectra, and high precision local temperature andenvironmental monitoring.The development kit is complemented with a rich set of software packages and optimized firmware libraries, aswell as a cloud dashboard application, all provided to help speed up design cycles for end-to-end solutions.The kit supports BLE wireless connectivity through an on-board module, and Wi-Fi connectivity through a specialplugin expansion board (STEVAL-STWINWFV1). Wired connectivity is also supported via an on-board RS485transceiver. The core system board also includes an STMod+ connector for compatible, low cost, small formfactor daughter boards associated with the STM32 family, such as the LTE Cell pack.Apart from the core system board, the kit is provided complete with a 480 mAh Li-Po battery, an STLINK-V3MINIdebugger and a plastic box.

UM2043System setup guide

UM2043 - Rev 8 page 32/39

Page 33: Getting started with the STM32Cube function pack for IoT ... them to the Microsoft Azure IoT Hub via Wi-Fi. The sample application also fully supports Azure device management primitives

Figure 37. STEVAL-STWINKT1 SensorTile Wireless Industrial Node

3.2 Software requirements

The following software components are needed to set up a suitable development environment for compiling andrunning the FP-CLD-AZURE1 package:• FP-CLD-AZURE1 software available on www.st.com/stm32ode• Development tool-chain and compiler; the FP-CLD-AZURE1 software supports the three following

environments:– IAR Embedded Workbench for ARM® (IAR-EWARM) toolchain + ST-LINK– RealView Microcontroller Development Kit (MDK-ARM-STR) toolchain + ST-LINK– STM32CubeIDE + ST-LINK

• Serial line monitor (e.g., TeraTerm, https://ttssh2.osdn.jp/)• STM32CubeProgrammer• To use the pre-compiled binaries and web dashboard: Chrome® web browser (http://www.google.com/

chrome/)

3.3 Hardware and software setup

3.3.1 Hardware setupThe following hardware components are needed:• For B-L475E-IOT01A:

1. One STM32L4 Discovery Kit for IoT node (order code: B-L475E-IOT01A)2. One USB type A to Micro-B USB cable to connect the STM32L4 Discovery Kit to the PC

• For the STEVAL-STWINKT1:1. One STWIN SensorTile Wireless Industrial Node development kit (order code: STEVAL-STWINKT1)2. One Wi-Fi expansion for the SensorTile Wireless Industrial Node (STWIN) kit (order code: STEVAL-

STWINWFV1)3. Two USB type A to Micro-B USB cables to connect the STWIN Kit and the STLINK-V3MINI to the PC

UM2043Software requirements

UM2043 - Rev 8 page 33/39

Page 34: Getting started with the STM32Cube function pack for IoT ... them to the Microsoft Azure IoT Hub via Wi-Fi. The sample application also fully supports Azure device management primitives

3.3.2.1 Development tool-chains and compilersSelect one of the IDEs in Section 3.2 Software requirements and refer to the system and setup informationprovided by the selected IDE provider.Project files for all of the supported IDEs can be found inside one of the FP-CLD-AZURE1 package folders, i.e. forIAR Embedded Workbench for Azure application: Projects\SelectedBoard\Applications\Azure\EWARM.

UM2043Hardware and software setup

UM2043 - Rev 8 page 34/39

Software setup3.3.2

Page 35: Getting started with the STM32Cube function pack for IoT ... them to the Microsoft Azure IoT Hub via Wi-Fi. The sample application also fully supports Azure device management primitives

Revision history

Table 2. Document revision history

Date Version Changes

23-Mar-2016 1 Initial release.

29-Apr-2016 2 Minor text edits.

13-Dec-2016 3

Updated for v2.0 firmware.

Added companion web application information.

Added X-NUCLEO-IKS01A2 support information.

06-Jun-2017 4 Updated all content to reflect v3.0 firmware.

19-Oct-2017 5 Updated all content to reflect v3.1 firmware.

07-May-2018 6

To reflect v3.3 firmware:• updated Introduction, Section 2.1 Overview, Section 2.3 Folder structure, Section 2.7 Azure IoT

sample application description, Section 2.7.2.2 Use pre-compiled binaries, Section 2.7.2.3Modify and rebuild solution files, Section 2.8.3.1 Overview of the web page sections, Section3.3.1 Hardware setup and Section 3.3.3 System setup guide for STM32 Nucleo and expansionboards;

• added Section 2.7.7 Motor control sample application, Section 2.7.8 IoT Central sample forAzure_Sns_DM application, Section 3.1.5 X-NUCLEO-IHM02A1 expansion board and Section3.1.6 X-NUCLEO-NFC04A1 expansion board;

• removed references to X-NUCLEO-IKS01A1 and X-NUCLEO-NFC01A1 expansion boards.

09-Jan-2019 7 Updated all content to reflect v4.0 firmware version.

02-Apr-2020 8 Updated all document to reflect v5.0.0 firmware version.

UM2043

UM2043 - Rev 8 page 35/39

Page 36: Getting started with the STM32Cube function pack for IoT ... them to the Microsoft Azure IoT Hub via Wi-Fi. The sample application also fully supports Azure device management primitives

Contents

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

2 FP-CLD-AZURE1 software description . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .3

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

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

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

2.4 Flash memory management . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4

2.5 The boot process for the firmware update over-the-air (FOTA) application . . . . . . . . . . . . . . . 5

2.6 The installation process for the firmware update over-the-air (FOTA) application . . . . . . . . . 6

2.7 Azure IoT sample application description. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9

2.7.1 Launch sample application . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9

2.7.2 Device configuration . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11

2.7.3 IoT Central PnP sample for Azure application . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12

2.7.4 DICE emulator for robust Internet of Things . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 19

2.8 STM32 ODE web dashboard for FP-CLD-AZURE1 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 27

2.8.1 Overview of Microsoft Azure services . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 27

2.8.2 Device provisioning . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 28

2.8.3 Usage of web dashboard for sensor data visualization . . . . . . . . . . . . . . . . . . . . . . . . . . . 28

2.8.4 Service limitations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 31

3 System setup guide. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .32

3.1 Hardware description . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 32

3.1.1 STM32L4 Discovery kit for IoT node . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 32

3.1.2 STEVAL-STWINKT1 development kit . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 32

3.2 Software requirements . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 33

3.3 Hardware and software setup . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 33

3.3.1 Hardware setup. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 33

3.3.2 Software setup . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 34

Revision history . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .35

UM2043Contents

UM2043 - Rev 8 page 36/39

Page 37: Getting started with the STM32Cube function pack for IoT ... them to the Microsoft Azure IoT Hub via Wi-Fi. The sample application also fully supports Azure device management primitives

List of figuresFigure 1. FP-CLD-AZURE1 software architecture . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3Figure 2. Package folder structure . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4Figure 3. Azure1 Flash structure for STM32L475VG . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5Figure 4. BootLoader folder content . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6Figure 5. Azure1 boot sequence. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6Figure 6. Project folder content example . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7Figure 7. BootLoader and Azure installation. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8Figure 8. BootLoader and Azure Dump process . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9Figure 9. Serial port configuration . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10Figure 10. Drag the binary to the connected board . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11Figure 11. Configure Wi-Fi credentials . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12Figure 12. Azure IoT Central PnP: create a new application. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13Figure 13. Azure IoT Central PnP: Application created . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14Figure 14. Azure IoT Central: real device creation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15Figure 15. Azure IoT Central: retrieve the connection parameters. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15Figure 16. Azure IoT Central: connection parameters insertion in the UART console. . . . . . . . . . . . . . . . . . . . . . . . . . . 16Figure 17. Azure IoT Central: sensor data . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17Figure 18. Azure IoT Central: change settings and send commands . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 18Figure 19. Azure IoT Central: board status . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 18Figure 20. DPS instance in the Azure portal. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 19Figure 21. DPS certification chain on the UART console . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 20Figure 22. Root intermediate certificates loaded on the DPS instance . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 21Figure 23. Validate a certificate on DPS instance . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 22Figure 24. UART terminal after leaf certiticates creation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 23Figure 25. Validated certificates on DPS instance . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 24Figure 26. Enrollment on DPS instance. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 24Figure 27. Group enrollment on DPS instance . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 25Figure 28. UART output when the device contacts the DPS . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 26Figure 29. IoTCentralPnP Enable Group Enrollment . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 27Figure 30. Overview of the main Azure services used . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 27Figure 31. STM32 ODE IoT web dashboard: create/login group and add device. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 28Figure 32. STM32 ODE IoT web dashboard: device details - overview tab. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 29Figure 33. STM32 ODE IoT web dashboard: device details - control tab . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 30Figure 34. STM32 ODE IoT web dashboard: device details - configuration tab . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 30Figure 35. STM32 ODE IoT web dashboard: telemetry visualization . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 31Figure 36. STM32L4 Discovery kit for IoT node . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 32Figure 37. STEVAL-STWINKT1 SensorTile Wireless Industrial Node . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 33

UM2043List of figures

UM2043 - Rev 8 page 37/39

Page 38: Getting started with the STM32Cube function pack for IoT ... them to the Microsoft Azure IoT Hub via Wi-Fi. The sample application also fully supports Azure device management primitives

List of tablesTable 1. List of acronyms . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2Table 2. Document revision history . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 35

UM2043List of tables

UM2043 - Rev 8 page 38/39

Page 39: Getting started with the STM32Cube function pack for IoT ... them to the Microsoft Azure IoT Hub via Wi-Fi. The sample application also fully supports Azure device management primitives

IMPORTANT NOTICE – PLEASE READ CAREFULLY

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

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

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

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

ST and the ST logo are trademarks of ST. For additional information about ST trademarks, please refer to www.st.com/trademarks. All other product or servicenames are the property of their respective owners.

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

© 2020 STMicroelectronics – All rights reserved

UM2043

UM2043 - Rev 8 page 39/39