USB On-The-Go
From Wikipedia, the free encyclopedia
|
|
This article may be confusing or unclear to readers. Please help clarify the article; suggestions may be found on the talk page. (January 2009) |
USB On-The-Go, often abbreviated USB OTG, is a supplement[1] to the USB 2.0 specification agreed upon in late 2001.[2] The specification allows for devices that generally fulfill the role of being slave (which might be, e. g. digital audio player or mobile phone) to a USB host (usually a desktop or notebook computer) to become the host themselves when paired with another slave device.
Examples include the Nokia N810 Internet Tablet[3] and the Meizu M6 miniPlayer[4] and at least three BenQ optical media recorders.[5] Each of these devices can use their OTG support to copy files off of USB mass storage devices, such as a key drive or many cameras and mobile phones. The N810 Internet Tablet can also use its ports to connect to traditional desktop keyboards and a number of other devices. Devices that support Back-to-Back OTG connections can connect to each other directly, with either device assuming the role of the USB host.
Contents |
[edit] 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. Now 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 acts as the Default Host, while the 'B' end acts as the Default Peripheral.
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. If a standard hub is used, the supplement notes that using it will lead to losing USB OTG role-swap capabilities, locking one device as the Host and the other as the Peripheral until the hub is disconnected.
[edit] Protocols
USB On-The-Go introduced two new protocols, Session Request Protocol (SRP) and Host Negotiation Protocol (HNP).
- 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 host can leave the USB link unpowered until 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/Device roles, provided both are OTG dual-role devices. By using HNP for reversing Host/Device roles, the USB OTG gadget is capable of acquiring control of data-transfer scheduling. Thus, any OTG device is capable of initiating 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, 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 cameras 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.
It must be noted that these new OTG protocols cannot pass through a standard USB hub since they are based on physical electrical-signaling.
[edit] 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 Device. The host and device 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.
[edit] OTG Micro Plugs
The USB On-The-Go standard introduces a new plug receptacle called Micro-AB. 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.[6][7]
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 (see above). The type of the plug inserted is detected by the state of the pin ID .
Three additional ID pin states are defined[6] 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.[8] 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.[8]
- 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.[8]
- A charger and a B-device are attached. The OTG device is allowed to charge and enter host mode.[8]
[edit] Backward compatibility
USB OTG devices are backward-compatible with USB 2.0 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 a small amount of power, which may not be enough to connect to a non-OTG peripheral, although a powered USB hub may sidestep the issue if supported.
[edit] Charger compatibility
Some devices can charge their battery via the 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.[8]
[edit] References
- ^ On-The-Go Supplement to the USB 2.0 Specification Revision 1.3, December 5, 2006
- ^ USB-On-the-Go-Specification Settled, Heinz Heise
- ^ "NoBounds And The N810 Show The Future Of The Internet Tablets". 2008-03-18. http://www.maemo-guru.com/2008/03/nobounds-and-the-n810-show-the-future-of-the-internet-tablets/. Retrieved 2009-08-27.
- ^ http://www.engadget.com/2006/06/26/meizu-mini-player-coming-to-america/
- ^ http://www.itworld.com/050531benq
- ^ a b "On-The-Go and Embedded Host Supplement to the USB Revision 2.0 Specification". USB Implementers Forum, Inc. 8 May 2009. http://www.usb.org/developers/docs/usb_20_052709.zip. Retrieved 23 September 2009.
- ^ "Universal Serial Bus Micro-USB Cables and Connectors Specification". USB Implementers Forum, Inc. 4 April 2009. http://www.usb.org/developers/docs/usb_20_052709.zip. Retrieved 23 September 2009.
- ^ a b c d e "Battery Charging Specification". USB Implementers Forum, Inc. 15 April 2009. http://www.usb.org/developers/devclass_docs/batt_charging_1_1.zip. Retrieved 23 September 2009.