Usb On-the-go Article Index for
Usb
Website Links For
Usb
 

Information About

Usb On-the-go




USB On-The-Go, normally abbreviated '''USB OTG''', is a supplement to the USB 2.0 specification.

The standard USB uses a master/slave architecture; a USB host acts as a master and a USB peripheral acts as a slave. Only the USB host can schedule the configuration and data transfers over the link. The USB peripherals cannot initiate data transfers, they only respond to instructions given by a host.

USB OTG changes that situation. Gadgets don't need to be pure peripherals; they can sometimes act as hosts. An example might be connecting a USB keyboard or printer to a handheld wireless device; or a USB printer that knows how to grab documents from certain peripherals and print them. The USB OTG compatible devices are able to initiate the session, control the connection and exchange Host/Peripheral roles between each other.

The USB OTG standard defines only one-to-one connection. Unlike standard USB , USB OTG does not use hubs. Connecting a USB hub between two OTG devices will lead to losing all USB OTG capabilities, locking one device as the host and the other as the peripheral until the hub is disconnected.


PROTOCOLS

The USB On-The-Go introduces two new Protocols , SRP (Session Request Protocol) and HNP (Host Negotiation Protocol).

- SRP allows both communicating devices to control when the link's power session is active; in standard USB, only the host is capable of doing so. That allows fine control over the power consumption, which is very important for portable devices such as photo/video cameras and mobile phones. The OTG host can leave the USB link unpowered, and the peripheral asks it to start delivering power. OTG hosts may not have much power to spare from their batteries, and leaving the USB link unpowered helps stretch battery life.

- HNP allows the two devices to exchange their host/slave roles, provide both are OTG dual-role devices. By using HNP for reversing host/slave roles, the USB OTG peripheral is capable of acquiring the control over the data scheduling of the USB. Thus, any device is capable of initiating the data transfer over USB OTG bus.
The main purpose of HNP is to accommodate users who have connected the A and B devices (see below) in the wrong direction for the task they want to perform. For example, maybe the printer is serving as the A-host, but it can't work that way for a particular camera since it doesn't understand its representation of print jobs. But when that camera knows how to talk to the printer, that won't be a problem ... the printer will use HNP to switch roles, the camera will act as a host to the printer, and the user will get her pictures printed without juggling cables.


DEVICE ROLES

USB OTG defines two roles of devices: OTG A-device and OTG B-device. This terminology defines which side supplies power to the link, and which is initially the host. The OTG A-device is a power supplier, and an OTG B-device is a power consumer. The default link configuration is that A-device is Host and B-device is a Peripheral. The host and peripheral modes may be exchanged later by using HNP.

Because every OTG controller supports both roles, they are often called "Dual-Role" controllers rather than "OTG controllers". From the perspective of a silicon vendor, one of the attractions of USB OTG is the ability to get more USB capabilities with fewer gates.
A "traditional" approach includes a high speed host controller based on EHCI (a register interface), a full/low speed host controller based on OHCI (another register interface), a third peripheral-only controller supporting both high and full speeds, and a fourth controller to switch the OTG root port between host and peripheral controllers.
That's a lot of gates to test and debug.
Plus, most current customers want just a host, or just a peripheral. A simpler hardware design will merge all of those into one Dual-Role controller, somewhat more complex than the peripheral controller alone.


PLUG

The USB On-The-Go standard introduces a new plug receptacle called mini-AB. It can accept either a mini-A plug or a mini-B plug. Mini-A Adapters allow connection to standard-A USB cables, coming from peripherals. The standard OTG cable has a mini-A plug on one side and a mini-B plug on the other (it cannot have two plugs of the same type). The device that has a mini-A plugged in becomes an OTG A-device, and the one that has mini-B plugged becomes a B-device (see above). The type of the plug inserted is detected by the state of the pin ID (the mini-A plug has the ID pin ''grounded'' while the ID in the mini-B plug is ''floating'').
(There are also pure Mini-A plugs, used where a compact host port is needed but OTG is not supported.)


BACKWARDS COMPATIBILITY

USB OTG devices are backward compliant with USB 2.0 and will behave as standard USB Hosts or Peripherals when connected to standard (no OTG) USB devices.
The main exception is that OTG hosts are only required to provide a small amount of power, which may not be enough to connect to a non-OTG peripheral. This can sometimes be worked around by connecting the non-OTG peripheral through an externally powered hub if that OTG host supports hubs. (Such support is not required.)


EXTERNAL LINKS