pppd 3g 拨号失败 LCP terminated by peer (User request)
#pppd 脚本
# /etc/ppp/peers/3g
# pppd call 3g
/dev/ttyMOT0
115200
noipdefault
defaultroute
persist
noauth
nodetach
usepeerdns
user CARD
password CARD
debug
connect "/usr/sbin/chat -esvf /etc/ppp/scripts/Talk.chat"
#chat 脚本
ABORT 'BUSY'
ABORT 'NO ANSWER'
ABORT 'ERROR'
TIMEOUT 20
'' 'ATZ'
OK "AT+CPIN?"
OK AT+CFUN=1
OK 'AT+CGDCONT=1,,"3gnet",,0,0'
OK 'ATDT*99#'
CONNECT ""
#拨号log:
pppd call gg
# /etc/ppp/peers/3g
# pppd call 3g
/dev/ttyMOT0
115200
noipdefault
/etc # pppd call 3g
abort on (BUSY)
abort on (NO ANSWER)
abort on (ERROR)
timeout set to 20 seconds
send (ATZ^M)
expect (OK)
ATZ
ATZ^M^M
OKOK
-- got it
send (AT+CPIN?^M)
expect (OK)
^M
AT+CPIN?
AT+CPIN?^M^M
+CPIN: READY
+CPIN: READY
^M
^M
OKOK
-- got it
send (AT+CFUN=1^M)
expect (OK)
^M
AT+CFUN=1
AT+CFUN=1^M^M
OKOK
-- got it
send (AT+CGDCONT=1,,"3gnet",,0,0^M)
expect (OK)
^M
AT+CGDCONT=1,,"3gnet",,0,0
AT+CGDCONT=1,,"3gnet",,0,0^M^M
OKOK
-- got it
send (ATDT*99#^M)
expect (CONNECT)
^M
ATDT*99#
ATDT*99#^M^M
CONNECTCONNECT
-- got it
send (^M)
Serial connection established.
using channel 3
Using interface ppp0
Connect: ppp0 <--> /dev/ttyMOT0
sent [LCP ConfReq id=0x1 <asyncmap 0x0> <magic 0x319b5569> <pcomp> <accomp>]
rcvd [LCP ConfReq id=0x1 <asyncmap 0x0> <auth pap> <magic 0xabec5754> <pcomp> <accomp>]
sent [LCP ConfAck id=0x1 <asyncmap 0x0> <auth pap> <magic 0xabec5754> <pcomp> <accomp>]
rcvd [LCP ConfAck id=0x1 <asyncmap 0x0> <magic 0x319b5569> <pcomp> <accomp>]
sent [PAP AuthReq id=0x1 user="CARD" password=<hidden>]
rcvd [PAP AuthAck id=0x1 ""]
PAP authentication succeeded
sent [CCP ConfReq id=0x1 <deflate 15> <deflate(old#) 15> <bsd v1 15>]
sent [IPCP ConfReq id=0x1 <compress VJ 0f 01> <addr 0.0.0.0> <ms-dns1 0.0.0.0> <ms-dns3 0.0.0.0>]
rcvd [CCP ConfReq id=0x1 <deflate 15> <deflate(old#) 15> <bsd v1 15>]
sent [CCP ConfAck id=0x1 <deflate 15> <deflate(old#) 15> <bsd v1 15>]
rcvd [IPCP ConfReq id=0x1 <compress VJ 0f 01> <addr 169.254.0.1>]
sent [IPCP ConfAck id=0x1 <compress VJ 0f 01> <addr 169.254.0.1>]
rcvd [CCP ConfAck id=0x1 <deflate 15> <deflate(old#) 15> <bsd v1 15>]
Deflate (15) compression enabled
rcvd [IPCP ConfRej id=0x1 <addr 0.0.0.0> <ms-dns1 0.0.0.0> <ms-dns3 0.0.0.0>]
sent [IPCP ConfReq id=0x2 <addrs 0.0.0.0 0.0.0.0> <compress VJ 0f 01>]
rcvd [LCP TermReq id=0x2 "User request"]
LCP terminated by peer (User request)
sent [LCP TermAck id=0x2]
Connection terminated.
Modem hangup
大家帮忙看看,是不是 pppd 的参数有问题。
这里已经能看到 ppp0 这个设备了。但是很快就被远端关闭连接。