I’m using HL6528RD modem to implement an MQTT client over a TCP socket.
The TCP socket status is polled every 100ms to check if any data is available to read.
The TCP socket is open at application startup and keeps opened until I decide to close the MQTT connection.
I noticed that every 150 sec (more or less), the +KTCPSTAT command returns 5 as , i.e. “Socket is closed”. In such a situation, I close the socket and reopen it as suggested in this thread: “TCP session with HL6528”.
My question is: why the socket gets closed every 150 sec (if I don’t have any activity on it)? Is it some TCP timeout related to the network operator? Is there any way to control/avoid it?
Thanks and regards,