Engineers Garage

  • Electronic Projects & Tutorials
    • Electronic Projects
      • Arduino Projects
      • AVR
      • Raspberry pi
      • ESP8266
      • BeagleBone
      • 8051 Microcontroller
      • ARM
      • PIC Microcontroller
      • STM32
    • Tutorials
      • Audio Electronics
      • Battery Management
      • Brainwave
      • Electric Vehicles
      • EMI/EMC/RFI
      • Hardware Filters
      • IoT tutorials
      • Power Tutorials
      • Python
      • Sensors
      • USB
      • VHDL
    • Circuit Design
    • Project Videos
    • Components
  • Articles
    • Tech Articles
    • Insight
    • Invention Stories
    • How to
    • What Is
  • News
    • Electronic Product News
    • Business News
    • Company/Start-up News
    • DIY Reviews
    • Guest Post
  • Forums
    • EDABoard.com
    • Electro-Tech-Online
    • EG Forum Archive
  • DigiKey Store
    • Cables, Wires
    • Connectors, Interconnect
    • Discrete
    • Electromechanical
    • Embedded Computers
    • Enclosures, Hardware, Office
    • Integrated Circuits (ICs)
    • Isolators
    • LED/Optoelectronics
    • Passive
    • Power, Circuit Protection
    • Programmers
    • RF, Wireless
    • Semiconductors
    • Sensors, Transducers
    • Test Products
    • Tools
  • Learn
    • eBooks/Tech Tips
    • Design Guides
    • Learning Center
    • Tech Toolboxes
    • Webinars & Digital Events
  • Resources
    • Digital Issues
    • EE Training Days
    • LEAP Awards
    • Podcasts
    • Webinars / Digital Events
    • White Papers
    • Engineering Diversity & Inclusion
    • DesignFast
  • Guest Post Guidelines
  • Advertise
  • Subscribe

USB Descriptors and their Types (Part 3/6)

By Amanpreet Singh May 20, 2025

Now that we have discussed the basic details of USB protocol encompassing types of USB packets and transfers, the next topic in the series is USB Descriptors. In context to USB interface, Descriptors are formatted blocks of information, through which, the host device learns about the peripheral. It helps in identifying and configuring the peripheral device.

A Descriptor contains information like type of the device, Vendor ID, Compliant USB Version, number of configurations device supports, number of endpoints, etc. The USB peripheral must respond with descriptors when requested by the host. During enumeration, the host uses control transfer to request the device for descriptors.

Descriptor Types

There are mainly five types of descriptors

• Device Descriptors

• Configuration Descriptors

• Interface Descriptors

• Endpoint Descriptors

• String Descriptors

During enumeration, the host requests for the higher level descriptors. As enumeration progresses, the higher level descriptors inform the host about the lower level descriptors (if any).  The descriptors contain a number of fields and most of them use prefix to indicate the format or content type. The common prefixes are: b = byte (8 bits), w = word (16 bits), bcd = binary coded decimal, bm = bitmap (bit array), i = index, id = identifier.

Each descriptor contains a series of fields and follows a common format. The first byte specifies the length of the descriptor while the second byte indicates the type of descriptor.

Descriptor Types

bLength – This field provides the length of the descriptor in bytes.

bDescriptionType – This field indicates the type of descriptor.

type of descriptor.

Device Descriptors

The device descriptor provides the basic information about the device. It represents the entire USB device. It is the first descriptor read by the host. The host receives this descriptor after sending Get_Descriptor request.

The descriptor contains fields containing device specific information like USB version, device class, Product ID, Vendor ID, number of configurations supported by device, etc. Check out the table below to learn about common fields included in device descriptors.

device descriptors

Device_qualifier Descriptors

USB Devices that support both full and high speed modes must have a device_qualifier Descriptor. When the USB device switches its speed mode, values in some fields get changed in device descriptor. The device_qualifier descriptor provides information only about those field values that get changed when device switches to an alternate speed mode. This descriptor contains following fields out of which first two are common while other changes specific to the device.

Device_qualifier Descriptors

Configuration Descriptors

