OpenLogi

0x0000 · root

The HID++ 2.0 entry point — map a feature ID to its session index and verify the link with a ping.

The entry point of every HID++ 2.0 device. root maps a 16-bit feature ID to the feature index the device uses for that feature in the current session, and reports the HID++ protocol version.

A client calls getFeature(featureId) first, then addresses every other feature by the index it returns. root itself is always at index 0.

Spec: Logitech HID++ 2.0 — x0000 root. Used by: all device access.

Function reference

The RootFeature wrapper (0x0000, always bound to feature index 0) exposes:

Methods

FunctionHID++ fnSignatureReturns
get_feature0(id: u16)Option<FeatureInformation>
ping1(data: u8)u8

All methods are async and return Result<…, Hidpp20Error>. get_feature resolves to None when the device does not support the requested feature ID; ping echoes data back when the link is alive.

Types

FeatureInformation

Information about a feature, returned by get_feature.

FieldTypeDescription
indexu8The feature's index in the device's feature table, used to address its functions.
typFeatureTypeThe feature's type flags.
versionu8Latest supported version of the feature (0 on root v0 devices).

FeatureType

Feature classification flags decoded from the type byte.

FieldTypeDescription
obsoleteboolFeature replaced by a newer one, kept so older software still finds it (bit 7).
hiddenboolSW-hidden feature; configuration software should ignore it (bit 6).
engineeringboolHidden feature disabled for user software; internal testing / manufacturing (bit 5).
manufacturing_deactivatableboolManufacturing feature that can be permanently deactivated (bit 4; added in v2).
compliance_deactivatableboolCompliance feature that can be permanently deactivated (bit 3; added in v2).

Wire format

Both functions use a 3-byte short-report request payload. Responses are read from the extended payload (up to 16 bytes) returned by the device.

get_feature (fn 0)

Request: [ id_hi, id_lo, 0x00 ]

  • Byte 0: high byte of the 16-bit feature ID ((id >> 8) as u8)
  • Byte 1: low byte of the 16-bit feature ID (id as u8)
  • Byte 2: reserved, always 0x00

Response (byte → field):

ByteFieldNotes
0indexFeature index in the device table. 0 means the feature is unsupported (returns None).
1type byte → FeatureTypeBit 7 = obsolete, bit 6 = hidden, bit 5 = engineering, bit 4 = manufacturing_deactivatable, bit 3 = compliance_deactivatable.
2versionLatest supported feature version; 0 on root v0 devices.

ping (fn 1)

Request: [ 0x00, 0x00, data ]

  • Bytes 0–1: reserved, always 0x00
  • Byte 2: arbitrary ping byte chosen by the caller

Response (byte → field):

ByteFieldNotes
2echoed dataThe device echoes the ping byte at the same offset. Bytes 0–1 also carry the HID++ protocol version but are not exposed by this wrapper.

Usage (Rust)

use hidpp::{device::Device, feature::root::RootFeature};

// mut device: Device, obtained via Device::new(channel, index).await?
// RootFeature is registered automatically; no enumerate_features() needed.
let feat = device.root(); // returns Arc<RootFeature>

// Look up a feature by its 16-bit ID (e.g. 0x1000 = battery unified).
if let Some(info) = feat.get_feature(0x1000).await? {
    println!("feature 0x1000 → index {}, version {}", info.index, info.version);
}

// Verify the link is alive; the device echoes the byte back.
let echo = feat.ping(0x42).await?;
assert_eq!(echo, 0x42);

On this page