0

I have a problem with a timeout connection when I use SIM800A to subscribe to a topic on cloudmqtt. All is ok when I send the connect and subscribe packet with AT commands, but after 2 minutes the SIM800A disconnects from cloudmqtt and closes the TCP connection. I think the problem is that the TCP connection times out. I want SIM800 to keep its connection to the server in order to subscribe to messages from that server at anytime.

Has anyone had the same problem? How do I solve this problem?

I appreciate your reply.

Hayden Eastwood
  • 928
  • 2
  • 10
  • 20
  • There is no code with your post, so this isn't really a question for StackOverflow....might have better luck on Reddit or something. – JD Allen Mar 09 '21 at 21:46
  • Cellular is not a good radio interface for long-lived MQTT connections. Your carrier might disconnect you if your connections stay up too long. Its usually better to do an intermittent connect w/polling using something besides MQTT. – JD Allen Mar 09 '21 at 21:49
  • @JDAllen Thanks for your reply. I just use AT command to send connect, publish, subscribe to cloudmqtt. I try change KEEP-ALIVE in connect packet then timeout-connection changed. So, Can I keep timeout-connection continously by change KEEP-ALIVE value? if can, what is value? – Tam Tan Mar 10 '21 at 02:38

0 Answers0