OpenLogi

0x1001 · batteryVoltage

Battery state as a big-endian millivolt reading and charging flags for wireless G-series devices.

batteryVoltage reports a measured battery voltage and a charging-flags byte. G915, G903 LIGHTSPEED, and G502 LIGHTSPEED expose it without 0x1000 or 0x1004. The feature contains no percentage.

Spec: No public Logitech specification. Layout reverse-engineered from Logi Options+ 2.8 (static analysis). Cross-checked: Linux HID++ driver, Solaar. Used by: device inventory and openlogi list.

Function reference

BatteryVoltageFeature (0x1001) implements one request method.

Methods

FunctionHID++ fnSignatureReturns
get_battery_info0()VoltageBatteryInfo
is_status_broadcastevent helper(function_id: u8)bool

get_battery_info is async and returns Result<VoltageBatteryInfo, Hidpp20Error>. The wrapper has no show_battery_status method for function 1.

Types

VoltageBatteryInfo

FieldTypeDescription
voltage_mvu16Battery voltage in millivolts. The code describes a single-cell Li-Po range of about 3,500–4,200 mV.
statusVoltageChargingStatusCharging state decoded from the flags byte.
criticalboolFirmware critical-charge marker from bit 5.

VoltageChargingStatus

VariantDescription
DischargingBattery power; external-power bit is clear.
ChargingExternal power with standard charging.
ChargingFastExternal power with the fast-charge bit.
ChargingSlowExternal power with the slow-charge bit.
FullExternal power with charge-status value 1.
NotChargingExternal power with charge-status value 2.
UnknownExternal power with an undefined charge-status value.

Events

This wrapper does not implement EmittingFeature or expose a typed event. is_status_broadcast(function_id) returns true only for function 0.

Wire format

get_battery_info (fn 0)

Request: [0x00, 0x00, 0x00] (no parameters).

Response:

ByteFieldNotes
0–1voltage_mvu16, BE, in millivolts.
2flagsLink, charging, charge-rate, and critical markers.

Flags:

Bit or bitsMeaningOpenLogi decoding
7External power presentClear means Discharging; other flag bits do not change that result.
0–2Charge status while external power is present0 is charging, 1 is Full, and 2 is NotCharging. Values 3–7 become Unknown.
3Fast-charge markerWith status 0, produces ChargingFast.
4Slow-charge markerWith status 0 and bit 3 clear, produces ChargingSlow.
5Critical markerExposed independently as critical.
6/No meaning is modeled.

With external power, a low status of 0x03 means Unknown. For example, the full flags byte 0x83 is not Full.

showBatteryStatus (fn 1, not implemented)

Logi Options+ calls function 1 and checks that it receives a nonempty reply. Its request layout, reply layout, and physical effect are not established. OpenLogi does not expose or call this function.

Status broadcast (event fn 0)

An unsolicited function-0 report carries the same three bytes as get_battery_info. It announces a changed voltage or charging state.

How OpenLogi uses it

Inventory selects this source only after 0x1004 and 0x1000 are absent. It prefers this voltage source over 0x1F20 ADC measurement.

OpenLogi estimates a percentage from a 13-point single-cell Li-Po curve. The curve clamps at 3,500 mV for 0% and 4,186 mV for 100%. The critical flag overrides the estimated display level.

Since v0.8.14, PR #1768 maps undefined external-power status values to Unknown. This includes a low status of 0x03. OpenLogi does not call function 1 because its effect is unverified.

Since v0.8.14, PR #1787 records this feature's runtime index. An unsolicited software-ID-0, function-0 report queues one coalesced inventory reconciliation. OpenLogi re-reads the authoritative state instead of trusting the event payload.

OpenLogi only reads this feature.

Open questions

Logi Options+ uses showBatteryStatus at function 1 and requires a nonempty reply. Static analysis does not establish whether it controls an LED, an on-screen indicator, or another device action. OpenLogi leaves it uncalled until hardware capture establishes its effect.

Usage (Rust)

use hidpp::{
    device::Device,
    feature::battery_voltage::BatteryVoltageFeature,
};

// `channel` and `device_index` identify an already opened HID++ device.
let mut device = Device::new(channel, device_index).await?;
device.enumerate_features().await?;

if let Some(feature) = device.get_feature::<BatteryVoltageFeature>() {
    let info = feature.get_battery_info().await?;
    println!("{} mV: {:?}", info.voltage_mv, info.status);
}

See also: 0x1000 batteryStatus and 0x1004 unifiedBattery.

On this page