Azure / azure-iot-arduino

Azure IoT library for the Arduino
Other
167 stars 96 forks source link

Failed to connect azure iot hub with esp8266 using azure-iot-arduino library #115

Closed MikhailKrivonos closed 4 years ago

MikhailKrivonos commented 4 years ago

I'm trying to connect to azure iot hub with esp8266 using azure-iot-arduino library (iothub_ll_telemetry_sample)

I've faced several problems doing that:

1) AzureIoTUtility library. File esp82266/sample_init.cpp function configTime(0, 0, "pool.ntp.org", "time.nist.gov"); doesn't work - after that I'm getting message "Fetching NTP epoch time failed! Waiting 2 seconds to retry." again and again. It is possible to fix that with configTime( "GMT", "pool.ntp.org", "time.nist.gov" ); function instead of configTime(0, 0, "pool.ntp.org", "time.nist.gov"); Or using initTime function from samd directory.

2) AzureIoTUtility library. File adapters/sslClient_arduino.cpp. function sslClient.connect(ip, port); in sslClient_connect(uint32_t ipAddress, uint16_t port) returns 0 status. I think it`s some problem with sertificate that is used in the library. I've tried esp32 example and desktop example (c sdk) and they both work well.

MikhailKrivonos commented 4 years ago

found that I had to use -DUSE_BALTIMORE_CERT flag but problem 1 still exists