I want to connect a RPI to the internet via an UMTS stick. I could get it working with some manual interaction. As the RPI is place on an external location where i don't have access to all the time, it should completely "come up" automatically when its booted.
What is did:
sudo apt-get install wvdial ppp sg3-utils
[Dialer Defaults] Init1 = ATZ ; Huawei E182E: ;Init2 = ATQ0 V1 E1 S0=0 &C1 &D2 +FCLASS=0 ; Huawei E173 Init2 = ATQ0 V1 E1 S0=0 &C1 &D2 Init3 = AT+CGDCONT=1,"IP","web.vodafone.de" ;Modem Type = Analog Modem Modem Type = USB Modem ISDN = 0 New PPPD = yes Username = '' Password = '' Modem = /dev/ttyUSB0 ;Modem = /dev/bus/usb/001/011 Dial Command = ATD Stupid Mode = 1 Phone = *99# Baud = 115200 Auto Reconnect = on
/etc/ppp/peers/wvdial to (no idea if this is required and what this does?):
noauth local name wvdial usepeerdns
/etc/network/interfaces.d/ppp0 (i have the impression that this does nothing as it does not "up" the interface at boot and the route is not set)
auto ppp0 iface ppp0 inet wvdial up ip route add default dev ppp0
as the above interface configuration does not activate the interface at boot, i added this to
When i (re-)boot the RPI after all these settings, the interface is properly activated but my traffic is not routed to the UMTS interface.
When i execute
ip route add default dev ppp0, everything works like it should be and the UTMS interface (ppp0) is used for internet traffic.
How can i automatically add this default route when the device is booted? or maybe better, when the ppp0 interface is connected?