wwyfang 发表于 2005-7-29 11:32:55

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

这几天用一个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拨号时显示的内容:
# 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
sent
sent
rcvd
sent
rcvd
sent
rcvd
sent
sent
rcvd
LCP terminated by peer
sent
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"

大家看看究竟是怎么回事啊,谢谢了
页: [1]
查看完整版本: linux下进行GPRS拨号上网,不能成功,兄弟姐妹帮帮忙!