receive-all
# Give some debug info
debug
kdebug 7
dump
/dev/ttyS2
4800
# Turn off waiting of carrier detect or flow control signal
# With IrDA it should be disabled with nocrtscts option.
nocrtscts # serial cable
local
# To keep pppd on the terminal
nodetach
# Accept the peer's idea of our local IP address
ipcp-accept-local
# Accept the peer's idea of its (remote) IP address
ipcp-accept-remote
# IP addresses:
# - accept peers idea of our local address and set address peer as 10.0.0.1
# (any address would do, since IPCP gives 0.0.0.0 to it)
# - if you use the 10. network at home or something and pppd rejects it,
# change the address to something else
0.0.0.0:0.0.0.0
-chap
#-pap
# pppd must not propose any IP address to the peer!
#noipdefault
# No ppp compression
novj
novjccomp
papcrypt
nodeflate
#No ppp magic number
nomagic
# no asyn cmap
asyncmap 0
# Add default route
defaultroute
#Auto get IP address
usepeerdns
# Connect script
connect 'chat -s -v -f /etc/ppp/gprs-connect-chat'
###########################################################
gprs-connect-chat:
TIMEOUT 10 ECHO ON ABORT 'BUSY' ABORT 'ERROR' ABORT 'NO ANSWER' ABORT 'NO CARRIER' ABORT 'NO DIALTONE' ABORT 'RINGING' '' AT\r TIMEOUT 12 OK ATE1 OK ATE0 OK ATS0 OK 'AT+CGDCONT=1,"IP","COMNET"' OK 'AT+CGCLASS="B"'
OK ATDT*99***1#
CONNECT ""
错误信息如下:
timeout set to 10 seconds
abort on (BUSY)
abort on (ERROR)
abort on (NO ANSWER)
abort on (NO CARRIER)
abort on (NO DIALTONE)
abort on (RINGING)
send (AT^M^M)
expect (OK)
%leealarm
send (AT^M^M)
expect (OK)
%leealarm
Failed