cancel
Showing results for 
Search instead for 
Did you mean: 

STM32H573I-DK won't connect to Azure IoT Central

Rob Ashworth
Senior

I have successfully got data going to Azure IoT hub, but now need to connect it to Azure IoT Central instead.

I've not managed to get it to connect successfully though...

This is the device settings, which are in the azure_iot config.h file, but I've been messing with it for a couple of days and can't tell if the problem is with some IoTCentral setting, or something in the firmware config...

Anyone else had success with this board?  Most of the examples are for the other U5 board which I don't have.

AzureIotCentral device.png

1 ACCEPTED SOLUTION

Accepted Solutions
Guillaume K
ST Employee

Hello

I am able to connect a STM32H573I-DK to Azure IoT Central.

Azure IoT Central uses DPS.

In the application configuration file app_azure_iot_config.h, check that DPS is enabled, ID_SCOPE , REGISTRATION_ID, and DEVICE_SYMMETRIC_KEY are configured.

Example:

 

 

 

#define ENABLE_DPS

#ifndef ENABLE_DPS

/* Required when DPS is not used.  */
/* These values can be picked from device connection string which is of format : HostName=<host1>;DeviceId=<device1>;SharedAccessKey=<key1>
   HOST_NAME is the IoT Hub host name (<host1> in connection string),
   DEVICE_ID can be set to <device1>,
   DEVICE_SYMMETRIC_KEY can be set to <key1>.  */
#ifndef HOST_NAME
#define HOST_NAME                                   ""
#endif /* HOST_NAME */

#ifndef DEVICE_ID
#define DEVICE_ID                                   ""
#endif /* DEVICE_ID */

#else /* !ENABLE_DPS */

/* Required when DPS is used.  */
#ifndef ENDPOINT
#define ENDPOINT                                    "global.azure-devices-provisioning.net"
#endif /* ENDPOINT */

#ifndef ID_SCOPE
#define ID_SCOPE                                    "0ne00XXXXXX"
#endif /* ID_SCOPE */

#ifndef REGISTRATION_ID
#define REGISTRATION_ID                             "STM32H5IoT"
#endif /* REGISTRATION_ID */

#endif /* ENABLE_DPS */

/* Optional SYMMETRIC KEY.  */
#ifndef DEVICE_SYMMETRIC_KEY
#define DEVICE_SYMMETRIC_KEY                        "ENguEPufGxxxxxxxxxxxxxxxx="
#endif /* DEVICE_SYMMETRIC_KEY */

 

 

  

View solution in original post

2 REPLIES 2
Guillaume K
ST Employee

Hello

I am able to connect a STM32H573I-DK to Azure IoT Central.

Azure IoT Central uses DPS.

In the application configuration file app_azure_iot_config.h, check that DPS is enabled, ID_SCOPE , REGISTRATION_ID, and DEVICE_SYMMETRIC_KEY are configured.

Example:

 

 

 

#define ENABLE_DPS

#ifndef ENABLE_DPS

/* Required when DPS is not used.  */
/* These values can be picked from device connection string which is of format : HostName=<host1>;DeviceId=<device1>;SharedAccessKey=<key1>
   HOST_NAME is the IoT Hub host name (<host1> in connection string),
   DEVICE_ID can be set to <device1>,
   DEVICE_SYMMETRIC_KEY can be set to <key1>.  */
#ifndef HOST_NAME
#define HOST_NAME                                   ""
#endif /* HOST_NAME */

#ifndef DEVICE_ID
#define DEVICE_ID                                   ""
#endif /* DEVICE_ID */

#else /* !ENABLE_DPS */

/* Required when DPS is used.  */
#ifndef ENDPOINT
#define ENDPOINT                                    "global.azure-devices-provisioning.net"
#endif /* ENDPOINT */

#ifndef ID_SCOPE
#define ID_SCOPE                                    "0ne00XXXXXX"
#endif /* ID_SCOPE */

#ifndef REGISTRATION_ID
#define REGISTRATION_ID                             "STM32H5IoT"
#endif /* REGISTRATION_ID */

#endif /* ENABLE_DPS */

/* Optional SYMMETRIC KEY.  */
#ifndef DEVICE_SYMMETRIC_KEY
#define DEVICE_SYMMETRIC_KEY                        "ENguEPufGxxxxxxxxxxxxxxxx="
#endif /* DEVICE_SYMMETRIC_KEY */

 

 

  

Rob Ashworth
Senior

Thanks Guillaume, 

for the 2nd time you have fixed my problem!  

DPS turned off was the problem, I just need to learn how to learn Azure IoT Central properly now.

Much appreciated