I have a USB modem (Huawei E1552) connected a RPi running Raspbian Stretch. It is connected at remote location that needs persistent internet. For example, for ssh or pushing code remotely.
I have managed to get it "working" using wvdial
and a couple of lines in /etc/profile
to get it to automatically to connect on reboot. It is very very cruel and I would like it to have some fail safe (e.g. reconnect on lost connection). The profile
looks like this:
echo waiting for device to boot...
sleep 10
screen -S APN -dm sudo wvdial defaults
echo adding to route...
sleep 10
sudo route add default dev ppp0
Can someone suggest a better method? I am not very familiar with Linux.
I have also tried the qmi method here but it did not work for me. I think the /etc/network/interface
is now deprecated?
Thanks!
It seems to reconnect in those situations. Maybe all I need is to call wvdial from a bash script in a while loop like https://wiki.archlinux.org/index.php/Wvdial#Auto_Reconnect suggests?
– Tony Baloney Jul 05 '19 at 07:14