【问题标题】:Use iSerialNumber USB device descriptor to uniquely identify GoPro Camera使用 iSerialNumber USB 设备描述符来唯一标识 GoPro 摄像机
【发布时间】:2014-09-18 12:52:14
【问题描述】:

我感兴趣的字段是来自以下输出的 iSerial:lsusb -d <idVendor>:<idProduct> -v

非唯一 iSerialNumber 的示例输出:

Device Descriptor:
  bLength                18
  bDescriptorType         1
  bcdUSB               1.10
  bDeviceClass          239 Miscellaneous Device
  bDeviceSubClass         2 ?
  bDeviceProtocol         1 Interface Association
  bMaxPacketSize0        64
  idVendor           0x0402 ALi Corp.
  idProduct          0x9665 Gateway Webcam
  bcdDevice            0.09
  iManufacturer           3 
  iProduct                1 
  iSerial                 0  <-- Three string descriptors exist to provide details of the manufacturer, product and serial number. There is no requirement to have string descriptors. If no string descriptor is present, a index of zero should be used.
  bNumConfigurations      1
  Configuration Descriptor:

据我所知,iSerialNumber 并不总是包含唯一可识别的字符串值。 例如 Iphone 和 Ipad 包含此信息,但我测试过的其他一些设备没有此值。 根据USB standard,字符串描述符不是强制性的。

拥有 GoPro 的人能否告诉我它是否有序列号的字符串描述符?

我还没有相机。

【问题讨论】:

    标签: linux usb udev gopro lsusb


    【解决方案1】:

    我的返回iSerial 3 123456789ABC,我用Hero3 Black Edition测试过

    这是完整的结果:

    Bus 001 Device 004: ID 2672:0004  
    Device Descriptor:
      bLength                18
      bDescriptorType         1
      bcdUSB               2.00
      bDeviceClass            0 (Defined at Interface level)
      bDeviceSubClass         0 
      bDeviceProtocol         0 
      bMaxPacketSize0        64
      idVendor           0x2672 
      idProduct          0x0004 
      bcdDevice            0.00
      iManufacturer           1 GoPro
      iProduct                2 Storage
      iSerial                 3 123456789ABC
      bNumConfigurations      2
      Configuration Descriptor:
        bLength                 9
        bDescriptorType         2
        wTotalLength           32
        bNumInterfaces          1
        bConfigurationValue     1
        iConfiguration          0 
        bmAttributes         0xc0
          Self Powered
        MaxPower                4mA
        Interface Descriptor:
          bLength                 9
          bDescriptorType         4
          bInterfaceNumber        0
          bAlternateSetting       0
          bNumEndpoints           2
          bInterfaceClass         8 Mass Storage
          bInterfaceSubClass      6 SCSI
          bInterfaceProtocol     80 Bulk-Only
          iInterface              0 
          Endpoint Descriptor:
            bLength                 7
            bDescriptorType         5
            bEndpointAddress     0x01  EP 1 OUT
            bmAttributes            2
              Transfer Type            Bulk
              Synch Type               None
              Usage Type               Data
            wMaxPacketSize     0x0200  1x 512 bytes
            bInterval               0
          Endpoint Descriptor:
            bLength                 7
            bDescriptorType         5
            bEndpointAddress     0x81  EP 1 IN
            bmAttributes            2
              Transfer Type            Bulk
              Synch Type               None
              Usage Type               Data
            wMaxPacketSize     0x0200  1x 512 bytes
            bInterval               0
      Configuration Descriptor:
        bLength                 9
        bDescriptorType         2
        wTotalLength           32
        bNumInterfaces          1
        bConfigurationValue     2
        iConfiguration          0 
        bmAttributes         0xc0
          Self Powered
        MaxPower                2mA
        Interface Descriptor:
          bLength                 9
          bDescriptorType         4
          bInterfaceNumber        0
          bAlternateSetting       0
          bNumEndpoints           2
          bInterfaceClass         8 Mass Storage
          bInterfaceSubClass      6 SCSI
          bInterfaceProtocol     80 Bulk-Only
          iInterface              0 
          Endpoint Descriptor:
            bLength                 7
            bDescriptorType         5
            bEndpointAddress     0x01  EP 1 OUT
            bmAttributes            2
              Transfer Type            Bulk
              Synch Type               None
              Usage Type               Data
            wMaxPacketSize     0x0200  1x 512 bytes
            bInterval               0
          Endpoint Descriptor:
            bLength                 7
            bDescriptorType         5
            bEndpointAddress     0x81  EP 1 IN
            bmAttributes            2
              Transfer Type            Bulk
              Synch Type               None
              Usage Type               Data
            wMaxPacketSize     0x0200  1x 512 bytes
            bInterval               0
    Device Qualifier (for other device speed):
      bLength                10
      bDescriptorType         6
      bcdUSB               2.00
      bDeviceClass            0 (Defined at Interface level)
      bDeviceSubClass         0 
      bDeviceProtocol         0 
      bMaxPacketSize0        64
      bNumConfigurations      2
    Device Status:     0x0001
      Self Powered
    

    【讨论】:

    • @BenVoigt,是的,正是我的想法!
    猜你喜欢
    • 2022-09-29
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2012-03-21
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多