当前位置: 技术问答>linux和unix
pppd 3g 拨号失败 LCP terminated by peer (User request)
来源: 互联网 发布时间:2016-09-02
本文导语: #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...
#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 ]
rcvd [LCP ConfReq id=0x1 ]
sent [LCP ConfAck id=0x1 ]
rcvd [LCP ConfAck id=0x1 ]
sent [PAP AuthReq id=0x1 user="CARD" password=]
rcvd [PAP AuthAck id=0x1 ""]
PAP authentication succeeded
sent [CCP ConfReq id=0x1 ]
sent [IPCP ConfReq id=0x1 ]
rcvd [CCP ConfReq id=0x1 ]
sent [CCP ConfAck id=0x1 ]
rcvd [IPCP ConfReq id=0x1 ]
sent [IPCP ConfAck id=0x1 ]
rcvd [CCP ConfAck id=0x1 ]
Deflate (15) compression enabled
rcvd [IPCP ConfRej id=0x1 ]
sent [IPCP ConfReq id=0x2 ]
rcvd [LCP TermReq id=0x2 "User request"]
LCP terminated by peer (User request)
sent [LCP TermAck id=0x2]
Connection terminated.
Modem hangup
大家帮忙看看,是不是 pppd 的参数有问题。
这里已经能看到 ppp0 这个设备了。但是很快就被远端关闭连接。
# /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 ]
rcvd [LCP ConfReq id=0x1 ]
sent [LCP ConfAck id=0x1 ]
rcvd [LCP ConfAck id=0x1 ]
sent [PAP AuthReq id=0x1 user="CARD" password=]
rcvd [PAP AuthAck id=0x1 ""]
PAP authentication succeeded
sent [CCP ConfReq id=0x1 ]
sent [IPCP ConfReq id=0x1 ]
rcvd [CCP ConfReq id=0x1 ]
sent [CCP ConfAck id=0x1 ]
rcvd [IPCP ConfReq id=0x1 ]
sent [IPCP ConfAck id=0x1 ]
rcvd [CCP ConfAck id=0x1 ]
Deflate (15) compression enabled
rcvd [IPCP ConfRej id=0x1 ]
sent [IPCP ConfReq id=0x2 ]
rcvd [LCP TermReq id=0x2 "User request"]
LCP terminated by peer (User request)
sent [LCP TermAck id=0x2]
Connection terminated.
Modem hangup
大家帮忙看看,是不是 pppd 的参数有问题。
这里已经能看到 ppp0 这个设备了。但是很快就被远端关闭连接。
|
太难了 没搞过 一点也不会
|
这个真不懂
|
rcvd [IPCP ConfRej id=0x1 ]
sent [IPCP ConfReq id=0x2 ]
rcvd [LCP TermReq id=0x2 "User request"]
LCP terminated by peer (User request)
sent [LCP TermAck id=0x2]
貌似这里的时候,被对端(局端)给终止了。是不是跟局端需要的参数不匹配?
|
rcvd [IPCP ConfRej id=0x1 ]
IPCP协商有问题,有些参数配置的不对,所以服务器confrej 拒绝了,可能是PPPD的选项的问题
IPCP协商有问题,有些参数配置的不对,所以服务器confrej 拒绝了,可能是PPPD的选项的问题
|
帮拉拉顶一下~~~~~~~~~~~~~~~~~~~~~~~
|
加上:
# No ppp compression
novj
novjccomp
|
哥们,3G是用的什么模块啊.