cancel
Showing results for 
Search instead for 
Did you mean: 

Connect the B-U585I-IOT20A board to Azure IoT Hub

Alnur ELBERIER
Associate II
Simple tutorial to connect the B-U585I-IOT20A Development kit to Azure IoT Hub.Introduction:
In this article, we connect the B-U5U5I-IOT20A discovery board to Azure IoT Hub. IoT Hub is a cloud-hosted application that allows you to communicate with your IoT devices, understand their state and keep them up to date.

                    
The B-U5U5I-IOT20A discovery board is a IoT development board composed of a low power microcontroller, a Wi-Fi Radio, and sensors such as temperature and humidity, a magnetometer, accelerometer, gyroscope, pressure, Time-of-Flight, and gesture-detection.
Requirements

General requirements:
  • An active Azure subscription (click here to create one)
  • X-CUBE-AZURE downloaded and extracted do your C:/ Drive
Hardware requirements:
  • B-U5U5I-IOT20A discovery board
  • Type-A to male Type-B Micro-USB cable
  • 2.4GHz Wi-Fi Router (No Captive Portal)
  • Windows PC
Software requirements (Installed via Quick Setup Script):
  • STM32CubeProgrammer
  • X-CUBE-AZURE
  • Python with Pip
  • Azure CLI
  • Edge or Chrome

Procedure
Configure PowerShell:
  1. Open PowerShell
1401.jpg
 
  1. Set execution policy
Set-ExecutionPolicy -ExecutionPolicy Unrestricted  -Scope CurrentUser
 
 
  1. Enter ‘y’ to accept the execution policy changes
1404.jpg
Install the dependencies:
  1. cd C:\STM32CubeExpansion_Cloud_AZURE_V2.2.0\Projects\B-U585I-IOT02A\Applications\TFM_Azure_IoT\AzureScripts\STM32U5_AZURE_QuickSetup
    Navigate to the directory containing setup material
 
  1. Rename-Item .\STM32U5_AZURE_QuickSetup.ps1.txt .\STM32U5_AZURE_QuickSetup.ps1
    Rename Quick Setup script
 
  1. Run the setup script. The following command programmatically installs all the required software.
.\STM32U5_AZURE_QuickSetup.ps1
 

Run The Quick Connect:
The Quick Connect script programmatically configures both the cloud and the discovery kit. After a successful execution of the script, the device will be provisioned with Azure IoT hub and communicating telemetry data to the cloud. \
 
  1. cd C:\STM32CubeExpansion_Cloud_AZURE_V2.2.0\Projects\B-U585I-IOT02A\Applications\TFM_Azure_IoT\AzureScripts
    Navigate into correct working directory:
 
  1. Run the script with -i argument:
Python .\STM32U5_AZ_IotHub_QC.py -i

     
 
  1. Enter your Configuration Credentials:
1406.png
 
  1. Login to your Azure Account:
1408.png
 
  1. Monitor Script execution
Next Steps
To view data in a customizable Web interface, follow this tutorial.
 
Version history
Last update:
‎2022-09-05 02:29 AM
Updated by: