Our peripheral device must stay connected to a MQTT broker and wait to receive a publish and immediately react to it.
Using WiFi connection, the goal is reached.
Using the GSM modem GL865 Telit, setting MQTT PING = 30 minutes (because we want to save as much money as possible) we have this repeating situation:
- on the peripheral, the status of the TCP socket is "online"
- after ~ 20 mins, we write on a topic that the peripheral subscribed to
- the broker finds out that the socket is "in error" and disconnects
- but the peripheral doesn't know or receive any indication of socket error
- the peripheral wait until PING time is reached
- then try to PING but finally detects a TCP socket error and proceed to reconnect
if we use a 1 minute PING, the problem doesn't happen because there is simply no time enough for it to happen.
We think that the problem involves telephonic providers, in particular a few ones. By simply changing the SIM, with a few providers the problem happens more than others.
Is someone experiencing the same problem?