Hello,  [I'm Debian libgphoto2 maintainer]

Marco d'Itri wrote:

> > In order to summarize libgphoto2 udev rules now looks like
> > 
> >   ACTION!="add", GOTO="libgphoto2_rules_end"
> > 
> >   # then lots of lines like this one (cr added for legibility):
> >   SUBSYSTEM=="usb_device", SYSFS{idVendor}=="0553",
> >      SYSFS{idProduct}=="0202", MODE="0660", GROUP="camera"
> > 
> >   # with also a generic rule for PTP cameras:
> >   SYSFS{bInterfaceClass}=="06", SYSFS{bInterfaceSubClass}=="01",
> >      SYSFS{bInterfaceProtocol}=="01", MODE="0660", GROUP="camera"
> This is a not specific enough rule (it should probably match on
> SUBSYSTEM=="usb_device", you can check using
> udevinfo -a -p /sys/class/usb_device/...), but I am not sure if it can
> cause the rule to not match.

I can't find info about how to get access to "interface level"
variables from udev; for example on this camera, shortened lsusb
output:

Bus 001 Device 014: ID 04a9:3073 Canon, Inc. PowerShot A70 (ptp)
Device Descriptor:
  bLength                18
  bDescriptorType         1
  bcdUSB               1.10
  bDeviceClass            0 (Defined at Interface level)
[...]
  Configuration Descriptor:
[...]
    Interface Descriptor:
[...]
      bInterfaceClass         6 Imaging
      bInterfaceSubClass      1 Still Image Capture
      bInterfaceProtocol      1 Picture Transfer Protocol (PIMA 15470)
[...]

I'd like to write a rule to match on this bInterfaceClass, so it would
match on future PTP devices, without any need to add  their idVendor /
idProduc; is this possible ?  How so ?


Thanks,

        Frederic


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]

Reply via email to