Skip to content

Instantly share code, notes, and snippets.

@jeffbk
Last active August 29, 2015 14:15
Show Gist options
  • Save jeffbk/38f6dd854e7217701a7b to your computer and use it in GitHub Desktop.
Save jeffbk/38f6dd854e7217701a7b to your computer and use it in GitHub Desktop.
Raspberry Pi /etc/network/interfaces with Sierra Wireless 305
'' at+cfun=1
OK at+cgdcont=3,"IP","tfdata"
OK at!scdftprof=3
OK at!scprof=3,"",0,0,0,0
OK at!scact=1,3
OK
'' at!scact=0,3
OK
auto lo
iface lo inet loopback
auto eth0
allow-hotplug eth0
iface eth0 inet dhcp
auto wlan0
allow-hotplug wlan0
iface wlan0 inet dhcp
wpa-conf /etc/wpa_supplicant/wpa_supplicant.conf
iface default inet dhcp
auto wwan0
allow-hotplug wwan0
iface wwan0 inet dhcp
pre-up /etc/modemctl/modem-up.sh
post-down /etc/modemctl/modem-down.sh
#!/bin/sh
set -eu
echo 'modem-down: Shutting down modem'
sudo chat -e -f /etc/modemctl/disconnect < /dev/ttyUSB2 > /dev/ttyUSB2
#!/bin/sh
set -eu
echo 'modem-up: Starting modem'
sudo chat -e -f /etc/modemctl/connect < /dev/ttyUSB2 > /dev/ttyUSB2
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment