knolleary / pubsubclient

A client library for the Arduino Ethernet Shield that provides support for MQTT.
http://pubsubclient.knolleary.net/
MIT License
3.83k stars 1.47k forks source link

Azure-sdk-for-C ESP8266 fails to connect: Unauthorized. #894

Open markpope opened 3 years ago

markpope commented 3 years ago

I downloaded the ESP8266 library to publish IoT data to an Azure IoT Hub. Azure's library uses PubSubClient. It fails to connect returning 5(MQTT_CONNECT_UNAUTHORIZED). I've tried multiple IoT Hubs that other clients can publish to. Azure guys think its a timing issue with NTP Servers. Thoughts?

ruem2802 commented 3 years ago

Try set a time manually, example: WiFiClientSecure client; client.setX509Time(1633017554); // Fake time