MMKernelDevice ID_USB_INTERFACE_NUM property isn't set anymore

Carlo Lobrano c.lobrano at gmail.com
Wed May 3 15:25:17 UTC 2017


By chance I have another Ubuntu machine, which is 17.04 while the main one
is 16.10, not sure that this matters, and in this one IS_USB_INTERFACE_NUM
is correctly defined :|

On 3 May 2017 at 17:08, Dan Williams <dcbw at redhat.com> wrote:

> On Wed, 2017-05-03 at 14:55 +0200, Aleksander Morgado wrote:
> > On Wed, May 3, 2017 at 2:09 PM, Carlo Lobrano <c.lobrano at gmail.com>
> > wrote:
> > > > > > When using the "udev" backend, which you are, the property
> > > > > > isn't
> > > > > > "loaded" or "stored" anywhere in our code. We directly look
> > > > > > for the
> > > > > > property in the GUdevDevice underneath.
> > > > > >
> > > > > > Could you run udevadm info in the port to see if
> > > > > > ID_USB_INTERFACE_NUM
> > > > > > is
> > > > > > set?
> > > > >
> > > > > Oh, I see now.
> > > > > The property is actually unset. Is there anything else I can do
> > > > > to have
> > > > > this
> > > > > information?
> > > > >
> > > > > $ udevadm info /dev/ttyACM0
> > > > > P:
> > > > >
> > > > > /devices/pci0000:00/0000:00:14.0/usb3/3-3/3-3.2/3-3.2.4/3-
> > > > > 3.2.4.3/3-3.2.4.3:1.0/tty/ttyACM0
> > > > > N: ttyACM0
> > > > > E: DEVNAME=/dev/ttyACM0
> > > > > E:
> > > > >
> > > > > DEVPATH=/devices/pci0000:00/0000:00:14.0/usb3/3-3/3-3.2/3-
> > > > > 3.2.4/3-3.2.4.3/3-3.2.4.3:1.0/tty/ttyACM0
> > > > > E: ID_MM_CANDIDATE=1
> > > > > E: ID_MM_TELIT_PORTS_TAGGED=1
> > > > > E: ID_MM_TELIT_TAGGED=1
> > > > > E: MAJOR=166
> > > > > E: MINOR=0
> > > > > E: SUBSYSTEM=tty
> > > > > E: TAGS=:systemd:
> > > > > E: USEC_INITIALIZED=75726372964
> > > >
> > > > Do you have a /lib/udev/rules.d/60-serial.rules in your system
> > > > that
> > > > sets ID_USB_INTERFACE_NUM? Maybe we shouldn't rely on having
> > > > that?
> > > >
> > >
> > > No, I do not have that 60-serial.rules file, but I did obtained the
> > > result I
> > > wanted adding the following rule to 77-mm-telit-port-types.rules
> > >
> > > SUBSYSTEMS=="usb", ATTRS{bInterfaceNumber}=="?*",
> > > ENV{ID_USB_INTERFACE_NUM}="$attr{bInterfaceNumber}"
> >
> > We need to fix this; we shouldn't be relying on a systemd property. I
> > originally thought this was provided by udev itself... although with
> > the systemd/udev development being done together, it may actually be
> > a
> > packaging decision; no idea.
>
> I think it originally was a udev property.  And I see it's still
> provided by systemd-udev, so I'd expect it to be present if udev is
> installed...
>
> Dan
>
> > One option would be to define ID_MM_USB_INTERFACE_NUM in all plugin
> > udev rules (telit, option, huawei, cinterion), and update the plugins
> > source code to use the new ID_MM_ prefixed property.
> >
> > Another option would be to provide a common rules file that is run
> > before all the others and defines ID_MM_USB_INTERFACE_NUM for all
> > plugins... we could have a 77-mm-serial.rules file and rename all
> > plugin rules to 78-mm-...
> >
> > What do you think?
> >
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/modemmanager-devel/attachments/20170503/6c914410/attachment.html>


More information about the ModemManager-devel mailing list