-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathopen3g.simple
executable file
·19 lines (13 loc) · 1.16 KB
/
open3g.simple
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
#!/bin/bash
OP=oi
typeset -A array
apn[oi]=gprs.oi.com.br
apn[claro]=bandalarga.claro.com.br
apn[tim]=tim.br
apn[vivo]=zap.vivo.com.br
/usr/sbin/pppd -d /dev/ttyUSB0 460800 noauth persist defaultroute noipdefault usepeerdns nodeflate refuse-pap user $OPE password $OPE connect "/usr/bin/chat -v TIMEOUT 300 ABORT \"BUSY\" ABORT \"NO DIALTONE\" ABORT \"NO CARRIER\" \"\" ATZ OK AT+cfun=1 OK AT+CGDCONT=1,\"IP\",\"${apn[$OPE]}\" -T ATDT*99# CONNECT \"\""
/usr/sbin/pppd -d /dev/ttyUSB0 460800 noauth persist defaultroute noipdefault usepeerdns nodeflate refuse-pap user claro password claro connect "/usr/bin/chat -v TIMEOUT 300 ABORT \"BUSY\" ABORT \"NO DIALTONE\" ABORT \"NO CARRIER\" \"\" ATZ OK AT+cfun=1 OK AT+CGDCONT=1,\"IP\",\"bandalarga.claro.com.br\" -T ATDT*99# CONNECT \"\""
/usr/sbin/pppd -d /dev/ttyUSB0 460800 noauth persist defaultroute noipdefault usepeerdns nodeflate refuse-pap user claro password claro connect "/usr/bin/chat -v TIMEOUT 300 ABORT \"BUSY\" ABORT \"NO DIALTONE\" ABORT \"NO CARRIER\" \"\" ATZ OK AT+cfun=1 OK AT+CGDCONT=1 \"IP\" \"bandalarga.claro.com.br\" -T ATDT*99# CONNECT \"\""
sleep 5;
killall -9 pppd
/usr/bin/wvdial -C /specta/3g/$OPE.conf