Closed PavelVe closed 4 years ago
I have the same issue.
Fetched NTP epoch time is: Tue Jul 30 08:55:12 2019
.
failure to set option "tlsVersionResult": 1
failure to set option "TrustedCerts": 1
28°C / 62%
Sending message: {"temperature":28,"humidity":62}.
IoTHubClient accepted the message for delivery.
Connection Status: NOT_AUTHENTICATED [NO_NETWORK]
Connection Status: NOT_AUTHENTICATED [NO_NETWORK]
27°C / 61%
Sending message: {"temperature":27,"humidity":61}.
IoTHubClient accepted the message for delivery.
Connection Status: NOT_AUTHENTICATED [NO_NETWORK]
Connection Status: NOT_AUTHENTICATED [NO_NETWORK]
Failed tlsio_options_set
unable to IoTHubTransport_SetOption
failure to set option "tls_version": 1
Trusted certs option not supported
Failed tlsio_options_set
unable to IoTHubTransport_SetOption
failure to set option "TrustedCerts": 1
28°C / 50%
Sending message: {"temperature":28,"humidity":50}.
IoTHubClient accepted the message for delivery.
Error opening socket
Connection Status: NOT_AUTHENTICATED [NO_NETWORK]
Connection Status: NOT_AUTHENTICATED [NO_NETWORK]
Have you tried with the new sample?
I updated all libraries to the last version, but still not work. I got error and than Core 1 panic'ed (StoreProhibited)
Error: Time:Thu Feb 20 09:02:34 2020 File:/Users/pavelve/Documents/ArduinoESP32/libraries/ESP32_AzureIoT/src/az_iot/iothub_client/src/iothubtransport_mqtt_common.c Func:mqtt_operation_complete_callback Line:1234 Connection Not Accepted: 0x5: Not Authorized
Looks like we do not have a x509 implementation for the ESP32/mbedtls. We also have no current plans to add one. If you would like to spin one up yourself, this openssl implementation may help.
Device: ESP8266 Arduino example: simplesample_mqtt
In this example is: `#ifdef SET_TRUSTED_CERT_IN_SAMPLES // For mbed add the certificate information if (IoTHubClient_LL_SetOption(iotHubClientHandle, OPTION_TRUSTED_CERT, certificates) != IOTHUB_CLIENT_OK) { (void)printf("failure to set option \"TrustedCerts\"\r\n"); }
endif // SET_TRUSTED_CERT_IN_SAMPLES`
I add
#define SET_TRUSTED_CERT_IN_SAMPLES
The code is compiled and uploaded. But the response from ESP is:Is it bug or reality?
I would like to use x.509 certificates to connect to Azure, but I am not successful in the Arduino environment. Azure simulator with C code works.