USB On-The-Go

Last updated

The USB On-The-Go logo USB OTG Logo.svg
The USB On-The-Go logo
Non-compliant USB On-The-Go adapter for a defective smartphone or tablet computer. Some products were made with defective ports (in effect, a Micro-AB port with the wrong shell so that a Micro-A plug cannot be inserted, so this adapter has what is electrically a Micro-A plug that is improperly shaped like a Micro-B plug to fit the defective port). Usb otg.jpg
Non-compliant USB On-The-Go adapter for a defective smartphone or tablet computer. Some products were made with defective ports (in effect, a Micro-AB port with the wrong shell so that a Micro-A plug cannot be inserted, so this adapter has what is electrically a Micro-A plug that is improperly shaped like a Micro-B plug to fit the defective port).

USB On-The-Go (USB OTG or just OTG) is a specification first used in late 2001 that allows USB devices, such as tablets or smartphones, to also act as a host, allowing other USB devices, such as USB flash drives, digital cameras, mouse or keyboards, to be attached to them. Use of USB OTG allows devices to switch back and forth between the roles of host and device. For example, a smartphone may read from removable media as the host device, but present itself as a USB Mass Storage Device when connected to a host computer.

Contents

USB OTG introduces the concept of a device performing both Host and Peripheral roles  whenever two USB devices are connected and one of them is a USB OTG device, they establish a communication link. The device controlling the link is called the Host, while the other is called the Peripheral.

USB OTG defines two roles for devices: OTG A-device and OTG B-device, specifying which side supplies power to the link, and which initially is the host. The OTG A-device is a power supplier, and an OTG B-device is a power consumer. In the default link configuration, the A-device acts as a USB host with the B-device acting as a USB peripheral. The host and peripheral modes may be exchanged later by using Host Negotiation Protocol (HNP).

The wiring for the ID pin defines the initial role of each device. [1]

Overview

A USB OTG setup involving a number of devices USB-OTG Setup IMG 2342.JPG
A USB OTG setup involving a number of devices

Standard USB uses a host/device architecture; a host acts as the Host device for the entire bus, and a USB device acts as a Peripheral. If implementing standard USB, devices must assume one role or the other, with computers generally set up as hosts, while (for example) printers normally function as a Peripheral. In the absence of USB OTG, cell phones often implemented Peripheral functionality to allow easy transfer of data to and from computers. Such phones could not readily be connected to printers as they also implemented the peripheral role. USB OTG directly addresses this issue. [1]

