Solaar/lib
Ken Sanislo 4cc8ac0d46 Record Centurion sub-device feature versions + version-gate AutoSleep
The Centurion sub-device discovery ignored the type/version bytes in
the per-index getFeatureId response and defaulted every feature's
version to 0. That made version-gated settings (sidetone, auto-sleep)
send V0 payload formats on features that may actually be V2/V3/V4 —
which the G522 rejects with OUT_OF_RANGE (error 0x03).

Evidence from tester's log (version acfd02ab):
  bridge sub-device error: orig_feat_idx=13 orig_func=0x1B error=0x03
  bridge sub-device error: orig_feat_idx=20 orig_func=0x1F error=0x03

feat_idx 13 is HeadsetAudioSidetone (0x0604); 20 is CenturionAutoSleep
(0x0108). Both have version-gated payload formats per the protocol doc.

Fixes:
1. In _discover_sub_device_features, extract response[3] (type) and
   response[4] (version) and store them in self.version / self.flags,
   so get_feature_version() returns the real version for downstream
   callers.

2. Add HeadsetAutoSleep.build() that picks byte_count and max_value
   based on the reported version (V<3=1 byte, V=3=2 bytes, V>=4=3).
   HeadsetSidetone.build() already had version gating — it just wasn't
   getting the real version before.

Does NOT address the mic-mute (error 0x0A) and mic-gain (error 0x0B)
rejections — those are non-standard error codes likely meaning the G522
either gates those behind the physical mic button (mic-mute) or rejects
writes for other reasons (mic-gain). Needs separate investigation once
the simpler version fix lands.
2026-04-17 23:51:34 -07:00
..
hid_parser Fix warnings from automatic code inspections 2024-10-11 07:42:38 -04:00
hidapi Add G522 LIGHTSPEED headset support (Centurion 0x50 transport variant) 2026-04-14 10:52:08 -07:00
keysyms keysymdef: Rename key symbols 2024-10-11 07:42:38 -04:00
logitech_receiver Record Centurion sub-device feature versions + version-gate AutoSleep 2026-04-17 23:51:34 -07:00
solaar Fix G522 0x50 Centurion init failure and protocol version crash 2026-04-15 23:00:45 -07:00