Search This Blog

Friday, December 9, 2011

USB On-The-Go | Wikipedia Definition | Smartphone USB to Computer USB Info



USB On-The-Go, often abbreviated USB OTG, is a specification that allows USB devices such as digital audio players or mobile phones to act as a host allowing a USB Flash Drive, mouse, or keyboard to be attached.


Architecture

Standard USB uses a master/slave architecture; a USB host acts as the protocol master, and a USB 'Device' acts as the slave. Only the Host can schedule the configuration and data transfers over the link. The Devices cannot initiate data transfers, they only respond to requests given by a host. OTG introduces the concept that a 'Device' can perform both the master and slave roles, and so subtly changes the terminology. With OTG, a 'Device' can be either a 'Host' (acting as the link master) or a 'Peripheral' (acting as the link slave). The Device connected to the 'A' end of the cable at start-up (known as the A-device) acts as the Default Host, while the 'B' end acts as the Default Peripheral (known as the B-device).
USB On-The-Go does not preclude using a USB hub, but it describes Host/Peripheral role swapping only for the case of a one-to-one connection where two OTG devices are directly connected. Role swapping does not work through a standard hub, as one device will act as the Host and the other as the Peripheral until they are disconnected.

Specifications

USB OTG is part of a supplement[1] to the USB 2.0 specification originally agreed upon in late 2001 and later revised.[2] The latest version of this supplement also defines behavior for an Embedded Host which has targeted capabilities and the same USB Standard-A port used by PCs.
SuperSpeed OTG devices, Embedded Hosts and peripherals are supported through the USB On-The-Go and Embedded Host Supplement [3] to the USB 3.0 specification.

Protocols

The USB On-The-Go and Embedded Host Supplement to the USB 2.0 specification introduced three new protocols, Attach Detection Protocol (ADP), Session Request Protocol (SRP) and Host Negotiation Protocol (HNP).
  • ADP allows an OTG device, Embedded host or USB device to determine attachment status in the absence of power on the USB bus. This enables both insertion based behavior and the possibility for a device to display attachment status. It does this by periodically measuring the capacitance on the USB port to determine whether there is another device attached, a dangling cable or no cable. When a change in capacitance, large enough to indicate device attachment is detected then an A-device will provide power to the USB bus and look for device connection. A B-device will generate SRP and wait for the USB bus to become powered.
  • 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 battery operated devices such as cameras and mobile phones. The OTG or Embedded host can leave the USB link unpowered until the peripheral (which can be an OTG or standard USB device) asks it to start delivering power. OTG and Embedded 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/Peripheral roles, provided both are OTG dual-role devices. By using HNP for reversing Host/Peripheral roles, the USB OTG device is capable of acquiring control of data-transfer scheduling. Thus, any OTG device is capable of initiating data-transfer over USB OTG bus. The latest version of the supplement also introduced the idea of HNP polling whereby the device in host role periodically polls the peripheral, during an active session, to determine whether it wishes to become a host.
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, a printer is connected as the A-device (host), but cannot function as a host for a particular camera, since it doesn't understand the camera's representation of print jobs. When that camera knows how to talk to the printer, the printer will use HNP to switch to the slave role, making the camera the host to the printer so that the user's pictures will get printed without juggling cables. These new OTG protocols cannot pass through a standard USB hub since they are based on physical electrical-signaling.
The USB On-The-Go and Embedded Host Supplement to the USB 3.0 specification introduces an additional protocol, Role Swap Protocol (RSP). This achieves the same purpose as HNP (i.e. role swapping) by extending standard mechanisms provided by the USB 3.0 specification. Products following the USB On-The-Go and Embedded Host Supplement to the USB 3.0 specification are also required to follow the USB 2.0 supplement in order to maintain backwards compatibility. SuperSpeed OTG devices (SS-OTG) are required to support RSP. SuperSpeed Peripheral Capable OTG devices (SSPC-OTG) are not required to support RSP since they can only operate at SuperSpeed as a peripheral; they have no SuperSpeed host and so can only role swap using HNP at USB 2.0 data rates.

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 act as USB Host and B-device is a USB 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".
For IC designers, an attraction of USB OTG is the ability to get more USB capabilities with fewer gates. A "traditional" approach includes four controllers:
  • USB High Speed host controller based on EHCI (a register interface)
  • Full/low Speed host controller based on OHCI (another register interface)
  • USB Device controller, supporting both high and full speeds
  • Fourth controller to switch the OTG root port between host and device controllers.
This means many gates to test and debug. Also, most gadgets need to be just a Host, or just a Device. OTG hardware design merges all of these controllers into a single Dual-Role controller, that is somewhat more complex than the device controller alone.

