OpenLogi

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

FunctionHID++ fnSignatureReturns
get_feature0(id: u16)Option<FeatureInformation>
ping1(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.

FieldTypeDescription
indexu8Session feature index used for later calls.
typFeatureTypeFeature classification flags from the type byte.
versionu8Latest 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.

FieldBitDescription
obsolete7An older feature remains advertised for older software.
hidden6End-user configuration software should ignore the feature.
engineering5The feature is for engineering or manufacturing use.
manufacturing_deactivatable4Manufacturing can permanently deactivate the feature. Available in feature type v2.
compliance_deactivatable3Compliance 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]

ByteFieldNotes
0–1idRequested feature ID, BE.
2reservedOpenLogi writes 0x00.
ByteFieldNotes
0indexThe session feature index. 0 means unsupported, and OpenLogi returns None.
1typFeatureType bits 7–3. OpenLogi retains other bits without named fields.
2versionLatest compatible version.
3–15trailing payloadOpenLogi ignores these bytes.

ping (fn 1)

Request: [0x00, 0x00, data]

ByteFieldNotes
0–1reservedOpenLogi writes 0x00.
2dataCaller-selected ping byte.
ByteFieldNotes
0protocol_numHID++ protocol number. RootFeature::ping does not expose it.
1target_swTarget software identifier. RootFeature::ping does not expose it.
2echoed dataRootFeature::ping returns this byte.
3–15trailing payloadOpenLogi 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(())
}

On this page