Failure opening connection on first time Provisioning

Ben 1 Reputation point
2021-06-13T07:06:38.133+00:00

I following the instruction from " Quickstart: Provision a device with symmetric keys" https://learn.microsoft.com/en-us/azure/iot-dps/quick-create-simulated-device-symm-key

The Visual Studio 2019 , git and cmake environment have been installed. I follow the instruction and up to run the "prov_dev_client_sample". I got the following error messages:

Provisioning API Version: 1.4.1

Registering Device

Error: Time:Sun Jun 13 14:47:30 2021 File:C:\Users\user\azure-iot-sdk-c\umqtt\sr
c\mqtt_client.c Func:onOpenComplete Line:454 Error: failure opening connection t
o endpoint
Error: Time:Sun Jun 13 14:47:30 2021 File:C:\Users\user\azure-iot-sdk-c\provisio
ning_client\src\prov_transport_mqtt_common.c Func:mqtt_error_callback Line:139 M
QTT communication error
Error: Time:Sun Jun 13 14:47:30 2021 File:C:\Users\user\azure-iot-sdk-c\provisio
ning_client\src\prov_device_ll_client.c Func:on_transport_registration_data Line
:771 Failure retrieving data from the provisioning service

Failure registering device: PROV_DEVICE_RESULT_TRANSPORT
Press enter key to exit:

Anythings I miss the configure or any other issues. I have test the internet connection was fine.

Azure IoT Hub
Azure IoT Hub
An Azure service that enables bidirectional communication between internet of things (IoT) devices and applications.
1,124 questions
{count} votes

1 answer

Sort by: Most helpful
  1. QuantumCache 20,031 Reputation points
    2021-06-24T07:47:13.157+00:00

    Hello @Ben Thanks for reaching out on this forum, we have verified the document at: https://learn.microsoft.com/en-us/azure/iot-dps/quick-create-simulated-device-symm-key

    And we were able to run the sample and provision the device via DPS with the Symmetric key attestation.

    108847-image.png

    108932-image.png

    Troubleshooting steps:

    Provisioning API version in your case looks different version than mine.
    What is the CMAKE version used?
    Did any changes happened in the prov_dev_client_sample.c file other than the mentioned in the document\tutorial?

    We expect the default solution to work with only few changes such as:

    • id_scope,
    • hsm_type = SECURE_DEVICE_TYPE_SYMMETRIC_KEY;
    • prov_dev_set_symmetric_key_info("mytestdevice","djbiw");

    Please note that we only make changes in the file prov_dev_client_sample.c and no other file is updated as part of this tutorial or sample to work as it is.

    Please give the document one more try and do let us know your experience.

    We really appreciate your kind feedback on this product document, which is very helpful to improve customer experience and helps the community as well.

    Please do comment in the below section. Happy to help you!

    If the response is helpful, please click "Accept Answer" and upvote it.

    0 comments No comments