In order to fulfill the basic functions of our service, the user hereby agrees to allow Xiaomi to collect, process and use personal information which shall include but not be limited to written threads, pictures, comments, replies in the Mi Community, and relevant data types listed in Xiaomi's Private Policy. By selecting "Agree", you agree to Xiaomi's Private Policy and Content Policy .
Agree

Redmi Note 5

Tech class
Subscribed
Subscribe

[Tips] [Tech Class] Chapter 66: All About USB On-The-Go [ OTG ]

2018-12-27 00:17:23
17651 144

Hello Mi Fans,
Welcome back to yet another Mi Community Tech Class Session. In the previous chapter, we dealt with Smartphone LED Flash and in today's chapter, we will be learning more about USB OTG's and how do they help us.

What is USB On-The-Go?

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


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).

Specifications

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

SuperSpeed OTG devices, Embedded Hosts and peripherals are supported through the USB OTG and Embedded Host Supplement to the USB 3.0 specification.


The Protocols behind USB OTG

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

  • Attach Detection Protocol (ADP): Allows an OTG device, embedded host or USB device to determine attachment status in the absence of power on the USB bus, enabling both insertion-based behaviour and the capability to display attachment status. It does so 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 large enough change in capacitance is detected to indicate device attachment, an A-device will provide power to the USB bus and look for device connection. At the same time, a B-device will generate SRP and wait for the USB bus to become power.


  • Session Request 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 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) requires power. OTG and embedded hosts typically have little battery power to spare, so leaving the USB link unpowered helps in extending the battery runtime.

  • Host Negotiation Protocol (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 HNP polling, in which the host device periodically polls the peripheral during an active session to determine whether it wishes to become a host.

Different USB OTG's Plugs

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 could accept either a mini-A plug or a mini-B plug, while mini-A adapters allowed connection to standard-A USB cables coming from peripherals. The standard OTG cable had a mini-A plug on one end and a mini-B plug on the other end (it could not have two plugs of the same type).

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


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 an 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.


Conclusion

As we have read above the definition of USB On-The-Go, often abbreviated USB OTG or just OTG, is a specification that allows USB devices such as digital audio players or mobile phones to act as a host, allowing other USB devices like a USB flash drive, mouse, or keyboard to be attached to them. On-the-Go 3.0 is an upgrade to On-the-Go 2.0 and is backwards compatible with past versions. The Embedded Host supplement adds details on how smart appliances like tablets, phones and even cameras will be able to use a single USB 3.0 IP port as either a host or peripheral.

Source 1, 2

In Case You Missed Previous Threads:

Thanks for reading!
Stay tuned to next week for the next chapter.

Rate

Number of participants 5 Experience +23 Pack Reason

View Rating Log

2018-12-27 00:17:23
Favorites157 RateRate
Tech class
It is a platform for all the Community Users to learn about New Technology and also to get the Knowledge from our Community Device Team.
55 Article Description     711 Subscribers
Subscribed
Subscribe

Device team

sktaufiq | from Redmi Y2

#1

Nice work bro
2018-12-27 03:09:31

Grandmaster Bunny

Solver13 | from Redmi Note 4

#2

Informative thread! Thanks for sharing :)
2018-12-27 03:55:24

Moderator

Mayank #1 | from Redmi 4A

#3

Nicely explained!!
2018-12-27 06:06:41

MIUI Beta Tester

2002 Abhishek prince | from Redmi Note 4

#4

thanks for sharing
2018-12-27 08:00:03

App Review Team

Maji George | from Redmi 3S

#5

Informative thread... Thanks for sharing!
2018-12-27 09:21:09

Grandmaster Bunny

prashanthsahu | from Redmi Note 4

#6

fabulous and fantastic information . good creation of ideas
2018-12-27 12:28:11

Mi FC President

PHATEH007 | from MI 8

#7

Nice thread
2018-12-29 12:34:55
well explained
2019-01-03 23:15:52

Master Bunny

1631413672 | from Redmi Note 4

#9

it's amazing beautiful pleasure.
2019-01-03 23:22:18

Pro Bunny

SMS151280 | from Redmi Note 5 Pro

#10

useful information
2019-01-03 23:22:32
please sign in to reply.
Sign In Sign Up
APP scratch card
2016 Diwali with Mi
3 Days Check-In
7 Days Check-In
21 Days Check-In
40 Days Check-In
70 Days Check-In
100 Days Check-In
Shake!!Shake!!
Lucky Draw No.
Mi Explorers
1st Anniversary
2 million registered members
Diwali
Christmas 2017
ThrowBackWithMiCommunity
MIUI Instagram
2017 Xiaomi Annual Bill
Mi Community Updater
Color Your Planet
The Motivator
MIUI 10
Golden Mi Bunny
MIUI Subscriber
MIUI 8th Anniversary
5 Million Registered Users
10 Million Downloads
2019
Throwback With Mi 2018
Xiaomi's 9th Birthday

Read moreGet new
Copyright©2016-2019 Xiaomi.com, All Rights Reserved
Content Policy
Quick Reply To Top Return to the list