Skip to content

feat: support the Logitech G Pro X 2 Lightspeed - #31

Merged
PyFlat-JR merged 2 commits into
mainfrom
feature/logitech-pro-x-2-lightspeed
Oct 16, 2026
Merged

PyFlat-JR merged 2 commits into
mainfrom
feature/logitech-pro-x-2-lightspeed

Conversation

@PyFlat-JR

Copy link
Copy Markdown
Member

What does this PR do?

Adds the Logitech G Pro X 2 Lightspeed headset (receiver 0AF7) on a new protocol, LogitechCenturionProtocol. It speaks Logitech's "Centurion" framing instead of HID++. Closes #25.

  • Transport: vendor collection FFA0:0001, 64-byte reports, report id 0x51. A frame is 51 <len> <flags> <payload>. The receiver answers its own features directly and reaches the headset through its bridge feature 0x0003. It acknowledges each bridge send before the headset answers, so only the headset's answer is accepted.
  • Read: three exchanges.
    1. Root getFeature for the bridge on the receiver.
    2. Root getFeature for the battery 0x0104 on the headset, through the bridge.
    3. The battery's getStatus: byte 0 is the level; byte 2 is the state (0 discharging, 1/2 charging, 3 complete).
  • Layout sources: Solaar and HeadsetControl, as HaloBattery (MIT) documents them. No code is copied.
  • Headset off: the receiver only acknowledges, so the read times out and the plugin keeps the last value.
  • Tests: LogitechCenturionProtocolTests run against a fake receiver with the real feature layout. It acknowledges first and sends unrelated reports. The request frames match HeadsetControl's fixed battery request byte for byte, apart from the software id.
  • Hardware test: new Lists_the_centurion_features_of_the_logitech_headset prints both feature tables and the raw battery answer.
  • Linux: a udev line for 0af7, plus its copy in docs/linux-setup.md.
  • Docs: a README row and the protocol in AGENTS.md.

Not implemented: HeadsetControl's fixed request for firmware without 0x0104.

Checklist

  • I have read AGENTS.md and CONTRIBUTING.md.
  • dotnet build and dotnet test pass locally (0 warnings, 353 tests).
  • I updated README.md / AGENTS.md if this changes what they describe.
  • If this touches a device backend: I tested it against the real hardware (see below).

Device/hardware tested against (if applicable)

The headset's owner (@ReqwiemG) tested it in #25 on Windows, through the 0AF7 receiver, with G HUB running:

  • On battery: raw 59 59 00 = 89% Discharging; G HUB showed 89%.
  • Charging: raw 5B 5B 02 = 91% Charging; G HUB showed 89% charging just before.
  • Headset off, receiver connected: the receiver still lists its features, the headset doesn't answer, and the read times out.
  • Feature tables: receiver 0000 0001 0100 0003 010A, headset via bridge 3 0000 0001 0101 0100 0104 010A 0108 0604 0602 0636.

@PyFlat-JR
PyFlat-JR merged commit 34d36df into main Oct 16, 2026
3 checks passed
@PyFlat-JR
PyFlat-JR deleted the feature/logitech-pro-x-2-lightspeed branch October 16, 2026 19:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Device Request]: G502 X PLUS. G915. PRO X 2 LIGHTSPEED

1 participant