USB webcam not attaching: proposed patch

José Pérez fbl at aoek.com
Thu May 21 12:27:19 UTC 2020


El 2020-05-21 13:23, Hans Petter Selasky escribió:
> Hi,
> 
> The match rule must be narrowed down a bit.
> 
> Can you dump the full configuration and device descriptor for this
> device? 0x0a is not correct interface class. This will make trouble
> for USB ethernet devices.


Hi,
is the vendor + intclass enough? Or are there Logitec ethernet devices?

---------------------------  CUT  ---------------------------
--- webcamd.conf.orig   2020-05-21 12:41:25.844895000 +0200
+++ webcamd.conf        2020-05-21 14:19:55.447913000 +0200
@@ -64,3 +64,13 @@
         action "/usr/local/etc/rc.d/webcamd start $cdev $interface";
  };

+# Logitech webcams
+notify 100 {
+       match "system"          "USB";
+       match "subsystem"       "INTERFACE";
+       match "type"            "ATTACH";
+
+       match "vendor"          "0x046d";
+       match "intclass"        "0x0a";
+       action "/usr/local/etc/rc.d/webcamd start $cdev";
+};
---------------------------  CUT  ---------------------------

Anyhow, here you are:
# usbconfig -d 1.2 dump_all_desc
ugen1.2: <vendor 0x046d product 0x08b3> at usbus1, cfg=0 md=HOST 
spd=FULL (12Mbps) pwr=ON (500mA)

   bLength = 0x0012
   bDescriptorType = 0x0001
   bcdUSB = 0x0110
   bDeviceClass = 0x0000  <Probed by interface class>
   bDeviceSubClass = 0x0000
   bDeviceProtocol = 0x0000
   bMaxPacketSize0 = 0x0008
   idVendor = 0x046d
   idProduct = 0x08b3
   bcdDevice = 0x0000
   iManufacturer = 0x0000  <no string>
   iProduct = 0x0000  <no string>
   iSerialNumber = 0x0000  <no string>
   bNumConfigurations = 0x0001

  Configuration index 0

     bLength = 0x0009
     bDescriptorType = 0x0002
     wTotalLength = 0x01fd
     bNumInterfaces = 0x0003
     bConfigurationValue = 0x0001
     iConfiguration = 0x0000  <no string>
     bmAttributes = 0x00a0
     bMaxPower = 0x00fa

     Interface 0
       bLength = 0x0009
       bDescriptorType = 0x0004
       bInterfaceNumber = 0x0000
       bAlternateSetting = 0x0000
       bNumEndpoints = 0x0002
       bInterfaceClass = 0x000a  <CDC-data>
       bInterfaceSubClass = 0x00ff
       bInterfaceProtocol = 0x0000
       iInterface = 0x0000  <no string>

      Endpoint 0
         bLength = 0x0007
         bDescriptorType = 0x0005
         bEndpointAddress = 0x0082  <IN>
         bmAttributes = 0x0003  <INTERRUPT>
         wMaxPacketSize = 0x0001
         bInterval = 0x0064
         bRefresh = 0x0000
         bSynchAddress = 0x0000

      Endpoint 1
         bLength = 0x0007
         bDescriptorType = 0x0005
         bEndpointAddress = 0x0085  <IN>
         bmAttributes = 0x0001  <ISOCHRONOUS>
         wMaxPacketSize = 0x0000
         bInterval = 0x0001
         bRefresh = 0x0000
         bSynchAddress = 0x0000


     Interface 0 Alt 1
       bLength = 0x0009
       bDescriptorType = 0x0004
       bInterfaceNumber = 0x0000
       bAlternateSetting = 0x0001
       bNumEndpoints = 0x0002
       bInterfaceClass = 0x000a  <CDC-data>
       bInterfaceSubClass = 0x00ff
       bInterfaceProtocol = 0x0000
       iInterface = 0x0000  <no string>

      Endpoint 0
         bLength = 0x0007
         bDescriptorType = 0x0005
         bEndpointAddress = 0x0082  <IN>
         bmAttributes = 0x0003  <INTERRUPT>
         wMaxPacketSize = 0x0001
         bInterval = 0x0064
         bRefresh = 0x0000
         bSynchAddress = 0x0000

      Endpoint 1
         bLength = 0x0007
         bDescriptorType = 0x0005
         bEndpointAddress = 0x0085  <IN>
         bmAttributes = 0x0001  <ISOCHRONOUS>
         wMaxPacketSize = 0x00c4
         bInterval = 0x0001
         bRefresh = 0x0000
         bSynchAddress = 0x0000


     Interface 0 Alt 2
       bLength = 0x0009
       bDescriptorType = 0x0004
       bInterfaceNumber = 0x0000
       bAlternateSetting = 0x0002
       bNumEndpoints = 0x0002
       bInterfaceClass = 0x000a  <CDC-data>
       bInterfaceSubClass = 0x00ff
       bInterfaceProtocol = 0x0000
       iInterface = 0x0000  <no string>

      Endpoint 0
         bLength = 0x0007
         bDescriptorType = 0x0005
         bEndpointAddress = 0x0082  <IN>
         bmAttributes = 0x0003  <INTERRUPT>
         wMaxPacketSize = 0x0001
         bInterval = 0x0064
         bRefresh = 0x0000
         bSynchAddress = 0x0000

      Endpoint 1
         bLength = 0x0007
         bDescriptorType = 0x0005
         bEndpointAddress = 0x0085  <IN>
         bmAttributes = 0x0001  <ISOCHRONOUS>
         wMaxPacketSize = 0x0124
         bInterval = 0x0001
         bRefresh = 0x0000
         bSynchAddress = 0x0000


     Interface 0 Alt 3
       bLength = 0x0009
       bDescriptorType = 0x0004
       bInterfaceNumber = 0x0000
       bAlternateSetting = 0x0003
       bNumEndpoints = 0x0002
       bInterfaceClass = 0x000a  <CDC-data>
       bInterfaceSubClass = 0x00ff
       bInterfaceProtocol = 0x0000
       iInterface = 0x0000  <no string>

      Endpoint 0
         bLength = 0x0007
         bDescriptorType = 0x0005
         bEndpointAddress = 0x0082  <IN>
         bmAttributes = 0x0003  <INTERRUPT>
         wMaxPacketSize = 0x0001
         bInterval = 0x0064
         bRefresh = 0x0000
         bSynchAddress = 0x0000

      Endpoint 1
         bLength = 0x0007
         bDescriptorType = 0x0005
         bEndpointAddress = 0x0085  <IN>
         bmAttributes = 0x0001  <ISOCHRONOUS>
         wMaxPacketSize = 0x01c0
         bInterval = 0x0001
         bRefresh = 0x0000
         bSynchAddress = 0x0000


     Interface 0 Alt 4
       bLength = 0x0009
       bDescriptorType = 0x0004
       bInterfaceNumber = 0x0000
       bAlternateSetting = 0x0004
       bNumEndpoints = 0x0002
       bInterfaceClass = 0x000a  <CDC-data>
       bInterfaceSubClass = 0x00ff
       bInterfaceProtocol = 0x0000
       iInterface = 0x0000  <no string>

      Endpoint 0
         bLength = 0x0007
         bDescriptorType = 0x0005
         bEndpointAddress = 0x0082  <IN>
         bmAttributes = 0x0003  <INTERRUPT>
         wMaxPacketSize = 0x0001
         bInterval = 0x0064
         bRefresh = 0x0000
         bSynchAddress = 0x0000

      Endpoint 1
         bLength = 0x0007
         bDescriptorType = 0x0005
         bEndpointAddress = 0x0085  <IN>
         bmAttributes = 0x0001  <ISOCHRONOUS>
         wMaxPacketSize = 0x0250
         bInterval = 0x0001
         bRefresh = 0x0000
         bSynchAddress = 0x0000


     Interface 0 Alt 5
       bLength = 0x0009
       bDescriptorType = 0x0004
       bInterfaceNumber = 0x0000
       bAlternateSetting = 0x0005
       bNumEndpoints = 0x0002
       bInterfaceClass = 0x000a  <CDC-data>
       bInterfaceSubClass = 0x00ff
       bInterfaceProtocol = 0x0000
       iInterface = 0x0000  <no string>

      Endpoint 0
         bLength = 0x0007
         bDescriptorType = 0x0005
         bEndpointAddress = 0x0082  <IN>
         bmAttributes = 0x0003  <INTERRUPT>
         wMaxPacketSize = 0x0001
         bInterval = 0x0064
         bRefresh = 0x0000
         bSynchAddress = 0x0000

      Endpoint 1
         bLength = 0x0007
         bDescriptorType = 0x0005
         bEndpointAddress = 0x0085  <IN>
         bmAttributes = 0x0001  <ISOCHRONOUS>
         wMaxPacketSize = 0x02c0
         bInterval = 0x0001
         bRefresh = 0x0000
         bSynchAddress = 0x0000


     Interface 0 Alt 6
       bLength = 0x0009
       bDescriptorType = 0x0004
       bInterfaceNumber = 0x0000
       bAlternateSetting = 0x0006
       bNumEndpoints = 0x0002
       bInterfaceClass = 0x000a  <CDC-data>
       bInterfaceSubClass = 0x00ff
       bInterfaceProtocol = 0x0000
       iInterface = 0x0000  <no string>

      Endpoint 0
         bLength = 0x0007
         bDescriptorType = 0x0005
         bEndpointAddress = 0x0082  <IN>
         bmAttributes = 0x0003  <INTERRUPT>
         wMaxPacketSize = 0x0001
         bInterval = 0x0064
         bRefresh = 0x0000
         bSynchAddress = 0x0000

      Endpoint 1
         bLength = 0x0007
         bDescriptorType = 0x0005
         bEndpointAddress = 0x0085  <IN>
         bmAttributes = 0x0001  <ISOCHRONOUS>
         wMaxPacketSize = 0x0308
         bInterval = 0x0001
         bRefresh = 0x0000
         bSynchAddress = 0x0000


     Interface 0 Alt 7
       bLength = 0x0009
       bDescriptorType = 0x0004
       bInterfaceNumber = 0x0000
       bAlternateSetting = 0x0007
       bNumEndpoints = 0x0002
       bInterfaceClass = 0x000a  <CDC-data>
       bInterfaceSubClass = 0x00ff
       bInterfaceProtocol = 0x0000
       iInterface = 0x0000  <no string>

      Endpoint 0
         bLength = 0x0007
         bDescriptorType = 0x0005
         bEndpointAddress = 0x0082  <IN>
         bmAttributes = 0x0003  <INTERRUPT>
         wMaxPacketSize = 0x0001
         bInterval = 0x0064
         bRefresh = 0x0000
         bSynchAddress = 0x0000

      Endpoint 1
         bLength = 0x0007
         bDescriptorType = 0x0005
         bEndpointAddress = 0x0085  <IN>
         bmAttributes = 0x0001  <ISOCHRONOUS>
         wMaxPacketSize = 0x0348
         bInterval = 0x0001
         bRefresh = 0x0000
         bSynchAddress = 0x0000


     Interface 0 Alt 8
       bLength = 0x0009
       bDescriptorType = 0x0004
       bInterfaceNumber = 0x0000
       bAlternateSetting = 0x0008
       bNumEndpoints = 0x0002
       bInterfaceClass = 0x000a  <CDC-data>
       bInterfaceSubClass = 0x00ff
       bInterfaceProtocol = 0x0000
       iInterface = 0x0000  <no string>

      Endpoint 0
         bLength = 0x0007
         bDescriptorType = 0x0005
         bEndpointAddress = 0x0082  <IN>
         bmAttributes = 0x0003  <INTERRUPT>
         wMaxPacketSize = 0x0001
         bInterval = 0x0064
         bRefresh = 0x0000
         bSynchAddress = 0x0000

      Endpoint 1
         bLength = 0x0007
         bDescriptorType = 0x0005
         bEndpointAddress = 0x0085  <IN>
         bmAttributes = 0x0001  <ISOCHRONOUS>
         wMaxPacketSize = 0x0380
         bInterval = 0x0001
         bRefresh = 0x0000
         bSynchAddress = 0x0000


     Interface 0 Alt 9
       bLength = 0x0009
       bDescriptorType = 0x0004
       bInterfaceNumber = 0x0000
       bAlternateSetting = 0x0009
       bNumEndpoints = 0x0002
       bInterfaceClass = 0x000a  <CDC-data>
       bInterfaceSubClass = 0x00ff
       bInterfaceProtocol = 0x0000
       iInterface = 0x0000  <no string>

      Endpoint 0
         bLength = 0x0007
         bDescriptorType = 0x0005
         bEndpointAddress = 0x0082  <IN>
         bmAttributes = 0x0003  <INTERRUPT>
         wMaxPacketSize = 0x0001
         bInterval = 0x0064
         bRefresh = 0x0000
         bSynchAddress = 0x0000

      Endpoint 1
         bLength = 0x0007
         bDescriptorType = 0x0005
         bEndpointAddress = 0x0085  <IN>
         bmAttributes = 0x0001  <ISOCHRONOUS>
         wMaxPacketSize = 0x03c0
         bInterval = 0x0001
         bRefresh = 0x0000
         bSynchAddress = 0x0000


     Interface 0 Alt 10
       bLength = 0x0009
       bDescriptorType = 0x0004
       bInterfaceNumber = 0x0000
       bAlternateSetting = 0x000a
       bNumEndpoints = 0x0002
       bInterfaceClass = 0x000a  <CDC-data>
       bInterfaceSubClass = 0x00ff
       bInterfaceProtocol = 0x0000
       iInterface = 0x0000  <no string>

      Endpoint 0
         bLength = 0x0007
         bDescriptorType = 0x0005
         bEndpointAddress = 0x0082  <IN>
         bmAttributes = 0x0003  <INTERRUPT>
         wMaxPacketSize = 0x0001
         bInterval = 0x0064
         bRefresh = 0x0000
         bSynchAddress = 0x0000

      Endpoint 1
         bLength = 0x0007
         bDescriptorType = 0x0005
         bEndpointAddress = 0x0085  <IN>
         bmAttributes = 0x0001  <ISOCHRONOUS>
         wMaxPacketSize = 0x03c0
         bInterval = 0x0001
         bRefresh = 0x0000
         bSynchAddress = 0x0000


     Interface 1
       bLength = 0x0009
       bDescriptorType = 0x0004
       bInterfaceNumber = 0x0001
       bAlternateSetting = 0x0000
       bNumEndpoints = 0x0000
       bInterfaceClass = 0x0001  <Audio device>
       bInterfaceSubClass = 0x0001
       bInterfaceProtocol = 0x0000
       iInterface = 0x0000  <no string>

       Additional Descriptor

       bLength = 0x09
       bDescriptorType = 0x24
       bDescriptorSubType = 0x01
        RAW dump:
        0x00 | 0x09, 0x24, 0x01, 0x00, 0x01, 0x26, 0x00, 0x01,
        0x08 | 0x02

       Additional Descriptor

       bLength = 0x0c
       bDescriptorType = 0x24
       bDescriptorSubType = 0x02
        RAW dump:
        0x00 | 0x0c, 0x24, 0x02, 0x01, 0x01, 0x02, 0x00, 0x01,
        0x08 | 0x00, 0x00, 0x00, 0x00


       Additional Descriptor

       bLength = 0x08
       bDescriptorType = 0x24
       bDescriptorSubType = 0x06
        RAW dump:
        0x00 | 0x08, 0x24, 0x06, 0x02, 0x01, 0x01, 0x03, 0x00


       Additional Descriptor

       bLength = 0x09
       bDescriptorType = 0x24
       bDescriptorSubType = 0x03
        RAW dump:
        0x00 | 0x09, 0x24, 0x03, 0x03, 0x01, 0x01, 0x00, 0x02,
        0x08 | 0x00


     Interface 2
       bLength = 0x000b
       bDescriptorType = 0x0004
       bInterfaceNumber = 0x0002
       bAlternateSetting = 0x0000
       bNumEndpoints = 0x0001
       bInterfaceClass = 0x0001  <Audio device>
       bInterfaceSubClass = 0x0002
       bInterfaceProtocol = 0x0000
       iInterface = 0x0000  <no string>

      Endpoint 0
         bLength = 0x0009
         bDescriptorType = 0x0005
         bEndpointAddress = 0x0084  <IN>
         bmAttributes = 0x0001  <ISOCHRONOUS>
         wMaxPacketSize = 0x0000
         bInterval = 0x0001
         bRefresh = 0x0000
         bSynchAddress = 0x0000


     Interface 2 Alt 1
       bLength = 0x000b
       bDescriptorType = 0x0004
       bInterfaceNumber = 0x0002
       bAlternateSetting = 0x0001
       bNumEndpoints = 0x0001
       bInterfaceClass = 0x0001  <Audio device>
       bInterfaceSubClass = 0x0002
       bInterfaceProtocol = 0x0000
       iInterface = 0x0000  <no string>

       Additional Descriptor

       bLength = 0x07
       bDescriptorType = 0x24
       bDescriptorSubType = 0x01
        RAW dump:
        0x00 | 0x07, 0x24, 0x01, 0x03, 0x01, 0x01, 0x00


       Additional Descriptor

       bLength = 0x0b
       bDescriptorType = 0x24
       bDescriptorSubType = 0x02
        RAW dump:
        0x00 | 0x0b, 0x24, 0x02, 0x01, 0x01, 0x02, 0x10, 0x01,
        0x08 | 0x44, 0xac, 0x00


      Endpoint 0
         bLength = 0x0009
         bDescriptorType = 0x0005
         bEndpointAddress = 0x0084  <IN>
         bmAttributes = 0x0001  <ISOCHRONOUS>
         wMaxPacketSize = 0x006e
         bInterval = 0x0001
         bRefresh = 0x0000
         bSynchAddress = 0x0000

       Additional Descriptor

       bLength = 0x07
       bDescriptorType = 0x25
       bDescriptorSubType = 0x01
        RAW dump:
        0x00 | 0x07, 0x25, 0x01, 0x00, 0x00, 0x00, 0x00



     Interface 2 Alt 2
       bLength = 0x000b
       bDescriptorType = 0x0004
       bInterfaceNumber = 0x0002
       bAlternateSetting = 0x0002
       bNumEndpoints = 0x0001
       bInterfaceClass = 0x0001  <Audio device>
       bInterfaceSubClass = 0x0002
       bInterfaceProtocol = 0x0000
       iInterface = 0x0000  <no string>

       Additional Descriptor

       bLength = 0x07
       bDescriptorType = 0x24
       bDescriptorSubType = 0x01
        RAW dump:
        0x00 | 0x07, 0x24, 0x01, 0x03, 0x01, 0x01, 0x00


       Additional Descriptor

       bLength = 0x0b
       bDescriptorType = 0x24
       bDescriptorSubType = 0x02
        RAW dump:
        0x00 | 0x0b, 0x24, 0x02, 0x01, 0x01, 0x02, 0x10, 0x01,
        0x08 | 0x22, 0x56, 0x00


      Endpoint 0
         bLength = 0x0009
         bDescriptorType = 0x0005
         bEndpointAddress = 0x0084  <IN>
         bmAttributes = 0x0001  <ISOCHRONOUS>
         wMaxPacketSize = 0x0036
         bInterval = 0x0001
         bRefresh = 0x0000
         bSynchAddress = 0x0000

       Additional Descriptor

       bLength = 0x07
       bDescriptorType = 0x25
       bDescriptorSubType = 0x01
        RAW dump:
        0x00 | 0x07, 0x25, 0x01, 0x00, 0x00, 0x00, 0x00



     Interface 2 Alt 3
       bLength = 0x000b
       bDescriptorType = 0x0004
       bInterfaceNumber = 0x0002
       bAlternateSetting = 0x0003
       bNumEndpoints = 0x0001
       bInterfaceClass = 0x0001  <Audio device>
       bInterfaceSubClass = 0x0002
       bInterfaceProtocol = 0x0000
       iInterface = 0x0000  <no string>

       Additional Descriptor

       bLength = 0x07
       bDescriptorType = 0x24
       bDescriptorSubType = 0x01
        RAW dump:
        0x00 | 0x07, 0x24, 0x01, 0x03, 0x01, 0x01, 0x00


       Additional Descriptor

       bLength = 0x0b
       bDescriptorType = 0x24
       bDescriptorSubType = 0x02
        RAW dump:
        0x00 | 0x0b, 0x24, 0x02, 0x01, 0x01, 0x02, 0x10, 0x01,
        0x08 | 0x11, 0x2b, 0x00


      Endpoint 0
         bLength = 0x0009
         bDescriptorType = 0x0005
         bEndpointAddress = 0x0084  <IN>
         bmAttributes = 0x0001  <ISOCHRONOUS>
         wMaxPacketSize = 0x001a
         bInterval = 0x0001
         bRefresh = 0x0000
         bSynchAddress = 0x0000

       Additional Descriptor

       bLength = 0x07
       bDescriptorType = 0x25
       bDescriptorSubType = 0x01
        RAW dump:
        0x00 | 0x07, 0x25, 0x01, 0x00, 0x00, 0x00, 0x00



     Interface 2 Alt 4
       bLength = 0x000b
       bDescriptorType = 0x0004
       bInterfaceNumber = 0x0002
       bAlternateSetting = 0x0004
       bNumEndpoints = 0x0001
       bInterfaceClass = 0x0001  <Audio device>
       bInterfaceSubClass = 0x0002
       bInterfaceProtocol = 0x0000
       iInterface = 0x0000  <no string>

       Additional Descriptor

       bLength = 0x07
       bDescriptorType = 0x24
       bDescriptorSubType = 0x01
        RAW dump:
        0x00 | 0x07, 0x24, 0x01, 0x03, 0x01, 0x01, 0x00


       Additional Descriptor

       bLength = 0x0b
       bDescriptorType = 0x24
       bDescriptorSubType = 0x02
        RAW dump:
        0x00 | 0x0b, 0x24, 0x02, 0x01, 0x01, 0x02, 0x10, 0x01,
        0x08 | 0x40, 0x1f, 0x00


      Endpoint 0
         bLength = 0x0009
         bDescriptorType = 0x0005
         bEndpointAddress = 0x0084  <IN>
         bmAttributes = 0x0001  <ISOCHRONOUS>
         wMaxPacketSize = 0x0010
         bInterval = 0x0001
         bRefresh = 0x0000
         bSynchAddress = 0x0000

       Additional Descriptor

       bLength = 0x07
       bDescriptorType = 0x25
       bDescriptorSubType = 0x01
        RAW dump:
        0x00 | 0x07, 0x25, 0x01, 0x00, 0x00, 0x00, 0x00


Regards,

-- 
José Pérez


More information about the freebsd-multimedia mailing list