Hi everyone. I have many devices in the field and for all extensive purposes have durable TCP connections. The towers do dump the connections often or seldom but unpredictable, even with persistent pings to keep things alive. The reason is the towers, when over loaded drop connections.
Nova, using Linux on a Pi.
What I have done to deal with the lost connection issue has three(3) major components. First to keep the host software running I use a custom created server that is thread based. When a connection happens the thread with the connection is detached and left on its own to service the client. If anything happens to the connection eventually eventually the connection times out, the thread reads the error and exits, linux will discard the thread and system resources are returned. If the connection completes without issue the same is true. Linux is good at handling terminated threads. Any shared resources need to be properly mutexed.
Second, the cell connection is established using the sudo hologram modem connect. This creates a ppp session where the system will listen to incoming connections from the hologram network. That service allows my server to receive incoming connections from the cell network. At the same time using the Hologram Dash Board each of my units has tunneling enabled and clients connect through ssh port forwarding. All in the hologram docs.
Third, I have a cron job that runs once every minute that’s sole function is to examine the network connections looking for the hologram ppp network service. If it is not found, it logs the lost connection and then attempts to reconnect by issuing the sudo hologram modem connect command. The job will try two attempts and then exit. Only two attempts because the job runs every minute, the process will be repeated and eventually the network will connect.
This solved my issue until hologram had an outage that affected the clients connecting through the tunneling services.
My systems have run for two years without any issues other than just described. In some areas of the US the lost connections are seldom, in other busy areas the lost connections are more frequent. However looking at the remote access to the systems, other than when hologram was down, the connections appear to be durable. In other words, lost connections are quickly recovered to the point that lost connections are only noticed when looking at the logs.
I would not put life critical systems on these connections, nor would I do that with any cell connection. But the lost and recovered connections look like ordinary connections with network traffic delays from time to time.
I like the connections I have. I am even able to view and download large logs from my devices, serve up html status pages and control lots of operating parameters. Just as if I had a hardware network connection.
The Hologram network does work well!