USB Component  Version 5.1
MDK-Professional Middleware for USB Device and Host
 All Data Structures Functions Variables Enumerations Enumerator Groups Pages
Device Descriptor

The Device Descriptor is the root of the descriptor tree and contains basic device information. The unique numbers, idVendor and idProduct, identify the connected device. The Windows operating system uses these numbers to determine which device driver must be loaded.

idVendor is the number assigned to each company producing USB-based devices. The USB Implementers Forum is responsible for administering the assignment of Vendor IDs.

The idProduct is another 16-bit field containing a number assigned by the manufacturer to identify a specific product.

Offset Field Size Value Description
0 bLength 1 Number Size of this descriptor in bytes.
1 bDescriptorType 1 Constant Device Descriptor Type.
2 bcdUSB 2 BCD

USB Specification Release Number in Binary-Coded Decimal (i.e., 2.10 is 210H).

This field identifies the release of the USB Specification with which the device and its descriptors are compliant.

4 bDeviceClass 1 Class

Class code (assigned by the USB-IF).

If this field is

  • reset to zero, each interface within a configuration specifies its own class information and the various interfaces operate independently.
  • set to a value between 1 and FEH, the device supports different class specifications on different interfaces and the interfaces may not operate independently. This value identifies the class definition used for the aggregate interfaces.
  • set to FFH, the device class is vendor-specific.
5 bDeviceSubClass 1 SubClass

Subclass code (assigned by the USB-IF).

These codes are qualified by the value of the bDeviceClass field.

If bDeviceClass is

  • reset to zero, this field must also be reset to zero.
  • not set to FFH, all values are reserved for assignment by the USB-IF.
6 bDeviceProtocol 1 Protocol

Protocol code (assigned by the USB-IF).

These codes are qualified by the value of the bDeviceClass and bDeviceSubClass fields. If a device supports class-specific protocols on a device basis as opposed to an interface basis, this code identifies the protocols that the device uses as defined by the specification of the device class.

If this field is

  • reset to zero, the device does not use class specific protocols on a device basis. However, it may use class specific protocols on an interface basis.
  • set to FFH, the device uses a vendor-specific protocol on a device basis.
7 bMaxPacketSize0 1 Number Maximum packet size for Endpoint zero (only 8, 16, 32, or 64 are valid).
8 idVendor 2 ID Vendor ID (assigned by the USB-IF).
10 idProduct 2 ID Product ID (assigned by the manufacturer).
12 bcdDevice 2 BCD Device release number in binary-coded decimal.
14 iManufacturer 1 Index Index of string descriptor describing manufacturer.
15 iProduct 1 Index Index of string descriptor describing product.
16 iSerialNumber 1 Index Index of string descriptor describing the device's serial number.
17 bNumConfigurations 1 Number Number of possible configurations.