Open main menu
Home
Random
Recent changes
Special pages
Community portal
Preferences
About Wikipedia
Disclaimers
Incubator escapee wiki
Search
User menu
Talk
Dark mode
Contributions
Create account
Log in
Editing
USB
(section)
Warning:
You are not logged in. Your IP address will be publicly visible if you make any edits. If you
log in
or
create an account
, your edits will be attributed to your username, along with other benefits.
Anti-spam check. Do
not
fill this in!
== Device classes <span class="anchor" id="PHDC"></span>== 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:<ref>{{Cite web | url = https://www.usb.org/defined-class-codes | title = USB Class Codes | date = 22 September 2018 | website = USB Implementers Forum | url-status=live | archive-url = https://web.archive.org/web/20180922111633/https://www.usb.org/defined-class-codes | archive-date = 22 September 2018}}</ref> {| class="wikitable" |- ! Class<br />([[hexadecimal]]) ! Usage ! Description ! Examples, or exception |- | 00 | Device | Unspecified<ref>Use class information in the interface descriptors. This base class is defined to use in device descriptors to indicate that class information should be determined from the Interface Descriptors in the device.</ref> | Device class is unspecified, interface descriptors are used to determine needed drivers |- | 01 | Interface | Audio | [[Loudspeaker|Speaker]], [[microphone]], [[sound card]], [[MIDI#USB and FireWire|MIDI]] |- | 02 | Both | [[USB communications device class|Communications and CDC control]] | [[UART]] and [[RS-232]] [[USB adapter|serial adapter]], [[modem]], [[Wi-Fi]] adapter, [[Ethernet]] adapter. Used together with class 0Ah ''(CDC-Data'') below |- | 03 | Interface | [[USB human interface device class|Human interface device (HID)]] | [[Keyboard (computing)|Keyboard]], [[Mouse (computing)|mouse]], joystick |- | 05 | Interface | Physical interface device (PID) | Force feedback joystick |- | 06 | Interface | Media ([[Picture Transfer Protocol|PTP]]/[[Media Transfer Protocol|MTP]]) | [[Image scanner|Scanner]], [[Digital camera|Camera]] |- | 07 | Interface | [[Computer printer|Printer]] | [[Laser printer]], [[inkjet printer]], [[CNC machine]] |- | 08 | Interface | [[USB mass storage]], [[USB Attached SCSI]] | [[USB flash drive]], [[memory card reader]], [[digital audio player]], [[digital camera]], external drive |- | 09 | Device | [[USB hub]] | High speed USB hub |- | 0A | Interface | CDC-Data | Used together with class 02h ''(Communications and CDC Control'') above |- | 0B | Interface | [[Smart card]] | USB smart card reader |- | 0D | Interface | Content security | Fingerprint reader |- | 0E | Interface | [[USB video device class|Video]] | [[Webcam]] |- | 0F | Interface | Personal healthcare device class (PHDC) | Pulse monitor (watch) |- | 10 | Interface | Audio/video (AV) | [[Webcam]], TV |- | 11 | Device | Billboard | Describes USB-C alternate modes supported by device |- | DC | Both | Diagnostic device | USB compliance testing device |- | E0 | Interface | [[Wireless]] controller | [[Bluetooth]] adapter |- | EF | Both | Miscellaneous | [[ActiveSync]] device |- | FE | Interface | Application-specific | [[IrDA]] Bridge, [[RNDIS]], Test & Measurement Class (USBTMC),<ref>{{Cite web |title= Universal Serial Bus Test and Measurement Class Specification (USBTMC) Revision 1.0 |url= http://sdpha2.ucsd.edu/Lab_Equip_Manuals/USBTMC_1_00.pdf |date= 14 April 2003 |publisher= USB Implementers Forum |via= sdpha2.ucsd.edu |access-date= 10 May 2018 |archive-date= 23 December 2018 |archive-url= https://web.archive.org/web/20181223041215/http://sdpha2.ucsd.edu/Lab_Equip_Manuals/USBTMC_1_00.pdf |url-status=live}}</ref> USB DFU (Device Firmware Upgrade)<ref name="dfu-1.1">{{cite web |url = https://www.usb.org/document-library/device-firmware-upgrade-11-new-version-31-aug-2004 |title = Universal Serial Bus Device Class Specification for Device Firmware Upgrade, Version 1.1 |date = 15 October 2004 |access-date = 8 September 2014 |publisher = USB Implementers Forum |pages = 8β9 |url-status = live |archive-url = https://web.archive.org/web/20141011015811/http://www.usb.org/developers/docs/devclass_docs/DFU_1.1.pdf |archive-date = 11 October 2014 }}</ref> |- | FFh | Both | Vendor-specific | Indicates that a device needs vendor-specific drivers |} === USB mass storage / USB drive <span class="anchor" id="MASSSTORAGE"></span>=== {{See also|USB mass storage device class|Disk enclosure|External hard disk drive}} [[File:SanDisk-Cruzer-USB-4GB-ThumbDrive.jpg|thumb|A [[USB flash drive|flash drive]], a typical USB mass-storage device]] [[File:M.2 2242 SSD connected into USB 3.0 adapter.jpg|thumb|An [[M.2]] (2242) solid-state-drive ([[SSD]]) connected into a USB 3.0 adapter connected to computer]] The [[USB mass storage device class]] (MSC or UMS) standardizes connections to storage devices. At first intended for magnetic and optical drives, it has been extended to support [[USB flash drive|flash drives]] and [[SD card]] readers. The ability to boot a write-locked [[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]], making it useful for mobile peripherals, including drives of various kinds. Several manufacturers offer external portable USB [[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]], [[ExpressCard]], [[FireWire]] (IEEE 1394), and most recently [[Thunderbolt (interface)|Thunderbolt]]. 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.<ref>{{cite web | url = http://www.makeuseof.com/tag/portable-software-usb/ | title = 100 Portable Apps for your USB Stick (both for Mac and Win) | access-date = 30 October 2008 | url-status=live | archive-url = https://web.archive.org/web/20081202121455/http://www.makeuseof.com/tag/portable-software-usb/ | archive-date = 2 December 2008}}</ref><ref>{{cite web | url = http://www.VoIP-Download.com/Skype.htm#USB/ | title = Skype VoIP USB Installation Guide | access-date = 30 October 2008 | url-status=dead | archive-url = https://web.archive.org/web/20140706153501/http://www.voip-download.com/Skype.htm#USB/ | archive-date = 6 July 2014}}</ref> === Media Transfer Protocol === {{See also|Picture Transfer Protocol}} [[Media Transfer Protocol]] (MTP) was designed by [[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 [[Digital rights management|DRM]] features. MTP was designed for use with [[portable media player]]s, but it has since been adopted as the primary storage access protocol of the [[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 === {{Main|USB human interface device class}} A USB mouse or keyboard can usually be used with older computers that have [[PS/2 port]]s with the aid of a small USB-to-PS/2 adapter. For mice and keyboards with dual-protocol support, a passive adapter that contains no [[Electronic circuit|logic circuitry]] may be used: the [[USB hardware]] 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.{{Citation needed|date=May 2023}} Active converters that connect USB keyboards and mice (usually one of each) to PS/2 ports also exist.<ref>{{cite web |url=http://www.startech.com/Server-Management/KVM-Switches/PS-2-to-USB-Keyboard-and-Mouse-Adapter~PS22USB |title=PS/2 to USB Keyboard and Mouse Adapter |archive-url=https://web.archive.org/web/20141112214808/http://www.startech.com/Server-Management/KVM-Switches/PS-2-to-USB-Keyboard-and-Mouse-Adapter~PS22USB |website=StarTech.com |archive-date=12 November 2014 |access-date=21 May 2023}}</ref> === Device Firmware Upgrade mechanism <span class="anchor" id="DFU"></span>=== ''Device Firmware Upgrade'' (DFU) is a generic mechanism for upgrading the [[firmware]] 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 [[Programmable read-only memory|PROM]] programmer. Any class of USB device can implement this capability by following the official DFU specifications. Doing so allows use of DFU-compatible host tools to update the device.<ref name="dfu-1.1"/><ref name="dfu-1.0">{{cite web | url = http://www.usb.org/developers/devclass_docs/usbdfu10.pdf | archive-url = https://web.archive.org/web/20140824054756/http://www.usb.org/developers/devclass_docs/usbdfu10.pdf | title = Universal Serial Bus Device Class Specification for Device Firmware Upgrade, Version 1.0 | date = 13 May 1999 | access-date = 8 September 2014 | archive-date = 24 August 2014 | publisher = USB Implementers Forum | pages = 7β8 }}</ref><ref>{{cite web | url = https://admin.fedoraproject.org/pkgdb/package/dfu-util/ | title = rpms/dfu-util: USB Device Firmware Upgrade tool | date = 14 May 2014 | access-date = 8 September 2014 | website = fedoraproject.org | archive-date = 8 September 2014 | archive-url = https://web.archive.org/web/20140908112041/https://admin.fedoraproject.org/pkgdb/package/dfu-util/ | url-status = live }}</ref> DFU is sometimes used as a flash memory programming protocol in microcontrollers with built-in USB bootloader functionality. <ref>{{cite web | url = https://www.st.com/resource/en/application_note/cd00264379-usb-dfu-protocol-used-in-the-stm32-bootloader-stmicroelectronics.pdf | title = AN3156: USB DFU protocol used in the STM32 bootloader | date = 7 February 2023 | access-date = 28 January 2024 | website = st.com }}</ref> === 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 four versions of audio device specifications:<ref>{{Cite press release |date=27 September 2016 |title=USB-IF Announces USB Audio Device Class 3.0 Specification |location=Houston, Texas & Beaverton, Oregon |url=https://www.businesswire.com/news/home/20160927006252/en/USB-IF-Announces-USB-Audio-Device-Class-3.0 |website=Business Wire |access-date=4 May 2018 |archive-date=4 May 2018 |archive-url=https://web.archive.org/web/20180504155618/https://www.businesswire.com/news/home/20160927006252/en/USB-IF-Announces-USB-Audio-Device-Class-3.0 |url-status=live }}</ref><ref>{{Cite web |url=http://www.usb.org/developers/docs/devclass_docs/ |title=USB Device Class Specifications |website=www.usb.org |access-date=4 May 2018 |archive-date=13 August 2014 |archive-url=https://web.archive.org/web/20140813051139/http://www.usb.org/developers/docs/devclass_docs/ |url-status=live }}</ref><ref>{{Cite web |title=USB Audio Devices Release 4.0 and Adopters Agreement {{!}} USB-IF |url=https://www.usb.org/document-library/usb-audio-devices-release-40-and-adopters-agreement |access-date=2025-05-20 |website=www.usb.org}}</ref> USB Audio 1.0, 2.0, 3.0 and 4.0, referred to as "UAC"<ref name="xmos2015"/> or "ADC".<ref>{{Cite web |url=https://docs.microsoft.com/en-us/windows-hardware/drivers/audio/usb-2-0-audio-drivers |title=USB Audio 2.0 Drivers |website=Microsoft Hardware Dev Center |access-date=4 May 2018 |quote=ADC-2 refers to the USB Device Class Definition for Audio Devices, Release 2.0. |archive-date=4 May 2018 |archive-url=https://web.archive.org/web/20180504155514/https://docs.microsoft.com/en-us/windows-hardware/drivers/audio/usb-2-0-audio-drivers |url-status=live }}</ref> 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.<ref>{{Cite web|url=https://www.synopsys.com/designware-ip/technical-bulletin/usb-audio-dwtb-q117.html|title=New USB Audio Class for USB Type-C Digital Headsets|website=Synopsys.com|access-date=7 May 2018|archive-date=7 May 2018|archive-url=https://web.archive.org/web/20180507221645/https://www.synopsys.com/designware-ip/technical-bulletin/usb-audio-dwtb-q117.html|url-status=live}}</ref> UAC 2.0 introduced support for High Speed USB (in addition to Full Speed), allowing greater bandwidth for multi-channel interfaces, higher sample rates,<ref name=":2">{{Cite web |url=http://thewelltemperedcomputer.com/KB/USB.html |title=USB |website=The Well-Tempered Computer |last=Kars |first=Vincent |date=May 2011 |access-date=7 May 2018 |quote=All operating systems (Win, OSX, and Linux) support USB Audio Class 1 natively. This means you don't need to install drivers, it is plug&play. |archive-date=7 May 2018 |archive-url=https://web.archive.org/web/20180507153825/http://thewelltemperedcomputer.com/KB/USB.html |url-status=live }}</ref> lower inherent latency,<ref>{{Cite web |url=https://www.xmos.ai/file/fundamentals-of-usb-audio?version=latest |title=Fundamentals of USB Audio |publisher=XMOS Ltd. |website=www.xmos.com |format=PDF |date=2015 |access-date=10 December 2020 |quote=Note that Full Speed USB has a much higher intrinsic latency of 2ms}}</ref><ref name="xmos2015"/> and 8Γ improvement in timing resolution in synchronous and adaptive modes.<ref name="xmos2015"/> UAC2 also introduced 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 [[Direct Stream Digital|DSD]], audio effects, channel clustering, user controls, and device descriptions.<ref name="xmos2015"/><ref name=":4"/> UAC 1.0 devices are still common, however, due to their cross-platform driverless compatibility,<ref name=":2"/> and also partly due to [[Microsoft Windows|Microsoft]]'s failure to implement UAC 2.0 for over a decade after its publication, having finally added support to [[Windows 10]] through the Creators Update on 20 March 2017.<ref>{{Cite web |url=https://blogs.windows.com/windowsexperience/2016/09/21/announcing-windows-10-insider-preview-build-14931-for-pc/ |title=Announcing Windows 10 Insider Preview Build 14931 for PC |website=Windows Experience Blog |date=21 September 2016 |access-date=7 May 2018 |quote=We now have native support for USB Audio 2.0 devices with an inbox class driver! This is an early version of the driver that does not have all features enabled |archive-date=23 September 2016 |archive-url=https://web.archive.org/web/20160923032703/https://blogs.windows.com/windowsexperience/2016/09/21/announcing-windows-10-insider-preview-build-14931-for-pc/ |url-status=live }}</ref><ref>{{Cite web |url=http://amplioaudio.blogspot.com/2017/09/usb-audio-class-20-support-in-windows.html |title=Ampliozone: USB Audio Class 2.0 Support in Windows 10, FINALLY!!!! |last=Plummer |first=Gregg |date=20 September 2017 |website=Ampliozone |access-date=7 May 2018 |archive-date=7 May 2018 |archive-url=https://web.archive.org/web/20180507154036/http://amplioaudio.blogspot.com/2017/09/usb-audio-class-20-support-in-windows.html |url-status=live }}</ref><ref name=":4">{{Cite web|url=https://www.computeraudiophile.com/ca/bits-and-bytes/this-just-in-microsoft-launches-native-class-2-usb-audio-support-wait-what-r647/|title=This Just In: Microsoft Launches Native Class 2 USB Audio Support. Wait, What?|website=Computer Audiophile|date=2 May 2017 |access-date=7 May 2018|quote=Class 2 support enables much higher sample rates such as PCM 24 bit / 384 kHz and DSD (DoP) up through DSD256.|archive-date=2 September 2018|archive-url=https://web.archive.org/web/20180902023557/https://www.computeraudiophile.com/ca/bits-and-bytes/this-just-in-microsoft-launches-native-class-2-usb-audio-support-wait-what-r647/|url-status=live}}</ref> UAC 2.0 is also supported by [[macOS]], [[iOS]], and [[Linux]],<ref name="xmos2015"/> however [[Android (operating system)|Android]] only implements a subset of the UAC 1.0 specification.<ref name=":5">{{Cite web |url=https://source.android.com/docs/core/audio/usb#hostAudio |title=USB Digital Audio |website=Android Open Source Project |access-date=16 February 2023 |quote=Synchronous sub-mode is not commonly used with audio because both host and peripheral are at the mercy of the USB clock. }}</ref> USB provides three isochronous (fixed-bandwidth) synchronization types,<ref>{{cite web|url=http://www.atmel.com/Images/doc32139.pdf|title=32-bit Atmel Microcontroller Application Note|date=2011|publisher=Atmel Corporation|access-date=13 April 2016|url-status=live|archive-url=https://web.archive.org/web/20160506204128/http://www.atmel.com/Images/doc32139.pdf|archive-date=6 May 2016}}</ref> all of which are used by audio devices:<ref>{{Cite web|url=http://www.ti.com/lit/ds/symlink/pcm2906c.pdf|title=PCM2906C datasheet|date=November 2011|website=Texas Instruments|quote=The PCM2906C employs SpAct architecture, TI's unique system that recovers the audio clock from USB packet data.|access-date=4 May 2018|archive-date=4 May 2018|archive-url=https://web.archive.org/web/20180504225235/http://www.ti.com/lit/ds/symlink/pcm2906c.pdf|url-status=live}}</ref> * Asynchronous β The ADC or DAC are not synced to the host computer's clock at all, operating off a free-running clock local to the device. * Synchronous β The device's clock is synced to the USB start-of-frame (SOF) or Bus Interval signals. For instance, this can require syncing an 11.2896 MHz clock to a 1 kHz SOF signal, a large frequency multiplication.<ref>{{Cite web|url=http://www.cypress.com/file/102921/download|title=Designing Modern USB Audio Systems|last=Castor-Perry|first=Kendall|date=October 2010|website=Cypress Semiconductor|access-date=4 May 2018|archive-date=5 May 2018|archive-url=https://web.archive.org/web/20180505172950/http://www.cypress.com/file/102921/download|url-status=live}}</ref><ref name=":1">{{Cite web|url=http://www.cypress.com/file/122521/download|title=Programmable Clock Generation and Synchronization for USB Audio Systems|last=Castor-Perry|first=Kendall|date=2011|website=Cypress Semiconductor|quote=Early USB replay interfaces used synchronous mode but acquired a reputation for poor quality of the recovered clock (and resultant poor replay quality). This was primarily due to deficiencies of clocking implementation rather than inherent shortcomings of the approach.|access-date=4 May 2018|archive-date=4 May 2018|archive-url=https://web.archive.org/web/20180504181023/http://www.cypress.com/file/122521/download|url-status=live}}</ref> * Adaptive β The device's clock is synced to the amount of data sent per frame by the host<ref>{{Cite web|url=http://www.thewelltemperedcomputer.com/Lib/Hitoshi%20Kondoh%20story.pdf|title=The D/A diaries: A personal memoir of engineering heartache and triumph|last=Kondoh|first=Hitoshi|date=20 February 2002|quote=The fact that there is no clock line within the USB cable leads to a thinner cable, which is an advantage. But, no matter how good the crystal oscillators are at the send and receive ends, there will always be some difference between the two...|access-date=4 May 2018|archive-date=12 December 2019|archive-url=https://web.archive.org/web/20191212230749/http://www.thewelltemperedcomputer.com/Lib/Hitoshi%20Kondoh%20story.pdf|url-status=live}}</ref> While the USB spec originally described asynchronous mode being used in "low cost speakers" and adaptive mode in "high-end digital speakers",<ref>{{Cite web |url=http://www.usb.org/developers/docs/usb20_docs/ |title=USB 2.0 Documents |website=www.usb.org |access-date=7 May 2018 |archive-date=3 December 2017 |archive-url=https://web.archive.org/web/20171203144114/http://www.usb.org/developers/docs/usb20_docs/ |url-status=live }}</ref> the opposite perception exists in the [[hi-fi]] world, where asynchronous mode is advertised as a feature, and adaptive/synchronous modes have a bad reputation.<ref>{{Cite web |url=https://www.cambridgeaudio.com/usa/en/blog/our-guide-usb-audio-why-should-i-use-it |title=Our Guide to USB Audio β Why Should I Use it? |website=Cambridge Audio |date=9 May 2016 |access-date=7 May 2018 |quote=Synchronous USB DAC is the lowest quality of the three ... Adaptive ... means that there is no continuous, accurate master clock in the DAC, which causes jitter in the audio stream. ... Asynchronous β this is the most complex to implement but it is a huge improvement on the other types. |archive-date=7 May 2018 |archive-url=https://web.archive.org/web/20180507153701/https://www.cambridgeaudio.com/usa/en/blog/our-guide-usb-audio-why-should-i-use-it |url-status=live }}</ref><ref>{{Cite web |url=http://thewelltemperedcomputer.com/Intro/SQ/USB_USB.htm |title=USB versus USB |website=The Well-Tempered Computer |last=Kars |first=Vincent |date=July 2012 |access-date=7 May 2018 |quote=Synchronous is not used in a quality DAC as it is very jittery. ... asynchronous is the better of these modes. |archive-date=22 April 2018 |archive-url=https://web.archive.org/web/20180422204100/http://thewelltemperedcomputer.com/Intro/SQ/USB_USB.htm |url-status=live }}</ref><ref name=":5"/> In reality, all types can be high-quality or low-quality, depending on the quality of their engineering and the application.<ref name=":1"/><ref name="xmos2015"/><ref>{{Cite web |url=https://www.head-fi.org/threads/low-jitter-usb-dan-lavry-michael-goodman-adaptive-asynchronous.493152/#post-6661517 |title=Low-Jitter USB: Dan Lavry, Michael Goodman, Adaptive, Asynchronous |website=Head-Fi |access-date=7 May 2018 |quote=Some manufacturers may lead you to believe that Asynchronous USB transfers are superior to Adaptive USB transfers and that therefore you must believe in the asynchronous solution. This no more true than saying that you "must" hold the fork in your left hand. In fact, if you know what you are doing, you will feed yourself with either hand. The issue is really about good engineering practices. |archive-date=7 May 2018 |archive-url=https://web.archive.org/web/20180507153738/https://www.head-fi.org/threads/low-jitter-usb-dan-lavry-michael-goodman-adaptive-asynchronous.493152/#post-6661517 |url-status=live }}</ref> Asynchronous has the benefit of being untied from the computer's clock, but the disadvantage of requiring [[sample rate conversion]] when combining multiple sources.
Edit summary
(Briefly describe your changes)
By publishing changes, you agree to the
Terms of Use
, and you irrevocably agree to release your contribution under the
CC BY-SA 4.0 License
and the
GFDL
. You agree that a hyperlink or URL is sufficient attribution under the Creative Commons license.
Cancel
Editing help
(opens in new window)