cancel
Showing results for 
Search instead for 
Did you mean: 

Trying to run Azure IoT Central Quick Connect Script on B-U585I-IOT02A But getting the following error: Device ID contains invalid characters.

YAgar.11
Associate

Trying to run Azure Iot Central Quick Connect Script on B-U585I-IOT02A

1.Downloaded x-cube-azure software package from

www.st.com/en/embedded-software/x-cube-azure.html

2.Then navigated through

project\en.x-cube-azure_v2-0-0\STM32CubeExpansion_Cloud_AZURE_V2.0.0\Projects\B-U585I-IOT02A\Applications\TFM_Azure_IoT

and opened the readme file available which has step by step how to connect to Azure IoT Central with a quick connect script

3.I followed the steps for the free azure account.

4.This was my config file after running STM32U5_QuickConnect.py and entering all the details0693W00000QLLEAQA5.png 

5.Certificate file was also made successfully

0693W00000QLLFNQA5.png 

6.But still share error was coming

Bad Request({"error":{"code":"InvalidArgument","message":"Device ID contains invalid characters. You can contact support at aka.ms/iotcentral-support. Please include the following information. Request ID: 5t53jg92, Time: Thu, 14 Jul 2022 08:37:19 GMT.","requestId":"5t53jg92","time":"Thu, 14 Jul 2022 08:37:19 GMT"}})

7.Updated mxchip and checked for Trust zone(disabled it before running the script).

Please help.

Thank you.

3 REPLIES 3
AMARSTM
ST Employee

Hello @YAgar.1​ 

Thank you for using x-cube-azure software package.

Could you please provide the logs (without sensitive information) to have the context of your error?

Some hints:

  • What is the registration id logged in the console (it will be used for azure iot central device id)? Does it contain any other characters than alpha numeric and dash?
  • Did you manually change Config.json file in order to put your own Application Template Id and Device template Id?

However you can still provision your device manually if you want to connect your device, Please jump to section "Connecting to Azure IoT Central manually" of readme file (in Projects\B-U585I-IOT02A\Applications\TFM_Azure_IoT) to do so.

Best regards.

Thank you for answering

I hope by logs you mean this:

0693W00000QLakQQAT.png 

And to answer your questions:

  1. registration id have alphanumeric, one dash, and one space
  2. I have tried both ways with and without changing the config.json file manually in order to put the Application Template Id and Device template Id

After trying manually it is looping on the following step giving an error:

0693W00000QLanfQAD.png 

Hello @YAgar.1​,

Thanks for providing the logs.

As we can see on your logs, the Registration ID contains a space which is not allowed by IotHub for DeviceID field.

Unfortunately, the board your are using will not be compatible with this application because it seems to have an old STSAFE-A110 device version. Only the STSAFE-A110 with SPL03 profiles are compatible. They integrate a unique ID in the common name certificate, with valid characters for cloud based solutions. (STSATE-A110 SPL03 Application note).

To be compatible with this application, Registration ID printed should be "eval3 – Unique serial number", for example “eval3-0209A0949081D4C16B0139�?

What is your board number? (on a sticker on the back, like "MB1551-U585AI-C01 G211600229" (not compatible) or "MB1551-U585AI-C02 G220701798" (compatible))

Sorry for the inconvenience, we will update the documentation about compatibility for next versions.

Best regards.