Open jaka87 opened 3 years ago
Are you calling the loop function of the client object regularly?
Yes about every 10s. In the first part of the log "MQTT loop" is where this function is called
The broker log shows a socket error, not a keepalive timeout. So the ping handling isn't relevant to whatever is causing the client to disconnect.
Not sure what to suggest. Never used the sim7000 so have no sense of what can cause it to drop connections.
Actualy I get both of them. If increase the frequency of sending data below 5min i get no problems...
Jan 04 18:19:56 mosquitto[3132766]: 1609780796: Client 865234031873176 has exceeded timeout, disconnecting.
Jan 04 18:19:56 mosquitto[3132766]: 1609780796: Socket error on client 865234031873176, disconnecting.
Hi. Im using your library (latest) together with tinygsmclient (also latest version) while using sim7000 module. In general it is working fine but i notice i get disconnects after few minutes of inactivity (about 5min). I checked my broker log (mosquito 1.5.7) and to my surprise i see almost none PINGREQ and responses while they should be pinged regularly.
I tried different settings with the same end result. Most of the time I was using keepalive 60s which i set directly in PubSubClient.h and i ran loop every 10 seconds.
Here is the log from both AT command from the module, and server. Any idea why this is happening or how to debug it further?