

Jan Axelson’s USB Complete book is also a good source of information. These two documents give good picture of what kind of information may be expected from HID device. The USB.org website has HID Page containing many useful documents, the main two being Device Class Definition for Human Interface Devices and HID Usage Tables. The format and contents of report descriptors are well documented.

Therefore, the format of report can be (and often is) determined by parsing report descriptor. Report descriptor outlines what is contained in each byte (sometimes even each bit) of the report, type of data, units of measurement, range of values and other good stuff. Format of this report is contained in much bigger and complex data structure called report descriptor. Simple devices, like mouse or keyboard, usually generate single report, while more complex devices often generate several.Ī report is simple data structure, in most cases less than 10 bytes long. At the same time, various data can be sent from a computer to the device – LEDs on a keyboard or force-feedback on joystick or game controller, just to name a few. Devices operate with many different types of information – for example, keyboard has many buttons and sends key codes, mouse has just a few buttons so it sends just the state of those buttons, but is also capable to report its’ X and Y coordinates, while a steering wheel-type game controller sends wheel and pedal positions along with button presses. Computer learns what happened by polling device from time to time, parsing received reports and changes program flow accordingly. When user operates HID device, the device produces a piece of data called report. To run code examples you will also need USB Host Shield Arduino Library. Arduino platform is used to run programs and USB Host Shield is used to provide low-level interface to USB devices. It outlines basic principles, shows how to read HID report descriptor, and also contains two practical code examples. This article is the first one in series describing Arduino USB Host interaction with HID devices.

HID has been around for a while and is very popular among peripheral manufacturers thanks to support in many OSes and simplicity of exchange protocol. In addition to that, some non-interactive devices are also using HID specification for data exchange, such as UPSes, scales and weather stations. Typical examples are keyboard, mouse and joystick. Human Interface Device (HID) is a class consisting primarily of devices that are used by humans to control the operation of computer systems.
