question

Ben-8476 avatar image
0 Votes"
Ben-8476 asked SatishBoddu-MSFT answered

Failure opening connection on first time Provisioning

I following the instruction from " Quickstart: Provision a device with symmetric keys" https://docs.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
· 1
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

Hello @Ben-8476 ,

Devices enrollment should be a simple solution, especially with the symmetric keys.

Can you check if the other examples (eg. the C# one) are working well?


0 Votes 0 ·

1 Answer

SatishBoddu-MSFT avatar image
0 Votes"
SatishBoddu-MSFT answered

Hello @Ben-8476 Thanks for reaching out on this forum, we have verified the document at: https://docs.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.



image.png (176.2 KiB)
image.png (19.1 KiB)
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.