分类: LINUX
2012-09-12 17:38:21
Android 3G 拨号脚本
1.WCDMA
debug
nodetach
lock
/dev/ttyUSB0
115200
user "card"
password "card"
crtscts
show-password
usepeerdns
noauth
noipdefault
novj
novjccomp
noccp
defaultroute
ipcp-accept-local
ipcp-accept-remote
connect '/usr/sbin/chat -s -v -f chat-wcdma-connect'
disconnect '/usr/sbin/chat -s -v -f chat-wcdma-disconnect'
>>>chat-wcdma-connect
TIMEOUT 5
ABORT 'NO CARRIER'
ABORT 'ERROR'
ABORT 'NO DIALTONE'
ABORT 'BUSY'
ABORT 'NO ANSWER'
'' \rAT
OK \rATZ
OK \rAT+CGDCONT=1,"IP","3gnet",,0,0
OK-AT-OK ATDT*99#
CONNECT \d\c
>>>chat-wcdma-disconnect
ABORT "BUSY"
ABORT "ERROR"
ABORT "NO DIALTONE"
SAY "\nSending break to the modem\n"
'' "\K"
'' "+++ATH"
SAY "\nGoodbay\n"
2.TD-CDMA
debug
logfile /var/log/pppd.log
lock
/dev/ttyUSB0
115200
user "card"
password "card"
crtscts
connect '/usr/sbin/chat -v -t3 -f td-connect-chat'
disconnect '/usr/sbin/chat -s -v -f td-disconnect-chat'
show-password
usepeerdns
noauth
noipdefault
novj
novjccomp
noccp
defaultroute
ipcp-accept-local
ipcp-accept-remote
>>>td-connect-chat
ABORT 'NO CARRIER'
ABORT 'ERROR'
ABORT 'NO DIALTONE'
ABORT 'BUSY'
ABORT 'NO ANSWER'
'' \rATZ
OK-AT-OK ATD#777
CONNECT \d\c
>>>td-disconnect-chat
ABORT "BUSY"
ABORT "ERROR"
ABORT "NO DIALTONE"
SAY "\nSending break to the modem\n"
'' "\K"
'' "+++ATH"
SAY "\nGoodbay\n"
3.CDMA1x
<<<cdma1x
debug
nodetach
lock
/dev/ttyUSB0
115200
user "card"
password "card"
crtscts
show-password
usepeerdns
noauth
noipdefault
novj
novjccomp
noccp
defaultroute
ipcp-accept-local
ipcp-accept-remote
connect '/usr/sbin/chat -s -v -f cdma1x-connect-chat'
disconnect '/usr/sbin/chat -s -v -f cdma1x-disconnect-chat'
>>> cdma1x-connect-chat
TIMEOUT 5
ABORT 'NO CARRIER'
ABORT 'ERROR'
ABORT 'NO DIALTONE'
ABORT 'BUSY'
ABORT 'NO ANSWER'
'' \rATZ
OK \rAT\^PREFMODE=2
OK-AT-OK ATD#777
CONNECT \d\c
>>>cdma1x-disconnect-chat
ABORT "BUSY"
ABORT "ERROR"
ABORT "NO DIALTONE"
SAY "\nSending break to the modem\n"
'' "\K"
'' "+++ATH"
SAY "\nGoodbay\n"
4.CDMA2000-EVDO
>>>evdo
debug
nodetach
lock
/dev/ttyUSB0
115200
user "card"
password "card"
crtscts
show-password
usepeerdns
noauth
noipdefault
novj
novjccomp
noccp
defaultroute
ipcp-accept-local
ipcp-accept-remote
connect '/usr/sbin/chat -s -v -f evdo-connect-chat'
disconnect '/usr/sbin/chat -s -v -f evdo-disconnect-chat'
>>>evdo-connect-chat
TIMEOUT 5
ABORT 'NO CARRIER'
ABORT 'ERROR'
ABORT 'NO DIALTONE'
ABORT 'BUSY'
ABORT 'NO ANSWER'
'' \rATZ
OK-AT-OK ATD#777
CONNECT \d\c
>>>evdo-disconnect-chat
ABORT "BUSY"
ABORT "ERROR"
ABORT "NO DIALTONE"
SAY "\nSending break to the modem\n"
'' "\K"
'' "+++ATH"
SAY "\nGoodbay\n"