From fdfb921ee838c0dc6d3379eac0fafab14e48ffbd Mon Sep 17 00:00:00 2001 From: Ken Sanislo Date: Sat, 18 Apr 2026 01:30:17 -0700 Subject: [PATCH] Record feature versions in Centurion Phase A (parent/direct) too MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The previous commit fixed version recording for bridge-routed sub-device features (Phase B). This applies the same fix to Phase A, which is used for parent features on a wireless dongle AND for the whole feature set on direct-USB Centurion devices like the wired G522 (PID 0x0B19). Without this, a wired Centurion headset would enumerate all features with version=0 and version-gated settings (sidetone 3-byte format, auto-sleep 2/3-byte timer) would send the wrong payload and get OUT_OF_RANGE rejections — same symptom the wireless G522 had before. --- lib/logitech_receiver/hidpp20.py | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/lib/logitech_receiver/hidpp20.py b/lib/logitech_receiver/hidpp20.py index fef020e2..6b3c940a 100644 --- a/lib/logitech_receiver/hidpp20.py +++ b/lib/logitech_receiver/hidpp20.py @@ -196,13 +196,19 @@ class FeaturesArray(dict): response = self.device.request((fs_index << 8) | 0x10, index) if response is None or len(response) < 3: continue - # Centurion FeatureSet response: [remaining_count, feat_hi, feat_lo, type, flags] + # Centurion FeatureSet response: [remaining_count, feat_hi, feat_lo, type, version] feat_id = struct.unpack("!H", response[1:3])[0] + feat_type = response[3] if len(response) > 3 else 0 + feat_version = response[4] if len(response) > 4 else 0 feature = resolve_feature(feat_id, centurion=True) if feature is None: feature = f"unknown:{feat_id:04X}" self[feature] = index self.inverse[index] = feature + # Record version/flags so version-gated settings (sidetone, auto-sleep) + # use the correct payload format on direct USB Centurion devices too. + self.version[feature] = feat_version + self.flags[feature] = feat_type if feature is CenturionCoreFeature.CENT_PP_BRIDGE: bridge_index = index