I am experiencing an issue with my project using TinyGSM, SSLClient, and PubSubClient libraries where the MQTT connection randomly disconnects. The disconnects seem to occur specifically when the 15-second MQTT ping interval happens. Until the ping, the MQTT communication works fine.
Below is a snippet from the stream writer log showing the issue:
From what I understand, the error happens when trying to send the ping packet, leading to the connection being dropped. This issue does not occur at any other time, so I suspect it's related to the ping mechanism.
Questions:
What could be causing the failure specifically during the ping interval?
Should I consider increasing the keepalive interval or adjusting the timeout values?
Are there specific areas or settings in TinyGSM, SSLClient, or PubSubClient that I should investigate to resolve this issue?
Additional Information:
The network connection itself seems stable as there are no disconnects during regular MQTT operations, only during the ping.
I have already tried different baud rates and checked for hardware issues, but the problem persists.
Any help or guidance on this issue would be greatly appreciated.
Hello,
I am experiencing an issue with my project using TinyGSM, SSLClient, and PubSubClient libraries where the MQTT connection randomly disconnects. The disconnects seem to occur specifically when the 15-second MQTT ping interval happens. Until the ping, the MQTT communication works fine.
Below is a snippet from the stream writer log showing the issue:
From what I understand, the error happens when trying to send the ping packet, leading to the connection being dropped. This issue does not occur at any other time, so I suspect it's related to the ping mechanism.
Questions: What could be causing the failure specifically during the ping interval? Should I consider increasing the keepalive interval or adjusting the timeout values? Are there specific areas or settings in TinyGSM, SSLClient, or PubSubClient that I should investigate to resolve this issue? Additional Information: The network connection itself seems stable as there are no disconnects during regular MQTT operations, only during the ping. I have already tried different baud rates and checked for hardware issues, but the problem persists. Any help or guidance on this issue would be greatly appreciated.
Thank you!