A USB device can have one or more configurations. Most devices only have one configuration. The configuration provides information related to power source, power consumption, and number of interfaces.

The bNumConfigurations in device descriptor tells the host about the number of possible configurations. The host uses Set_Configuration request to select a configuration and Get_Configuration request to read the currently selected configuration.

The configuration descriptor contains following fields.

Configuration Descriptors

Other_speed_configuration Descriptors

This descriptor is for devices which support both full and high speed modes. It returns the configuration for the speed mode currently not active. The structure is same as configuration descriptor except for the field value for bDescriptor type, which is 0x07.

Interface Descriptors

A configuration can have one or more interfaces that can be taken as features or functions implemented by the device. The interface descriptor provides information related to particular feature of the device like class, subclass, protocol and number of endpoints interface uses.

The bNumInterfaces in configuration descriptor tells the host about the number of possible interfaces. After selecting a configuration, the host uses Set_Interface request to select an interface and Get_Interface request to read the currently selected interface.

It is possible to activate multiple interfaces at the same time for a configuration. The devices in which multiple interfaces are active are known as composite devices.

Interface Descriptors

Endpoint Descriptors

The Endpoint Descriptor describes the endpoints associated with an interface. There is no descriptor for default endpoint zero. The endpoint zero is control endpoint and is configured even before the request of any descriptor. The information contained in this descriptor is used to determine  the bandwidth required by the USB bus.

This descriptor includes following fields – :

Endpoint Descriptors

String Descriptors

String descriptors contain human readable texts. They are generally used to provide information. Other descriptors contain index value that points to strings containing information for manufacturer, product, serial number, configuration, interface. Other descriptors like Class and Vendor Specific can contain indexes to string descriptors

The Strings are encoded in Unicode format and multiple languages are supported. The host can get the list of supported languages using Get_Descriptor request with 0 in wIndex field. The device returns the String descriptor containing codes for different languages. The first 2 fields are mandatory fields and other fields contain language codes.

String Descriptors

Thereafter, all the subsequent string descriptor (beyond index 0) have string contents and should conform to the following format.

Format of string descriptor

Other Standard Descriptors

According to USB 2.0 specifications, there are additional descriptors for other specific purposes. These are as follows- :

interface_association Descriptor: This is for composite devices that have more than one interface for a single function or feature.

Interface_power Descriptor:  It was proposed by Microsoft 1998 but hasn’t been implemented. The aim to propose this descriptor was to give the ability to interfaces to manage their own power consumption individually.

OTG Descriptor: This descriptor is required for devices that support OTG Host Negotiation Protocol (HNP) or Session Request Protocol.

Debug descriptors: The debug descriptor is used by debug devices for debugging purposes.

In the next part of the USB series, we will discuss USB requests and stages of control transfer.

You may also like:


  • What are the top development boards for AI and ML?

  • What are LoRa gateways and what types are available?

  • How does LoRa modulation enable long-range communication?

  • What are the different EV charging protocols?

  • What is IP geofencing?
  • Getting Started With Arduino With Simple LED Blinking Code Circuit Setup On Breadboard
    Getting started with Arduino – (Part 1/49)

Filed Under: Tutorials, USB

 

Next Article

← Previous Article
Next Article →

Questions related to this article?
👉Ask and discuss on EDAboard.com and Electro-Tech-Online.com forums.



Tell Us What You Think!! Cancel reply

You must be logged in to post a comment.

EE TECH TOOLBOX

“ee
Tech Toolbox: Internet of Things
Explore practical strategies for minimizing attack surfaces, managing memory efficiently, and securing firmware. Download now to ensure your IoT implementations remain secure, efficient, and future-ready.

EE Learning Center

EE Learning Center
“engineers
EXPAND YOUR KNOWLEDGE AND STAY CONNECTED
Get the latest info on technologies, tools and strategies for EE professionals.

HAVE A QUESTION?

Have a technical question about an article or other engineering questions? Check out our engineering forums EDABoard.com and Electro-Tech-Online.com where you can get those questions asked and answered by your peers!


