Solaar/tests/logitech_receiver
Ken Sanislo e91cbff361 Fix G522 0x50 Centurion init failure and protocol version crash
Three interrelated fixes for G522 LIGHTSPEED headset support:

1. Deferred init for silent 0x50 dongles: When the probe fails and
   feature discovery returns nothing (dongle silently drops all frames
   with device_addr=0x00), return a "pending" CenturionReceiver instead
   of falling through to the broken create_device direct-device path.
   The listener thread starts reading; when the first unsolicited frame
   arrives, _unwrap_centurion_frame learns device_addr, the notification
   handler detects the pending state, and re-runs feature discovery with
   the correct address — finding the bridge and creating the child device.

2. Centurion protocol version floor: The G522 dongle reports protocol
   1.1 (major=1, minor=1), which routes all protocol < 2.0 gates into
   HID++ 1.0 code paths (battery register reads, etc.) that crash with
   INVALID_SUB_ID_COMMAND. Centurion devices always use HID++ 2.0
   features, so the protocol property now returns 2.0 as a floor for
   any device with centurion=True.

3. CI segfault fix: Mock probe_centurion_device_addr in the two
   Centurion device tests so fake handles never reach the real hidapi
   C extension on macOS.
2026-05-10 15:39:17 -07:00
..
__init__.py tests: Add tests of common module 2024-02-18 06:10:53 -05:00
fake_hidpp.py centurion: support PRO X 2 LIGHTSPEED headphones Centurion features (#3150) 2026-04-14 11:43:23 -04:00
test_base.py Probe Centurion 0x50 device address on handle open 2026-05-10 15:39:17 -07:00
test_base_usb.py Speedup lookup of known receivers 2025-01-01 11:33:07 -05:00
test_common.py refactor: use IntEnum for firmware and cidgroup constances 2024-10-23 16:25:35 -04:00
test_desktop_notifications.py testing: upgrade desktop notifications tests to take notifications availability into account 2025-01-02 10:47:53 -05:00
test_device.py Fix G522 0x50 Centurion init failure and protocol version crash 2026-05-10 15:39:17 -07:00
test_diversion.py Refactor: Introduce Feature enum 2024-10-14 07:28:09 -04:00
test_hidpp10.py device: Handle composite IntFlag.name on Python < 3.11 (#3187) 2026-04-16 11:38:25 -04:00
test_hidpp20_complex.py centurion: support PRO X 2 LIGHTSPEED headphones Centurion features (#3150) 2026-04-14 11:43:23 -04:00
test_hidpp20_simple.py Estimate accurate battery level for some rechargable devices (#2745) 2025-01-02 10:58:07 -05:00
test_notifications.py show better pairing errors (#3063) 2025-12-10 11:18:50 -05:00
test_receiver.py device: Support per-slot unpair on Lightspeed receivers (CLI + GUI) (#3183) 2026-04-17 09:34:58 -04:00
test_setting_templates.py Add per-key RGB color painter and replace MAP_CHOICE color validator 2026-05-10 17:52:55 -04:00
test_settings_validator.py Split up huge settings module 2025-01-01 10:46:04 -05:00