Use a specific device ?

Jean-Christian de Rivaz jc at eclis.ch
Thu May 28 10:26:00 PDT 2015


Le 28. 05. 15 18:39, Aleksander Morgado a écrit :
> On Thu, May 28, 2015 at 4:41 PM, Jean-Christian de Rivaz <jc at eclis.ch> wrote:
> My proposition got that way:
> 1) By default ModemManager identify the modem on D-Bus using the device name
> (e.g. ttyACMx).
> 2) If ID_MM_DEVICE_TAG is provided from udev rules, then ModemManager use
> ID_MM_DEVICE_TAG value to identify the modem on D-Bus instead of 1).
> 3) If (choose a method here) then ModemManager use the modem ID / SIM ID to
> identify the modem on D-Bus instead of 1) and 2).
> I still think that the ideal thing would be to have NetworkManager
> settings tied to specific devices; but not identified by a
> user-provided tag or a specific /dev/ttyX name. From my point of view,
> NetworkManager should allow to either:
>   a) Have connection settings not tied to any modem (possible nowadays).
>   b) Have connection settings tied to a very specific modem (e.g. to a
> specific IMEI, MEID...) or even better, SIM card (e.g. IMSI, SIM
> ICCID...).

a) Is a trick not visible from a normal user point of view and will not 
solve b) situation.

b) Will not solve my problem as exposed in my first post:

I want to configure all the systems of a network with the same 
configuration file, but the device port name change dynamically on each 
system. As the IMSI or MEID or ICCID is unique for each modem or SIM 
card, it will require a specific configuration on each system, exactly 
the opposite of what I want.

> The fact that ModemManager exports the primary port in DBus is really
> just a convenience for NetworkManager to provide a descriptive modem
> interface device name in the logs (isn't it?). The device names are of
> course not ensured to be the same across reboots, and therefore
> identifying a modem via the exposed device name is never a good idea.
> Hence, the suggestion to identify it directly by IMEI, MEID,... or via
> the "Equipment ID" property.

Without trick NetworkManager require a specific device name to add a new 
gsm type connection. I learned from the NM malling list that I can 
modify the connection after his creation to remove the device name, but 
this is a hack that a normal user like me will be unable to find in the 
documentation.

> Don't take me wrong, the idea of exposing in DBus the value of a given
> property is feasible. But then, why does ModemManager have to do that?
> If you want to have specific udev tags tied to a given modem, you can
> still do that, and as ModemManager already exposes the full list of
> ports of a modem, you could traverse each looking for the specific
> udev tag.

How you do that from NetworkManager or an other MM client ? I am not 
certain that this is simpler than the ID_MM_DEVICE_TAG proposition.

The reality is that udev is specifically designed to identify a device 
and add environment variable to solve this kind of problem. Why should 
MM client like NM redo the same work ? All MM have to do is to pass the 
already good value from udev rule to D-Bus so that MM client can refer 
to it, exactly like if MM will use the IMEI, MEID, IMSI, ICCID, to let 
the MM client refer to them.

The question is open regarding if it's the MM or NM job to select the 
fileds it need to pick up the right modem, but at lest can we agree that 
ModemManager is in the best place to publish those fields on D-Bus ?

Jean-Christian



More information about the ModemManager-devel mailing list