Repository navigation
feat: support the Logitech G502 X PLUS - #29
Merged
Merged
Conversation
PyFlat-JR
force-pushed
the
feature/logitech-g502-x-plus
branch
from
October 16, 2026 15:56
1b37e9b to
b0be9e3
Compare
This was referenced Oct 16, 2026
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.
What does this PR do?
Adds the Logitech G502 X PLUS (receiver
C547, cableC095) to the existing HID++ mouse protocol, and makes HID probing robust against a second receiver with the same product id. Part of #25.LogitechProtocol.Devices. The mouse answers HID++0x1004(unified battery) at device index 1 over the receiver and over the cable, exactly like the G Pro X Superlight 2.C547is not unique to this mouse; other Logitech devices ship with the same receiver. When no candidate answered the short probe,HidFamilyfell back to the first candidate, which could be another device's receiver. Every read then failed with "The device does not have that battery feature." Now a candidate that answered as a different device (NotSupportedException) is never the fallback. A candidate that only timed out still is. A newHidFamilyTestscase covers it and fails without the fix.Lists_the_hidpp_features_of_every_logitech_deviceprints each Logitech HID++ device's name and feature table at device index 1 and0xFF.Reads_every_supported_hid_device_through_the_pluginnow prints aprobeline for each candidate it skipped, with the reason.c547andc095, plus their copy indocs/linux-setup.md.Checklist
dotnet buildanddotnet testpass locally (0 warnings, 317 tests).Device/hardware tested against (if applicable)
The mouse's owner (@ReqwiemG) tested it in #25 on Windows, with G HUB running:
C547receiver for another device plugged in, after the fallback fix: 91% Discharging, matching G HUB. The other receiver timed out in the probe, and the mouse's receiver answered.