First steps for USB client driver development

This section introduces USB driver development concepts and tools. The section applies to devlopers new to driver development that wish to implement a driver for a USB device that Microsoft does not provide an in-box driver for. These drivers are called a USB client driver in this documentation. The topics in this section describe high-level USB concepts and provide step-by-step instructions about performing common tasks of a USB client driver. For detailed information about those concepts see USB specifications at USB Documents.

Driver developers must have coding experience in the C++ programming language and understand the concepts of function pointers, callback functions, and event handlers. If writing a driver based on the User-Mode Driver Framework the developer must be familiar with C++ and COM.

Learning path for USB client driver developers

  1. Read the USB Specification 3.2.

    • Learn about the industry specification and different components (device, host controller, and hub) of the architecture. It's important to understand the data flow model, how the host and device communicate with each other, and the format of the requests that the device expects.
  2. Obtain a test USB device.

    • Have a USB device and its hardware specification. The specification describes device capabilities and the supported vendor commands. Use the specification to determine the functionality of the device driver and the related design decisions.

    • Have the OSR USB FX2 learning kit if new to USB driver development. The kit is the most suitable to study USB samples included in this documentation set.

    • Have a Microsoft USB Test Tool (MUTT) devices. MUTT hardware can be purchased from JJG Technologies. The device does not have installed firmware installed. To install firmware, download the MUTT software package. For more information, see the documentation included with the package.

  3. Study the USB device layout and the related USB descriptors.

    • Describe your device capabilities by reading the configuration descriptor, interface descriptors for each supported alternate settings, and their endpoint descriptors. By using USBView, the developer can browse all USB controllers and the USB devices connected to them and also inspect the device configuration.
  4. Choose a driver model for developing a USB client driver

    • Determine if the driver should be a custom driver or use one of the Microsoft-provided drivers based on the design of the target device. Choose the best driver model and describe the features supported by each model.
  5. Review the Microsoft-provided USB driver stack and driver development concepts.

  6. Prepare the development and debugging environment.

  7. Write your first driver.

  8. Extend your driver by sending a USB control transfer request.

  9. Extend your driver to use WDF USB I/O target objects to perform USB data transfers.

Community Resources for USB

Microsoft Windows USB Core Team Blog Check out posts written by the Microsoft USB Team. The blog focuses on the Windows USB driver stack that works with various USB Host controllers and USB hubs found in Windows PC. A useful resource for USB client driver developers and USB hardware designers understand the driver stack implementation, resolve common issues, and explain how to use tools for gathering traces and log files.

OSR Online Lists
Discussion list managed by OSR Online for kernel-mode driver developers.

Windows Dev-Center for Hardware Development

Windows Driver Kit, ensure that your product is reliable and compatible with Windows through the Windows Hardware Lab Kit, learn Windows driver samples.

Universal Serial Bus (USB) Drivers
How to enable USB selective suspend and system wake in the UMDF driver for a USB device
USB Driver Development Guide