Targeted Peripheral List

The Targeted Peripheral List or TPL applies to all Targeted Hosts which includes both OTG devices acting in host role and Embedded Hosts. The aim of the TPL is for a manufacturer to list products supported by the Targeted Host in order to define what it needs to support in terms of output power, speeds, protocols and device classes. The TPL is intended such that hosts can be "targeted" at a particular product or application rather than being forced to be general purpose hosts like a PC.

Plug

OTG mini plugs

The original USB On-The-Go standard introduced a plug receptacle called mini-AB which was replaced by the micro-AB in later revisions (Revision 1.4 onwards). It could accept either a mini-A plug or a mini-B plug. Mini-A Adapters allowed connection to standard-A USB cables, coming from peripherals. The standard OTG cable had a mini-A plug on one side and a mini-B plug on the other (it could not have two plugs of the same type). The device that had a mini-A plugged in became an OTG A-device, and the one that had mini-B plugged became a B-device (see above). The type of the plug inserted was 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 was floating). (There were also pure Mini-A plugs, used where a compact host port is needed but OTG was not supported.)

OTG Micro Plugs

With the introduction of the USB Micro Plug, a new plug receptacle called Micro-AB was also introduced. It can accept either a Micro-A plug or a Micro-B plug. Micro-A Adapters allow for connection to Standard-A plug type USB cables, as used on standard USB 2.0 Devices. An OTG product must have a single Micro-AB receptacle and no other USB receptacles.[4][5]
The OTG cable has a micro-A plug on one side, and a micro-B plug on the other (it cannot have two plugs of the same type). OTG adds a fifth pin to the standard USB connector, called the ID-pin; the micro-A plug has the ID pin grounded, while the ID in the micro-B plug is floating. The device that has a micro-A plugged in becomes an OTG A-device, and the one that has micro-B plugged becomes a B-device. The type of the plug inserted is detected by the state of the pin ID .
Three additional ID pin states are defined[4] at the nominal resistance values of 124 kΩ, 68 kΩ, and 36.5 kΩ. These permit the device to work with a USB Accessory Charger Adapter which allows the OTG device to be attached to both a charger and another device simultaneously.[6] These three states are used in the cases of:
  • A charger and either no device or an A-device that is not asserting VBUS (not providing power) are attached. The OTG device is allowed to charge and initiate SRP but not connect.[6]
  • A charger and an A-device that is asserting VBUS (is providing power) are attached. The OTG device is allowed to charge and connect but not initiate SRP.[6]
  • A charger and a B-device are attached. The OTG device is allowed to charge and enter host mode.[6]
USB 3.0 introduced a backwards compatible, SuperSpeed extension of the Micro-AB receptacle and Micro-A and Micro-B plugs. These contain all of the pins in the USB 2.0 Micro and use the ID pin to identify the A-device and B-device roles. Additionally they contain the additional SuperSpeed pins.

OTG micro cables

When attached to a PC an OTG device requires a cable which has a USB Standard-A plug on one end and a Micro-B plug on the other end. In order to attach a peripheral to an OTG device the peripheral either needs to have a cable ending in a Micro-A plug which is inserted into the OTG device's Micro-AB receptacle or the OTG device itself needs an adapter cable which has a Micro-A plug on one end and a Standard-A receptacle on the other. The adapter cable enables any standard USB peripheral to be attached to an OTG device. In order to attach two OTG devices together requires either a cable with a Micro-B plug at one end and a Micro-A plug at the other or can be achieved using a combination of the PC cable and adapter cable.
An example can be viewed here on Amazon

Backward compatibility

USB OTG devices are backward-compatible with USB 2.0 (USB 3.0 for SuperSpeed OTG devices) and will behave as standard USB Hosts or Devices when connected to standard (non-OTG) USB devices. The main exception is that OTG hosts are only required to provide enough power for the products listed on the TPL, which may or may not be enough to connect to a peripheral which is not listed. A powered USB hub may sidestep the issue if supported since this will then provide its own power according to either the USB 2.0 or USB 3.0 specifications.
Some incompatibilities in both HNP and SRP were introduced between the 1.3 and 2.0 versions of the On-The-Go supplement which may lead to interoperability issues when using these protocols.

Charger compatibility

Some devices can charge their battery via their USB port; some can even detect a dedicated charger and draw more than 500mA, which allows them to charge faster. OTG devices are not excluded from either of these options.[6]

Visit http://www.BeyondUSB.com for the latest in Smartphone USB to Computer  USB interface. This changes the way you can transfer all your important data from Smartphone to Computer, Smartphone to Smartphone, Computer to Computer and more!!

No comments:

Post a Comment

Beyond USB - Smartphone USB to Computer USB