Inquiry about some details about ModemManager for the mismatch between "mmcli -m index" and at command result

Aleksander Morgado aleksander at aleksander.es
Tue Aug 18 07:57:01 UTC 2020


Hey Kevin,

See replies inline below.

>
> The modem I use is a Fibcom L860-GL on a Lenovo PC, on which I found when I type in “mmcli –m index” to query the information of modem. However, I found the result from mmcli and at is different, the picture is shown below.
>

What ModemManager version are you using? I can see the device is being
used as a "virtual" device, so I assume you're using some modified
version of MM?

>
> As we can tell, modem state from this two ways are mismatched. After reviewing the code, I found that there is a function called “get_current_consolidated_state” in mm-iface-modem.c which will build a consolidated state. The parameter “modem_state” passed in is ‘enabled’, which matched with the actual modem state after sending at command “at+cops=2” to unregister from network.

You sent COPS=2 via an AT port, *while* ModemManager was also using
the modem? If you do that, the state reported by ModemManager will
definitely be out of sync w.r.t. the real state of the modem.
ModemManager doesn't poll the registration status, if you modify it
"out of ModemManager's view", then you cannot expect ModemManager to
know what you did.
>
> 1.       Is this phenomena ( results from at command and mmcli are different) a special design in order to compatible with different ‘subsystem’?
>

As said above, if you send AT commands yourself "out of ModemManager's
view" then the state reported by mmcli vs the real state of the modem
will be different always. You should not send AT commands and expect
MM to know what you did.

> 2.       I’m not very clear with the concept of ‘subsystem’, and I failed to find any description about it in the document. So could you kindly provide me some guidance?

In the context of mm_iface_modem_update_subsystem_state(), the
subsystem just refers to either 3GPP or CDMA. For modems that support
both (e.g a CDMA/EVDO+LTE device) we consolidate the registration
state from states of both LTE and CDMA/EVDO.

-- 
Aleksander
https://aleksander.es


More information about the ModemManager-devel mailing list