AWS IoT Device disconnect

0

My device frequently loses connection to AWS IoT Core. The reason for the disconnection is disconnectReason: CONNECTION_LOST. Previously, the device was used connected to RabbitMQ-MQTT. After using AWS IoT Core MQTT, my device disconnects frequently for reason disconnectReason: CONNECTION_LOST. The big difference between RabbitMQ-MQTT is certificate file authentication and TLS. If you look at the wireshark log when disconnectReason: CONNECTION_LOST occurs, [TCP Window Full] 8883 -> 1115 [PSH, ACK] Seq-97 Ack-205 Win-7648 Len-512 [TCP segment of a reassembled PDU] Several messages appear. Is there a way to prevent the device from disconnecting for reason disconnectReason: CONNECTION_LOST? Please advise. thank you

asked 3 months ago232 views
1 Answer
0

Hello,

Firstly, according to the documentation [1] the disconnectReason: CONNECTION_LOST signifies that "The client-server connection is cut off. This can happen during a period of high network latency or when the internet connection is lost". In simpler terms, it indicates a disruption in communication from the client to the IoT Core over the network.

A possible resolution for this type of disconnect would be to enhance the network route's latency and subsequently ensuring the stability of the internet connection. Therefore, it is advisable to validate the network connectivity, ensuring a consistent and reliable internet connection.

It's worth noting that the timeout problem may be intertwined with network instability, and a specific timeout configuration on the client side [2]. For fundamental troubleshooting of connectivity issues, referencing [3, 4] is recommended, where Device Advisor is suggested in [5]. As per [4], it is also important to adjust your client-side setup to make sure your devices can be automatically reconnected to the AWS IoT after a disconnect event.

References:

[1]. https://docs.aws.amazon.com/iot/latest/developerguide/life-cycle-events.html#connect-disconnect:~:text=CONNECTION_LOST,Yes.

[2] https://docs.aws.amazon.com/iot/latest/developerguide/device-advisor-tests-mqtt.html#connect

[3] https://docs.aws.amazon.com/iot/latest/developerguide/diagnosing-connectivity-issues.html

[4] https://docs.aws.amazon.com/iot/latest/developerguide/ota-troubleshooting-fleet-disconnects.html

[5] https://docs.aws.amazon.com/iot/latest/developerguide/device-advisor.html

AWS
answered 3 months ago

You are not logged in. Log in to post an answer.

A good answer clearly answers the question and provides constructive feedback and encourages professional growth in the question asker.

Guidelines for Answering Questions