USB helps connect the enterprise

Universal Serial Bus (USB) is an open industry standard providing a simple and inexpensive way to connect up to 127 devices to a single computer port. With USB, many computer peripherals, such as keyboards, mice, digital cameras, digital scanners, bar-code readers, modems, and specialty printers can all run at the same time.

01/01/2001


Universal Serial Bus (USB) is an open industry standard providing a simple and inexpensive way to connect up to 127 devices to a single computer port. With USB, many computer peripherals, such as keyboards, mice, digital cameras, digital scanners, bar-code readers, modems, and specialty printers can all run at the same time.

USB is a dynamically reconfigurable serial bus with an elementary data rate of 12 Mbps, and is based on off-the-shelf, low-cost microcontroller technology. Its modular, layered software protocol supports sophisticated device drivers and application programs.

A USB driver on Win32 Driver Model (WDM) platforms is known as a client driver. It is a layered driver, meaning that it is layered above the hub drivers and does not access the hardware directly. Instead, the client driver makes requests to another driver, which carries out the requests. This layered relationship is referred to as a driver stack and is a common architecture for WDM drivers.



A USB driver on Win32 Driver Model is known as a client driver
meaning that it is layered above the hub drivers and does not
access the hardware directly.

Drivers, standards

At the bottom of the driver stack is the driver that controls the USB hub (see figure). There are two standards for these hub controller drivers: Intel's Universal Host Controller Interface (UHCI) and the industry standard Open Host Controller

Interface (OHCI). Most machines built around Intel-designed motherboards use an UHCI controller, while most add-in cards and other motherboards use OHCI controllers. Although differences exist in the way the hub operates, these differences are not important to the client driver.

The most important element of the Microsoft-written components of the driver stack is the USB bus driver, usbd.sys , through which client drivers perform all communication. Usbd.sys presents an interface to client drivers that allow clients to perform USB transfers without having to know the intricacies of a particular hub controller.

USB driver detects device

The USB client driver performs two major tasks: device enumeration and device operation. During device enumeration, the client driver obtains all the configuration information it needs from the USB device, including relevant descriptors, and performs other tasks, such as selecting a configuration. During normal operation of the device, requests from user programs are handled and communication is performed with the device.

There is a distinct series of actions that are always performed when a device is plugged in, and it is crucial that the device handle these actions correctly.

When the host detects a new device, the first action it performs is to send a GET_DESCRIPTOR command for the device descriptor on the default control endpoint. The device will begin returning the descriptor on the default endpoint, but it is important to know that the operating system will read only one packet of the descriptor. After receiving one packet, apparently to confirm that the device is working, a zero length OUT packet is sent to terminate the transfer. If the device does not correctly handle the situation of an aborted transfer of a descriptor, the device will not enumerate.

The second step the host performs during enumeration is sending a SET_ADDRESS request on the default endpoint. This is performed automatically by the operating system and the device merely needs to accept the request.

The next step the host performs is sending another GET_DESCRIPTOR command for the device descriptor. On this request, however, the host will obtain all 18 bytes of the device descriptor. The operating system will use information in the descriptor to determine what device driver to load. The idVendor, idProduct and bDeviceClass fields are all used by the operating system to load drivers. The final step the host performs before handing control over to the device driver is obtaining the configuration descriptor. At this point, the operating system will load the device driver that it selects to control the new device.

