wire / wire-format / usb-descriptor

USB device descriptor

A USB device descriptor is the first descriptor retrieved by the host during enumeration. It describes the device's USB version, class, subclass, protocol, max packet size, vendor/product IDs, and number of configurations. The descriptor is 18 bytes: bLength (1), bDescriptorType (1, = 0x01 for device), bcdUSB (2), bDeviceClass (1), bDeviceSubClass (1), bDeviceProtocol (1), bMaxPacketSize0 (1), idVendor (2), idProduct (2), bcdDevice (2), iManufacturer (1), iProduct (1), iSerialNumber (1), bNumConfigurations (1).

wire-format kind wire-format status standard verification verified tier B wire-format@1

aka: USB device descriptor

wire format

spec: USB 2.0 specification

A USB device descriptor is the first descriptor retrieved by the host during enumeration. It describes the device's USB version, class, subclass, protocol, max packet size, vendor/product IDs, and number of configurations. The descriptor is 18 bytes: bLength (1), bDescriptorType (1, = 0x01 for device), bcdUSB (2), bDeviceClass (1), bDeviceSubClass (1), bDeviceProtocol (1), bMaxPacketSize0 (1), idVendor (2), idProduct (2), bcdDevice (2), iManufacturer (1), iProduct (1), iSerialNumber (1), bNumConfigurations (1).

fieldsizemeaning
bLength1 byteSize of this descriptor (18).
bDescriptorType1 byte0x01 (DEVICE).
bcdUSB2 bytes (BCD)USB specification version (e.g. 0x0200 for USB 2.0, 0x0300 for USB 3.0, 0x0310 for USB 3.1).
bDeviceClass1 byteDevice class (0 = use interface descriptors, 0x02 = CDC, 0x03 = HID, 0x08 = Mass Storage, 0x09 = Hub, 0x0E = Video, 0xE0 = Wireless, 0xEF = Miscellaneous).
bDeviceSubClass1 byteSubclass (class-specific).
bDeviceProtocol1 byteProtocol (class-specific).
bMaxPacketSize01 byteMax packet size for endpoint 0 (8, 16, 32, or 64 for USB 2.0; 9 for USB 3.0).
idVendor2 bytesVendor ID (assigned by USB-IF).
idProduct2 bytesProduct ID (assigned by vendor).
bcdDevice2 bytes (BCD)Device release number.
iManufacturer1 byteIndex of manufacturer string descriptor (0 = none).
iProduct1 byteIndex of product string descriptor.
iSerialNumber1 byteIndex of serial number string descriptor.
bNumConfigurations1 byteNumber of possible configurations.

example:

12 01 00 02 00 00 00 40 00 00 00 00 00 00 00 00 00 01

USB device descriptor: 18 bytes, USB 2.0, max packet 64, 1 configuration


provenance

agent: curl -H 'accept: application/json' wire.phall.io/wire-format/usb-descriptor or /wire-format/usb-descriptor.json