Hi Marco

I did some investigations into the libphoto2 udev rules issue, maybe 
this helps you finding a solution. (I am using udev 0.100-2.2, 
libgphoto2-2 2.2.1-10, kernel 2.6.18-2-686 2.6.18-4)

The camera I use here is an older one (HP Photosmart R507) which used 
to work with sarge and hotplug. Which means a lot of cameras where no 
explicit vendorid .. is provided, will not be supported only because 
the devices does not get the right groups. :(

Am Mittwoch, 1. November 2006 19:52 schrieb Frederic Peters:
> md wrote:
> > > How would you reformat those ?
> >
> > Then they are fine.
>
> Sorry to bother you again, but there is still one problem; consider
> this rules file:
>
>   ACTION!="add", GOTO="libgphoto2_rules_end"
>   SUBSYSTEM=="usb_device", GOTO="libgphoto2_rules_real"
>   SUBSYSTEM=="usb", GOTO="libgphoto2_rules_real"
>   BUS!="usb", GOTO="libgphoto2_rules_end"
>
>   LABEL="libgphoto2_rules_real"

If I comment out the above lines, the following devices get the 
plugdev group  

/dev/usbdev2.7_ep81
/dev/usbdev2.7_ep01
/dev/usbdev2.7_ep82

but not /dev/bus/usb/002/007 which is used to get access to the 
photos.

>   SYSFS{idVendor}=="04a9", SYSFS{idProduct}=="30fd", \
>     MODE="0660", GROUP="plugdev"
>
>   SYSFS{bInterfaceClass}=="06", SYSFS{bInterfaceSubClass}=="01", \
>     SYSFS{bInterfaceProtocol}=="01", \
>     MODE="0660", GROUP="plugdev"
>
>   LABEL="libgphoto2_rules_end"
>
>
> It will match my camera on its USB ID and it will work fine.
>
> What I would like to achieve would be that if a specific USB ID
> can't be matched, at least there is a generic rule matching 'PTP
> camera' and it works without adding a new rule.
>
> Unfortunately the rule as it is written now doesn't work, could you
> enlighten me on this, how can I match against bInterface* when a
> camera is plugged ?

With the rules provided in libgphoto2-2 no device gets the plugdev 
group.

Hendrik

-- 
PGP ID 65C92061
Bus 002 Device 007: ID 03f0:6e02 Hewlett-Packard 
Device Descriptor:
  bLength                18
  bDescriptorType         1
  bcdUSB               2.00
  bDeviceClass            0 (Defined at Interface level)
  bDeviceSubClass         0 
  bDeviceProtocol         0 
  bMaxPacketSize0        64
  idVendor           0x03f0 Hewlett-Packard
  idProduct          0x6e02 
  bcdDevice            0.01
  iManufacturer           1 HEWLETT-PACKARD 
  iProduct                2 HP PhotoSmart R507 Camera                 
  iSerial                 3 LCN48BB602B0
  bNumConfigurations      1
  Configuration Descriptor:
    bLength                 9
    bDescriptorType         2
    wTotalLength           39
    bNumInterfaces          1
    bConfigurationValue     1
    iConfiguration          0 
    bmAttributes         0xc0
      Self Powered
    MaxPower               10mA
    Interface Descriptor:
      bLength                 9
      bDescriptorType         4
      bInterfaceNumber        0
      bAlternateSetting       0
      bNumEndpoints           3
      bInterfaceClass         6 Imaging
      bInterfaceSubClass      1 Still Image Capture
      bInterfaceProtocol      1 Picture Transfer Protocol (PIMA 15470)
      iInterface              0 
      Endpoint Descriptor:
        bLength                 7
        bDescriptorType         5
        bEndpointAddress     0x81  EP 1 IN
        bmAttributes            2
          Transfer Type            Bulk
          Synch Type               None
          Usage Type               Data
        wMaxPacketSize     0x0040  1x 64 bytes
        bInterval               0
      Endpoint Descriptor:
        bLength                 7
        bDescriptorType         5
        bEndpointAddress     0x01  EP 1 OUT
        bmAttributes            2
          Transfer Type            Bulk
          Synch Type               None
          Usage Type               Data
        wMaxPacketSize     0x0040  1x 64 bytes
        bInterval               0
      Endpoint Descriptor:
        bLength                 7
        bDescriptorType         5
        bEndpointAddress     0x82  EP 2 IN
        bmAttributes            3
          Transfer Type            Interrupt
          Synch Type               None
          Usage Type               Data
        wMaxPacketSize     0x0010  1x 16 bytes
        bInterval             255
Device Status:     0x0001
  Self Powered

Attachment: pgpOZNCK7TcBr.pgp
Description: PGP signature

Reply via email to