HID++ 2.0 is a self descriptive protocol built on top of the USB HID specification. The goal is to be able to interact with the device without having any knowledge about it beforehand.
| byte | 0 | 1 | 2 | 3 | 4 .. End | |
|---|---|---|---|---|---|---|
| bit | 15 .. 8 | 7 .. 0 | ||||
| description | Report ID | Device Index | Feature Index | Function | Software ID | Parameters |
- Report ID
The first byte of the report as defined in the HID specification. Supported report types by the device can be found in the HID report descriptor.
There following report types are supported:
Table 2 - Supported report types Report Type Value Lenght Short 0x107 bytes Long 0x1120 bytes - Device Index
- Target device index.
0xffis reserved for corded devices and receivers. - Feature Index
Each device has a feature table. It resolves the feature ID (see below) to the internal feature index. The IRoot feature is required to be present and have the index 0.
To read the feature table, you can use the
GetFeaturefunction from theIRootfeature.Table 3 - Example device feature table Feature ID Index 0x0000(IRoot)0 0x0002(IFeatureInfo)1 0x0003(Device Information)2 0x40a0(Fn Inversion)3 - Function
- Each HID++ feature can define a list of functions. To access a function you send a request with the desired feature index and the function ID.
- Software ID
- This ID is used in case multiple applications want to interact with the device. When you send a request with a software ID, the reponse's software ID will have the same value. You can use it to make sure a reply is meant for you.
- Parameters
- The parameters hold arbitrary data to interact with the functions. For requests they hold function arguments, and for responses, they hold return values.
| byte | 0 | 1 | 2 | 3 | 4 | 5 | 6 | |
|---|---|---|---|---|---|---|---|---|
| bit | 15 .. 8 | 7 .. 0 | ||||||
| description | 0x10 | Device Index | Feature Index | Function | Software ID | Parameters | ||
| byte | 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| bit | 15 .. 8 | 7 .. 0 | |||||||||||||||||||
| description | 0x11 | Device Index | Feature Index | Function | Software ID | Parameters | |||||||||||||||
- 00 - Important
0x0000IRoot0x0001IFeatureSet0x0002IFeatureInfo
- 01 - Common
0x0003Device Information0x0004Unit ID0x0005Device Name and Type0x0006Device Groups0x0007Device Friendly Name0x0008Keep-Alive0x0020Config Change0x002132-byte Unique Random Identifier0x0030Target Software0x0080Wireless Signal Strength0x00c0DFU Control Legacy0x00c1DFU Control Unsigned0x00c2DFU Control Signed0x00d0DFU0x1000Battery Unified Level Status0x1001Battery Voltage0x1010Charging Control0x1814Change Host0x1981Backlight 10x1982Backlight 20x1a00PresenterControl0x1b00Keyboard reprogrammable keys and Mouse buttons 10x1b01Keyboard reprogrammable Keys and Mouse buttons 20x1b02Keyboard reprogrammable Keys and Mouse buttons 30x1b03Keyboard reprogrammable Keys and Mouse buttons 40x1b04Keyboard reprogrammable Keys and Mouse buttons 50x1bc0Report HID Usages0x1c00Persistent Remappable Action0x1d4bWireless Device Status0x1df0Remaining Pairings
- 02 - Mouse
0x2001Swap left/right button0x2005Button Swap Cancel0x2006Pointer Axes Orientation0x2100Vertical Scrolling0x2110SmartShift wheel0x2120High-Resolution Scrolling0x2121HiRes Wheel0x2130Ratchet Wheel0x2150Thumbwheel0x2200Mouse Pointer0x2201Adjustable DPI0x2205Pointer Motion Scaling0x2230Sensor angle snapping0x2240Surface Tuning0x2400Hybrid Tracking Engine
- 04 - Keyboard
0x40a0Fn Inversion0x40a2Fn Inversion, with default state0x40a3Fn Inversion, for multi-host devices0x4100Encryption0x4220Lock Key State0x4301Solar Keyboard Dashboard Feature0x4520Keyboard Layout0x4521Disable Keys0x4522Disable Keys By Usage0x4530Dual Platform0x4540Keyboard International Layouts0x4600Crown
- 06 - Touchpad
0x6010Touchpad FW items0x6011Touchpad SW Items0x6012Touchpad Win8 FW items0x6020TAP enable0x6021TAP enable Extended0x6030Cursor Ballistic0x6040Touchpad resolution divider0x6100TouchPad Raw XY0x6110TouchMouse Raw TouchPoints0x6120BT TouchMouse Settings0x6500Gestures10x6501Gestures2
- 08 - Gaming Devices
0x8010Gaming G-Keys0x8020Gaming M-keys0x8030MacroRecord, MR Key0x8040Brightness control0x8060Adjustable Report Rate0x8070Color LED Effects0x8071RGB Effects0x8080Per Key Lighting0x8090Mode status0x8100Onboard Profiles0x8110Mouse Button Filter