When a device is plugged into the USB bus, the host device sets up communications with the device and handles service provisioning (the host's software enables or does the needed data-handling such as file managing or other desired kind of data communication or function). That allows the devices to be greatly simplified compared to the host; for example, a mouse contains very little logic and relies on the host to do almost all of the work. The host controls all data transfers over the bus, with the devices capable only of signalling (when polled) that they require attention. To transfer data between two devices, for example from a phone to a printer, the host first reads the data from one device, then writes it to the other.[ citation needed ]

While the host-device arrangement works for some devices, many devices can act either as host or as device depending on what else shares the bus. For instance, a computer printer is normally a device, but when a USB flash drive containing images is plugged into the printer's USB port with no computer present (or at least turned off), it would be useful for the printer to take on the role of host, allowing it to communicate with the flash drive directly and to print images from it.[ citation needed ]

USB OTG recognizes that a device can perform both Host and Peripheral roles, and so subtly changes the terminology. With OTG, a device can be either a host when acting as a link host, or a link peripheral. The choice between host and peripheral roles is handled entirely by which end of the cable the device is connected to. 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".[ citation needed ]

After initial startup, setup for the bus operates as it does with the normal USB standard, with the A-device setting up the B-device and managing all communications. However, when the same A-device is plugged into another USB system or a dedicated host becomes available, it can become a device.[ citation needed ]

USB OTG 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 a host and the other as a peripheral until they are disconnected.[ citation needed ]

Specifications

USB OTG is a part of a supplement [2] to the Universal Serial Bus (USB) 2.0 specification originally agreed upon in late 2001 and later revised. [3] The latest version of the supplement also defines behavior for an Embedded Host which has targeted abilities and the same USB Standard-A port used by PCs.[ citation needed ]

SuperSpeed OTG devices, Embedded Hosts and peripherals are supported through the USB OTG and Embedded Host Supplement [4] to the USB 3.0 specification.[ citation needed ]

Protocols

The USB OTG and Embedded Host Supplement to the USB 2.0 specification introduced three new communication protocols:

The USB OTG and Embedded Host Supplement to the USB 3.0 specification introduces an additional communication protocol:

Device roles

USB OTG defines two roles for devices: OTG A-device and OTG B-device, specifying which side supplies power to the link, and which initially is the host. The OTG A-device is a power supplier, and an OTG B-device is a power consumer. In the default link configuration, the A-device acts as a USB host with the B-device acting as a USB peripheral. The host and peripheral modes may be exchanged later by using HNP or RSP. Because every OTG controller supports both roles, they are often called "Dual-Role" controllers rather than "OTG controllers".

For integrated circuit (IC) designers, an attractive feature of USB OTG is the ability to achieve more USB capabilities with fewer gates.

A "traditional" approach includes four controllers, resulting in more gates to test and debug:

Also, most gadgets must be either a host or a device. OTG hardware design merges all of the controllers into one dual-role controller that is somewhat more complex than an individual device controller.

Targeted peripheral list (TPL)

A manufacturer's targeted peripheral list (TPL) serves the aim of focusing a host device towards particular products or applications, rather than toward its functioning as a general-purpose host, as is the case for typical PCs. The TPL specifies products supported by the "targeting" host, defining what it needs to support, including the output power, transfer speeds, supported protocols, and device classes. It applies to all targeted hosts, including both OTG devices acting as a host and embedded hosts.

Plug

Standard, mini, and micro USB plugs (not to scale). The white areas in the drawings represent hollow spaces. As the plugs are shown here, the USB logo (with optional letter A or B) is on the top of the overmold in all cases. Pin numbering (looking into receptacles) is mirrored from plugs, such that pin 1 on plug connects to pin 1 on the receptacle. USB 2.0 connectors.svg
Standard, mini, and micro USB plugs (not to scale). The white areas in the drawings represent hollow spaces. As the plugs are shown here, the USB logo (with optional letter A or B) is on the top of the overmold in all cases. Pin numbering (looking into receptacles) is mirrored from plugs, such that pin 1 on plug connects to pin 1 on the receptacle.

OTG mini plugs

The original USB OTG standard introduced a plug receptacle called mini-AB that was replaced by micro-AB in later revisions (Revision 1.4 onwards). It can accept either a mini-A plug or a mini-B plug, while mini-A adapters allows connection to standard-A USB cables coming from peripherals. The standard OTG cable has a mini-A plug on one end and a mini-B plug on the other end (it can not have two plugs of the same type).

The device with a mini-A plug inserted becomes an OTG A-device, and the device with a mini-B plug inserted becomes a B-device (see above). The type of plug inserted is detected by the state of the ID pin (the mini-A plug's ID pin is grounded, while the mini-B plug's is floating).

Pure mini-A receptacles also exist, used where a compact host port is needed, but OTG is 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 plugs, as used on fixed or standard devices. An OTG product must have a single micro-AB receptacle and no other USB receptacles. [5] [6]

An OTG cable has a micro-A plug on one end, and a micro-B plug on the other end (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. A device with a micro-A plug inserted becomes an OTG A-device, and a device with a micro-B plug inserted becomes a B-device. The type of plug inserted is detected by the state of the pin ID.

Three additional ID pin states are defined [5] at the nominal resistance values of 124 kΩ, 68 kΩ, and 36.5 kΩ, with respect to the ground pin. These permit the device to work with USB Accessory Charger Adapters that allows the OTG device to be attached to both a charger and another device simultaneously. [7]

These three states are used in the cases of:

USB 3.0 introduced a backwards compatible SuperSpeed extension of the micro-AB receptacle and micro-A and micro-B plugs. They contain all pins of the non-Superspeed micro connectors and use the ID pin to identify the A-device and B-device roles, also adding the SuperSpeed pins.

OTG micro cables

USB OTG adapters, hubs and card readers USB-OTG-Adapters.jpg
USB OTG adapters, hubs and card readers

When an OTG-enabled device is connected to a PC, it uses its own USB-A or USB Type-C cable (typically ending in micro-B, USB-C or Lightning plugs for modern devices). When an OTG-enabled device is attached to a USB device device, such as a flash drive, the device device must either end in the appropriate connection for the device, or the user must supply an appropriate adapter ending in USB-A. The adapter enables any standard USB peripheral to be attached to an OTG device. Attaching two OTG-enabled devices together requires either an adapter in conjunction with the device device's USB-A cable, or an appropriate dual-sided cable and a software implementation to manage it. This is becoming commonplace with USB Type-C devices.

Smartphone and tablet implementation

BlackBerry 10.2 implements Host Mode (like in the BlackBerry Z30 handset). [8] Nokia has implemented USB OTG in many of their Symbian cellphones such as Nokia N8, C6-01, C7, Oro, E6, E7, X7, 603, 700, 701 and 808 Pureview. Some high-end Android phones produced by HTC, and Sony under Xperia series also have it. [9] Samsung [10] [11] Android version 3.1 or newer supports USB OTG, but not on all devices. [12] [13]

Specifications listed on technology web sites (such as GSMArena, PDAdb.net, PhoneScoop, and others) can help determine compatibility. Using GSMArena as an example, one would locate the page for a given device, and examine the verbiage under Specifications → Comms → USB. If "USB Host" is shown, the device should be capable of supporting OTG-type external USB accessories. [14] [15]

In many of the above implementations, the host device has only a micro-B receptacle rather than a micro-AB receptacle. Although non-standard, micro-B to micro-A receptacle adapters are widely available and used in place of the mandated micro-AB receptacle on these devices. [16]

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 that is not listed. A powered USB hub may sidestep the issue, if supported, since it 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 OTG supplement, which can lead to interoperability issues when using those protocol versions.

Charger compatibility

Some devices can use their USB ports to charge built-in batteries, while other devices can detect a dedicated charger and draw more than 500 mA (0.5 A), allowing them to charge more rapidly. OTG devices are allowed to use either option. [7]

See also

Related Research Articles

<span class="mw-page-title-main">Parallel ATA</span> Interface standard for the connection of storage devices

Parallel ATA (PATA), originally AT Attachment, also known as IDE, is a standard interface designed for IBM PC-compatible computers. It was first developed by Western Digital and Compaq in 1986 for compatible hard drives and CD or DVD drives. The connection is used for storage devices such as hard disk drives, floppy disk drives, and optical disc drives in computers.

<span class="mw-page-title-main">SCSI</span> Set of computer and peripheral connection standards

Small Computer System Interface is a set of standards for physically connecting and transferring data between computers and peripheral devices, best known for its use with storage devices such as hard disk drives. SCSI was introduced in the 1980s and has seen widespread use on servers and high-end workstations, with new SCSI standards being published as recently as SAS-4 in 2017.

<span class="mw-page-title-main">USB</span> Standard for computer data connections

Universal Serial Bus (USB) is an industry standard that allows data exchange and delivery of power between many various types of electronics. It specifies its architecture, in particular its the physical interface, and communication protocols for data transfer and power delivery to and from hosts, such as personal computers, to and from peripheral devices, e.g. displays, keyboards, and mass storage devices, and to and from intermediate hubs, which multiply the number of a host's ports. USB was originally designed to standardize the connection of peripherals to computers, replacing various interfaces such as serial ports, parallel ports, game ports, and ADB ports, and prior versions of USB became commonplace on a wide range of devices, such as keyboards, mice, cameras, printers, scanners, flash drives, smartphones, game consoles, and power banks. It has evolved into a standard to replace virtually all common ports on computers, mobile devices, peripherals, power supplies, and manifold other small electronics. In the current standard the USB-C connector replaces the many various connectors for power, displays, and many other uses, as well as all previous USB connectors.

<span class="mw-page-title-main">PC Card</span> Expansion card standard for laptop computers

PC Card is a parallel peripheral interface for laptop computers and PDAs.

<span class="mw-page-title-main">Expansion card</span> Circuit board for connecting to a computer system to add functionality

In computing, an expansion card is a printed circuit board that can be inserted into an electrical connector, or expansion slot on a computer's motherboard to add functionality to a computer system. Sometimes the design of the computer's case and motherboard involves placing most of these slots onto a separate, removable card. Typically such cards are referred to as a riser card in part because they project upward from the board and allow expansion cards to be placed above and parallel to the motherboard.

ACCESS.bus, or A.b for short, is a peripheral-interconnect computer bus developed by Philips and DEC in the early 1990s, based on Philips' I²C system. It is similar in purpose to USB, in that it allows low-speed devices to be added or removed from a computer on the fly. While it was made available earlier than USB, it never became popular as USB gained in popularity.

<span class="mw-page-title-main">PCI Express</span> Computer expansion bus standard

PCI Express, officially abbreviated as PCIe or PCI-e, is a high-speed serial computer expansion bus standard, designed to replace the older PCI, PCI-X and AGP bus standards. It is the common motherboard interface for personal computers' graphics cards, sound cards, hard disk drive host adapters, SSDs, Wi-Fi and Ethernet hardware connections. PCIe has numerous improvements over the older standards, including higher maximum system bus throughput, lower I/O pin count and smaller physical footprint, better performance scaling for bus devices, a more detailed error detection and reporting mechanism, and native hot-swap functionality. More recent revisions of the PCIe standard provide hardware support for I/O virtualization.

<span class="mw-page-title-main">SATA</span> Computer bus interface for storage devices

SATA is a computer bus interface that connects host bus adapters to mass storage devices such as hard disk drives, optical drives, and solid-state drives. Serial ATA succeeded the earlier Parallel ATA (PATA) standard to become the predominant interface for storage devices.

<span class="mw-page-title-main">Electronic test equipment</span> Testing appliance for electronics systems

Electronic test equipment is used to create signals and capture responses from electronic devices under test (DUTs). In this way, the proper operation of the DUT can be proven or faults in the device can be traced. Use of electronic test equipment is essential to any serious work on electronics systems.

<span class="mw-page-title-main">SD card</span> Type of memory storage for portable devices

Secure Digital, officially abbreviated as SD, is a proprietary, non-volatile, flash memory card format the SD Association (SDA) developed for use in portable devices.

<span class="mw-page-title-main">DC connector</span> Electrical connector for carrying DC power

A DC connector is an electrical connector for supplying direct current (DC) power.

<span class="mw-page-title-main">Adapter</span> Accessory for adapting or connecting two devices or two workpieces

An adapter or adaptor is a device that converts attributes of one electrical device or system to those of an otherwise incompatible device or system. Some modify power or signal attributes, while others merely adapt the physical form of one connector to another.

<span class="mw-page-title-main">USB hub</span> Device that expands a single USB port into several

A USB hub is a device that expands a single Universal Serial Bus (USB) port into several so that there are more ports available to connect devices to a host system, similar to a power strip. All devices connected through a USB hub share the bandwidth available to that hub.

<span class="mw-page-title-main">PS/2 port</span> 6-pin mini-DIN connector for connecting keyboards and mice to a PC compatible computer

The PS/2 port is a 6-pin mini-DIN connector used for connecting keyboards and mice to a PC compatible computer system. Its name comes from the IBM Personal System/2 series of personal computers, with which it was introduced in 1987. The PS/2 mouse connector generally replaced the older DE-9 RS-232 "serial mouse" connector, while the PS/2 keyboard connector replaced the larger 5-pin/180° DIN connector used in the IBM PC/AT design. The PS/2 keyboard port is electrically and logically identical to the IBM AT keyboard port, differing only in the type of electrical connector used. The PS/2 platform introduced a second port with the same design as the keyboard port for use to connect a mouse; thus the PS/2-style keyboard and mouse interfaces are electrically similar and employ the same communication protocol. However, unlike the otherwise similar Apple Desktop Bus connector used by Apple, a given system's keyboard and mouse port may not be interchangeable since the two devices use different sets of commands and the device drivers generally are hard-coded to communicate with each device at the address of the port that is conventionally assigned to that device.

<span class="mw-page-title-main">USB 3.0</span> Third major version of the Universal Serial Bus standard

USB 3.0, released in November 2008, is the third major version of the Universal Serial Bus (USB) standard for interfacing computers and electronic devices. The USB 3.0 specification defined a new architecture and protocol, named SuperSpeed, which included a new lane for a new signal coding scheme providing full-duplex data transfers that physically required five additional wires and pins, while preserving the USB 2.0 architecture and protocols and therefore keeping the original four pins and wires for the USB 2.0 backward-compatibility, resulting in nine wires in total and nine or ten pins at connector interfaces. The new transfer rate, marketed as SuperSpeed USB (SS), can transfer signals at up to 5 Gbit/s with nominal data rate of 500 MB/s after encoding overhead, which is about 10 times faster than High-Speed. USB 3.0 Type-A and B connectors are usually blue, to distinguish them from USB 2.0 connectors, as recommended by the specification. and by the initials SS.

Mobile High-Definition Link (MHL) is an industry standard for a mobile audio/video interface that allows the connection of smartphones, tablets, and other portable consumer electronics devices to high-definition televisions (HDTVs), audio receivers, and projectors. The standard was designed to share existing mobile device connectors, such as Micro-USB, and avoid the need to add video connectors on devices with limited space for them.

<span class="mw-page-title-main">Universal charger</span>

Universal charger or common charger refers to various projects to standardize the connectors of power supplies, particularly for battery-powered devices.

<span class="mw-page-title-main">USB-C</span> 24-pin USB connector system

USB-C, or USB Type-C, is a connector that supersedes previous USB connectors and can carry audio and/or video data, e.g. to drive multiple displays, or transfer data, e.g. to store a backup to an external drive, and providing/receiving power, such as to power a laptop or a mobile phone. It is not only applied by the USB technology, but is also used by other protocols including Thunderbolt, PCIe, HDMI, DisplayPort, and others. It is extensible to support future standards.

The initial versions of the USB standard specified connectors that were easy to use and that would have acceptable life spans; revisions of the standard added smaller connectors useful for compact portable devices. Higher-speed development of the USB standard gave rise to another family of connectors to permit additional data paths. All versions of USB specify cable properties; version 3.x cables include additional data paths. The USB standard included power supply to peripheral devices; modern versions of the standard extend the power delivery limits for battery charging and devices requiring up to 240 watts. USB has been selected as the standard charging format for many mobile phones, reducing the proliferation of proprietary chargers.

<span class="mw-page-title-main">USB4</span> Fourth major version of the Universal Serial Bus standard

USB4, sometimes referred to as USB 4.0, is a technical specification that the USB Implementers Forum (USB-IF) released on 29 August 2019. USB4 is based on the Thunderbolt 3 protocol specification, which Intel has donated to the USB-IF, but is aligned with the Thunderbolt 4 specification. The USB4 architecture can share a single, high-speed link with multiple hardware endpoints dynamically, best serving each transfer by data type and application.

References

  1. 1 2 Koeman, Kosta (22 November 2001). "Understanding USB On-The-Go". edn.com. EDN. Retrieved 20 June 2017.
  2. "On-The-Go and Embedded Host Supplement to the USB 2.0 Specification, Revision 2.0 plus ECN and errata". USB.org. 14 July 2011. Archived from the original on 5 May 2012. Retrieved 18 July 2005.
  3. Heise, Heinz. "USB-On-the-Go-Specification Settled". Heise.de.[ dead link ]
  4. "On-The-Go and Embedded Host Supplement to the USB Revision 3.0 Specification, Revision 1.1". USB.org. May 10, 2012.
  5. 1 2 "Universal Serial Bus Revision 2.0 specification". On-The-Go and Embedded Host Supplement to the USB Revision 2.0 Specification, Revision 2.0 version 1.1a. USB Implementers Forum, Inc. 27 July 2012. Retrieved 26 June 2017.[ permanent dead link ]
  6. "Universal Serial Bus Revision 2.0 specification". Universal Serial Bus Micro-USB Cables and Connectors Specification, Revision 1.01. USB Implementers Forum, Inc. 4 April 2007. Retrieved 26 June 2017.[ permanent dead link ]
  7. 1 2 3 4 5 "Battery Charging Specification". USB Implementers Forum, Inc. 15 April 2009. Archived from the original on 4 March 2016. Retrieved 23 September 2009.
  8. "KB34983-Support for USB Embedded Host mode on BlackBerry 10 OS version 10.2". Archived from the original on 9 January 2020. Retrieved 12 November 2013.
  9. "USB On the Go - HTC Blog". blog.htc.com. Archived from the original on 6 October 2014. Retrieved 30 September 2014.
  10. "Samsung Galaxy S II Able To Use Standard USB OTG Cable For USB On-The-Go Access - TalkAndroid.com". www.talkandroid.com. Archived from the original on 10 September 2022. Retrieved 11 September 2013.
  11. "Xperia S USB OTG demonstrated [Video] - Xperia Blog". www.xperiablog.net. 9 March 2012. Archived from the original on 5 September 2013. Retrieved 11 September 2013.
  12. "Android Issue 738: I hope Android will implement and support the USB host feature". 30 May 2008. Archived from the original on 9 June 2013. Retrieved 30 May 2013.
  13. "USB Host – Android Developers". developer.android.com. 30 May 2013. Archived from the original on 30 September 2011. Retrieved 30 May 2013.
  14. http://www.gsmarena.com/ Archived 16 September 2017 at the Wayback Machine GSMArena
  15. http://pdadb.net Archived 10 August 2006 at the Wayback Machine PDAdb.net
  16. "Are Micro A USB plugs actually ever used?". Electrical Engineering Stack Exchange. Archived from the original on 10 September 2022. Retrieved 13 August 2020.