搜索
bottom↓
回复: 3

求助:linux下华为EM770W模块GPRS拔号有时连不上

[复制链接]

出0入0汤圆

发表于 2014-5-27 14:42:51 | 显示全部楼层 |阅读模式
HI,各位大侠,我在使用华为EM770W模块,使用中国移动神州行大众卡做GPRS拔号,做100次拔号测试,会有几次出现拔号时长非常长的情况,下面是详说:
1. CPU imx28  454M,  128M DDR2, 128M Nand
2. linux 2.6.35.3
3. pppd  2.4.4

chap-secret及pap-secrets 均为
card    *    card   *

gprs 文件内容为

debug
noauth
hide-password
/dev/ttyUSB0
115200
nocrtscts
modem
nodetach
usepeerdns
noipdefault
defaultroute
user "card"
password "card"
0.0.0.0:0.0.0.0
ipcp-accept-local
ipcp-accept-remote
#lcp-echo-failure 12
#lcp-echo-interval 3
noccp
novj
novjccomp
persist
connect '/sbin/chat -s -v -f /etc/ppp/peers/gprs-chat-connect'
disconnect '/sbin/chat -s -v -f /etc/ppp/peers/gprs-chat-disconnect'

gprs-chat-connect 内容为
TIMEOUT 30
ECHO ON
ABORT '\nBUSY\r'
ABORT '\nERROR\r'
ABORT '\nNO ANSWER\r'
ABORT '\nNO CARRIER\r'
ABORT '\nNO DIALTONE\r'

TIMEOUT 5
''                                      AT
OK                                      ATE0

TIMEOUT 60
SAY "Press CTRL-C to break the connection process.\n"
OK                                      AT+CGREG=1
OK                                      AT+CGATT=1
#OK AT+CGQMIN=1,0,0,0,0,31
#OK AT+CGACT=1,1
OK                                      AT+CGDCONT=1,"IP","CMNET"
OK                                      ATDT*99***1#
SAY "Waiting for connect...\n"
TIMEOUT 60
CONNECT ''
SAY "Connect Success!\n"

100次启动中有80次是很正常
有10来次,在 AT+CGATT=1 命令发出后无应答,超时后,脚本自动重拔又能连上
有几次是如下现象:
abort on (\nBUSY\r)
abort on (\nERROR\r)
abort on (\nNO ANSWER\r)
abort on (\nNO CARRIER\r)
abort on (\nNO DIALTONE\r)
timeout set to 5 seconds
send (AT^M)
expect (OK)

^M
OKOK
-- got it

send (ATE0^M)
Main power failed!
timeout set to 60 seconds
Press CTRL-C to break the connection process.
expect (OK)

^M

^M
OKOK
-- got it

send (AT+CGREG=1^M)
expect (OK)

^M

^M
OKOK
-- got it

send (AT+CGATT=1^M)
Main power failed!
expect (OK)

^M

^M
OKOK
-- got it

send (AT+CGDCONT=1,"IP","CMNET"^M)
Main power failed!
expect (OK)

^M

^M
OKOK
-- got it

