-
Notifications
You must be signed in to change notification settings - Fork 4
Expand file tree
/
Copy pathHuawei_ME909s-120.sh
More file actions
40 lines (31 loc) · 1.04 KB
/
Huawei_ME909s-120.sh
File metadata and controls
40 lines (31 loc) · 1.04 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
# Setting up a Huawei ME909s-120 WWAN card in Debian 8.
# Assuming that the PIN authentication is disabled on the SIM card.
# Copyright (c) 2016 Stanislav Sinyagin <ssinyagin@k-open.com>.
# This content is published under Creative Commons Attribution 4.0
# International (CC BY 4.0) lincense.
# Source repository: https://github.com/ssinyagin/wwan_udev_rules
apt-get install -y ppp
wget -O /etc/udev/rules.d/99-wwan.rules \
https://raw.githubusercontent.com/ssinyagin/wwan_udev_rules/master/99-wwan.rules
cat >/etc/chatscripts/sunrise.HUAWEI <<'EOT'
ABORT BUSY
ABORT 'NO CARRIER'
ABORT ERROR
TIMEOUT 10
'' ATZ
OK 'AT+CFUN=1'
OK 'AT+CMEE=1'
OK 'AT\^NDISDUP=1,1,"internet"'
OK
EOT
cat >/etc/chatscripts/gsm_off.HUAWEI <<'EOT'
ABORT ERROR
TIMEOUT 5
'' AT+CFUN=0 OK
EOT
cat >/etc/network/interfaces.d/lte0 <<'EOT'
allow-hotplug lte0
iface lte0 inet dhcp
pre-up /usr/sbin/chat -v -f /etc/chatscripts/sunrise.HUAWEI >/dev/ttyWWAN02 </dev/ttyWWAN02
post-down /usr/sbin/chat -v -f /etc/chatscripts/gsm_off.HUAWEI >/dev/ttyWWAN02 </dev/ttyWWAN02
EOT