fix(logitech): G305 LIGHTSPEED — connect via Nano receiver and hide unsupported controls - #54
Merged
Merged
Conversation
Author
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

Summary
Two fixes make the G305 LIGHTSPEED usable: it never connected before (probing latched onto its receiver's HID++ 1.0 error reply), and once connected it showed gaming-surface / LightForce controls the mouse does not have. Both are verified on hardware.
Fix 1 — device connect
The G305 connects through a Nano Lightspeed receiver (
046d:c53f) that was missing fromLOGITECH_RECEIVER_PRODUCT_IDS, so device-index probing ran the wrong way around.resolveDeviceIndex()probes two HID++ device indexes to learn whether a mouse answers on its own endpoint (0xFF) or through a receiver pairing slot (0x01). For product IDs not on the receiver list it tried0xFFfirst. The G305's receiver is a HID++ 1.0 device and answers that probe with a HID++ 1.0 error reply (0x8F, "invalid command") rather than silence. The old probe counted any reply — including an error reply — as "a mouse is here", so OpenMouse locked onto device index0xFFand every later request failed with "The mouse rejected that setting (HID++ 1.0: invalid command)."resolveDeviceIndex()now only treats a successful root feature query as proof of a HID++ 2.0 mouse; a receiver's HID++ 1.0 error reply no longer counts as "answered", so probing falls through to the pairing slot and finds the mouse. Only genuine HID++ 2.0 mice answer the root probe successfully, so direct-connect mice (G402, G403 HERO, etc.) are unaffected. Also added0xc53f(Nano Lightspeed 1.1, G305) and0xc543(Lightspeed 1.2) toLOGITECH_RECEIVER_PRODUCT_IDSso the receiver slot is probed first.Fix 2 — hide surface / LightForce controls the G305 does not have
The G305 exposes Mode Status
0x8090, but only the power-mode half is meaningful: the status1 byte that would carry the gaming-surface and LightForce fields is reserved and reads0. That decoded as Gaming surface "Auto" and LightForce "Optical" and offered both controls (plus the sensor card).407400000000(captured from the device's connection diagnostics), added toMODE_STATUS_POWER_ONLY_MODEL_IDSthe same way the G309 was handled inff6e1cd.gamingSurfaceModeandlightforceSwitchModeare now reportednulland both cards stay hidden.Files changed
src/devices/logitech/hidpp.ts— strict index probe; receiver PIDs; G305 model id.src/devices/vendors.ts— receiver PIDs for the picker.src/devices/logitech/hidpp.test.ts— G305 mode-status assertion.src/devices/logitech/TESTING.md— receiver identifiers and G305 checklist.Verification
046d:c53f): connects and reads DPI, polling rate, and battery correctly; gaming-surface, LightForce, and lift-off cards stay hidden.npm run check(build + 197 tests) passes.