send (ATDT*99***1#^M)
Main power failed!
Waiting for connect...
expect (CONNECT)

^M

^M
CONNECTCONNECT
-- got it

send (^M)
Connect Success!

Serial connection established.
using channel 5
Using interface ppp0
Connect: ppp0 <--> /dev/ttyUSB0
sent [LCP ConfReq id=0x1 <asyncmap 0x0> <magic 0x6938dbd7> <pcomp> <accomp>]
rcvd [LCP ConfReq id=0x0 <asyncmap 0x0> <auth chap MD5> <magic 0xf6b0ba> <pcomp> <accomp>]
sent [LCP ConfAck id=0x0 <asyncmap 0x0> <auth chap MD5> <magic 0xf6b0ba> <pcomp> <accomp>]
rcvd [LCP ConfAck id=0x1 <asyncmap 0x0> <magic 0x6938dbd7> <pcomp> <accomp>]
rcvd [LCP DiscReq id=0x1 magic=0xf6b0ba]
rcvd [CHAP Challenge id=0x1 <ca87f89c482f9b80ee613d4c5c77e851>, name = "UMTS_CHAP_SRVR"]
sent [CHAP Response id=0x1 <27324f4b42680de69e36250a4c0d3c17>, name = "card"]
rcvd [CHAP Success id=0x1 ""]
CHAP authentication succeeded
CHAP authentication succeeded
sent [IPCP ConfReq id=0x1 <addr 0.0.0.0> <ms-dns1 0.0.0.0> <ms-dns3 0.0.0.0>]
rcvd [IPCP ConfNak id=0x1 <ms-dns1 10.11.12.13> <ms-dns3 10.11.12.14> <ms-wins 10.11.12.13> <ms-wins 10.11.12.14>]
sent [IPCP ConfReq id=0x2 <addr 0.0.0.0> <ms-dns1 10.11.12.13> <ms-dns3 10.11.12.14>]
rcvd [IPCP ConfNak id=0x2 <ms-dns1 10.11.12.13> <ms-dns3 10.11.12.14> <ms-wins 10.11.12.13> <ms-wins 10.11.12.14>]
sent [IPCP ConfReq id=0x3 <addr 0.0.0.0> <ms-dns1 10.11.12.13> <ms-dns3 10.11.12.14>]
rcvd [IPCP ConfNak id=0x3 <ms-dns1 10.11.12.13> <ms-dns3 10.11.12.14> <ms-wins 10.11.12.13> <ms-wins 10.11.12.14>]
sent [IPCP ConfReq id=0x4 <addr 0.0.0.0> <ms-dns1 10.11.12.13> <ms-dns3 10.11.12.14>]
rcvd [IPCP ConfNak id=0x4 <ms-dns1 10.11.12.13> <ms-dns3 10.11.12.14> <ms-wins 10.11.12.13> <ms-wins 10.11.12.14>]
sent [IPCP ConfReq id=0x5 <addr 0.0.0.0> <ms-dns1 10.11.12.13> <ms-dns3 10.11.12.14>]
rcvd [IPCP ConfNak id=0x5 <ms-dns1 10.11.12.13> <ms-dns3 10.11.12.14> <ms-wins 10.11.12.13> <ms-wins 10.11.12.14>]
sent [IPCP ConfReq id=0x6 <addr 0.0.0.0>]
rcvd [IPCP ConfNak id=0x6 <ms-dns1 10.11.12.13> <ms-dns3 10.11.12.14> <ms-wins 10.11.12.13> <ms-wins 10.11.12.14>]
sent [IPCP ConfReq id=0x7 <addr 0.0.0.0>]
rcvd [IPCP ConfNak id=0x7 <ms-dns1 10.11.12.13> <ms-dns3 10.11.12.14> <ms-wins 10.11.12.13> <ms-wins 10.11.12.14>]
sent [IPCP ConfReq id=0x8 <addr 0.0.0.0>]
rcvd [IPCP ConfNak id=0x8 <ms-dns1 10.11.12.13> <ms-dns3 10.11.12.14> <ms-wins 10.11.12.13> <ms-wins 10.11.12.14>]
sent [IPCP ConfReq id=0x9 <addr 0.0.0.0>]
rcvd [IPCP ConfNak id=0x9 <ms-dns1 10.11.12.13> <ms-dns3 10.11.12.14> <ms-wins 10.11.12.13> <ms-wins 10.11.12.14>]
sent [IPCP ConfReq id=0xa <addr 0.0.0.0>]
rcvd [IPCP ConfNak id=0xa <ms-dns1 10.11.12.13> <ms-dns3 10.11.12.14> <ms-wins 10.11.12.13> <ms-wins 10.11.12.14>]
sent [IPCP ConfReq id=0xb <addr 0.0.0.0>]
rcvd [IPCP ConfNak id=0xb <ms-dns1 10.11.12.13> <ms-dns3 10.11.12.14> <ms-wins 10.11.12.13> <ms-wins 10.11.12.14>]
sent [IPCP ConfReq id=0xc <addr 0.0.0.0>]
rcvd [IPCP ConfNak id=0xc <ms-dns1 10.11.12.13> <ms-dns3 10.11.12.14> <ms-wins 10.11.12.13> <ms-wins 10.11.12.14>]
sent [IPCP ConfReq id=0xd <addr 0.0.0.0>]
rcvd [IPCP ConfNak id=0xd <ms-dns1 10.11.12.13> <ms-dns3 10.11.12.14> <ms-wins 10.11.12.13> <ms-wins 10.11.12.14>]
sent [IPCP ConfReq id=0xe <addr 0.0.0.0>]
rcvd [IPCP ConfNak id=0xe <ms-dns1 10.11.12.13> <ms-dns3 10.11.12.14> <ms-wins 10.11.12.13> <ms-wins 10.11.12.14>]
sent [IPCP ConfReq id=0xf <addr 0.0.0.0>]
rcvd [IPCP ConfNak id=0xf <ms-dns1 10.11.12.13> <ms-dns3 10.11.12.14> <ms-wins 10.11.12.13> <ms-wins 10.11.12.14>]
sent [IPCP ConfReq id=0x10 <addr 0.0.0.0>]
....这样一直收发收发下去, 直接我另一监视脚本超时后把3G模块的电源断掉,杀掉pppd, 再上电,再拔号重来,有时候会长达1个多小时才能最终拔上号,

而且我的手机卡在我手机上使用gprs时也有出现过类似的情况。就是把安卓里面的"数据开关"打开,再打开浏览器,有时候,浏览器连不到网络,要关闭"数据开关"再打开,才行.

希望有经验的大侠们一起交流一下看,到底是什么原因。

出0入0汤圆

发表于 2014-5-27 14:52:36 | 显示全部楼层
不懂,但是执行AT+CGATT的时候问题与楼主类似,帮忙顶,最近也被这个问题烦死了

出0入0汤圆

 楼主| 发表于 2014-5-27 17:48:31 | 显示全部楼层
哈哈,是吧,你测试多少次? 有多少次会停在这儿?

出0入0汤圆

 楼主| 发表于 2014-5-27 17:51:18 | 显示全部楼层
有人使用移动的神州行用GPRS上网吗,会不会出现和我手机一样的情况? 有时候打开GPRS根本不能连上网络的呢
回帖提示: 反政府言论将被立即封锁ID 在按“提交”前,请自问一下:我这样表达会给举报吗,会给自己惹麻烦吗? 另外:尽量不要使用Mark、顶等没有意义的回复。不得大量使用大字体和彩色字。【本论坛不允许直接上传手机拍摄图片,浪费大家下载带宽和论坛服务器空间,请压缩后(图片小于1兆)才上传。压缩方法可以在微信里面发给自己(不要勾选“原图),然后下载,就能得到压缩后的图片】。另外,手机版只能上传图片,要上传附件需要切换到电脑版(不需要使用电脑,手机上切换到电脑版就行,页面底部)。
您需要登录后才可以回帖 登录 | 注册

本版积分规则

手机版|Archiver|amobbs.com 阿莫电子技术论坛 ( 粤ICP备2022115958号, 版权所有:东莞阿莫电子贸易商行 创办于2004年 (公安交互式论坛备案:44190002001997 ) )

GMT+8, 2024-5-9 11:20

© Since 2004 www.amobbs.com, 原www.ourdev.cn, 原www.ouravr.com

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