Oct 23 2019 06:55 AM
We are using an ESP32 to connect to IoT Central. We have been connecting using symm keys but now we are wanting to move forward to production and need to use x509 instead. But when using the following example from esp-azure, I get the following error:
https://github.com/espressif/esp-azure/tree/master/examples/prov_dev_client_ll_sample
<- 14:36:06 PUBLISH | IS_DUP: false | RETAIN: 0 | QOS: DELIVER_AT_LEAST_ONCE = 0x01 | TOPIC_NAME: $dps/registrations/res/401/?$rid=1 | PACKET_ID: 2 | PAYLOAD_LEN: 156 Error: Time:Tue Oct 22 14:36:06 2019 File:*/esp-azure/azure-iot-sdk-c/provisioning_client/src/prov_device_ll_client.c Func:prov_transport_process_json_reply Line:323 failure retrieving json auth key value Error: Time:Tue Oct 22 14:36:06 2019 File:*/esp-azure/azure-iot-sdk-c/provisioning_client/src/prov_transport_mqtt_common.c Func:prov_transport_common_mqtt_dowork Line:965 Unable to process registration reply. I (7640) AZURE_LIB: Doing SDK Work Error: Time:Tue Oct 22 14:36:06 2019 File:*/esp-azure/azure-iot-sdk-c/provisioning_client/src/prov_device_ll_client.c Func:on_transport_registration_data Line:572 Failure retrieving data from the provisioning service Failure encountered on registration PROV_DEVICE_RESULT_PARSING E (7680) esp-tls: write error :-80: Info: Error from SSL_write: -80 -> 14:36:06 DISCONNECT Error: Time:Tue Oct 22 14:36:06 2019 File:*/esp-azure/port/src/tlsio_esp_tls.c Func:tlsio_esp_tls_destroy Line:152 tlsio_esp_tls_destroy called while not in TLSIO_STATE_CLOSED. I (7700) AZURE_LIB: Registeration Failed...
Is there a special route I need to take to implement dps to connect to IoT Central? Documentation do not do a good job in explaining the actual code needed to connect to IoT Central specifically.
Oct 23 2019 02:17 PM
Oct 23 2019 02:20 PM
Actually was able to resolve the issue. Turns out it was just a x509 cert creation error.
Thank you!
Oct 23 2019 02:21 PM
Oct 23 2019 02:24 PM