Connecting Arduino uno rev2 with IoT central application

Pranay Bolem 0 Reputation points
2023-11-16T14:34:18.5166667+00:00

I am following this git repo to establish a connection between Arduino Rev2 with a wifi chip and the Azure IoT central application
https://github.com/firedog1024/arduino-uno-wifi-iotc

I am having difficulty establishing a connection and obtaining a connection string at the configuration step where I am required to provide scope id, device id, and primary key. I have obtained all of those values from a device I have created in the IoT central application. I received the following error message after entering these values.

.Error: Time:Fri Nov 10 19:54:33 2023 File:/Users/gonzo/Github/azure-iot-sdk-c/provisioning_client/src/prov_device_ll_client.c Func:prov_transport_process_json_reply Line:300 failure retrieving json auth key value
Error: Time:Fri Nov 10 19:54:33 2023 File:/Users/gonzo/Github/azure-iot-sdk-c/provisioning_client/src/prov_transport_mqtt_common.c Func:prov_transport_common_mqtt_dowork Line:944 Unable to process registration reply.
Error: Time:Fri Nov 10 19:54:33 2023 File:/Users/gonzo/Github/azure-iot-sdk-c/provisioning_client/src/prov_device_ll_client.c Func:on_transport_registration_data Line:510 Failure retrieving data from the provisioning service
Failure encountered on registration PROV_DEVICE_RESULT_PARSING
error: registration failed!

Could someone guide me in the right direction? Thank you

Azure IoT Central
Azure IoT Central
An Azure hosted internet of things (IoT) application platform.
347 questions
{count} votes

2 answers

Sort by: Most helpful
  1. Sander van de Velde 28,706 Reputation points MVP
    2023-11-16T16:04:09.7733333+00:00

    Hello @Pranay Bolem,

    welcome to this moderated Azure community forum.

    You are referencing a repo maintained outside Microsoft.

    Please contact this firedog1024 directly or submit an issue in that repo.

    Regarding access to Azure IoT Central, check out the Azure DPS (embedded) client SDKs coming from Microsoft.


    If the response helped, do "Accept Answer". If it doesn't work, please let us know the progress. All community members with similar issues will benefit by doing so. Your contribution is highly appreciated.

    0 comments No comments

  2. LeelaRajeshSayana-MSFT 13,471 Reputation points
    2023-11-21T00:34:04.72+00:00

    Hi @Pranay Bolem Greetings! Welcome to Microsoft Q&A forum. Thank you for posting this question here.

    The approach you are trying uses repository Azure IoT DPS Symmetric Key Generator for generating the connection string. The tool responsible for fetching the connection string has deprecated a long time back as mentioned in the repository. Please find the below statement.

    User's image

    The only functionality available in the tool is the ability to generate individual device keys from your IoT Central applications group SAS key. This is the reason why the code sample fails to fetch the connection string.

    I have found an alternative approach in the EPS8266 samples which uses Azure IoT SDK C to establish the connection with IoT Central using the same parameters without relying on the connection string. You can find the underlying implementation for the connection process in the file iotc.cpp. Since this sample is built for Arduino and using Azure SDK for C, I believe this can be extended to Arduino Uno as well.

    You may want to refer Azure Arduino for C SDK samples and see how you can use embed the SDK library into the device using Arduino IDE.

    Hope this helps.


    If the response helped, please do click Accept Answer and Yes for the answer provided. Doing so would help other community members with similar issue identify the solution. I highly appreciate your contribution to the community.