Modem index increment

Aleksander Morgado aleksander at aleksander.es
Wed Jul 26 16:37:24 UTC 2017


On Wed, Jul 26, 2017 at 4:57 PM, José <Joseddg92 at gmail.com> wrote:
> I have noticed that when unplugging and plugging a modem, ModemManager
> increases its index by one. This can be annoying when you are trying
> to script something.
>
> Would it make sense to assign the same index to the same modem? Maybe
> something like using the  "equipment id" field to detect a plugged
> modem is not new and use the previous index, instead of increasing it.
>
> Has this been consider before? Are there any arguments for or against it?

You can apply a "unique id" to each modem via udev tags (e.g. based on
the usb sysfs path), and then use that to refer to the modem in mmcli
calls, see:
https://sigquit.wordpress.com/2016/10/06/naming-devices-in-modemmanager/

Would that help your use case?

-- 
Aleksander
https://aleksander.es


More information about the ModemManager-devel mailing list