Modem Manager Error


I’m with a problem when trying to connect a USB modem following these steps here:

Everything is OK until I try to start a new connection.
I have the interface wwan0 visible using ifconfig, but I get the error when trying to use the command to connect to the modem not sure why and cannot find much information about this problem in the manpage of modem manager.

torizon@verdin-imx8mm-14756371:~$ mmcli -m 0 --simple-connect="apn=emnify"
error: couldn't connect the modem: 'GDBus.Error:org.freedesktop.ModemManager1.Error.Core.NotFound: No valid data port found to launch connection
torizon@verdin-imx8mm-14756371:~$ mmcli -m 0 --simple-connect="apn=em"
error: couldn't connect the modem: 'GDBus.Error:org.freedesktop.ModemManager1.Error.Core.NotFound: No valid data port found to launch connection'
Bus 001 Device 004: ID 0424:2740 Microchip Technology, Inc. (formerly SMSC) Hub Controller
Bus 001 Device 005: ID 2c7c:0121 Quectel Wireless Solutions Co., Ltd. EC21 LTE modem
Bus 001 Device 003: ID 067b:23a3 Prolific Technology, Inc. USB-Serial Controller
Bus 001 Device 002: ID 0424:2744 Microchip Technology, Inc. (formerly SMSC) Hub
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub

Check if the necessary kernel modules for your USB modem are loaded. For Quectel modems, the qmi_wwan USB serial driver might be required. You can check loaded modules with lsmod and load a module with modprobe <module_name> .
Use mmcli -L to list modems recognized by ModemManager and ensure your modem is detected and not in a low-power or uninitialized state.
The Quectel models, can use either QMI or MBIM protocols for data connections. Use lsusb -v to inspect if the modem presents QMI or MBIM interfaces to the system. You may need specific drivers or utilities for these protocols, such as libqmi or libmbim .
Please also check this article:

Hello @alex.tx , thanks for the fast reply

Apparently all the modules seem ok


Module                  Size  Used by
qmi_wwan               36864  0
cdc_wdm                28672  2 qmi_wwan
usbnet                 53248  1 qmi_wwan
usb_wwan               24576  1 option

Using mmcli -L it detects corrrectly the modem, and the modem seems to be initialized.
/org/freedesktop/ModemManager1/Modem/15 [QUALCOMM INCORPORATED] QUECTEL Mobile Broadband Module

mmcli -m 15 also the modem seems connected and not in low power

  System   |                 device: /sys/devices/platform/soc@0/32c00000.bus/32e50000.usb/ci_hdrc.1/usb1/1-1/1-1.2
           |                drivers: qmi_wwan, option
           |                 plugin: quectel
           |           primary port: cdc-wdm0
           |                  ports: cdc-wdm0 (qmi), ttyUSB0 (qcdm), ttyUSB2 (at), ttyUSB3 (at),
           |                         wwan0 (net)
  Status   |                   lock: sim-pin2
           |         unlock retries: sim-pin (3), sim-puk (10), sim-pin2 (3), sim-puk2 (10)
           |                  state: searching
           |            power state: on
           |         signal quality: 0% (cached)

libqmi or libmbim also are installed, because I’ve done some tests with Quectel-CM which uses both libraries (GitHub - kmilo17pet/quectel-cm: Quectel Connect Manager tool)
This is a quectel application, is working correctly and with that application I can connect the modem perfectly without errors and can ping google from that interface with ping -I wwan0
Only get the error when using the ModemManager mmcli, so I’m guessing this could be a bad usage or miss configuration from my side but I’ve followed the steps above regarding modem support.

Number of interfaces is 5 with lsusb -v

Bus 001 Device 009: ID 2c7c:0121 Quectel Wireless Solutions Co., Ltd. EC21 LTE modem
Device Descriptor:
  idVendor           0x2c7c Quectel Wireless Solutions Co., Ltd.
  idProduct          0x0121 EC21 LTE modem
  Configuration Descriptor:
    bNumInterfaces          5

Hi @peterz

Can you try to use NetworkManager instead of ModemManager to establish the connection. NetworkManager will then talk to ModemManager directly:

nmcli c add connection.type gsm con-name gsm apn access_point_name
nmcli c up gsm

Can you also send the full output of:

mmcli -m 15

Signal Quality: 0% means the modem doesn’t see any signal, then it will not be able to register.

BTW: Why is it 15? Could it be that the modem is going up and down regularly? Normally ModemManager starts with 0 when it first detects the modem.


Hi @stefan_e.tx ,

BTW: Why is it 15?

I was just testing usb disconnections, hence the increasing number.

At the moment the error is fixed
When I was trying to connect using the mmcli -m 0 --simple-connect="apn=em" I got the error but then adding ip-type=ipv4v6 the error disappear and connect ok
mmcli -m 0 --simple-connect="apn=em,ip-type=ipv4v6"

Hi @peterz

Great to hear that, thanks for letting us know. I will mark your answer as solution.