esp-aws-iot icon indicating copy to clipboard operation
esp-aws-iot copied to clipboard

AWS IoT sometimes unable to reconnect (CA-239)

Open tobyloki opened this issue 3 years ago • 2 comments

I've bene using the thing shadow example based on https://github.com/espressif/aws-iot-device-sdk-embedded-C/tree/release-v3.1.x. Sometimes the device disconnects from AWS and is unable to reconnect even though there is wifi and internet available. It gives out the error NETWORK_ATTEMPTING_RECONNECT. What can I do to make sure the device always reconnects back to AWS?

tobyloki avatar Sep 13 '22 06:09 tobyloki

I also have the same issue even with the ota_mqtt demo project, any way to resolve this?

law-ko avatar Oct 06 '22 01:10 law-ko

If you disconnect, then I suggest you do a full shutdown of the TLS/MQTT connection, then restart if Wifi/SNTP is still connected and valid.

Be sure that you're always going through MQTT_ProcessLoop when you are idle and doing nothing because MQTT_ProcessLoop initiates/handles your PING/PINGRESP. If you're not continuously moving through MQTT_ProcessLoop, then your connection will get dropped.

SolidStateLEDLighting avatar Oct 16 '22 19:10 SolidStateLEDLighting