mmcli lookup of first available modem or SIM objects

Aleksander Morgado aleksander at
Mon Mar 23 05:24:44 UTC 2020


For systems where there is usually one single object available, mmcli
still needed to provide the exact modem/sim index number or a fixed
UID setup by the user as a udev tag.

I've tried to hack up a simpler solution which I hope is even easier
to use; see

It allows the user to use "any" (or even just "a") to refer to the
first available modem or SIM object found in the system. It is
obviously not fit for systems with more than one modem, but if there
is only one, it will always work.

   $ mmcli -m a
        General  |            dbus path: /org/freedesktop/ModemManager1/Modem/0
                 |            device id:
        Hardware |         manufacturer: Sierra Wireless Inc.
                 |                model: Sierra Wireless EM7345 4G LTE

Comments welcome!


More information about the ModemManager-devel mailing list