This article needs additional citations for verification .(September 2014) |
A human interface device (HID) is a type of computer device usually used by humans that takes input from or provides output to humans.
The term "HID" most commonly refers to the USB HID specification. The term was coined by Mike Van Flandern of Microsoft when he proposed that the USB committee create a Human Input Device class working group.[ when? ] The working group was renamed as the Human Interface Device class at the suggestion of Tom Schmidt of DEC because the proposed standard supported bi-directional communication.[ when? ]
HIDs for Output | |
Common HIDs | |
Less common HIDs | |
|
The HID standard was adopted primarily to enable innovation in PC input devices and to simplify the process of installing such devices. Prior to the introduction of the HID concept, devices usually conformed to strictly defined protocols for mouse, keyboards and joysticks; for example, the standard mouse protocol at the time supported relative X- and Y-axis data and binary input for up to two buttons, with no legacy support. All hardware innovations necessitated either overloading the use of data in an existing protocol or the creation of custom device drivers and the evangelization of a new protocol to developers. By contrast, all HID-defined devices deliver self-describing packages that may contain any number of data types and formats. A single HID driver on a computer parses data and enables dynamic association of data I/O with application functionality, which has enabled rapid innovation and development, and prolific diversification of new human-interface devices.
A working committee with representatives from several prominent companies developed the HID standard. The list of participants appears in the "Device Class Definition for Human Interface Devices (HID)" [1] document. The concept of a self-describing extensible protocol initially came from Mike Van Flandern and Manolito Adan while working on a project named "Raptor" at Microsoft, and independently from Steve McGowan, who worked on a "SIM" project that defined a device protocol for the VFX1 VR Headset and its peripherals based on ACCESS.bus while at Forte Technologies. SIM was also self-describing and extensible, however it was more focused on SIMulation devices used for VR and motion capture. After comparing notes at a Consumer Game Developer Conference, Steve and Mike agreed to collaborate on a new standard for the emerging Universal Serial Bus (USB).
Prior to HID (c.1995), proprietary drivers needed to be installed for almost every device attached to a PC. This meant that device vendors needed to track OS releases, and regularly offer updated drivers for their devices, and to develop drivers for each OS that they wanted to support. Also, at the time any novel devices, e.g., Joysticks designed for flight simulators with extra buttons or D-pads, required software support not only by the driver, but by each game that supported them to enable new controls. This meant that the device developers had the additional responsibility of enabling each game that they wanted to support. The ability for a HID device to describe itself via a Report Descriptor, decoupled hardware device developers from game developers. The Report Descriptor concept also meant that OS vendors could write a HID driver (Parser) that could accommodate almost any HID device a vendor could dream up, without the vendor needing to write or maintain a driver for every OS that they wanted to support.
So the HID class decoupled device vendors from game and OS vendors, enabling device vendors to innovate faster, and reducing their development costs (e.g., no drivers or game developer support). The HID Usage Table document defines thousands of controls that can be presented by HID devices. Game vendors can query the OS's HID parser to identify the set of controls that are presented by a device, then map those controls to features in their game. Since its original release, the HID Usage Table (HUT) document has had hundreds of new uses added to it.
The HID protocol has its limitations, but all modern mainstream operating systems will recognize standard USB HID devices, such as keyboards and mice, without needing a specialized driver. However its versatility has been demonstrated by the fact that it has not been updated in over 22 years, and it is still supported by every PC, tablet and cell phone in production today. USB, hence HID, devices can be hot-plugged, so when installed, a message saying that "A 'HID-compliant device' has been recognized" generally appears on screen. In comparison, this message did not usually appear for devices connected via the PS/2 6-pin DIN connectors which preceded USB. PS/2 did not typically support plug-and-play, which means that connecting a PS/2 keyboard or mouse with the computer powered on does not always work and may pose a hazard to the computer's motherboard. Likewise, the PS/2 standard did not support the HID protocol. The USB human interface device class describes a USB HID.
The HID protocol (Report Descriptor and Report mechanism) has been implemented on many buses other than USB, including Bluetooth and I2C.
There are also a number of extensions to HID defined in "HID Integrated Usage Table Documents", including uninterruptible power supplies, video monitor controls, point of sale devices, arcade and gaming (slot machines) devices.
The Report Descriptor exposes the messages that are generated or accepted by a HID device. Each message is referred to as a 'Report'. Reports can define bits/controls in a device that can be read or written, or generated periodically to keep a host updated on the current status of the device. For instance, a mouse typically generates a Report 200 times a second to inform the host of any movement or button presses. Report Descriptors are 'bit orientated', meaning that controls can present between 1 and 32 bits of information. Each control defined in a Report Descriptor has an ID and defines its size and position in its Report. A Report Descriptor can define many Reports, each reporting a different set, or combination of information.
For example, a basic mouse defines a 3 byte Report where the least significant (0) bit of the report is the left button, the next (1) bit is the middle button, and the third (2) bit is the right button. To allow the mouse 8-bit X and Y position coordinates to conveniently land on byte boundaries, a 5-bit 'pad' is defined. Then the X coordinate is defined as an 8-bit relative value (i.e., number of 'mickeys' since the previous report) that resides in bit positions 8 through 15, and the Y coordinate is defined as an 8-bit relative value that resides in bit positions 16 through 24, resulting in a data packet that is presented to the host.
A Report Descriptor is extremely versatile, allowing a device to specify the resolution, range, and many other characteristics of each control that it presents. Being designed at a time when a mouse or keyboard controller was lucky to have 1KB of ROM for all its code and data, the Report Descriptor syntax has many features that allow its size to be minimized e.g., selected control parameters can persist across control multiple definitions, only needing to be redeclared if their value changes. The reports generated by a basic mouse can be described in 50 bytes, and a 104 keyboard in 65 bytes.
A little known or understood feature of HID is the Physical Descriptor. The Physical Descriptor is used to define the parts of the human body that interact with the individual controls defined in the Report Descriptor. When controlling a game, the index finger and thumb are usually used to invoke repetitive actions. Because these fingers are considered to have the fastest 'twitch' response, they are typically used for pulling the trigger of a gun, or activating an often used game function. The Physical Descriptor allows a device vendor identify that which fingers rests on each control and prioritize the set of controls that can be reached by an individual finger. This feature enables a game vendor to intelligently present the best default button mapping, even for a device that didn't exist when the game was developed. The Physical Descriptor also enables full body motion capture information to be presented by a HID device, i.e., the angle, orientation, relative or absolute position of any joint in the human body. And through the Report Descriptor, the motion capture data can be presented at whatever resolution that the device can support.
In the HID protocol, there are 2 entities: the "host" and the "device". The device is the entity that directly interacts with a human, such as a keyboard or mouse. The host communicates with the device and receives input data from the device on actions performed by the human. Output data flows from the host to the device and then to the human. The most common example of a host is a PC but some cell phones and PDAs also can be hosts.
The HID protocol makes implementation of devices very simple. Devices define their data packets and then present a "HID descriptor" to the host. The HID descriptor is a hard coded array of bytes that describes the device's data packets. This includes: how many packets the device supports, the size of the packets, and the purpose of each byte and bit in the packet. For example, a keyboard with a calculator program button can tell the host that the button's pressed/released state is stored as the 2nd bit in the 6th byte in data packet number 4 (note: these locations are only illustrative and are device-specific). The device typically stores the HID descriptor in ROM and does not need to intrinsically understand or parse the HID descriptor. Some mouse and keyboard hardware in the market today is implemented using only an 8-bit CPU.
The host is expected to be a more complex entity than the device. The host needs to retrieve the HID descriptor from the device and parse it before it can fully communicate with the device. Parsing the HID descriptor can be complicated. Multiple operating systems were known to have shipped bugs in the device drivers responsible for parsing the HID descriptors years after the device drivers were originally released to the public. However, this complexity is the reason why rapid innovation with HID devices is possible.
The above mechanism describes what is known as HID "report protocol". Because it was understood that not all hosts would be capable of parsing HID descriptors, HID also defines "boot protocol". In boot protocol, only specific devices are supported with only specific features because fixed data packet formats are used. The HID descriptor is not used in this mode so innovation is limited. However, the benefit is that minimal functionality is still possible on hosts that otherwise would be unable to support HID. The only devices supported in boot protocol are
One common usage of boot mode is during the first moments of a computer's boot up sequence. Directly configuring a computer's BIOS is often done using only boot mode. Sometimes a message will appear informing the user that the device has installed the correct driver and is now usable.
According to the HID specification, a device is described, during the report mode, as a set of controls or group of controls. Controls are matched by a field containing the data, and another containing a usage tag. Each usage tag is described in the spec as the constructor suggested use of the data described in the report mode.
The
is a Windows app that can be used to generate all the descriptors associated with a HID device (see link below). It performs syntax checking, and can generate C, C Header and binary files for the HID descriptors. Its text-based Usage Table definion files can also be easily extended to define proprietary Usages (control types) or Usage Tables (the set of Usages associated with a device or feature).Since HID's original definition over USB, HID is now also used in other computer communication buses. This enables HID devices that traditionally were only found on USB to also be used on alternative buses. This is done since existing support for USB HID devices can typically be adapted much faster than having to invent an entirely new protocol to support mouse, touchpad, keyboards, and the like. Known buses that use HID are:
Parallel ATA (PATA), originally AT Attachment, also known as Integrated Drive Electronics (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, optical disc drives, and tape drives in computers.
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.
Universal Serial Bus (USB) is an industry standard that allows data exchange and delivery of power between many types of electronics. It specifies its architecture, in particular its 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.
I2C (Inter-Integrated Circuit; pronounced as “eye-squared-see” or “eye-two-see”), alternatively known as I2C or IIC, is a synchronous, multi-controller/multi-target (historically-termed as master/slave), single-ended, serial communication bus invented in 1982 by Philips Semiconductors. It is widely used for attaching lower-speed peripheral integrated circuits (ICs) to processors and microcontrollers in short-distance, intra-board communication.
Serial Peripheral Interface (SPI) is a de facto standard for synchronous serial communication, used primarily in embedded systems for short-distance wired communication between integrated circuits.
Display Data Channel (DDC) is a collection of protocols for digital communication between a computer display and a graphics adapter that enable the display to communicate its supported display modes to the adapter and that enable the computer host to adjust monitor parameters, such as brightness and contrast.
A KVM switch is a hardware device that allows a user to control multiple computers from one or more sets of keyboards, video monitors, and mouse.
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.
In computing, the USB human interface device class is a part of the USB specification for computer peripherals: it specifies a device class for human interface devices such as keyboards, mice, game controllers and alphanumeric display devices.
Ethernet over USB is the use of a USB link as a part of an Ethernet network, resulting in an Ethernet connection over USB.
DeviceNet is a network protocol used in the automation industry to interconnect control devices for data exchange. It utilizes the Common Industrial Protocol over a Controller Area Network media layer and defines an application layer to cover a range of device profiles. Typical applications include information exchange, safety devices, and large I/O control networks.
Universal Serial Bus 3.0, marketed as SuperSpeed USB, is the third major version of the Universal Serial Bus (USB) standard for interfacing computers and electronic devices. It was released in November 2008. The USB 3.0 specification defined a new architecture and protocol, named SuperSpeed, which included a new lane for providing full-duplex data transfers that physically required five additional wires and pins, while also adding a new signal coding scheme, and 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 raw 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.
The Display Serial Interface (DSI) is a specification by the Mobile Industry Processor Interface (MIPI) Alliance aimed at reducing the cost of display controllers in a mobile device. It is commonly targeted at LCD and similar display technologies. It defines a serial bus and a communication protocol between the host, the source of the image data, and the device which is the destination. The interface is closed source, which means that the specification of the interface is not open to the public. The maintenance of the interface is the responsibility of the MIPI Alliance. Only legal entities can be members. These members or the persons commissioned and approved by them have access to the specification in order to use it in their possible applications.
SCSI / ATA Translation (SAT) is a set of standards developed by the T10 subcommittee, defining how to communicate with ATA devices through a SCSI application layer. The standard attempts to be consistent with the SCSI architectural model, the SCSI Primary Commands, and the SCSI Block Commands standards.
The eXtensible Host Controller Interface (xHCI) is a technical specification that provides a detailed framework for the functioning of a computer's host controller for Universal Serial Bus (USB). Known alternately as the USB 3.0 host controller specification, xHCI is designed to be backward compatible, supporting a wide range of USB devices from older USB 1.x to the more recent USB 3.x versions.
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 computers to provide most input/output duties for those computers. Unlike most I/O systems of the era, such as RS-232, SIO included a lightweight protocol that allowed multiple devices to be attached to a single daisy-chained port that supported dozens of devices. It also supported plug-and-play operations. SIO's designer, Joe Decuir, credits his work on the system as the basis of USB.
RTP-MIDI is a protocol to transport MIDI messages within Real-time Transport Protocol (RTP) packets over Ethernet and WiFi networks. It is completely open and free, and is compatible both with LAN and WAN application fields. Compared to MIDI 1.0, RTP-MIDI includes new features like session management, device synchronization and detection of lost packets, with automatic regeneration of lost data. RTP-MIDI is compatible with real-time applications, and supports sample-accurate synchronization for each MIDI message.
CCID protocol is a USB protocol that allows a smartcard to be connected to a computer via a card reader using a standard USB interface, without the need for each manufacturer of smartcards to provide its own reader or protocol. This allows the smartcard to be used as a security token for authentication and data encryption, such as that used in BitLocker. Chip card interface devices come in a variety of forms. The smallest CCID form is a standard USB dongle and may contain a SIM card or Secure Digital card inside the USB dongle. Another popular interface is a USB smart card reader keyboard, which in addition to being a standard USB keyboard, has an built-in slot for accepting a smartcard. However, not all CCID compliant devices accept removable smartcards, for example, select Yubikey hardware authentication devices support CCID, where they play the role of both the card reader and the smartcard itself.
This article provides information about the communications aspects of Universal Serial Bus (USB): Signaling, Protocols, Transactions. USB is an industry-standard used to specify cables, connectors, and protocols that are used for communication between electronic devices. USB ports and cables are used to connect hardware such as printers, scanners, keyboards, mice, flash drives, external hard drives, joysticks, cameras, monitors, and more to computers of all kinds. USB also supports signaling rates from 1.5 Mbit/s to 80 Gbit/s depending on the version of the standard. The article explains how USB devices transmit and receive data using electrical signals over the physical layer, how they identify themselves and negotiate parameters such as speed and power with the host or other devices using standard protocols such as USB Device Framework and USB Power Delivery, and how they exchange data using packets of different types and formats such as token, data, handshake, and special packets.