Skip to content

fix(endgame): support OP1w 4K v2 and fix WE/OP1 PID collision - #32

Merged
snekxs merged 1 commit into
mainfrom
fix/op1w-4k-v2-issue-107
Aug 22, 2026
Merged

fix(endgame): support OP1w 4K v2 and fix WE/OP1 PID collision#32
snekxs merged 1 commit into
mainfrom
fix/op1w-4k-v2-issue-107

Conversation

@snekxs

@snekxs snekxs commented Aug 22, 2026

Copy link
Copy Markdown
Member

Fixes OpenMouse-Project/openmouse#107.

What

  • Adds EGG_DEVICE_PROFILES entries for the OP1w 4K v2 (PID 0x1984 mouse / 0x1970 wireless dongle) — previously undetected entirely.
  • Fixes the 0x1970 PID collision: that PID is reused by both the legacy OP1we dongle (handled by EggWeHidClient) and the new OP1w 4K v2 dongle (OP1-8K v2 protocol). EggWeHidClient.isSupported() now excludes any device exposing the OP1-8K command feature report (0xa1) via descriptor check, rather than relying on PID alone. Also closes a related gap where 0x1980 (XM2 8K v2) wasn't excluded from the WE driver's PID set.
  • Broadens eggNormalizeFeatureReport's wire-header detection to accept all four status bytes the reporter documented (0x01 OK / 0x03 busy / 0x07 rejected / 0x08 RF sleep), not just OK/busy — replies with the other two statuses were falling through to the byte-shifting path, corrupting the payload length and explaining the reported firmware misdetection (V1.00 vs V1.01) and write failures.
  • Adds maxPollingHz to the device profile (4000 Hz wireless / 8000 Hz wired) and caps supportedPollingRates/setPollingRate by it.

Not addressed

The 0x07 config-store-rejection root cause and the battery data format are hardware-observation claims from the issue reporter that I couldn't independently verify without their raw HID captures — flagging here in case hardware testing still turns up write failures after this fix.

Testing

npx tsx --test src/drivers/endgame/egg-op1-protocol.test.ts src/drivers/endgame/egg-we-protocol.test.ts — 19/19 passing (17 pre-existing + 2 new regression tests).

🤖 Generated with Claude Code

Fixes #107.

- Add EGG_DEVICE_PROFILES entries for PID 0x1984 (mouse) and 0x1970
  (wireless dongle) — the OP1w 4K v2 was undetected because it had no
  device profile at all.
- Disambiguate the 0x1970 collision by HID descriptor instead of PID:
  EggWeHidClient now excludes any device exposing the OP1-8K command
  feature report (0xa1), since that PID is reused by both the legacy
  OP1we dongle and the new OP1w 4K v2 dongle. Also closes a related
  gap where 0x1980 (XM2 8K v2) wasn't excluded from the WE driver.
- Broaden eggNormalizeFeatureReport's wire-header detection to accept
  all four documented status bytes (0x01/0x03/0x07/0x08), not just
  OK/busy — rejected and RF-sleep replies were falling through to the
  byte-shifting path and corrupting the payload length calculation,
  which explains the reported firmware misdetection and write
  failures.
- Add maxPollingHz to the device profile (4000 for wireless, 8000 for
  wired) and cap supportedPollingRates/setPollingRate accordingly.
- Add regression tests for the new profiles and the descriptor-based
  collision fix.
@snekxs
snekxs merged commit 89581f3 into main Aug 22, 2026
2 checks passed
@snekxs
snekxs deleted the fix/op1w-4k-v2-issue-107 branch August 22, 2026 20:04
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.

Endgame Gear OP1w 4k v2 not detected (VID 0x3367, PID 0x1984 / 0x1970)

1 participant