HOME

TheInfoList




Universal Serial Bus (USB) is an
industry standard ''Industry Standard'' is a 1982 album by Dixie Dregs, The Dregs. It is their only album featuring vocals (by Alex Ligertwood of Santana (band), Santana and Patrick Simmons of The Doobie Brothers on one track each) and garnered the group their fou ...
that establishes specifications for cables, connectors and
protocols Protocol may refer to: Sociology and politics * Protocol (politics)Protocol originally (in Late Middle English, c. 15th century) meant the minute or logbook taken at a meeting, upon which an agreement was based. The term now commonly refers to an a ...
for connection, communication and power supply (
interfacing Interfacing is a textile used on the unseen or "wrong" side of fabrics to make an area of a garment more rigid. Interfacings can be used to: *stiffen or add body to fabric, such as the interfacing used in shirt collars *strengthen a certain are ...
) between computers,
peripheral A peripheral or peripheral device is an auxiliary device used to put information into and get information out of the computer. The term peripheral device refers to all hardware components that are attached to a computer and are controlled by the co ...
s and other computers. A broad variety of
USB hardware The initial versions of the USB Universal Serial Bus (USB) is an industry standard that establishes specifications for cables and connectors and protocols for connection, communication and power supply (Interface (computing), interfacing ...
exists, including 14 different connectors, of which
USB-C USB-C (formally known as USB Type-C) is a 24-pin USB Universal Serial Bus (USB) is an industry standard ''Industry Standard'' is a 1982 album by Dixie Dregs, The Dregs. It is their only album featuring vocals (by Alex Ligertwood of Sa ...

USB-C
is the most recent. Released in 1996, the USB standard is maintained by the
USB Implementers Forum The USB Implementers Forum (USB-IF) is a nonprofit organization A nonprofit organization (NPO), also known as a non-business entity, not-for-profit organization, or nonprofit institution, is a legal entity organized and operated for a collect ...
(USB-IF). The four generations of USB specifications are: USB 1.''x'',
USB 2.0 Universal Serial Bus (USB) is an industry standard ''Industry Standard'' is a 1982 album by Dixie Dregs, The Dregs. It is their only album featuring vocals (by Alex Ligertwood of Santana (band), Santana and Patrick Simmons of The Doobie Brot ...
,
USB 3.''x''
USB 3.''x''
, and
USB4 USB4 is a USB Universal Serial Bus (USB) is an industry standard that establishes specifications for cables and connectors and protocols for connection, communication and power supply (Interface (computing), interfacing) between computers, ...
.


Overview

USB was designed to standardize the connection of
peripheral A peripheral or peripheral device is an auxiliary device used to put information into and get information out of the computer. The term peripheral device refers to all hardware components that are attached to a computer and are controlled by the co ...
s to personal computers, both to communicate with and to supply electric power. It has largely replaced interfaces such as
serial port In computing Computing is any goal-oriented activity requiring, benefiting from, or creating computing machinery. It includes the study and experimentation of algorithmic processes and development of both computer hardware , hardware and soft ...

serial port
s and
parallel port In computing Computing is any goal-oriented activity requiring, benefiting from, or creating computing machinery. It includes the study and experimentation of algorithmic processes and development of both computer hardware , hardware a ...
s, and has become commonplace on a wide range of devices. Examples of peripherals that are connected via USB include computer keyboards and mice, video cameras, printers, portable media players, mobile (portable) digital telephones, disk drives, and network adapters. USB connectors have been increasingly replacing other types as charging cables of portable devices.


Receptacle (socket) identification

This section is intended to allow fast identification of USB receptacles (sockets) on equipment. Further diagrams and discussion of plugs and receptacles can be found in the main article above.


Objectives

The Universal Serial Bus was developed to simplify and improve the interface between personal computers and peripheral devices, such as cell phones, computer accessories, and monitors, when compared with previously existing standard or ''ad hoc'' proprietary interfaces.Jan Axelson, ''USB Complete: The Developer's Guide, Fifth Edition'', Lakeview Research LLC, 2015, , pages 1-7 From the computer user's perspective, the USB interface improves ease of use in several ways: * The USB interface is self-configuring, eliminating the need for the user to adjust the device's settings for speed or data format, or configure
interrupt In s, an interrupt is a response by the to an event that needs attention from the software. An interrupt condition alerts the processor and serves as a request for the processor to interrupt the currently executing code when permitted, so that ...

interrupt
s, input/output addresses, or direct memory access channels. * USB connectors are standardized at the host, so any peripheral can use most available receptacles. * USB takes full advantage of the additional processing power that can be economically put into peripheral devices so that they can manage themselves. As such, USB devices often do not have user-adjustable interface settings. * The USB interface is
hot-swappable Hot swapping is the replacement or addition of components to a Computer, computer system without stopping, shutdown (computing), shutting down, or Reboot, rebooting the system; hot plugging describes the addition of components only. Components whi ...
(devices can be exchanged without rebooting the host computer). * Small devices can be powered directly from the USB interface, eliminating the need for additional power supply cables. * Because use of the USB logo is only permitted after
compliance testing Conformance testing — an element of conformity assessment, and also known as compliance testing, or type testing — is testing or other activities that determine whether a process, product, or service complies with the requirements of a specific ...
, the user can have confidence that a USB device will work as expected without extensive interaction with settings and configuration. * The USB interface defines protocols for recovery from common errors, improving reliability over previous interfaces. * Installing a device that relies on the USB standard requires minimal operator action. When a user plugs a device into a port on a running computer, it either entirely automatically configures using existing
device driver In computing Computing is any goal-oriented activity requiring, benefiting from, or creating computing machinery. It includes the study and experimentation of algorithmic processes and development of both computer hardware , hardware and softwa ...
s, or the system prompts the user to locate a driver, which it then installs and configures automatically. The USB standard also provides multiple benefits for hardware manufacturers and software developers, specifically in the relative ease of implementation: * The USB standard eliminates the requirement to develop proprietary interfaces to new peripherals. * The wide range of transfer speeds available from a USB interface suits devices ranging from keyboards and mice up to streaming video interfaces. * A USB interface can be designed to provide the best available
latency Latency or latent may refer to: Science and technology * Latent heat, energy released or absorbed, by a body or a thermodynamic system, during a constant-temperature process * Latent variable, a variable that is not directly observed but inferred i ...
for time-critical functions or can be set up to do background transfers of bulk data with little impact on system resources. * The USB interface is generalized with no signal lines dedicated to only one function of one device.


Limitations

As with all standards, USB possesses multiple limitations to its design: * USB cables are limited in length, as the standard was intended for peripherals on the same table-top, not between rooms or buildings. However, a USB port can be connected to a gateway that accesses distant devices. * USB data transfer rates are slower than those of other interconnects such as 100 Gigabit Ethernet. * USB has a strict tree network topology and master/slave protocol for addressing peripheral devices; those devices cannot interact with one another except via the host, and two hosts cannot communicate over their USB ports directly. Some extension to this limitation is possible through
USB On-The-Go USB On-The-Go (USB OTG or just OTG) is a specification first used in late 2001 that allows USB devices, such as Tablet computer, tablets or smartphones, to act as a host, allowing other USB devices, such as USB flash drives, digital cameras, co ...

USB On-The-Go
in, Dual-Role-Devices and
Protocol Bridge Protocol may refer to: Sociology and politics * Protocol (politics), a formal agreement between nation states * Protocol (diplomacy), the etiquette of diplomacy and affairs of state * Etiquette, a code of personal behavior Science and technology * ...
. * A host cannot broadcast signals to all peripherals at once—each must be addressed individually. * While converters exist between certain legacy interfaces and USB, they may not provide a full implementation of the legacy hardware. For example, a USB-to-parallel-port converter may work well with a printer, but not with a scanner that requires bidirectional use of the data pins. For a product developer, using USB requires the implementation of a complex protocol and implies an "intelligent" controller in the peripheral device. Developers of USB devices intended for public sale generally must obtain a USB ID, which requires that they pay a fee to the
USB Implementers Forum The USB Implementers Forum (USB-IF) is a nonprofit organization A nonprofit organization (NPO), also known as a non-business entity, not-for-profit organization, or nonprofit institution, is a legal entity organized and operated for a collect ...
(USB-IF). Developers of products that use the USB specification must sign an agreement with the USB-IF. Use of the USB logos on the product requires annual fees and membership in the organization.


History

A group of seven companies began the development of USB in 1995:
Compaq Compaq (a portmanteau A portmanteau (, ) or portmanteau word (from "portmanteau (luggage) A portmanteau is a piece of luggage Baggage or luggage consists of bags, cases, and containers which hold a travel Travel is the movement ...

Compaq
, DEC,
IBM International Business Machines Corporation (IBM) is an American multinational technology company headquartered in Armonk, New York, with operations in over 170 countries. The company began in 1911, founded in Endicott, New York, as the C ...

IBM
,
Intel Intel Corporation is an American and headquartered in , . It is the world's largest manufacturer by revenue, and is the developer of the series of s, the processors found in most personal computers (PCs). , Intel ranked No. 45 in the 2020 ...

Intel
,
Microsoft Microsoft Corporation is an American multinational Multinational may refer to: * Multinational corporation, a corporate organization operating in multiple countries * Multinational force, a military body from multiple countries * Multinationa ...

Microsoft
,
NEC is a Japanese multinational information technology and electronics Electronics comprises the physics, engineering, technology and applications that deal with the emission, flow and control of electrons in vacuum and matter. It uses active d ...
, and
Nortel Nortel Networks Corporation (Nortel), formerly Northern Telecom Limited, was a Canadian multinational Multinational may refer to: * Multinational corporation, a corporate organization operating in multiple countries * Multinational force, a mil ...

Nortel
. The goal was to make it fundamentally easier to connect external devices to PCs by replacing the multitude of connectors at the back of PCs, addressing the usability issues of existing interfaces, and simplifying software configuration of all devices connected to USB, as well as permitting greater data rates for external devices and
Plug and Play In computing Computing is any goal-oriented activity requiring, benefiting from, or creating computing machinery. It includes the study and experimentation of algorithmic processes and development of both computer hardware , hardware and softwar ...
features.
Ajay Bhatt Ajay V. Bhatt (born 6 September 1957) is an Indian-born American computer architect who defined and developed several widely used technologies, including USB (Universal Serial Bus), AGP (Accelerated Graphics Port), PCI Express PCI Express ...
and his team worked on the standard at Intel; the first
integrated circuit An integrated circuit or monolithic integrated circuit (also referred to as an IC, a chip, or a microchip) is a set of electronic circuit 200px, A circuit built on a printed circuit board (PCB). An electronic circuit is composed of indivi ...

integrated circuit
s supporting USB were produced by Intel in 1995.
Joseph C. Decuir Joseph C. Decuir is an American fellow of the Institute of Electrical and Electronics Engineers The Institute of Electrical and Electronics Engineers (IEEE) is a professional association for electronic engineering and electrical engineering (a ...
, an American fellow of the Institute of Electrical and Electronics Engineers (IEEE) and one of the designers of the early Atari 8-bit game and computer systems (Atari VCS, Atari 400/800), as well as the Commodore Amiga, credits his work on
Atari SIO The Serial Input/Output system, universally known as SIO, was a proprietary peripheral bus and related software protocol stacks used on the Atari 8-bit family to provide most input/output duties for those computers. Unlike most I/O systems of the er ...
, the Atari 8-bit computer's communication implementation as the basis of the USB standard, which he also helped design and on which he holds patents. The original USB 1.0 specification, which was introduced in January 1996, defined data transfer rates of 1.5 
Mbit/s In telecommunications Telecommunication is the transmission of information by various types of technologies over , radio, , or other systems. It has its origin in the desire of humans for communication over a distance greater than that fea ...
''Low Speed'' and 12 Mbit/s ''Full Speed''. Draft designs had called for a single-speed 5 Mbit/s bus, but the low speed was added to support low-cost peripherals with un
shielded cable A shielded cable or screened cable is an electrical cable An electrical cable is an assembly of one or more wire A wire is a single usually cylindrical A cylinder (from Greek Greek may refer to: Greece Anything of, from, or rel ...
s, resulting in a split design with a 12 Mbit/s data rate intended for higher-speed devices such as printers and floppy disk drives, and the lower 1.5 Mbit/s rate for low data rate devices such as keyboards, mice and
joystick : 1. stick, 2. base, 3. trigger, 4. extra buttons, 5. autofire switch, 6. throttle, 7. #Hat switch, hat switch (POV hat), 8. suction cups. A joystick is an input device consisting of a stick that pivots on ...

joystick
s. Microsoft Windows 95, OSR 2.1 provided OEM support for the devices in August 1997. The first widely used version of USB was 1.1, which was released in September 1998.
Apple Inc. Apple Inc. is an American multinational Multinational may refer to: * Multinational corporation, a corporate organization operating in multiple countries * Multinational force, a military body from multiple countries * Multinational state, a ...
's
iMac iMac is a family of all-in-one All in One or All-in-One may refer to: Computing * All-in-one PC, a desktop computer with the monitor and computer in the same case * All-in-one printer or multifunction printer * ALL-IN-1, an office automation ...

iMac
was the first mainstream product with USB and the iMac's success popularized USB itself. Following Apple's design decision to remove all
legacy port In computing, a legacy port is a computer port (hardware), computer port or Electrical connector, connector that is considered by some to be fully or partially superseded. The replacement ports usually provide most of the functionality of the legac ...
s from the iMac, many PC manufacturers began building
legacy-free PC A legacy-free PC is a type of personal computer that lacks a floppy and/or optical disc drive In computing Computing is any goal-oriented activity requiring, benefiting from, or creating computing machinery. It includes the study and exp ...
s, which led to the broader PC market using USB as a standard. The USB 2.0 specification was released in April 2000 and was ratified by the USB-IF at the end of 2001.
Hewlett-Packard The Hewlett-Packard Company, commonly shortened to Hewlett-Packard ( ) or HP, was an American multinational company headquartered in . HP developed and provided a wide variety of hardware components, as well as software and related servic ...

Hewlett-Packard
, Intel,
Lucent Technologies Lucent Technologies, Inc., was an American multinational telecommunications equipment company headquartered in Murray Hill, New Jersey New Jersey is a U.S. state, state in the Mid-Atlantic States, Mid-Atlantic and Northeastern United ...
(now Nokia), NEC, and
Philips Koninklijke Philips N.V. (in Dutch Dutch commonly refers to: * Something of, from, or related to the Netherlands * Dutch people () * Dutch language () *Dutch language , spoken in Belgium (also referred as ''flemish'') Dutch may also refer t ...

Philips
jointly led the initiative to develop a higher data transfer rate, with the resulting specification achieving 480 Mbit/s, 40 times as fast as the original USB 1.1 specification. The
USB 3.0 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. Among other improvements, USB 3.0 adds the new transfer rate referred to as ''S ...

USB 3.0
specification was published on 12 November 2008. Its main goals were to increase the data transfer rate (up to 5 Gbit/s), decrease power consumption, increase power output, and be
backward compatible Backward or Backwards is a relative direction Body relative directions (also known as egocentric coordinates) are geometrical orientations relative to a body such as a human Humans (''Homo sapiens'') are the most populous and widespre ...
with USB 2.0. USB 3.0 includes a new, higher speed bus called SuperSpeed in parallel with the USB 2.0 bus. For this reason, the new version is also called SuperSpeed. The first USB 3.0 equipped devices were presented in January 2010. , about 6 billion USB ports and interfaces were in the global marketplace, and about 2 billion were being sold each year. The USB 3.1 specification was published in July 2013. In December 2014, USB-IF submitted USB 3.1, USB Power Delivery 2.0 and
USB-C USB-C (formally known as USB Type-C) is a 24-pin USB Universal Serial Bus (USB) is an industry standard ''Industry Standard'' is a 1982 album by Dixie Dregs, The Dregs. It is their only album featuring vocals (by Alex Ligertwood of Sa ...

USB-C
specifications to the
IECIEC may refer to: Businesses and organisations * International Electrotechnical Commission The International Electrotechnical Commission (IEC; in French: ''Commission électrotechnique internationale'') is an international standards organizati ...
( TC 100 – Audio, video and multimedia systems and equipment) for inclusion in the international standard IEC 62680 (''Universal Serial Bus interfaces for data and power)'', which is currently based on USB 2.0. The USB 3.2 specification was published in September 2017.


USB 1.x

Released in January 1996, USB 1.0 specified signaling rates of 1.5 Mbit/s (''Low Bandwidth'' or ''Low Speed'') and 12 Mbit/s (''Full Speed''). It did not allow for extension cables or pass-through monitors, due to timing and power limitations. Few USB devices made it to the market until USB 1.1 was released in August 1998. USB 1.1 was the earliest revision that was widely adopted and led to what Microsoft designated the "
Legacy-free PC A legacy-free PC is a type of personal computer that lacks a floppy and/or optical disc drive In computing Computing is any goal-oriented activity requiring, benefiting from, or creating computing machinery. It includes the study and exp ...
". Neither USB 1.0 nor 1.1 specified a design for any connector smaller than the standard type A or type B. Though many designs for a miniaturised type B connector appeared on many peripherals, conformity to the USB 1.x standard was hampered by treating peripherals that had miniature connectors as though they had a tethered connection (that is: no plug or receptacle at the peripheral end). There was no known miniature type A connector until USB 2.0 (revision 1.01) introduced one.


USB 2.0

USB 2.0 was released in April 2000, adding a higher maximum signaling rate of 480 Mbit/s (maximum theoretical data throughput 53 MByte/s) named ''High Speed'' or ''High Bandwidth'', in addition to the USB 1.x ''Full Speed'' signaling rate of 12 Mbit/s (maximum theoretical data throughput 1.2 MByte/s). Modifications to the USB specification have been made via engineering change notices (ECNs). The most important of these ECNs are included into the USB 2.0 specification package available from USB.org: * ''Mini-A and Mini-B Connector'' * ''Micro-USB Cables and Connectors Specification 1.01'' * '' InterChip USB Supplement'' * ''On-The-Go Supplement 1.3''
USB On-The-Go USB On-The-Go (USB OTG or just OTG) is a specification first used in late 2001 that allows USB devices, such as Tablet computer, tablets or smartphones, to act as a host, allowing other USB devices, such as USB flash drives, digital cameras, co ...

USB On-The-Go
makes it possible for two USB devices to communicate with each other without requiring a separate USB host * ''
Battery Charging A simple charger for NiCD batteries that outputs 300mA of 12V DC. A battery charger, or recharger, is a device used to put energy into a secondary cell or rechargeable battery A rechargeable battery, storage battery, or secondary cell, (or a ...
Specification 1.1'' Added support for dedicated chargers, host chargers behaviour for devices with dead batteries * ''Battery Charging Specification 1.2'': with increased current of 1.5 A on charging ports for unconfigured devices, allowing High Speed communication while having a current up to 1.5 A * ''Link Power Management Addendum ECN'', which adds a ''sleep'' power state * ''USB 2.0 VBUS Max Limit'', increased the maximum allowable V_BUS voltage from 5.25V to 5.50V to align with the USB Type-C Spec, which was released simultaneously.


USB 3.x

The USB 3.0 specification was released on 12 November 2008, with its management transferring from USB 3.0 Promoter Group to the USB Implementers Forum (USB-IF), and announced on 17 November 2008 at the SuperSpeed USB Developers Conference. USB 3.0 adds a ''SuperSpeed'' transfer mode, with associated backward compatible plugs, receptacles, and cables. SuperSpeed plugs and receptacles are identified with a distinct logo and blue inserts in standard format receptacles. The SuperSpeed bus provides for a transfer mode at a nominal rate of 5.0 Gbit/s, in addition to the three existing transfer modes. Its efficiency is dependent on a number of factors including physical symbol encoding and link level overhead. At a 5 Gbit/s signaling rate with 8b/10b encoding, each byte needs 10 bits to transmit, so the raw throughput is 500 MB/s. When flow control, packet framing and protocol overhead are considered, it is realistic for 400 MB/s (3.2 Gbit/s) or more to transmit to an application. Communication is
full-duplex A duplex communication system is a Point-to-point (telecommunications), point-to-point system composed of two or more connected parties or devices that can communicate with one another in both directions. Duplex systems are employed in many commun ...
in SuperSpeed transfer mode; earlier modes are half-duplex, arbitrated by the host. Low-power and high-power devices remain operational with this standard, but devices using SuperSpeed can take advantage of increased available current of between 150 mA and 900 mA, respectively. USB 3.1, released in July 2013 has two variants. The first one preserves USB 3.0's ''SuperSpeed'' transfer mode and is labeled ''USB 3.1 Gen 1'', and the second version introduces a new ''SuperSpeed+'' transfer mode under the label of ''USB 3.1 Gen 2''. SuperSpeed+ doubles the maximum
data signaling rate In telecommunication Telecommunication is the transmission of information Information can be thought of as the resolution of uncertainty; it answers the question of "What an entity is" and thus defines both its essence and the nature of ...
to 10 Gbit/s, while reducing line encoding overhead to just 3% by changing the encoding scheme to 128b/132b. USB 3.2, released in September 2017, preserves existing USB 3.1 ''SuperSpeed'' and ''SuperSpeed+'' data modes but introduces two new ''SuperSpeed+'' transfer modes over the
USB-C USB-C (formally known as USB Type-C) is a 24-pin USB Universal Serial Bus (USB) is an industry standard ''Industry Standard'' is a 1982 album by Dixie Dregs, The Dregs. It is their only album featuring vocals (by Alex Ligertwood of Sa ...

USB-C
connector with data rates of 10 and 20 Gbit/s (1.25 and 2.5 GB/s). The increase in bandwidth is a result of multi-lane operation over existing wires that were intended for flip-flop capabilities of the USB-C connector. USB 3.0 also introduced the UASP protocol, which provides generally faster transfer speeds than the BOT (Bulk-Only-Transfer) protocol.


Naming scheme

Starting with the USB 3.2 standard, USB-IF introduced a new naming scheme. To help companies with branding of the different transfer modes, USB-IF recommended branding the 5, 10, and 20 Gbit/s transfer modes as ''SuperSpeed USB 5Gbps'', ''SuperSpeed USB 10Gbps'', and ''SuperSpeed USB 20Gbps'', respectively:


USB4

The USB4 specification was released on 29 August 2019 by the USB Implementers Forum. USB4 is based on the
Thunderbolt 3 Thunderbolt is the brand name of a hardware interface developed by Intel Intel Corporation is an American multinational corporation and technology company headquartered in Santa Clara, California, Santa Clara, California, in Silicon Vall ...
protocol specification. It supports 40 Gbit/s throughput, is compatible with Thunderbolt 3, and backward compatible with USB 3.2 and USB 2.0. The architecture defines a method to share a single high-speed link with multiple end device types dynamically that best serves the transfer of data by type and application. The USB4 specification states that the following technologies shall be supported by USB4: During
CES 2020 CES (formerly an initialism for Consumer Electronics Show) is an annual trade show A trade fair (trade show, trade exhibition, or trade exposition) is an exhibition organized so that companies A company, abbreviated as co., is a Legal pers ...

CES 2020
, USB-IF and Intel stated their intention to allow USB4 products that support all the optional functionality as Thunderbolt 4 products. The first products compatible with USB4 are expected to be Intel's
Tiger LakeTiger Lake is List of Intel codenames, Intel's codename for the 11th generation Intel Core mobile processors based on the new Willow Cove Core microarchitecture, manufactured using Intel's third-generation 10 nanometer, 10 nm process node known ...
series and AMD's
Zen 3 Zen 3 is the codename A code name, call sign or cryptonym is a code word or name used, sometimes clandestinely, to refer to another name, word, project, or person. Code names are often used for military A military, also known collecti ...
series of CPUs. Released in 2020.


Version history


Release versions


Power-related specifications


System design

A USB system consists of a host with one or more downstream ports, and multiple peripherals, forming a tiered-
star topology A star network is an implementation of a spoke–hub distribution paradigm in computer networks. In a star network, every Host (network), host is connected to a central Hub (network science), hub. In its simplest form, one central hub acts as ...

star topology
. Additional
USB hub A USB hub is a device that expands a single Universal Serial Bus Universal Serial Bus (USB) is an industry standard ''Industry Standard'' is a 1982 album by Dixie Dregs, The Dregs. It is their only album featuring vocals (by Alex Ligertwo ...

USB hub
s may be included, allowing up to five tiers. A USB host may have multiple controllers, each with one or more ports. Up to 127 devices may be connected to a single host controller. USB devices are linked in series through hubs. The hub built into the host controller is called the ''root hub''. A USB device may consist of several logical sub-devices that are referred to as ''device functions''. A ''composite device'' may provide several functions, for example, a
webcam A webcam is a video camera that feeds or streams an image or video in real time to or through a computer A computer is a machine that can be programmed to carry out sequences of arithmetic or logical operations automatically. Modern com ...

webcam
(video device function) with a built-in microphone (audio device function). An alternative to this is a '' compound device,'' in which the host assigns each logical device a distinct address and all logical devices connect to a built-in hub that connects to the physical USB cable. USB device communication is based on ''pipes'' (logical channels). A pipe is a connection from the host controller to a logical entity within a device, called an '' endpoint''. Because pipes correspond to endpoints, the terms are sometimes used interchangeably. Each USB device can have up to 32 endpoints (16 ''in'' and 16 ''out''), though it is rare to have so many. Endpoints are defined and numbered by the device during initialization (the period after physical connection called "enumeration") and so are relatively permanent, whereas pipes may be opened and closed. There are two types of pipe: stream and message. * A ''message'' pipe is bi-directional and is used for ''control'' transfers. Message pipes are typically used for short, simple commands to the device, and for status responses from the device, used, for example, by the bus control pipe number 0. * A ''stream'' pipe is a uni-directional pipe connected to a uni-directional endpoint that transfers data using an ''
isochronous A sequence of events is isochronous if the events occur regularly, or at equal time Time is the continued of and that occurs in an apparently succession from the , through the , into the . It is a component quantity of various s used ...
'', ''interrupt'', or ''bulk'' transfer: *;Isochronous transfers: At some guaranteed data rate (for fixed-bandwidth streaming data) but with possible data loss (e.g., realtime audio or video) *;Interrupt transfers: Devices that need guaranteed quick responses (bounded latency) such as pointing devices,
mice A mouse, plural mice, is a small mammal Mammals (from Latin Latin (, or , ) is a classical language A classical language is a language A language is a structured system of communication Communication (from Latin ...

mice
, and keyboards *;Bulk transfers: Large sporadic transfers using all remaining available bandwidth, but with no guarantees on bandwidth or latency (e.g., file transfers) When a host starts a data transfer, it sends a TOKEN packet containing an endpoint specified with a
tuple In mathematics Mathematics (from Ancient Greek, Greek: ) includes the study of such topics as quantity (number theory), mathematical structure, structure (algebra), space (geometry), and calculus, change (mathematical analysis, analysis). ...
of ''(device_address, endpoint_number)''. If the transfer is from the host to the endpoint, the host sends an OUT packet (a specialization of a TOKEN packet) with the desired device address and endpoint number. If the data transfer is from the device to the host, the host sends an IN packet instead. If the destination endpoint is a uni-directional endpoint whose manufacturer's designated direction does not match the TOKEN packet (e.g. the manufacturer's designated direction is IN while the TOKEN packet is an OUT packet), the TOKEN packet is ignored. Otherwise, it is accepted and the data transaction can start. A bi-directional endpoint, on the other hand, accepts both IN and OUT packets. Endpoints are grouped into ''interfaces'' and each interface is associated with a single device function. An exception to this is endpoint zero, which is used for device configuration and is not associated with any interface. A single device function composed of independently controlled interfaces is called a ''composite device''. A composite device only has a single device address because the host only assigns a device address to a function. When a USB device is first connected to a USB host, the USB device enumeration process is started. The enumeration starts by sending a reset signal to the USB device. The data rate of the USB device is determined during the reset signaling. After reset, the USB device's information is read by the host and the device is assigned a unique 7-bit address. If the device is supported by the host, the
device driver In computing Computing is any goal-oriented activity requiring, benefiting from, or creating computing machinery. It includes the study and experimentation of algorithmic processes and development of both computer hardware , hardware and softwa ...
s needed for communicating with the device are loaded and the device is set to a configured state. If the USB host is restarted, the enumeration process is repeated for all connected devices. The host controller directs traffic flow to devices, so no USB device can transfer any data on the bus without an explicit request from the host controller. In USB 2.0, the host controller polls the bus for traffic, usually in a round-robin fashion. The throughput of each USB port is determined by the slower speed of either the USB port or the USB device connected to the port. High-speed USB 2.0 hubs contain devices called transaction translators that convert between high-speed USB 2.0 buses and full and low speed buses. There may be one translator per hub or per port. Because there are two separate controllers in each USB 3.0 host, USB 3.0 devices transmit and receive at USB 3.0 data rates regardless of USB 2.0 or earlier devices connected to that host. Operating data rates for earlier devices are set in the legacy manner.


Device classes

The functionality of a USB device is defined by a class code sent to a USB host. This allows the host to load software modules for the device and to support new devices from different manufacturers. Device classes include:


USB mass storage / USB drive

USB mass storage device class The USB mass storage device class (also known as USB MSC or UMS) is a set of computing communications protocols, specifically a USB#Device_classes, USB Device Class, defined by the USB Implementers Forum that makes a USB device accessible to a host ...
(MSC or UMS) standardizes connections to storage devices. At first intended for magnetic and optical drives, it has been extended to support
flash drives A flash drive is a portable computer drive that uses flash memory Flash memory is an electronic Electronic may refer to: *Electronics Electronics comprises the physics, engineering, technology and applications that deal with the emissi ...

flash drives
. It has also been extended to support a wide variety of novel devices as many systems can be controlled with the familiar metaphor of file manipulation within directories. The process of making a novel device look like a familiar device is also known as extension. The ability to boot a write-locked
SD card Secure Digital, officially abbreviated as SD, is a proprietary format, proprietary non-volatile memory, non-volatile memory card format developed by the SD Association, SD Association (SDA) for use in portable devices. The standard was introduc ...

SD card
with a USB adapter is particularly advantageous for maintaining the integrity and non-corruptible, pristine state of the booting medium. Though most personal computers since early 2005 can boot from USB mass storage devices, USB is not intended as a primary bus for a computer's internal storage. However, USB has the advantage of allowing
hot-swapping Hot swapping is the replacement or addition of components to a computer system A computer is a machine that can be programmed to carry out Sequence, sequences of arithmetic or logical operations automatically. Modern computers can perform gen ...
, making it useful for mobile peripherals, including drives of various kinds. Several manufacturers offer external portable USB
hard disk drive A hard disk drive (HDD), hard disk, hard drive, or fixed disk is an electro-mechanical data storage device On a reel-to-reel tape recorder (Sony TC-630), the recorder is data storage equipment and the magnetic tape is a data stora ...

hard disk drive
s, or empty enclosures for disk drives. These offer performance comparable to internal drives, limited by the number and types of attached USB devices, and by the upper limit of the USB interface. Other competing standards for external drive connectivity include
eSATA Serial ATA (SATA, abbreviated from Serial AT Attachment) is a computer bus In computer architecture In computer engineering, computer architecture is a set of rules and methods that describe the functionality, organization, and implemen ...

eSATA
,
ExpressCard ExpressCard, initially called NEWCARD, is an interface to connect peripheral, peripheral devices to a computer, usually a laptop, laptop computer. The ExpressCard technical standard specifies the design of slots built into the computer and of expa ...
,
FireWire IEEE 1394 is an interface standard In telecommunication Telecommunication is the transmission of information Information can be thought of as the resolution of uncertainty; it answers the question of "What an entity is" and thus defin ...
(IEEE 1394), and most recently
Thunderbolt A thunderbolt or lightning bolt is a symbolic representation of lightning when accompanied by a loud thunderclap. In Indo-European mythology, the thunderbolt was identified with the Proto-Indo-European mythology#Sky Father, 'Sky Father'; thi ...
. Another use for USB mass storage devices is the portable execution of software applications (such as web browsers and VoIP clients) with no need to install them on the host computer.


Media Transfer Protocol

Media Transfer Protocol The Media Transfer Protocol (MTP) is an extension to the Picture Transfer Protocol Picture Transfer Protocol (PTP) is a protocol developed by the International Imaging Industry Association to allow the transfer of images from digital cameras to c ...
(MTP) was designed by
Microsoft Microsoft Corporation is an American multinational Multinational may refer to: * Multinational corporation, a corporate organization operating in multiple countries * Multinational force, a military body from multiple countries * Multinationa ...

Microsoft
to give higher-level access to a device's filesystem than USB mass storage, at the level of files rather than disk blocks. It also has optional
DRM DRM may refer to: Government, military and politics * Defense reform movement, U.S. campaign inspired by Col. John Boyd * Democratic Republic of Madagascar, a former socialist state (1975–1992) on Madagascar * Direction du renseignement militaire ...
features. MTP was designed for use with
portable media player A portable media player (PMP) or digital audio player (DAP) is a portable consumer electronics device capable of storing and playing digital media such as audio, images, and video files. The data is typically stored on a compact disc (CD), Di ...
s, but it has since been adopted as the primary storage access protocol of the
Android operating system Android is a mobile operating system A mobile operating system is an operating system An operating system (OS) is system software that manages computer hardware, computer software, software resources, and provides common daemon (computing), ...

Android operating system
from the version 4.1 Jelly Bean as well as Windows Phone 8 (Windows Phone 7 devices had used the Zune protocol an evolution of MTP). The primary reason for this is that MTP does not require exclusive access to the storage device the way UMS does, alleviating potential problems should an Android program request the storage while it is attached to a computer. The main drawback is that MTP is not as well supported outside of Windows operating systems.


Human interface devices

USB mice and keyboards can usually be used with older computers that have PS/2 connectors with the aid of a small USB-to-PS/2 adapter. For mice and keyboards with dual-protocol support, an adaptor that contains no may be used: the
USB hardware The initial versions of the USB Universal Serial Bus (USB) is an industry standard that establishes specifications for cables and connectors and protocols for connection, communication and power supply (Interface (computing), interfacing ...
in the keyboard or mouse is designed to detect whether it is connected to a USB or PS/2 port, and communicate using the appropriate protocol. Converters that connect PS/2 keyboards and mice (usually one of each) to a USB port also exist. These devices present two HID endpoints to the system and use a
microcontroller A microcontroller (MCU for ''microcontroller unit'') is a small computer A computer is a machine that can be programmed to carry out sequences of arithmetic or logical operations automatically. Modern computers can perform generic sets of ...

microcontroller
to perform bidirectional data translation between the two standards.


Device Firmware Upgrade mechanism

''Device Firmware Upgrade'' (DFU) is a vendor- and device-independent mechanism for upgrading the
firmware In computing Computing is any goal-oriented activity requiring, benefiting from, or creating computing machinery. It includes the study and experimentation of algorithmic processes and development of both computer hardware , hardware and soft ...
of USB devices with improved versions provided by their manufacturers, offering (for example) a way to deploy firmware bug fixes. During the firmware upgrade operation, USB devices change their operating mode effectively becoming a
PROM A promenade dance, commonly called a prom, is a dance party A dance party (also referred to as a dance) is a social gathering where dancing is the primary activity. Some dance parties are held in a casual setting and open to the public, such a ...
programmer. Any class of USB device can implement this capability by following the official DFU specifications. DFU can also give the user the freedom to flash USB devices with alternative firmware. One consequence of this is that USB devices after being re-flashed may act as various unexpected device types. For example, a USB device that the seller intends to be just a flash drive can "spoof" an input device like a keyboard. See
BadUSB In computing Computing is any goal-oriented activity requiring, benefiting from, or creating computing machinery. It includes the study and experimentation of algorithm of an algorithm (Euclid's algorithm) for calculating the greatest commo ...
.


Audio streaming

The USB Device Working Group has laid out specifications for audio streaming, and specific standards have been developed and implemented for audio class uses, such as microphones, speakers, headsets, telephones, musical instruments, etc. The working group has published three versions of audio device specifications: Audio 1.0, 2.0, and 3.0, referred to as "UAC" or "ADC". UAC 2.0 introduced support for High Speed USB (in addition to Full Speed), allowing greater bandwidth for multi-channel interfaces, higher sample rates, lower inherent latency, and 8× improvement in timing resolution in synchronous and adaptive modes. UAC2 also introduces the concept of clock domains, which provides information to the host about which input and output terminals derive their clocks from the same source, as well as improved support for audio encodings like DSD, audio effects, channel clustering, user controls, and device descriptions. UAC 3.0 primarily introduces improvements for portable devices, such as reduced power usage by bursting the data and staying in low power mode more often, and power domains for different components of the device, allowing them to be shut down when not in use. UAC 1.0 devices are still common, however, due to their cross-platform driverless compatibility, and also partly due to
Microsoft Microsoft Corporation is an American multinational corporation, multinational technology company, technology corporation which produces Software, computer software, consumer electronics, personal computers, and related services. Its best-know ...
's failure to implement UAC 2.0 for over a decade after its publication, having finally added support to
Windows 10 Windows 10 is a major release of the Windows NT Windows NT is a proprietary {{Short pages monitor