Re: Modem index increment

2017-07-26 Thread Aleksander Morgado
On Wed, Jul 26, 2017 at 4:57 PM, José  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
___
ModemManager-devel mailing list
ModemManager-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/modemmanager-devel


Modem index increment

2017-07-26 Thread José
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?
___
ModemManager-devel mailing list
ModemManager-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/modemmanager-devel