Page MenuHomeVyOS Platform

Backend qmicli commands fail, when ModemManager is starting the cellular service, need to use qmi-proxy.
Open, NormalPublicBUG

Description

Configuring WWAN interfaces with a simple:

set interfaces wwan wwan0 apn mylegitapn
set interfaces wwan wwan0 address dhcp

"Works" in that a cellular connecting is established (DHCP doesn't work because of raw-ip framing, but that's a DHCP problem)

The cellular service can be verified with:

mmcli -L (to get modem number)
mmcli -m <modem number>
mmcli -m <modem number> -b <bearer number>

real world e.g.

vyos@vyos:~$ mmcli -m 1


General  |               dbus path: /org/freedesktop/ModemManager1/Modem/1
         |               device id: 9e28add5d5a7e9dfa38df30ea91a34b9bf44d293
-----------------------------------
Hardware |            manufacturer: Quectel
         |                   model: EP06-E
         |       firmware revision: EP06ELAR03A08M4G
         |          carrier config: ROW_Generic_3GPP
         | carrier config revision: 06010821
         |            h/w revision: 20000
         |               supported: gsm-umts, lte
         |                 current: gsm-umts, lte
         |            equipment id: 868186041308014
-----------------------------------
System   |                  device: /sys/devices/pci0000:00/0000:00:15.0/usb1/1-3
         |                 drivers: option1, qmi_wwan
         |                  plugin: quectel
         |            primary port: cdc-wdm1
         |                   ports: cdc-wdm1 (qmi), ttyUSB0 (qcdm), ttyUSB1 (gps),
         |                          ttyUSB2 (at), ttyUSB3 (at), wwan0 (net)
-----------------------------------
Status   |                    lock: sim-pin2
         |          unlock retries: sim-pin (3), sim-pin2 (3), sim-puk (10), sim-puk2 (10)
         |                   state: connected
         |             power state: on
         |             access tech: lte
         |          signal quality: 71% (recent)
-----------------------------------
Modes    |               supported: allowed: 3g; preferred: none
         |                          allowed: 4g; preferred: none
         |                          allowed: 3g, 4g; preferred: 4g
         |                          allowed: 3g, 4g; preferred: 3g
         |                 current: allowed: 2g, 3g, 4g; preferred: 4g
-----------------------------------
Bands    |               supported: utran-1, utran-3, utran-5, utran-8, eutran-1, eutran-3,
         |                          eutran-5, eutran-7, eutran-8, eutran-20, eutran-28, eutran-32,
         |                          eutran-38, eutran-40, eutran-41
         |                 current: utran-1, utran-3, utran-5, utran-8, eutran-1, eutran-3,
         |                          eutran-5, eutran-7, eutran-8, eutran-20, eutran-28, eutran-32,
         |                          eutran-38, eutran-40, eutran-41
-----------------------------------
IP       |               supported: ipv4, ipv6, ipv4v6
-----------------------------------
3GPP     |                    imei: 868186041308014
         |             operator id: 50502
         |           operator name: OPTUS
         |            registration: home
-----------------------------------
3GPP EPS |    ue mode of operation: csps-2
-----------------------------------
SIM      |               dbus path: /org/freedesktop/ModemManager1/SIM/1
-----------------------------------
Bearer   |               dbus path: /org/freedesktop/ModemManager1/Bearer/1

vyos@vyos:~$ mmcli -m 1 -b 1


General            |      dbus path: /org/freedesktop/ModemManager1/Bearer/1
                   |           type: default
------------------------------------
Status             |      connected: yes
                   |      suspended: no
                   |      interface: wwan0
                   |     ip timeout: 20
------------------------------------
Properties         |            apn: yesbusinessip
                   |        roaming: allowed
------------------------------------
IPv4 configuration |         method: static
                   |        address: 202.139.23.223
                   |         prefix: 26
                   |        gateway: 202.139.23.224
                   |            dns: 61.88.88.88, 211.29.132.12
                   |            mtu: 1900
------------------------------------
Statistics         |       bytes rx: 11784
                   |       attempts: 1
                   | total-bytes rx: 11784

So the ModemManager is doing its job, and is started from a VyOS interface wwan configuration.

When you try to query this data, VyOS is using qmicli commands, but is not passing the "-p" flag and therefore is barred from controlling the modem

vyos@vyos:~$ show interfaces wwan wwan0 signal
Command not supported by Modem

The try block fails, and this is the only error text supplied.

when we extract the qmicli command from the show wwan python script, and add in the -p flag, it functions.

VyOS needs to detect if qmi-proxy is running (/usr/libexec/qmi-proxy ), and if it is, add the -p flag to all of its qmicli command calls.

If VyOS will always use ModemManager to instantiate cellular connections, the -p flag MAY be able to be permanently hard coded?

Details

Difficulty level
Normal (likely a few hours)
Version
1.3.2
Why the issue appeared?
Will be filled on close
Is it a breaking change?
Unspecified (possibly destroys the router)
Issue type
Bug (incorrect behavior)