Use a specific device ?

Aleksander Morgado aleksander at aleksander.es
Thu May 28 03:17:04 PDT 2015


On Wed, May 27, 2015 at 1:34 AM, Jean-Christian de Rivaz <jc at eclis.ch> wrote:
> Le 27. 05. 15 01:14, Dan Williams a écrit :
>>
>> Like I said on the NM lists, I'd rather have ModemManager read the
>> symlinks and advertise *those* over D-Bus instead of adding new
>> MM-specific tagging stuff to ModemManager itself.  Seems like a more
>> generic solution to me than "magic" tags.  It also ensures that you
>> cannot use the same tag for multiple devices.
>>
>
> Just for curiosity, how did you plan to find the symbolic link that point to
> the real ttyACMx ?

That's an interesting question; as udev won't notify via events about
the links it creates (right?). We could list all files within /dev and
then use realpath() to see if any link file points to the real tty
device path, but that is too much I think. Tagging the specific device
in udev with a new "ID_MM_DEVICE_TAG" that is then exposed in DBus
could be much simpler to implement.

But anyway, at the end, the setting of the udev rule (either tag or
link) depends directly on a developer or administrator setting it for
a specific use case. I wonder if that use case cannot be fulfilled
automatically in some other way. E.g. if you know you'll have to
support CDMA and GSM/UMTS modems, you could create 2 different
connection settings in NM that are not bound to any specific device,
and once the modem shows up in ModemManager decide in runtime which of
the settings should get applied to the modem to get it connected. CDMA
vs GSM/UMTS is an obvious thing, maybe you have to setup more runtime
checkes, but I don't think it should be impossible.

-- 
Aleksander
https://aleksander.es


More information about the ModemManager-devel mailing list