Use a specific device ?

Jean-Christian de Rivaz jc at eclis.ch
Fri May 29 02:44:16 PDT 2015


Le 29. 05. 15 10:32, Bjørn Mork a écrit :
> Dan Williams <dcbw at redhat.com> writes:
>> On Thu, 2015-05-28 at 22:26 +0200, Jean-Christian de Rivaz wrote:
>>> I you follow the previous paragraph, you will understand that it's
>>> clearly the job of ModemManager. This just plain logic as this is the
>>> only entity in the chain that receive the udev event about the modem.
>> I don't necessarily think it is ModemManager's job.  Since what you want
>> in the end is to tie a specific NM connection to a specific modem (based
>> on type, slot #, whatever), it's the job of NetworkManager to figure
>> that out for you.  ModemManager can certainly help if we can figure out
>> a clean generic way to do that.
> FWIW, I agree here.
>
> Once you have more than one modem/SIM/operator/whatever, then you cannot
> automatically do-the-right-thing-for-everyone.  You can select
> reasonable defaults of course, but the final modem selection policy
> should be user controlled.
>
> There is no way MM or NM can know that one of my modems dont' have any
> antennas connected, or that my operator only allows 3G so that LTE is
> irrelevant, or that my internal modem tends to overheat, or ... I'm sure
> you get the point.

This is clearly the MM jobs to a least make those information available 
to D-Bus.

> Even simple things like internal vs external might be hidden from MM.
> All modems are connected by USB to the same controllers.  We do have the
> port/connect_type attribute nowadays, but that information comes from
> the PC firmware (ACPI), and we can be pretty sure there is at least one
> system getting it wrong.

No, what you are talking about here is the udev job. And yes, an user 
could have a use case to select a modem based on the port/connect path. 
An other user could have a use case to match a specific modem product 
id. This is the advantage to use udev: it let the choice to the user. 
The standard why to manage devices on Linux today is to provides a list 
of udev rules that match the know devices on the market. This is why 
there is a /lib/udev/rules.d and /lib/udev/hwdb.d directories in your 
distribution. MM try to auto probing every serial ports, nobody do that 
anymore with udev. MM should only auto probe to find the good port on 
multiple port modem.

> Every system and user is different. Policies have to be user defined.
> Which implies configuration. So NM is the lowest level where you can
> make this decision.
>

Certainly false: udev is the lowest level. There are reasons why MM 
already use udev variables.

Jean-Christian


More information about the ModemManager-devel mailing list