0000 00 c6 0a 07 81 ff ff ff 43 02 80 03 01 00 2d 00 ........C.....-.
0010 25 2a e5 65 00 00 00 00 ea f1 04 00 00 00 00 00 %*.e............
0020 fb 03 00 00 fb 03 00 00 00 00 00 00 00 00 00 00 ................
0030 00 00 00 00 00 00 00 00 00 02 00 00 00 00 00 00 ................
上述的这些是描述URB的状态
0040 09 02 fb 03 06 01 04 80 fa 08 0b 00 03 01 02 00 ................
这里面有一个9个Byte的描述符 USB_DT_CONFIG
09 02 fb 03 06 01 04 80 fa
struct usb_config_descriptor {
__u8 bLength;
__u8 bDescriptorType;
__le16 wTotalLength;
__u8 bNumInterfaces;
__u8 bConfigurationValue;
__u8 iConfiguration;
__u8 bmAttributes;
__u8 bMaxPower;
} __attribute__ ((packed));
__u8 bLength; ------------------------------09
__u8 bDescriptorType; ------------------------------02
__le16 wTotalLength; ------------------------------03fb
__u8 bNumInterfaces; ------------------------------06
__u8 bConfigurationValue; ------------------------------01
__u8 iConfiguration; ------------------------------04
__u8 bmAttributes; ------------------------------80
__u8 bMaxPower; ------------------------------fa
其中的bDescriptorType,这里的02代表的是USB_DT_CONFIG
#define USB_DT_DEVICE 0x01
#define USB_DT_CONFIG 0x02
#define USB_DT_STRING 0x03
#define USB_DT_INTERFACE 0x04
#define USB_DT_ENDPOINT 0x05
#define USB_DT_DEVICE_QUALIFIER 0x06
#define USB_DT_OTHER_SPEED_CONFIG 0x07
#define USB_DT_INTERFACE_POWER 0x08
#define USB_DT_OTG 0x09
#define USB_DT_DEBUG 0x0a
#define USB_DT_INTERFACE_ASSOCIATION 0x0b
#define USB_DT_SECURITY 0x0c
#define USB_DT_KEY 0x0d
#define USB_DT_ENCRYPTION_TYPE 0x0e
#define USB_DT_BOS 0x0f
#define USB_DT_DEVICE_CAPABILITY 0x10
#define USB_DT_WIRELESS_ENDPOINT_COMP 0x11
#define USB_DT_WIRE_ADAPTER 0x21
#define USB_DT_RPIPE 0x22
#define USB_DT_CS_RADIO_CONTROL 0x23
#define USB_DT_PIPE_USAGE 0x24
#define USB_DT_SS_ENDPOINT_COMP 0x30
#define USB_DT_SSP_ISOC_ENDPOINT_COMP 0x31
0040 08 0b 00 03 01 02 00 ................
0050 05 ...........$...N
这里面有一个8个Byte的描述符 USB_DT_INTERFACE_ASSOCIATION
08 0b 00 03 01 02 00 05
struct usb_interface_assoc_descriptor {
__u8 bLength;
__u8 bDescriptorType;
__u8 bFirstInterface;
__u8 bInterfaceCount;
__u8 bFunctionClass;
__u8 bFunctionSubClass;
__u8 bFunctionProtocol;
__u8 iFunction;
} __attribute__ ((packed));
__u8 bLength; ------------------------------08
__u8 bDescriptorType; ------------------------------0b
__u8 bFirstInterface; ------------------------------00
__u8 bInterfaceCount; ------------------------------03
__u8 bFunctionClass; ------------------------------01
__u8 bFunctionSubClass; ------------------------------02
__u8 bFunctionProtocol; ------------------------------00
__u8 iFunction; ------------------------------05
0050 05 09 04 00 00 01 01 01 00 06 0a 24 01 00 01 4e ...........$...N
这里面有一个9个Byte的描述符 USB_DT_INTERFACE
09 04 00 00 01 01 01 00 06
struct usb_interface_descriptor {
__u8 bLength;
__u8 bDescriptorType;
__u8 bInterfaceNumber;
__u8 bAlternateSetting;
__u8 bNumEndpoints;
__u8 bInterfaceClass;
__u8 bInterfaceSubClass;
__u8 bInterfaceProtocol;
__u8 iInterface;
} __attribute__ ((packed));
__u8 bLength; ------------------------------09
__u8 bDescriptorType; ------------------------------04
__u8 bInterfaceNumber; ------------------------------00
__u8 bAlternateSetting; ------------------------------00
__u8 bNumEndpoints; ------------------------------01
__u8 bInterfaceClass; ------------------------------01
__u8 bInterfaceSubClass; ------------------------------01
__u8 bInterfaceProtocol; ------------------------------00
__u8 iInterface; ------------------------------06
这里的bInterfaceClass
#define USB_CLASS_PER_INTERFACE 0 /* for DeviceClass */
#define USB_CLASS_AUDIO 1
#define USB_CLASS_COMM 2
#define USB_CLASS_HID 3
#define USB_CLASS_PHYSICAL 5
#define USB_CLASS_STILL_IMAGE 6
#define USB_CLASS_PRINTER 7
#define USB_CLASS_MASS_STORAGE 8
#define USB_CLASS_HUB 9
#define USB_CLASS_CDC_DATA 0x0a
#define USB_CLASS_CSCID 0x0b /* chip+ smart card */
#define USB_CLASS_CONTENT_SEC 0x0d /* content security */
#define USB_CLASS_VIDEO 0x0e
#define USB_CLASS_WIRELESS_CONTROLLER 0xe0
#define USB_CLASS_MISC 0xef
#define USB_CLASS_APP_SPEC 0xfe
#define USB_CLASS_VENDOR_SPEC 0xff
#define USB_SUBCLASS_VENDOR_SPEC 0xff
0050 0a 24 01 00 01 4e ...........$...N
0060 00 02 01 02 .....$..........
这里面有一个10个Byte的描述符 USB_DT_INTERFACE