Use a specific device ?

Dan Williams dcbw at redhat.com
Tue May 26 16:14:18 PDT 2015


On Tue, 2015-05-26 at 19:06 +0200, Jean-Christian de Rivaz wrote:
> Le 26. 05. 15 16:37, Aleksander Morgado a écrit :
> > On Tue, May 26, 2015 at 12:19 AM, Jean-Christian de Rivaz <jc at eclis.ch> wrote:
> >> I have a system where the modem have multiple /dev/ttyACMx ports where x is
> >> not constant because of the dynamic nature of others serial devices.
> >> ModemManager always detect the rights ttyACMx of the modem but
> >> NetworkManager only allow to configure a connection for a fixed device. I
> >> tried to solve this problem by adding udev rules to fix the device name of
> >> the modem, but it's only possible to add a fixed symbolic link. ModemManager
> >> seem to ignore the fixed symbolic link and only use the dynamic ttyACMx.
> >>
> >> Is there a way to force ModemManager to only use a specific symbolic link to
> >> control the modem, so that NetworkManger can be configured using a fix
> >> device name ?
> > There's no current way to do that; instead, the NM settings should be
> > bound to either the SIM ICCID (if SIM available) or otherwise to the
> > Equipment ID (built from e.g. the IMEI).
> >
> 
> The proposed idea is to have a udev rule that contain something like 
> this ENV(ID_MM_DEVICE_TAG_NAME)="gsm" if the rule match,  then 
> ModemManager can use the tag 'gsm' as a fixed reference instead of the 
> dynamic ttyACMx. Of course ModemManager will continue to use the dynamic 
> ttyACMx internally to communicate with the modem but will use the 'gsm' 
> tag on the D-Bus so that NetworkManager get a fixed name too.
> 
> Now if you prefer to use the device ID or the SIM ID, ModemManager could 
> be configured by a udev rule like ENV(ID_MM_DEVICE_TAG_TYPE)="device-id" 
> or "sim-id" for example.

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.

Dan



More information about the ModemManager-devel mailing list