0x0000 · root
Map a feature ID to its session index and use ping to determine the HID++ protocol version.
Every HID++ 2.0 device exposes root at feature index 0. It maps a 16-bit feature ID to its session feature index. Its ping function also returns the device protocol version.
Spec: Logitech HID++ 2.0 — x0000 root. Cross-checked: Logi Options+ 2.8 (static analysis). Used by: Supported devices.
Function reference
The RootFeature wrapper is fixed at feature index 0.
Methods
| Function | HID++ fn | Signature | Returns |
|---|---|---|---|
get_feature | 0 | (id: u16) | Option<FeatureInformation> |
ping | 1 | (data: u8) | u8 |
All methods are asynchronous and return Result<…, Hidpp20Error>. get_feature returns None when response byte 0 is zero. ping returns only the echoed byte.
Types
FeatureInformation
get_feature returns this information for a supported feature.
| Field | Type | Description |
|---|---|---|
index | u8 | Session feature index used for later calls. |
typ | FeatureType | Feature classification flags from the type byte. |
version | u8 | Latest compatible feature version. It is 0 on Root v0 devices. |
FeatureType
FeatureType is a bitfield. OpenLogi retains unknown bits, but exposes fields only for the bits below.
| Field | Bit | Description |
|---|---|---|
obsolete | 7 | An older feature remains advertised for older software. |
hidden | 6 | End-user configuration software should ignore the feature. |
engineering | 5 | The feature is for engineering or manufacturing use. |
manufacturing_deactivatable | 4 | Manufacturing can permanently deactivate the feature. Available in feature type v2. |
compliance_deactivatable | 3 | Compliance processing can permanently deactivate the feature. Available in feature type v2. |
Events
This feature does not define events.
Wire format
Both requests use a 3-byte short payload. OpenLogi reads replies through extend_payload(), which presents a 16-byte payload.
get_feature (fn 0)
Request: [id_hi, id_lo, 0x00]
| Byte | Field | Notes |
|---|---|---|
| 0–1 | id | Requested feature ID, BE. |
| 2 | reserved | OpenLogi writes 0x00. |
| Byte | Field | Notes |
|---|---|---|
| 0 | index | The session feature index. 0 means unsupported, and OpenLogi returns None. |
| 1 | typ | FeatureType bits 7–3. OpenLogi retains other bits without named fields. |
| 2 | version | Latest compatible version. |
| 3–15 | trailing payload | OpenLogi ignores these bytes. |
ping (fn 1)
Request: [0x00, 0x00, data]
| Byte | Field | Notes |
|---|---|---|
| 0–1 | reserved | OpenLogi writes 0x00. |
| 2 | data | Caller-selected ping byte. |
| Byte | Field | Notes |
|---|---|---|
| 0 | protocol_num | HID++ protocol number. RootFeature::ping does not expose it. |
| 1 | target_sw | Target software identifier. RootFeature::ping does not expose it. |
| 2 | echoed data | RootFeature::ping returns this byte. |
| 3–15 | trailing payload | OpenLogi ignores these bytes. |
How OpenLogi uses it
Device::new() sends a Root ping through determine_version before it installs RootFeature. It rejects HID++ 1.0 peripherals and stores the detected HID++ 2.x protocol number and target software identifier.
Device::enumerate_features() calls get_feature(0x0001). It uses the returned index to install FeatureSetFeature and discover the remaining feature table. Root has no device state to restore.
Usage (Rust)
use hidpp::{
device::Device,
feature::root::RootFeature,
protocol::v20::Hidpp20Error,
};
async fn inspect_root(device: &Device) -> Result<(), Hidpp20Error> {
let root: std::sync::Arc<RootFeature> = device.root();
if let Some(info) = root.get_feature(0x1000).await? {
println!("0x1000 is at index {} and supports v{}", info.index, info.version);
}
assert_eq!(root.ping(0x42).await?, 0x42);
Ok(())
}