Confused with primary port (ttyUSB3) with other ports
Aleksander Morgado
aleksander at aleksander.es
Wed Mar 21 11:07:21 UTC 2018
>
> mmcli -m 0 shows 'ttyUSB3; as primary whereas ttyUSB4 as part of ports as
> below. [Why two devices, I am not understanding. but I went ahead].
>
>
> System | device:
> '/sys/devices/pci0000:00/0000:00:16.0/usb1/1-1/1-1.1'
> | drivers: 'option1, huawei_cdc_ncm'
> | plugin: 'Huawei'
> | primary port: 'ttyUSB3'
> | ports: 'ttyUSB3 (at), ttyUSB4 (at), wwan1 (net)'
>
> Then I confimed USB3 and USB4 is used by my modem vendor as below
>
> root at vyos:/opt/vyatta/share/ppp/network# grep PRODUCT=
> /sys/bus/usb-serial/devices/ttyUSB3/../uevent
> PRODUCT=12d1/1506/102
> root at vyos:/opt/vyatta/share/ppp/network# grep PRODUCT=
> /sys/bus/usb-serial/devices/ttyUSB4/../uevent
> PRODUCT=12d1/1506/102
>
> 1. The first problem is when I run AT commands in ttyUSB3 is not responding.
> So proceded with ttyUSB4 and the following commands worked perfectly till
> before connection error.
>
> echo -e "ATZ\r" > /dev/ttyUSB4
> echo -e "AT+COPS?\r" > /dev/ttyUSB4
> echo -e "AT+COPS=0,2\r" > /dev/ttyUSB4
> echo -e "AT+COPS?\r" > /dev/ttyUSB4
> echo -e "ATZ\r" > /dev/ttyUSB4
> echo -e "AT+CGDCONT?\r" > /dev/ttyUSB4
> echo -e 'AT+CGDCONT=1,"IP","airtelgprs.com","",0,0,0,0,0,0' > /dev/ttyUSB4
>
> tr -s "\n" < /dev/ttyUSB4
>
> While connecting by "echo -e 'ATD*99***1#' > /dev/ttyUSB4" modem is
> returning ERROR.
>
> 2. As a workaround, I went with mmcli --simple-connect, which is throwing
> 'ttyUSB3' device is closed.
>
> root at vyos:/opt/vyatta/share/ppp/network# mmcli -m 0
> --simple-connect="apn=airtelgprs.com"
> error: couldn't connect the modem:
> 'GDBus.Error:org.freedesktop.ModemManager1.Error.Serial.OpenFailed: Could
> not open serial device ttyUSB3: it has been forced close'
>
> So I can establish the connection. Could anyone please guide me.
>
Are you trying to run the AT commands *while* ModemManager is running?
(you cannot do that).
Try to unplug/replug the modem and run only the mmcli --simple-connect
command, and if you're still getting errors, please enable
ModemManager debug logging and retry gathering the logs.
--
Aleksander
https://aleksander.es
More information about the ModemManager-devel
mailing list