免费注册 查看新帖 |

Chinaunix

  平台 论坛 博客 文库
最近访问板块 发新帖
查看: 844 | 回复: 0
打印 上一主题 下一主题

[网络管理] linux下进行GPRS拨号上网,不能成功,兄弟姐妹帮帮忙! [复制链接]

论坛徽章:
0
跳转到指定楼层
1 [收藏(0)] [报告]
发表于 2005-07-29 11:43 |只看该作者 |倒序浏览
这几天用一个USB接口的GPRS上网卡来拨号上网,按照别人的gprs、gprs-connect-chat脚本程序来做的,就是不能成功。我的GPRS上网卡是USB接口,然后它里面有一个PL2303芯片,就是用来USB转串口用的,linux源代码有pl2303.c,是这个芯片的驱动程序,使用/dev/ttyUSB0这个设备文件。
另:我用AT指令集直接拨号时:
AT+CGDCONT=1,IP,CMNET
OK
ATD*99***1#
CONNECT 115200
然后就出现了NO CARRIER

下面是用pppd拨号时显示的内容:
[root@110 root]# pppd file /etc/ppp/gprs
Press CTRL_C to close the connection at any stage!
defining PDP context...
rAT
OK
ATE1
OK
AT+CGDCONT=1,"IP","CMNET"
OK
AT+CGATT=1
OK
waiting for connect...

ATD*99#
CONNECT
IF the following ppp negotiations fail,
try restarting the phone.

Serial connection established.
using channel 9
Using interface ppp0
Connect: ppp0 <-->; /dev/ttyUSB0
rcvd [LCP ConfReq id=0x1 <mru 1500>; <asyncmap 0x0>; <pcomp>; <accomp>; <auth pap>;]
sent [LCP ConfReq id=0x1 <asyncmap 0x0>; <magic 0xbfb0a81d>; <pcomp>; <accomp>;]
sent [LCP ConfRej id=0x1 <auth pap>;]
rcvd [LCP ConfRej id=0x1 <magic 0xbfb0a81d>;]
sent [LCP ConfReq id=0x2 <asyncmap 0x0>; <pcomp>; <accomp>;]
rcvd [LCP ConfReq id=0x2 <mru 1500>; <asyncmap 0x0>; <pcomp>; <accomp>;]
sent [LCP ConfAck id=0x2 <mru 1500>; <asyncmap 0x0>; <pcomp>; <accomp>;]
rcvd [LCP ConfAck id=0x2 <asyncmap 0x0>; <pcomp>; <accomp>;]
sent [IPCP ConfReq id=0x1 <addr 0.0.0.0>;]
sent [CCP ConfReq id=0x1 <deflate 15>; <deflate(old#) 15>;]
rcvd [LCP TermReq id=0x3]
LCP terminated by peer
sent [LCP TermAck id=0x3]
Connection terminated.

Sending break to the modem

PDP context detached
Serial link disconnected.

反正不能成功,下面是gprs、gprs-connect-chat的脚本程序:
gprs:
#File
#gprs
#
debug
debug
debug

/dev/ttyUSB0
115200
crtscts
local
nodetach
connect /etc/ppp/gprs-connect-chat
noipdefault
ipcp-accept-local
ipcp-accept-remote
novj
novjccomp
disconnect /etc/ppp/gprs-disconnect-chat
defaultroute

gprs-connect-chat:
#!/bin/sh
#
# This is part 2 of the ppp-on script. It will perform the connection
# protocol for the desired connection.
#
exec /usr/sbin/chat -v \
TIMEOUT 5 \
ECHO ON \
ABORT '\nBUSY\r' \
ABORT '\nNO ANSWER\r' \
ABORT '\nNO CARRIER\r' \
ABORT '\nRINGING\r\n\r\nRINGING\r' \
'' \rAT \
SAY "Press CTRL_C to close the connection at any stage!" \
SAY "\ndefining PDP context...\n" \
OK ATE1 \
OK 'AT+CGDCONT=1,"IP","CMNET" ' \
OK AT+CGATT=1 \
OK ATD*99# \
SAY "\nwaiting for connect...\n" \
TIMEOUT 30 \
CONNECT '' \
SAY "\nIF the following ppp negotiations fail,\n" \
SAY "try restarting the phone.\n"

大家看看究竟是怎么回事啊,谢谢了
您需要登录后才可以回帖 登录 | 注册

本版积分规则 发表回复

  

北京盛拓优讯信息技术有限公司. 版权所有 京ICP备16024965号-6 北京市公安局海淀分局网监中心备案编号:11010802020122 niuxiaotong@pcpop.com 17352615567
未成年举报专区
中国互联网协会会员  联系我们:huangweiwei@itpub.net
感谢所有关心和支持过ChinaUnix的朋友们 转载本站内容请注明原作者名及出处

清除 Cookies - ChinaUnix - Archiver - WAP - TOP