我在用telit gc864-dual-v2调制解调器。
我正在尝试连接到一个gprs网络,在linux中使用chatpppd。在这篇文章中,我得到了一条错误消息,上面说“lcp:timeout sending config requests”来自pppd。我试过在lcp-max-configure中增加pppd选项。我也收到了同样的错误信息。
有人能提出一些建议来纠正这个问题吗?
下面是我从pppd获得的详细消息日志。
获取的PPPD日志:

pppd /dev/ttyUSB0 115200 modem lock connect '/usr/sbin/chat -v -s -f /etc/ppp/chatscript' debug logfd 1 nodetach noauth defaultroute
timeout set to 10 seconds
abort on (\nBUSY\r)
abort on (\nNO ANSWER\r)
abort on (\nERROR\r)
abort on (\nNO CARRIER\r)
timeout set to 35 seconds
send (ATZ^M)
expect (OK)
ATZ^M^M
OK
 -- got it

send (ATX3^M)
expect (OK)
^M
ATX3^M^M
OK
 -- got it

send (AT&K0^M)
expect (OK)
^M
AT&K0^M^M
OK
 -- got it

send (AT+CGDCONT=2,"IP","airtelgprs.com"^M)
expect (OK)
^M
AT+CGDCONT=2,"IP","airtelgprs.com"^M^M
OK
 -- got it

send (AT+CGATT=1^M)
expect (OK)
^M
AT+CGATT=1^M^M
OK
 -- got it

send (ATD*99***2#^M)
expect (CONNECT)
^M
ATD*99***2#^M^M
CONNECT
 -- got it

Serial connection established.
using channel 7
Using interface ppp0
Connect: ppp0 <--> /dev/ttyUSB0
sent [LCP ConfReq id=0x1 <asyncmap 0x0> <magic 0xdd04133c> <pcomp> <accomp>]
rcvd [LCP ConfAck id=0x1 <asyncmap 0x0> <magic 0xdd04133c> <pcomp> <accomp>]
rcvd [LCP ConfReq id=0x1 <asyncmap 0x0> <auth pap> <magic 0x23dd4e00> <pcomp> <accomp>]
No auth is possible
sent [LCP ConfRej id=0x1 <auth pap>]
rcvd [LCP TermReq id=0x2 00 00 00 00 00 00]
sent [LCP TermAck id=0x2]
sent [LCP ConfReq id=0x1 <asyncmap 0x0> <magic 0xdd04133c> <pcomp> <accomp>]
sent [LCP ConfReq id=0x1 <asyncmap 0x0> <magic 0xdd04133c> <pcomp> <accomp>]
sent [LCP ConfReq id=0x1 <asyncmap 0x0> <magic 0xdd04133c> <pcomp> <accomp>]
sent [LCP ConfReq id=0x1 <asyncmap 0x0> <magic 0xdd04133c> <pcomp> <accomp>]
sent [LCP ConfReq id=0x1 <asyncmap 0x0> <magic 0xdd04133c> <pcomp> <accomp>]
sent [LCP ConfReq id=0x1 <asyncmap 0x0> <magic 0xdd04133c> <pcomp> <accomp>]
sent [LCP ConfReq id=0x1 <asyncmap 0x0> <magic 0xdd04133c> <pcomp> <accomp>]
sent [LCP ConfReq id=0x1 <asyncmap 0x0> <magic 0xdd04133c> <pcomp> <accomp>]
sent [LCP ConfReq id=0x1 <asyncmap 0x0> <magic 0xdd04133c> <pcomp> <accomp>]
sent [LCP ConfReq id=0x1 <asyncmap 0x0> <magic 0xdd04133c> <pcomp> <accomp>]
LCP: timeout sending Config-Requests
Connection terminated.
Modem hangup

最佳答案

我已将AT#GAUTH=0添加到我的chat脚本中。然后我就可以毫无问题地联系了。
注:
AT#GAUTH-命令为PPP-GPRSPPP-GSM连接设置身份验证类型。它的出厂默认值是PAP已启用身份验证。有关更多详细信息,请参阅参考手册中的telit gc864-dual-v2。
在我的情况下,如果没有将AT#GAUTH=0添加到聊天脚本调制解调器,则需要来自对等方的身份验证数据包。但在我的例子中peer(airtel)不需要任何认证,所以它没有发送任何包。所以在主机端,我从pppd获取超时消息。
我希望这能帮助像我这样正在寻找答案的人。

关于linux - 使用pppd和chat通过linux中的gprs/gsm调制解调器连接到gprs网络,我们在Stack Overflow上找到一个类似的问题:https://stackoverflow.com/questions/6922922/

10-13 04:55