OpenLogi

0x8040 · brightnessControl

Display or backlight brightness range, value, and independent illumination control for feature version 1.

Controls display or backlight brightness on devices that advertise BrightnessControl. It reports a brightness range and capability bits. It can also read or set illumination separately when the device advertises that capability.

Spec: Logitech HID++ 2.0 — brightnessControl. Used by: Typed wrapper in openlogi-hidpp; no v0.8.15 device-layer path.

Function reference

BrightnessControlFeature (0x8040, version 1) exposes the following methods.

Methods

FunctionHID++ fnSignatureReturns
get_info0()BrightnessInfo
get_brightness1()u16
set_brightness2(brightness: u16)()
get_illumination3()bool
set_illumination4(enabled: bool)()

All methods are async and return Result<…, Hidpp20Error>.

Types

BrightnessInfo

FieldTypeDescription
min_brightnessu16Lowest accepted brightness.
max_brightnessu16Highest accepted brightness.
stepsu16Number of advertised brightness steps.
capabilitiesBrightnessCapabilitiesFeature capability bits.

BrightnessCapabilities

Unknown bits are retained when OpenLogi decodes the capability byte.

FlagBitDescription
HARDWARE_BRIGHTNESS0Hardware can change brightness directly.
EVENTS1The device can emit brightness or illumination changes.
ILLUMINATION2Illumination can be queried and controlled separately.
HARDWARE_ON_OFF3Hardware can toggle illumination directly.
TRANSIENT4Brightness does not persist across a power cycle.

Events

BrightnessControlFeature exposes no event type or listener. The EVENTS capability therefore has no OpenLogi event consumer.

Wire format

Requests have a three-byte short payload. All multi-byte fields are BE. OpenLogi expands short responses to its 16-byte payload before decoding.

get_info (fn 0)

Request: [0x00, 0x00, 0x00]

BytesFieldNotes
0–1max_brightnessBE u16.
2steps low byteCombined with byte 6.
3capabilitiesBrightnessCapabilities bitfield.
4–5min_brightnessBE u16.
6steps high bytesteps is BE from bytes 6 then 2.

get_brightness (fn 1)

Request: [0x00, 0x00, 0x00]

BytesFieldNotes
0–1brightnessBE u16.

set_brightness (fn 2)

Request: [brightness_hi, brightness_lo, 0x00], where brightness is a BE u16.

The response is an acknowledgement. OpenLogi does not inspect a response payload.

get_illumination (fn 3)

Request: [0x00, 0x00, 0x00]

ByteFieldNotes
0illumination stateBit 0 set means true.

set_illumination (fn 4)

Request: [enabled, 0x00, 0x00], where enabled is 0x00 or 0x01.

The response is an acknowledgement. OpenLogi does not inspect a response payload.

How OpenLogi uses it

OpenLogi registers BrightnessControlFeature in the HID++ feature registry. In v0.8.15, no openlogi-device, agent, CLI, inventory, or user-facing path opens this feature.

OpenLogi therefore does not read its range, apply a capability gate, read back a write, restore its state, or subscribe to its advertised events. A direct caller should read get_info() and require ILLUMINATION before calling fn 3 or fn 4.

Usage (Rust)

use hidpp::{
    device::Device,
    feature::brightness_control::{BrightnessCapabilities, BrightnessControlFeature},
};

// `device` is already created for a HID++ channel and device index.
device.enumerate_features().await?;
if let Some(feature) = device.get_feature::<BrightnessControlFeature>() {
    let info = feature.get_info().await?;
    let current = feature.get_brightness().await?;
    println!("brightness: {current} of {}", info.max_brightness);

    if info.capabilities.contains(BrightnessCapabilities::ILLUMINATION) {
        feature.set_illumination(true).await?;
    }
}

On this page