I am really new to this topic. So I have to ask a few questions. Sorry to bother you if they are too simple.
I am running Lubuntu 20.04 on a laptop which comes with EM7511 cellular module. I was able to configure the mobile broadband and connected to Internet. However, when I tried to run QMI query like “qmicli --wds-get-packet-service-status -d /dev/cdc-wdm0”, it always said device is closed.
Is it because the cellular modem was set to MBIM mode?
From another post, aleksander0m said it’s possible to run qmi service in MBIM mode. So, how should I do to make this QMI query work?
Did I point to right device? In the /dev directory, there is only cdc-wdm0, no any ttyUSB* device.
Can you tell what WWAN driver this system is using? Is it MBIM driver? I run dmesg, there is no anything related to gobi.
I am confused with QMI driver, GobiSerial or GobiNet drivers. Will system present more devices after installing those drivers?
Sorry to ask so many questions. Again, I am noob in this field. If you can point me some articles for basic knowledge, that would also be appreciated.
If you’re configuring mobile broadband using the UI, you’re using ModemManager. And ModemManager uses libqmi through the qmi-proxy process (an intermediate process that syncs the access to the QMI control port).
If you want you run your own qmicli commands at the same time ModemManager is running, you need to use the extra -p option in all your qmicli commands. And run them with sudo or as root user.
See comment above.
Yes, cdc-wdm0 would be your control port.
It’s either qmi_wwan (if it’s in QMI mode) or cdc_mbim (if it’s in MBIM mode). You can run this to confirm:
You need to choose whether you want to use the upstream drivers (qmi_wwan or cdc_mbim) or switch to GobiNet and GobiAPI. It’s either one or the other, not both. qmicli only works with upstream drivers. This doc is a bit outdated, but it can help you understand the differences between both: https://aleksander.es/data/Qualcomm%20Gobi%20devices%20on%20Linux.pdf
I can only point you to upstream efforts to work on QMI and MBIM
Thanks for your help!
I checked, the driver is cdc_mbim.
It’ odd. Without -p parameter, qmicli and mbimcli sometimes work, sometimes not. But if with -p, they are always working. Thanks!
One more question. I ran command “sudo qmicli -p -d /dev/cdc-wdm0 --wds-get-packet-service-status”. Got the result “Connection status: ‘disconnected’”. Why it showed “disconnected” when the mobile broadband connection was connected?
That “sometimes” is because you have other programs using the control port at the same time via the proxy, like ModemManager. If you don’t use -p, then you’re hijacking the control port from the proxy each time you run a new command, so you’re effectively breaking the communication of the proxy, and the other way around. If you have at least one application using the proxy, then all applications must use the proxy as well.
Could be because you’re using the wrong WDS client to query. If you connected via ModemManager, you can rely on the connection status reported by ModemManager. You can see all the QMI messages transferred to/from the modem if you run the MM daemon with --debug; see Debugging | ModemManager
You response was very helpful. Thanks a lot.
When you talking about different WDS clients, does that mean different applications to connect mobile broadband network? ig, using ModemManager will be a WDS client. Using qmicli will be another WDS client.
Yes and no. Different applications will definitely have different WDS clients. But a single application may use more than one WDS client. E.g. ModemManager 1.18 allows multi-PDN connections, so you can have separate connections to different APNs, and for that we use different WDS clients. Another example is IPv4v6 setups, where one WDS client is used for IPv4 and another one for IPv6.