USB is a modern bus standard that supports a vast range of peripherals; however, the complexity of the drivers is likewise increased. Commercially available device driver toolkits (such as bSquare's WinDK and USB Extension) make the development of drivers an easier task than just using the DDK.

We will soon see new peripherals using USB hastening the acceptance of the bus into the mainstream.


Author Information
Bill Kyle, director of marketing, Platform Technologies bSquare Corp. (Bellevue, Wash.)




The Engineers' Choice Awards highlight some of the best new control, instrumentation and automation products as chosen by Control Engineering subscribers. Vote now (if qualified)!
The System Integrator Giants program lists the top 100 system integrators among companies listed in CFE Media's Global System Integrator Database.
Each year, a panel of Control Engineering and Plant Engineering editors and industry expert judges select the System Integrator of the Year Award winners in three categories.
This eGuide illustrates solutions, applications and benefits of machine vision systems.
Learn how to increase device reliability in harsh environments and decrease unplanned system downtime.
This eGuide contains a series of articles and videos that considers theoretical and practical; immediate needs and a look into the future.
Maximize ROI with integrated control system approach; Microcontrollers vs. PLCs; Power quality; Accelerate and rewire IIoT; Traits for excellent engineers
HMI effectiveness; Distributed I/O; Engineers' Choice Award finalists; System Integrator advice; Inside Machines
Women in engineering; Engineering Leaders Under 40; PID benefits and drawbacks; Ladder logic; Cloud computing
Programmable logic controllers (PLCs) represent the logic (decision) part of the control loop of sense, decide, and actuate. As we know, PLCs aren’t the only option for making decisions in a control loop, but they are likely why you’re here.
This digital report explains how plant engineers and subject matter experts (SME) need support for time series data and its many challenges.
This article collection contains several articles on how advancements in vision system designs, computing power, algorithms, optics, and communications are making machine vision more cost effective than ever before.

Find and connect with the most suitable service provider for your unique application. Start searching the Global System Integrator Database Now!

Control room technology innovation; Practical approaches to corrosion protection; Pipeline regulator revises quality programs
Cloud, mobility, and remote operations; SCADA and contextual mobility; Custom UPS empowering a secure pipeline
Infrastructure for natural gas expansion; Artificial lift methods; Disruptive technology and fugitive gas emissions
Automation Engineer; Wood Group
System Integrator; Cross Integrated Systems Group
Jose S. Vasquez, Jr.
Fire & Life Safety Engineer; Technip USA Inc.
This course focuses on climate analysis, appropriateness of cooling system selection, and combining cooling systems.
This course will help identify and reveal electrical hazards and identify the solutions to implementing and maintaining a safe work environment.
This course explains how maintaining power and communication systems through emergency power-generation systems is critical.
The Engineers' Choice Awards highlight some of the best new control, instrumentation and automation products as chosen by Control Engineering subscribers. Vote now (if qualified)!
The System Integrator Giants program lists the top 100 system integrators among companies listed in CFE Media's Global System Integrator Database.
Each year, a panel of Control Engineering and Plant Engineering editors and industry expert judges select the System Integrator of the Year Award winners in three categories.
This eGuide illustrates solutions, applications and benefits of machine vision systems.
Learn how to increase device reliability in harsh environments and decrease unplanned system downtime.
This eGuide contains a series of articles and videos that considers theoretical and practical; immediate needs and a look into the future.
Maximize ROI with integrated control system approach; Microcontrollers vs. PLCs; Power quality; Accelerate and rewire IIoT; Traits for excellent engineers
HMI effectiveness; Distributed I/O; Engineers' Choice Award finalists; System Integrator advice; Inside Machines
Women in engineering; Engineering Leaders Under 40; PID benefits and drawbacks; Ladder logic; Cloud computing
Programmable logic controllers (PLCs) represent the logic (decision) part of the control loop of sense, decide, and actuate. As we know, PLCs aren’t the only option for making decisions in a control loop, but they are likely why you’re here.
This digital report explains how plant engineers and subject matter experts (SME) need support for time series data and its many challenges.
This article collection contains several articles on how advancements in vision system designs, computing power, algorithms, optics, and communications are making machine vision more cost effective than ever before.

Find and connect with the most suitable service provider for your unique application. Start searching the Global System Integrator Database Now!

Control room technology innovation; Practical approaches to corrosion protection; Pipeline regulator revises quality programs
Cloud, mobility, and remote operations; SCADA and contextual mobility; Custom UPS empowering a secure pipeline
Infrastructure for natural gas expansion; Artificial lift methods; Disruptive technology and fugitive gas emissions
Automation Engineer; Wood Group
System Integrator; Cross Integrated Systems Group
Jose S. Vasquez, Jr.
Fire & Life Safety Engineer; Technip USA Inc.
This course focuses on climate analysis, appropriateness of cooling system selection, and combining cooling systems.
This course will help identify and reveal electrical hazards and identify the solutions to implementing and maintaining a safe work environment.
This course explains how maintaining power and communication systems through emergency power-generation systems is critical.
The Engineers' Choice Awards highlight some of the best new control, instrumentation and automation products as chosen by Control Engineering subscribers. Vote now (if qualified)!
The System Integrator Giants program lists the top 100 system integrators among companies listed in CFE Media's Global System Integrator Database.
Each year, a panel of Control Engineering and Plant Engineering editors and industry expert judges select the System Integrator of the Year Award winners in three categories.
This eGuide illustrates solutions, applications and benefits of machine vision systems.
Learn how to increase device reliability in harsh environments and decrease unplanned system downtime.
This eGuide contains a series of articles and videos that considers theoretical and practical; immediate needs and a look into the future.
Maximize ROI with integrated control system approach; Microcontrollers vs. PLCs; Power quality; Accelerate and rewire IIoT; Traits for excellent engineers
HMI effectiveness; Distributed I/O; Engineers' Choice Award finalists; System Integrator advice; Inside Machines
Women in engineering; Engineering Leaders Under 40; PID benefits and drawbacks; Ladder logic; Cloud computing
Programmable logic controllers (PLCs) represent the logic (decision) part of the control loop of sense, decide, and actuate. As we know, PLCs aren’t the only option for making decisions in a control loop, but they are likely why you’re here.
This digital report explains how plant engineers and subject matter experts (SME) need support for time series data and its many challenges.
This article collection contains several articles on how advancements in vision system designs, computing power, algorithms, optics, and communications are making machine vision more cost effective than ever before.

Find and connect with the most suitable service provider for your unique application. Start searching the Global System Integrator Database Now!

Control room technology innovation; Practical approaches to corrosion protection; Pipeline regulator revises quality programs
Cloud, mobility, and remote operations; SCADA and contextual mobility; Custom UPS empowering a secure pipeline
Infrastructure for natural gas expansion; Artificial lift methods; Disruptive technology and fugitive gas emissions
Automation Engineer; Wood Group
System Integrator; Cross Integrated Systems Group
Jose S. Vasquez, Jr.
Fire & Life Safety Engineer; Technip USA Inc.
This course focuses on climate analysis, appropriateness of cooling system selection, and combining cooling systems.
This course will help identify and reveal electrical hazards and identify the solutions to implementing and maintaining a safe work environment.
This course explains how maintaining power and communication systems through emergency power-generation systems is critical.
click me