我一直在尝试使用运行 raspbian 的 raspberry pi 设置 4g usb 调制解调器(这篇文章并不针对 Raspberry Pi,因为我后来在 windows 上遇到了同样的问题)。调制解调器被识别,我能够通过使用 minicom 运行 AT 命令来查询 imsi、信号强度和其他详细信息。然后我尝试设置 wvdial。
[Dialer Defaults]
Init1 = ATZ
Init2 = ATQ V1 E1 S0=0 &C1 &D2 +FCLASS=0
Init3 = AT+CGDCONT=1,"IP","airtelgprs.com"
Init4 = ATDT*99#
Modem Type = Analog Modem
Stupid Mode = 1
Baud = 9600
New PPPD = Yes
Modem = /dev/ttyUSB1
; no user name or pwd
在所有 init 命令之后,我能够发送ATDT*99#
,我收到一条响应说CONNECT 100000000
。但之后什么也没发生,wvdial 尝试在一段时间后发送 ATQ0 并放弃,说调制解调器没有响应。wvdial 输出:
--> WvDial: Internet dialer version 1.61
--> Initializing modem.
--> Sending: ATZ
ATZ
OK
--> Sending: ATQ0 V1 E1 S0=0 &C1 &D2 +FCLASS=0
ATQ0 V1 E1 S0=0 &C1 &D2 +FCLASS=0
OK
--> Sending: AT+CGDCONT=1,"IP","airtelgprs.com",,0,0
AT+CGDCONT=1,"IP","airtelgprs.com",,0,0
OK
--> Sending: ATDT*99#
ATDT*99#
CONNECT 100000000
--> Sending: ATQ0
--> Re-Sending: ATDT*99#
--> Modem not responding.
我尝试使用串行端口嗅探器调查 Windows 发送的 AT 命令序列。我将 USB 调制解调器连接到 PC,然后右键单击它并选择“连接”来启动拨号调制解调器界面。
调制解调器连接并记录所有 AT 命令。调制解调器 COM 端口日志:
01-18-2015 13:30:46.555 - File: C:\Windows\system32\tapisrv.dll, Version 6.3.9600
01-18-2015 13:30:46.555 - File: C:\Windows\system32\unimdm.tsp, Version 6.3.9600
01-18-2015 13:30:46.555 - File: C:\Windows\system32\unimdmat.dll, Version 6.3.9600
01-18-2015 13:30:46.555 - File: C:\Windows\system32\uniplat.dll, Version 6.3.9600
01-18-2015 13:30:46.555 - File: C:\Windows\system32\drivers\modem.sys, Version 6.3.9600
01-18-2015 13:30:46.555 - File: C:\Windows\system32\modemui.dll, Version 6.3.9600
01-18-2015 13:30:46.555 - File: C:\Windows\system32\mdminst.dll, Version 6.3.9600
01-18-2015 13:30:46.555 - Modem type: ZTE Proprietary USB Modem
01-18-2015 13:30:46.555 - Modem inf path: oem43.inf
01-18-2015 13:30:46.555 - Modem inf section: Modem6k
01-18-2015 13:30:46.555 - Matching hardware ID: usb\vid_19d2&pid_0017&mi_02
01-18-2015 13:30:46.570 - Opening Modem
01-18-2015 13:30:46.570 - 921600,8,N,1, ctsfl=0, rtsctl=1
01-18-2015 13:30:46.570 - Initializing modem.
01-18-2015 13:30:46.570 - Recv: <cr><lf>OK<cr><lf>
01-18-2015 13:30:46.570 - Interpreted response: OK
01-18-2015 13:30:46.586 - Send: AT<cr>
01-18-2015 13:30:46.586 - Recv: <cr><lf>OK<cr><lf>
01-18-2015 13:30:46.586 - Interpreted response: OK
01-18-2015 13:30:46.602 - Send: ATV1<cr>
01-18-2015 13:30:46.602 - Recv: <cr><lf>OK<cr><lf>
01-18-2015 13:30:46.602 - Interpreted response: OK
01-18-2015 13:30:46.602 - TSP(0000): Making Call
01-18-2015 13:30:46.617 - Send: ATE0<cr>
01-18-2015 13:30:46.617 - Recv: <cr><lf>OK<cr><lf>
01-18-2015 13:30:46.617 - Interpreted response: OK
01-18-2015 13:30:46.633 - Send: AT&F&D2&C1S0=0<cr>
01-18-2015 13:30:46.633 - Recv: <cr><lf>OK<cr><lf>
01-18-2015 13:30:46.633 - Interpreted response: OK
01-18-2015 13:30:46.649 - Send: ATS7=60S30=0<cr>
01-18-2015 13:30:46.649 - Recv: <cr><lf>OK<cr><lf>
01-18-2015 13:30:46.649 - Interpreted response: OK
01-18-2015 13:30:46.649 - Waiting for a call.
01-18-2015 13:30:46.664 - Send: ATS0=0<cr>
01-18-2015 13:30:46.664 - Recv: <cr><lf>OK<cr><lf>
01-18-2015 13:30:46.664 - Interpreted response: OK
01-18-2015 13:30:46.664 - 7200000,8,N,1, ctsfl=0, rtsctl=1
01-18-2015 13:30:46.664 - Initializing modem.
01-18-2015 13:30:46.680 - Send: AT<cr>
01-18-2015 13:30:46.680 - Recv: <cr><lf>OK<cr><lf>
01-18-2015 13:30:46.680 - Interpreted response: OK
01-18-2015 13:30:46.696 - Send: ATV1<cr>
01-18-2015 13:30:46.696 - Recv: <cr><lf>OK<cr><lf>
01-18-2015 13:30:46.696 - Interpreted response: OK
01-18-2015 13:30:46.711 - Send: ATE0<cr>
01-18-2015 13:30:46.711 - Recv: <cr><lf>OK<cr><lf>
01-18-2015 13:30:46.711 - Interpreted response: OK
01-18-2015 13:30:46.727 - Send: AT&F&D2&C1S0=0<cr>
01-18-2015 13:30:46.727 - Recv: <cr><lf>OK<cr><lf>
01-18-2015 13:30:46.727 - Interpreted response: OK
01-18-2015 13:30:46.742 - Send: ATS7=60S30=0<cr>
01-18-2015 13:30:46.742 - Recv: <cr><lf>OK<cr><lf>
01-18-2015 13:30:46.742 - Interpreted response: OK
01-18-2015 13:30:46.742 - Dialing.
01-18-2015 13:30:46.742 - TSP Completing Async Operation(0x00010099) Status 0x00000000
01-18-2015 13:30:46.742 - TSP(0000): LINEEVENT: LINECALLSTATE_DIALING
01-18-2015 13:30:46.742 - TSP(0000): LINEEVENT: LINECALLSTATE_PROCEEDING
01-18-2015 13:30:46.758 - Send: ATDT*99#<cr>
01-18-2015 13:30:46.789 - Recv: <cr><lf>CONNECT 100000000<cr><lf>
01-18-2015 13:30:46.789 - An unknown response was received while attempting to connect, but CD was high so completing successfully
01-18-2015 13:30:46.789 - Connection established at 7200000bps.
01-18-2015 13:30:46.789 - Error-control off or unknown.
01-18-2015 13:30:46.789 - Data compression off or unknown.
01-18-2015 13:30:46.789 - TSP(0000): LINEEVENT: LINECALLSTATE_CONNECTED
之后,我尝试通过运行日志中的 AT 命令手动启动调制解调器。我收到所有命令的 OK 响应,直到我按下 ATDT*99#,它给出 CONNECT 100000000 并挂起。我不明白,我以相同的顺序使用了相同的 AT 命令。当我手动运行它时它不会启动,但当我右键单击适配器选择连接时它会启动,这反过来会运行相同的 AT 命令。单击连接时,Windows 会执行什么额外的操作?
答案1
我无法通过 wvdial 使其工作,但我确实设法启动了调制解调器并连接到互联网以pppconfig
配置ppp
连接。我还遇到了一些 dns 设置问题,我通过使用 opendns ips 解决了这些问题。