QQ登录

只需一步,快速开始

 找回密码
 注册

QQ登录

只需一步,快速开始

查看: 858|回复: 2

linux下进行GPRS拨号上网,不能成功,兄弟姐妹帮帮忙!

[复制链接]
发表于 2005-7-29 11:30:08 | 显示全部楼层 |阅读模式
这几天用一个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"

大家看看究竟是怎么回事啊,谢谢了
 楼主| 发表于 2005-7-31 11:45:44 | 显示全部楼层
咋就这样呢 就没有人遇到这种情况的吗? :-(
回复

使用道具 举报

发表于 2005-11-4 15:28:26 | 显示全部楼层
看你的手机支持哪些蓝牙功能,命令:sdptool browse
我也用GPRS上网
请去
http://www.pcshow.net/bbs/viewthread.php?tid=350625704&extra=page%3D1

我按照这个解决方法OK!!
但是发现SUSE 9.3运行喜欢断线。。。
你看看这个文章对你有帮助没。
虽然这个是蓝牙的GPRS
但是思路是差不多的。
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 注册

本版积分规则

GMT+8, 2024-11-3 02:32 , Processed in 0.101247 second(s), 15 queries .

© 2021 Powered by Discuz! X3.5.

快速回复 返回顶部 返回列表