Solaar/lib/logitech_receiver
Ken Sanislo f73fe2d295 Probe Centurion 0x50 device address on handle open
The 0x50 variant requires a device-specific address byte at frame[1]
on every TX frame. Until now we left state.device_addr=None and sent
0x00 as a placeholder, relying on the device to either be permissive
enough to respond, or to send an unsolicited frame early enough for
_unwrap_centurion_frame to learn the address passively.

Strict firmware silently drops device_addr=0x00 requests, which breaks
dongle feature discovery before it can start: _discover_dongle_features
times out, has_bridge is False, create_centurion_receiver falls through
to create_device, Device.__init__ leaves _protocol=None, and a later
read_battery() dispatches HID++ 1.0 read_register(BATTERY_CHARGE) that
the dongle rejects with INVALID_SUB_ID_COMMAND.

Port strain08's fix from LGSTrayEx (commits 1439b27a + c6d21972): right
after registering a 0x50 handle, write a 64-byte all-zero frame with
just the report ID set. That elicits an error/unsolicited response
whose byte[1] is the real device address. Read up to 3 x 500ms until
a matching frame arrives, then store the address on the handle state
so subsequent TX frames carry it correctly.

On timeout the probe logs a warning and leaves device_addr=None, so
behavior falls back to the current 0x00-placeholder path (no regression
for devices where the probe isn't needed). The passive learn-on-first-RX
in _unwrap_centurion_frame is preserved as a second line of defense.
2026-05-10 15:39:17 -07:00
..
__init__.py Refactor: Distinguish module from package 2024-09-15 09:18:51 -04:00
base.py Probe Centurion 0x50 device address on handle open 2026-05-10 15:39:17 -07:00
base_usb.py device: Support per-slot unpair on Lightspeed receivers (CLI + GUI) (#3183) 2026-04-17 09:34:58 -04:00
centurion.py Probe Centurion 0x50 device address on handle open 2026-05-10 15:39:17 -07:00
centurion_constants.py centurion: support PRO X 2 LIGHTSPEED headphones Centurion features (#3150) 2026-04-14 11:43:23 -04:00
common.py centurion: support PRO X 2 LIGHTSPEED headphones Centurion features (#3150) 2026-04-14 11:43:23 -04:00
descriptors.py Add G522 LIGHTSPEED headset support (Centurion 0x50 transport variant) 2026-05-10 15:39:16 -07:00
desktop_notifications.py testing: upgrade desktop notifications tests to take notifications availability into account 2025-01-02 10:47:53 -05:00
device.py Probe Centurion 0x50 device address on handle open 2026-05-10 15:39:17 -07:00
diversion.py rules: remove use of XTest and use uinput in all cases 2026-03-08 20:58:43 -04:00
exceptions.py Use double quotes for module level docstrings 2024-06-02 09:54:21 -04:00
hidpp10.py cli: Fix crash when showing notification flags. (#3070) 2025-12-12 04:54:10 -05:00
hidpp10_constants.py device: Handle composite IntFlag.name on Python < 3.11 (#3187) 2026-04-16 11:38:25 -04:00
hidpp20.py Add regional keyboard layouts (ISO_QWERTY, QWERTZ, AZERTY, JIS) and fix copyright 2026-05-10 17:52:55 -04:00
hidpp20_constants.py centurion: support PRO X 2 LIGHTSPEED headphones Centurion features (#3150) 2026-04-14 11:43:23 -04:00
i18n.py Unify imports in logitech package 2024-05-23 16:42:18 -04:00
listener.py Add G522 LIGHTSPEED headset support (Centurion 0x50 transport variant) 2026-05-10 15:39:16 -07:00
notifications.py centurion: support PRO X 2 LIGHTSPEED headphones Centurion features (#3150) 2026-04-14 11:43:23 -04:00
onboard_eq.py centurion: support PRO X 2 LIGHTSPEED headphones Centurion features (#3150) 2026-04-14 11:43:23 -04:00
receiver.py device: Support per-slot unpair on Lightspeed receivers (CLI + GUI) (#3183) 2026-04-17 09:34:58 -04:00
settings.py Add per-key RGB color painter and replace MAP_CHOICE color validator 2026-05-10 17:52:55 -04:00
settings_new.py settings: add setting for HAPTIC feature 2025-11-12 14:50:46 -05:00
settings_templates.py Add per-key RGB color painter and replace MAP_CHOICE color validator 2026-05-10 17:52:55 -04:00
settings_validator.py Add per-key RGB color painter and replace MAP_CHOICE color validator 2026-05-10 17:52:55 -04:00
special_keys.py device: add special keys from Logitech 2025-10-16 20:57:15 -04:00