cancel
Showing results for 
Search instead for 
Did you mean: 

How to Quick Connect STM32U5 to Azure IoT Central

Alnur ELBERIER
Associate II
A step-by-step guide to connect and publish real B-U585I-IOT02A Discovery Kit sensor data to a free Azure IoT Central Application.STM32U5 Azure Quick Connect - Getting Started Guide
 

STM32U5 Azure Quick Connect is the fastest way to get your B-U585I-IOT02A Discovery Kit up and running with Azure IoT Central and Plug and Play. This demonstration reduces software requirements, configuration steps, and start-up time to show how easy it is to leverage IoT solutions with STM32 microcontrollers and Azure IoT.  
Goal: Connect the B-U585I-IOT02A Discovery Kit to a free Azure IoT Central Application and publish sensor data (as seen below) within a matter of minutes.

1437.png
 

1. Software Requirements

 

2. Hardware Requirements 


 

3. Create an Azure IoT Central Application


Click the Quick Connect Application Template and login with a valid Microsoft account (no subscription required) 
After choosing a unique Application name, URL, and Pricing plan click ‘Create’
1440.png
 

4. Add A Device to the Central Application


In the menu on the left select ‘Devices’
1441.png  
Select ‘New’ to add a new device
1442.png
Enter a unique ‘Device name’ and ‘Device ID’ 
Choose ‘B-U585I-IOT02A IoT Node 2 discovery kit.’ as the Device Template.
Make sure ‘Simulate this device’ is not selected
And select ‘Create’
1445.png
Your new device should now populate in the devices tab
1447.png
 

5. Collect Connection Credentials


Click on the ‘Device Name’ of the device you want to connect to
1448.png
Click ‘Connect’
1450.png
Here you can view all the required device Connection Credentials
1453.png
In File Explorer Navigate to STM32U5_Azure_QuickConnect  and open Config.txt
1454.png
Enter the Wi-Fi SSID and Password for your 2.4Ghz network
Copy and Paste the ID Scope, Device ID, and Primary Key into this file and save.
1455.png
 

6. Run Quick Connect Executable


Connect your Discovery Kit using the Micro-USB cable as pictured below
1456.png
Ensure that you downloaded the correct STM32U5_Azure_QuickConnect package for you operating system above and run the STM32U5_AZURE_QuickConnect.exe
1457.png
Script logs can be seen in the window:
1458.png
 

8. Monitor Device Activity


Navigate back to your device in your central application and you can see a summary of the incoming data
1459.png
Under ‘Raw data’ specific MQTT messages can be viewed
1460.png
 

9. Next Steps


Customize the Dashboard and Manage Devices in Azure IoT Central 
Export data from IoT Central Application
 
 
Comments
UKhan.2
Associate II

This was very helpful! Where can we find the source code for this application?

Alnur ELBERIER
Associate II

Here is the link to the source code: https://github.com/azure-rtos/samples/releases/download/v6.1_rel/Azure_RTOS_6.1_B-U585I-IOT02A_IAR_Samples_Beta_2021_10_01.zip

It is not exactly the same as the code used in this tutorial as the quick connect example is intended as an introduction/demonstration.

UKhan.2
Associate II

Thanks for you reply!

I already went through this and made it work - a little caveat though, I had to build it using IAR IDE and was hoping if it's supposed to be added to the STM32CubeIDE projects sometime soon?

Alternatively, I can convert it to an STM32CubeIDE project I assume, but would be great to have everything at one place.

shakk.1
Associate

Any chance I can get the source code of ​ this project on  B-U585I-IOT02A Discovery Kit?

there isn't source code from Github. thanks!​

bay
Associate II

Is there any user guide: Using STM32Cube IDE to connect B-U585I-IOT02A Discovery Kit to Azure IoT?

Version history
Last update:
‎2021-10-26 01:29 PM
Updated by: