Human Interface Device (HID) Class Decoder

http://www.usblyzer.com/usb-human-interface-device-hid-class-decoder.htm

 HID Class Decoder  Human Interface Device (HID) Class Decoder

Human Interface Device (HID) class is one of the most frequently used USB classes. The HID class consists primarily of devices that are used by humans to control the operation of computer systems. Examples of HID class devices include keyboards, pointing devices (such as mouse devices, joysticks and trackballs), control devices (such as steering wheels, throttles, rudder pedals, and data gloves), the devices that humans use to enter data directly into a computer (such as telephones, VCR remote controls, games and simulation devices), and other devices that may not require direct human interaction but provide data in a similar to HID class devices format (such as bar code readers, voltmeters, and thermometers).

The HID device class specification defines the configuration and communication protocols for human interface devices. USBlyzer includes fully comprehensive USB HID class decoder that helps you easily visualize various HID class specific requests. HID Descriptor, HID Report Descriptor and HID Reports are also decoded.


HID Class-Specific Protocols

All HID Class, SubClass and Protocols below are supported:

ClassSubClassProtocol
03h - HID00h - None
01h - Boot Interface
00h - None
01h - Keyboard
02h - Mouse


HID Class-Specific Descriptors

HID class devices use class-specific descriptors which are differ from standard USB descriptors. USBlyzer decodes and displays the following HID class-specific descriptors:

  • HID Descriptor

    A HID Descriptor specifies the number, type, and size of HID Report Descriptors and Physical Descriptors that are associated with a HID class device.

  • HID Report Descriptor

    The format of the data a HID class device can send or receive is not defined by the HID class specification. Instead, a HID device is required to provide HID Report Descriptor which enumerates all the data fields of a particular HID report the device can use. For each field in the HID report, the HID Report Descriptor defines how many bits the particular data item occupies, which usage it has, what range of values it uses, etc.

Below is an example of decoding Mouse HID Report Descriptor.


HID Class-Specific Requests

HID class-specific requests allow the host to inquire about the capabilities and state of a HID compliant device and to set the state of output and feature items.

All HID class-specific requests below are supported:

  • Get Report (GET_REPORT)

  • Set Report (SET_REPORT)

  • Get Idle (GET_IDLE)

  • Set Idle (SET_IDLE)

  • Get Protocol (GET_PROTOCOL)

  • Set Protocol (SET_PROTOCOL)

For complete description of USB HID class requests, refer to Device Class Definition for Human Interface Devices Specification.

Below are examples of decoding Get Descriptor (HID Report Descriptor) and Set Idle requests.

   


HID Reports

The basic communication mechanism for HID class devices is a HID Reports that is used to transfer HID control data. HID Report Descriptor defines the format of each report. Input and Output Reports specify control data and Feature Reports specify configuration data. A device may support more than one report type and more than one report of the same type.

USBlyzer extracts the individual items from the HID Report based on the HID Report Descriptor and displays them in an easy to view form. Since USBlyzer uses its own HID Parser it's possible to decode HID Reports at any time, even after the device has been unplugged or even if you analize previously saved capture file.

Below is an example of Joystick HID Input Report analysis.


HID Usage Pages

HID usages are organized into usage pages of related controls. The usage page and usage ID define a unique constant that describes a particular type of control. The following table lists the currently supported usage pages.

Page IDPage Name
01hGeneric Desktop Controls
02hSimulation Controls
03hVR Controls
04hSport Controls
05hGame Controls
06hGeneric Device Controls
07hKeyboard/Keypad
08hLEDs
09hButton
0AhOrdinal
0BhTelephony Devices
0ChConsumer Devices
0DhDigitizer
0FhPhysical Input Device (PID)
10hUnicode
14hAlphanumeric Display
40hMedical Instruments
80hMonitor Devices
81hMonitor Enumerated Values
82hVESA Virtual Controls
83hVESA Command
84hPower Device
85hBattery System


Composite USB Device with Single or Multiple HID Class Interfaces

A composite USB device exposes multiple functions to a host by using multiple interfaces which are separately managed by different drivers. Each interface of a composite device is, in many respects, like a separate device that has its own configuration descriptor and, in the case of HID class interface(s), HID report descriptor(s). The default control endpoint is shared by all the interfaces while separate HID class interfaces require non-shareable interrupt endpoint(s).

USBlyzer provides support for USB composite devices with single or multiple HID interfaces.

转载于:https://www.cnblogs.com/libra13179/p/7231728.html

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值