I have a Raspberry Pi with a 4G USB dongle connected to it for internet access. Everything works on power-up, everything auto-connects and connectivity is established. In fact if I leave the Raspberry Pi on my desk powered up it stays connected through the 4G dongle for weeks without any issues. As soon as I leave my mobile cell area, connectivity drops out and does not recover. I also want to be able to unplug the USB 4G dongle and reconnect it and have the cell link auto recover. I am using USB-Modeswitch and wvdial. Is there anyway I can get the 4G dongle to auto recover?
Thanks for reading. Brodes.
OK I think I have found the solution I was looking for....
I created this script that sends 5 pings to the other end of a VPN tunnel. If the pings fail then the Raspberry Pi reboots.
Then I created a cronjob to run this script every 2 minutes.
If anyone has a better idea please let me know.
Cheers,
Brodes.