我正在尝试使用SIM800L和PL2303 USB串行电缆建立GPRS连接。
如果我屏幕或minicom调制解调器(在115200 8N1)我从调制解调器得到立即响应,我甚至在设置PDP和GPRS上下文后,我可以通过AT命令成功ping谷歌服务器。我也可以通过AT+CGDATA="PPP"
或启动PPP连接ATDT*99***1#
。
但是对于wvdial,调制解调器不会响应
--> WvDial: Internet dialer version 1.61
--> Cannot set information for serial port.
--> Initializing modem.
--> Sending: ATZ
--> Sending: ATQ0
--> Re-Sending: ATZ
--> Modem not responding.
如果我cat /dev/ttyUSB0
同时运行wvdial,我会得到:
ATZ0
OK
OK
OK
在wvdial结束命令并且第一个OK
出现之后,一秒钟后两个OK
将出现。另外我想注意一下ATZ
,ATQ0
命令变得重叠了。
我可能是通过cat劫持输出,这可能是原因,但无论是否有猫,wvdial的行为都是相同的。
这是我的/etc/wvdial.conf
[Dialer Defaults]
Modem = /dev/ttyUSB0
Baud = 115200
Phone = *99***1#
Username = webgprs
Password = webgprs2002
New PPPD = yes
Modem Type = Analog Modem
没有任何区别。如果我输入一些Init#
参数,它们也不会得到任何响应。命令的重叠也会随Init#
命令发生。
如在3G和GPRS调制解调器中指出的那样使用pppd导致仅使用pppd的抽象层也不起作用。显而易见的是,系统进程与串口的通信不是通过串口客户端进行的。
sakis3g与调制解调器成功通信但无法启动接口。
[13751] [11:45:56] Connection command that will be used is: /usr/bin/setsid /usr/sbin/pppd /dev/ttyUSB0 460800 modem crtscts -detach defaultroute dump noipdefault usepeerdns usehostname ktune logfd 2 noauth name sakis3g lock maxfail 3 connect "/usr/sbin/chat -v -f /tmp/pppd.tmp.13751" user "webgprs" password "webgprs2002"
[13751] [11:45:56] Verbosing: 28% Initializing modem
[13751] [11:45:56] Using default INITIALIZE.
[13751] [11:45:56] Command "INITIALIZE" refers to AT commands: ATZ OK 'AT&F' OK 'ATQ0 V1 E1' OK 'AT&D2 &C1' OK AT+FCLASS=0 OK ATS0=0 OK 'AT+CGDCONT=1,"IP","internet.itelcel.com"' OK
[13751] [11:45:56] Will send INITIALIZE commands to tty /dev/ttyUSB0: "" '\pAT' OK ATZ OK 'AT&F' OK 'ATQ0 V1 E1' OK 'AT&D2 &C1' OK AT+FCLASS=0 OK ATS0=0 OK 'AT+CGDCONT=1,"IP","internet.itelcel.com"' OK '\pAT' OK
[13751] [11:45:57] We are root already. Proceeding.
[13751] [11:45:57] Device /dev/ttyUSB0 is not busy.
[13751] [11:45:58] Got response from tty:
AT
OK
ATZ
OK
AT&F
OK
ATQ0 V1 E1
OK
AT&D2 &C1
OK
AT+FCLASS=0
ERROR
[13751] [11:45:58] Unknown command "STAGE7".
[13751] [11:45:58] Unknown command "STAGE8".
[13751] [11:45:58] We are root already. Proceeding.
/-------------------------------------------------------------------------------
[13751] [11:45:58] Will now run command: \'/bin/rm -f "/tmp/sakis3g.3gnet"\'
/-------------------------------------------------------------------------------
\-------------------------------------------------------------------------------
[13751] [11:45:58] Command returned 0.
\-------------------------------------------------------------------------------
[13751] [11:45:58] We are root already. Proceeding.
[13751] [11:45:58] Device /dev/ttyUSB0 is not busy.
[13751] [11:45:58] Verbosing: 35% Connecting
[13751] [11:45:58] PID 15625 is still running.
[13751] [11:45:59] Located "netstat" within PATH (/bin/netstat).
[13751] [11:45:59] Waiting for interface to go up (0 seconds passed).
[13751] [11:46:00] PID 15625 is still running.
[13751] [11:46:00] Waiting for interface to go up (1 seconds passed).
[13751] [11:46:01] PID 15625 is still running.
[13751] [11:46:01] Waiting for interface to go up (2 seconds passed).
... (truncated) ...
[13751] [11:46:56] Waiting for interface to go up (20 seconds passed).
[13751] [11:46:57] Giving up waiting for connection to occur.
[13751] [11:46:57] PID 16179 is still running.
[13751] [11:46:58] PID 16179 is not running any more.
[13751] [11:46:58] PID 16179 is not running any more.
[13751] [11:46:58] Failed to connect.
[13751] [11:46:58] Error: Failed to connect.
[13751] [11:46:58] Aborting execution chain due to actor "connect" returning 95.
即使我手动设置PDP上下文并将调制解调器设置在GPRS活动上下文中,结果也是一样的
AT+CIPSTATUS
IP STATUS