求助,关于linux下ppp,gprs拨号上网的问题,急啊!

发布于 2022-09-30 19:11:11 字数 6720 浏览 16 评论 0

本帖最后由 luojijian 于 2011-03-26 16:33 编辑

错误现象:---------------------------

  1. [root@huang ppp]# pppd call gprs
  2. timeout set to 5 seconds
  3. abort on (\nBUSY\r)
  4. abort on (\nERROR\r)
  5. abort on (\nNO ANSWER\r)
  6. abort on (\nNO CARRIER\r)
  7. abort on (\nNO DIALTONE\r)
  8. abort on (\nRINGING\r\n\r\nRINGING\r)
  9. send (AT^M)
  10. timeout set to 60 seconds
  11. Press CTRL-C to break the connection process.
  12. expect (OK)
  13. AT
  14. AT^M^M
  15. OKOK
  16. -- got it
  17. send (AT+CGREG=1^M)
  18. expect (OK)
  19. ^M
  20. AT+CGREG=1
  21. AT+CGREG=1^M^M
  22. OKOK
  23. -- got it
  24. send (AT+CGATT=1^M)
  25. expect (OK)
  26. ^M
  27. AT+CGATT=1
  28. AT+CGATT=1^M^M
  29. OKOK
  30. -- got it
  31. send (AT+CGDCONT=1,"IP","CMNET"^M)
  32. expect (OK)
  33. ^M
  34. AT+CGDCONT=1,"IP","CMNET"
  35. AT+CGDCONT=1,"IP","CMNET"^M^M
  36. OKOK
  37. -- got it
  38. send (AT+CGQMIN=1,0,0,0,0,31^M)
  39. expect (OK)
  40. ^M
  41. AT+CGQMIN=1,0,0,0,0,31
  42. AT+CGQMIN=1,0,0,0,0,31^M^M
  43. OKOK
  44. -- got it
  45. send (AT+CGACT=1,1^M)
  46. expect (OK)
  47. ^M
  48. AT+CGACT=1,1
  49. AT+CGACT=1,1^M^M
  50. OKOK
  51. -- got it
  52. send (ATDT*99***1#^M)
  53. timeout set to 60 seconds
  54. Waiting for connect...
  55. expect (CONNECT)
  56. ^M
  57. ATDT*99***1#
  58. ATDT*99***1#^M^M
  59. CONNECTCONNECT
  60. -- got it
  61. send (^M)
  62. Connect Success!
  63. Serial connection established.
  64. using channel 1
  65. Using interface ppp0
  66. Connect: ppp0 <--> /dev/ttyS0
  67. Warning - secret file /etc/ppp/pap-secrets has world and/or group access
  68. sent [LCP ConfReq id=0x1 <asyncmap 0x0> <magic 0xb889b908> <pcomp> <accomp>]
  69. rcvd [LCP ConfRej id=0x1 <magic 0xb889b908>]
  70. sent [LCP ConfReq id=0x2 <asyncmap 0x0> <pcomp> <accomp>]
  71. rcvd [LCP ConfAck id=0x2 <asyncmap 0x0> <pcomp> <accomp>]
  72. rcvd [LCP ConfReq id=0x1 <asyncmap 0x0> <auth chap MD5> <pcomp> <accomp>]
  73. sent [LCP ConfAck id=0x1 <asyncmap 0x0> <auth chap MD5> <pcomp> <accomp>]
  74. rcvd [CHAP Challenge id=0x1 <77cbeca3d320f610f547a8159c4f9e5b17b8ac0c4e8ace>, name = ""]
  75. Warning - secret file /etc/ppp/chap-secrets has world and/or group access
  76. sent [CHAP Response id=0x1 <87e255063a1a08e33190d6bbde50d6ab>, name = "foo"]
  77. rcvd [CHAP Success id=0x1 ""]
  78. CHAP authentication succeeded
  79. CHAP authentication succeeded
  80. sent [CCP ConfReq id=0x1 <deflate 15> <deflate(old#) 15>]
  81. 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>]
  82. rcvd [LCP ProtRej id=0x1 80 fd 01 01 00 0c 1a 04 78 00 18 04 78 00]
  83. Protocol-Reject for 'Compression Control Protocol' (0x80fd) received
  84. 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>]
  85. 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>]
  86. 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>]
  87. 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>]
  88. 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>]
  89. 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>]
  90. 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>]
  91. 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>]
  92. 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>]
  93. IPCP: timeout sending Config-Requests
  94. sent [LCP TermReq id=0x3 "No network protocols running"]
  95. rcvd [LCP TermAck id=0x3 "No network protocols running"]
  96. Connection terminated.
  97. [root@huang ppp]#

复制代码++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

下面是我的脚本:------------------------

  1. /etc/ppp/peers/gprs
  2. ----
  3. /dev/ttyS0
  4. 115200
  5. nocrtscts  ##流控
  6. nodetach ##在前台运行,如果要在后台运行则去掉该项
  7. noauth
  8. usepeerdns ##使用DNS,否则还得自己去改/etc/resolv.conf文件
  9. noipdefault
  10. ipcp-accept-local
  11. ipcp-accept-remote
  12. defaultroute
  13. user foo ##必须有,因为不像windows下可以不需要用户名
  14. connect '/usr/sbin/chat -s -v -f /etc/ppp/chat-gprs-connect'
  15. debug ##输出调试, /var/log/messages中

复制代码++++++++++++++

  1. /etc/ppp/chat-gprs-connect
  2. -----
  3. TIMEOUT 5
  4. ECHO ON
  5. ABORT '\nBUSY\r'
  6. ABORT '\nERROR\r'
  7. ABORT '\nNO ANSWER\r'
  8. ABORT '\nNO CARRIER\r'
  9. ABORT '\nNO DIALTONE\r'
  10. ABORT '\nRINGING\r\n\r\nRINGING\r'
  11. '' AT
  12. TIMEOUT 60
  13. SAY "Press CTRL-C to break the connection process.\n"
  14. OK AT+CGREG=1
  15. OK AT+CGATT=1
  16. OK 'AT+CGDCONT=1,"IP","CMNET"'
  17. OK AT+CGQMIN=1,0,0,0,0,31
  18. OK AT+CGACT=1,1
  19. OK ATDT*99***1#
  20. TIMEOUT 60
  21. SAY "Waiting for connect...\n"
  22. CONNECT ''
  23. SAY "Connect Success!\n"

复制代码++++++++++++++++++++

/etc/ppp/chap-secrets和/etc/ppp/pap-secrets都是如下内容:
-----

foo * 123456 *

++++++++++++++++++++++++

/etc/ppp/resolv.conf
------
nameserver 211.136.20.203
nameserver 211.136.17.107

+++++++++++++++++++++++++

恳请高手帮帮忙,如何解决,谢谢了!!

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(3

独孤求败 2022-10-07 19:11:11

本人菜鸟一个,对这个真的不懂,谁帮帮忙

街角卖回忆 2022-10-07 19:11:11

了解的朋友帮忙看看啊.......

半仙 2022-10-07 19:11:11

悲剧啊,偌大的一个论坛无人问津

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文