Getting started with USB client driver development
This section introduces you to USB driver development. The section applies to you if you are new to driver development; want to implement a driver for a USB device, for which Microsoft does not provide an in-box driver. Such a driver is termed as a USB client driver in this documentation set. 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.
As a driver developer, you must have coding experience in the C programming language, and understand the concepts of function pointers, callback functions, and event handlers. If you are going to write a driver based on the User-Mode Driver Framework, make sure that you familiarize yourself with C++ and COM.
Learning path for USB client driver developers
Learning step | After completing the step, you should be able to ... |
---|---|
Step 1—Read the Official USB specification version 2.0 and 3.0. | 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. |
Step 2—Obtain a test USB device. |
|
Step 3—Study your 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, you can browse all USB controllers and the USB devices connected to them, and also inspect the device configuration. |
Step 4—Choose a driver model for developing a USB client driver. | Determine whether you should write a custom driver or use one of the Microsoft-provided drivers based on the design of your device. For writing a driver, choose the best driver model and describe the features supported by each model. |
Step 5—Familiarize yourself with the Microsoft-provided USB driver stack and driver development concepts.
|
|
Step 6—Prepare your development and debugging environment. |
|
Step 7—Write your first driver. | Write, build, and install your first USB client driver by using the USB templates included with Visual Studio 2012. You should be able to describe framework driver, device, and queue objects and understand how the framework communicates with your driver. |
Step 8—Extend your driver by sending a USB control transfer request. | Send standard control requests and vendor commands to your device. For more information, see How to send a USB control transfer. |
Step 9—Extend your driver to use WDF USB I/O target objects to perform USB data transfers. USB data transfers. |
Extend your driver to perform common tasks. This topic lists the "How to" topics in this documentation set that provide step-by-step guidance about those tasks. |
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 - ntdev
-
Discussion list managed by OSR Online for kernel-mode driver developers.
- USB Technologies
-
Miscellaneous resources based on frequently asked questions from developers who are new to developing USB devices and drivers that work with Windows operating systems.
- Windows Dev-Center for Hardware Development
-
Download the latest tools for driver development, ensure that your product is reliable and compatible with Windows through the Windows Certification Program, learn Windows hardware development samples.
Related topics
- 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