我陷于以下问题。我有一个调制解调器(Huawei E3372),并将其插入USB,我看到多个ttyUSB设备。 wvdial以某种方式检测到正确的ttyUSB进行数据调用,但我无法理解它的逻辑(因为我无法使用任何第三方软件,因此我必须通过AT命令或其他方法检测实际的ttyUSB第三方)。
逐步解决问题: 1.我有ttyUSB0,ttyUSB1,ttyUSB2。 2.我尝试遍历它们,ttyUSB0不响应“ AT”命令,ttyUSB1做->我尝试ATD * 99#,尝试建立ppp连接,但是失败了(我在LCP阶段没有收到任何数据包),所以我进一步移到ttyUSB2->我尝试ATD * 99#,并得到错误消息。
如果我跳过ttyUSB1,然后在ttyUSB2上调用ATD * 99#-一切都会好起来,建立ppp连接,等等。
我很好奇,如何确定通过AT命令终止活动呼叫(任何ttyUSB中的AT + CHUP都无济于事,ATH也是如此),或检测要用于数据呼叫的ttyUSB。
以下是wvdialconf的日志,该日志以某种方式检测到正确的ttyUSB(在此示例中,它是第一个响应AT命令的ttyUSB,但是当它不是第一个ttyUSB时,我常常陷入困境,但wvdialconf正确地检测到了它):< / p>
$ sudo wvdialconf
Editing `/etc/wvdial.conf'.
Scanning your serial ports for a modem.
ttyS0<*1>: ATQ0 V1 E1 -- failed with 2400 baud, next try: 9600 baud
ttyS0<*1>: ATQ0 V1 E1 -- failed with 9600 baud, next try: 115200 baud
ttyS0<*1>: ATQ0 V1 E1 -- and failed too at 115200, giving up.
Modem Port Scan<*1>: S1 S2 S3 S4 S5 S6 S7 S8
Modem Port Scan<*1>: S9 S10 S11 S12 S13 S14 S15 S16
Modem Port Scan<*1>: S17 S18 S19 S20 S21 S22 S23 S24
Modem Port Scan<*1>: S25 S26 S27 S28 S29 S30 S31
WvModem<*1>: Cannot get information for serial port.
ttyUSB0<*1>: ATQ0 V1 E1 -- failed with 2400 baud, next try: 9600 baud
ttyUSB0<*1>: ATQ0 V1 E1 -- failed with 9600 baud, next try: 115200 baud
ttyUSB0<*1>: ATQ0 V1 E1 -- and failed too at 115200, giving up.
ttyUSB1<*1>: ATQ0 V1 E1 -- OK
ttyUSB1<*1>: ATQ0 V1 E1 Z -- OK
ttyUSB1<*1>: ATQ0 V1 E1 S0=0 -- OK
ttyUSB1<*1>: ATQ0 V1 E1 S0=0 &C1 -- +CME ERROR: 50
ttyUSB1<*1>: ATQ0 V1 E1 S0=0 &D2 -- +CME ERROR: 50
ttyUSB1<*1>: ATQ0 V1 E1 S0=0 +FCLASS=0 -- +CME ERROR: 50
ttyUSB1<*1>: Modem Identifier: ATI -- Manufacturer:
ttyUSB1<*1>: Speed 9600: AT -- OK
ttyUSB1<*1>: Max speed is 9600; that should be safe.
ttyUSB1<*1>: ATQ0 V1 E1 S0=0 -- OK
ttyUSB2<*1>: ATQ0 V1 E1 -- OK
ttyUSB2<*1>: ATQ0 V1 E1 Z -- OK
ttyUSB2<*1>: ATQ0 V1 E1 S0=0 -- OK
ttyUSB2<*1>: ATQ0 V1 E1 S0=0 &C1 -- +CME ERROR: 50
ttyUSB2<*1>: ATQ0 V1 E1 S0=0 &D2 -- +CME ERROR: 50
ttyUSB2<*1>: ATQ0 V1 E1 S0=0 +FCLASS=0 -- +CME ERROR: 50
ttyUSB2<*1>: Modem Identifier: ATI -- Manufacturer:
ttyUSB2<*1>: Speed 9600: AT -- OK
ttyUSB2<*1>: Max speed is 9600; that should be safe.
ttyUSB2<*1>: ATQ0 V1 E1 S0=0 -- OK
Found a modem on /dev/ttyUSB1.
Modem configuration written to /etc/wvdial.conf.
ttyUSB1<Info>: Speed 9600; init "ATQ0 V1 E1 S0=0"
ttyUSB2<Info>: Speed 9600; init "ATQ0 V1 E1 S0=0"