RSS EDABOARD.com Discussions

  • Reducing "shoot-through" in offline Full Bridge SMPS?
  • High Side current sensing
  • How to simulate power electronics converter in PSpice?
  • Voltage mode pushpull is a nonsense SMPS?
  • Layout IRN reduction in Comparator

RSS Electro-Tech-Online.com Discussions

  • Back to the old BASIC days
  • Parts required for a personal project
  • PIC KIT 3 not able to program dsPIC
  • Failure of polypropylene motor-run capacitors
  • Siemens large industrial PLC parts

Featured – RPi Python Programming (27 Part)

  • RPi Python Programming 21: The SIM900A AT commands
  • RPi Python Programming 22: Calls & SMS using a SIM900A GSM-GPRS modem
  • RPi Python Programming 23: Interfacing a NEO-6MV2 GPS module with Raspberry Pi
  • RPi Python Programming 24: I2C explained
  • RPi Python Programming 25 – Synchronous serial communication in Raspberry Pi using I2C protocol
  • RPi Python Programming 26 – Interfacing ADXL345 accelerometer sensor with Raspberry Pi

Recent Articles

  • What is AWS IoT Core and when should you use it?
  • AC-DC power supply extends voltage range to 800 V DC
  • Infineon’s inductive sensor integrates coil system driver, signal conditioning circuits and DSP
  • Arm Cortex-M23 MCU delivers 87.5 µA/MHz active mode
  • STMicroelectronics releases automotive amplifiers with in-play open-load detection

EE ENGINEERING TRAINING DAYS

engineering

Submit a Guest Post

submit a guest post
Engineers Garage
  • Analog IC TIps
  • Connector Tips
  • Battery Power Tips
  • DesignFast
  • EDABoard Forums
  • EE World Online
  • Electro-Tech-Online Forums
  • EV Engineering
  • Microcontroller Tips
  • Power Electronic Tips
  • Sensor Tips
  • Test and Measurement Tips
  • 5G Technology World
  • Subscribe to our newsletter
  • About Us
  • Contact Us
  • Advertise

Copyright © 2025 WTWH Media LLC. All Rights Reserved. The material on this site may not be reproduced, distributed, transmitted, cached or otherwise used, except with the prior written permission of WTWH Media
Privacy Policy

Search Engineers Garage

  • Electronic Projects & Tutorials
    • Electronic Projects
      • Arduino Projects
      • AVR
      • Raspberry pi
      • ESP8266
      • BeagleBone
      • 8051 Microcontroller
      • ARM
      • PIC Microcontroller
      • STM32
    • Tutorials
      • Audio Electronics
      • Battery Management
      • Brainwave
      • Electric Vehicles
      • EMI/EMC/RFI
      • Hardware Filters
      • IoT tutorials
      • Power Tutorials
      • Python
      • Sensors
      • USB
      • VHDL
    • Circuit Design
    • Project Videos
    • Components
  • Articles
    • Tech Articles
    • Insight
    • Invention Stories
    • How to
    • What Is
  • News
    • Electronic Product News
    • Business News
    • Company/Start-up News
    • DIY Reviews
    • Guest Post
  • Forums
    • EDABoard.com
    • Electro-Tech-Online
    • EG Forum Archive
  • DigiKey Store
    • Cables, Wires
    • Connectors, Interconnect
    • Discrete
    • Electromechanical
    • Embedded Computers
    • Enclosures, Hardware, Office
    • Integrated Circuits (ICs)
    • Isolators
    • LED/Optoelectronics
    • Passive
    • Power, Circuit Protection
    • Programmers
    • RF, Wireless
    • Semiconductors
    • Sensors, Transducers
    • Test Products
    • Tools
  • Learn
    • eBooks/Tech Tips
    • Design Guides
    • Learning Center
    • Tech Toolboxes
    • Webinars & Digital Events
  • Resources
    • Digital Issues
    • EE Training Days
    • LEAP Awards
    • Podcasts
    • Webinars / Digital Events
    • White Papers
    • Engineering Diversity & Inclusion
    • DesignFast
  • Guest Post Guidelines
  • Advertise
  • Subscribe