Skip to content

Fix and extend Endgame Gear 8K wired mice configuration support - #7

Merged
snekxs merged 3 commits into
OpenMouse-Project:mainfrom
qsxcv:endgamegear8k
Aug 2, 2026
Merged

Fix and extend Endgame Gear 8K wired mice configuration support#7
snekxs merged 3 commits into
OpenMouse-Project:mainfrom
qsxcv:endgamegear8k

Conversation

@qsxcv

@qsxcvqsxcv commented Aug 1, 2026

Copy link
Copy Markdown
Contributor

Summary

OpenMouse already recognized four wired Endgame Gear 8K models and exposed their
core CPI, polling, sensor, switch, and button settings. That implementation used
mostly shared OP1 8K assumptions, however, and had problems with feature-report
alignment, firmware parsing, active CPI stages, model-specific limits, and button
record offsets.

This change corrects and extends that existing support. It adds XM2 8K v2 support
and defines an explicit capability profile for each supported model:

  • OP1 8K
  • XM2 8K
  • OP1 8K Purple Frost
  • OP1 8K v2
  • XM2 8K v2

Existing controls continue to use read-modify-write config updates. Writes now
also wait for the device ACK and verify the stored config before reporting success.

Development notes:

  • qsxcv/UnofficialEGGWebConfig was used as the implementation reference.
  • These commits were generated with AI (GPT-5.6 Sol, xhigh reasoning) and have not been fully reviewed by a human.

Changes

  • Add XM2 8K v2 to the existing OP1 8K, XM2 8K, Purple Frost, and OP1 8K v2 device list.
  • Replace shared OP1 8K assumptions with per-model CPI, LOD, sensor, and firmware capabilities.
  • Fix config response alignment for data returned through either the A0 or A1 feature report.
  • Retry config transfers, require write acknowledgements, and verify stored values after writes.
  • Fix firmware response handling and decode BCD versions such as V1.07 and V1.37.
  • Read, select, and update the active CPI stage instead of assuming or overwriting other stages.
  • Clamp custom DPI, CPI-stage, and fixed-CPI inputs to values supported by the active model.
  • Retain the existing 1,000 Hz through 8,000 Hz choices and add 125 Hz, 250 Hz, and 500 Hz divider options.
  • Keep the existing Motion Sync, angle snapping, ripple control, slamclick, and motion-jitter controls while applying the correct model-specific restrictions.
  • Keep the existing GX and multiclick controls while correcting their physical button record offsets.
  • Correct the shifted button mapping layout and preserve the hidden firmware mapping record.
  • Extend button support with wheel actions, left-handed mode, keyboard shortcuts, fixed CPI, media actions, and system actions.
  • Add Glass Mode for Purple Frost and both v2 models.
  • Add sensor angle tuning, maximum sensor FPS, and lift-off LED control for v2 models.
  • Add reload and factory reset actions.
  • Add protocol tests for the corrected model profiles, firmware format, config framing, CPI rules, and button layout.

Model-specific behavior

  • OP1 8K and XM2 8K use PAW3395 and cannot enable Motion Sync at 8,000 Hz.
  • Purple Frost, OP1 8K v2, and XM2 8K v2 use PAW3950 and can use Motion Sync at 8,000 Hz.
  • Glass Mode is available only on PAW3950 models.
  • Sensor angle tuning, maximum sensor FPS, and lift-off LED control are limited to v2 models.
  • Polling changes are blocked while Glass Mode controls the polling divider.

Config safety

  • Updates continue to start from a fresh config read and change only documented fields.
  • Reserved bytes are preserved, including unknown button mappings until they are replaced.
  • Config frames are checked for valid status, stage count, polling divider, and CPI.
  • Writes now require an ACK and are followed by a config readback.

Tests

  • npm test
  • npm run build
  • git diff --check

Unit tests cover:

  • Product profiles and sensor capability flags
  • CPI ranges and model-specific quantization
  • Normal and Glass Mode LOD lists
  • BCD firmware version parsing
  • Button control and mapping offsets
  • Button action encoding and decoding

Hardware testing

The protocol and UI changes were tested on OP1 8K v2 hardware running firmware V1.07.

  • OP1 8K
  • XM2 8K
  • OP1 8K Purple Frost
  • OP1 8K v2 (firmware V1.07)
  • XM2 8K v2

Suggested smoke test for each available model:

  • Read the current config and firmware version.
  • Change polling, CPI, active CPI stage, and LOD.
  • Toggle each supported sensor option.
  • Change multiclick and button mappings, then verify the physical controls.
  • Reload the page and confirm that stored values are read back correctly.

Notes

  • The 125 Hz, 250 Hz, and 500 Hz options use the same 8,000/divider formula as the higher rates. These rates are not exposed by the stock Endgame Gear tool.
  • Stage LED color and enable bytes are preserved but are not exposed as controls.
  • The UI waits for the write ACK and config readback before displaying the new value. Optimistic UI updates can be handled separately.

qsxcv added 3 commits August 1, 2026 06:41
Model each supported wired EGG 8K mouse explicitly and make config exchange match the A0/A1 feature-report framing used by the devices.
- Add profiles for OP1 8K, XM2 8K, OP1 8K Purple Frost, OP1 8K v2, and XM2 8K v2.
- Define model-specific CPI ranges, CPI steps, LOD options, and 8K Motion Sync support.
- Clamp custom DPI and CPI-stage input to values supported by the active model.
- Read and update the active CPI stage instead of assuming the first stage.
- Decode both firmware version bytes as BCD, including V1.07 and V1.37.
- Preserve firmware response alignment when WebHID includes the report ID.
- Ignore short command acknowledgements while waiting for firmware version data.
- Normalize A0 and A1 responses without shifting documented config offsets.
- Retry config reads and writes, validate response frames, and require write acknowledgements.
- Preserve unknown config bytes with read-modify-write updates and verify stored values.
- Keep EGG-only status fields in the EGG protocol module.
- Cover model capabilities, CPI clamping, LOD options, firmware parsing, and report normalization with tests.
Match the seven logical button records and shifted mapping layout used by the EGG 8K firmware and stock configuration tools.
- Use the correct mapping offsets for Right, Middle, Forward, Back, Wheel Up, and Wheel Down.
- Leave the hidden firmware mapping record unchanged.
- Decode and expose all seven logical button actions.
- Add left-handed mode while keeping the physical primary button fixed.
- Support mouse, scroll, keyboard, CPI, media, browser, system, and disabled actions.
- Clamp fixed-CPI mapping values to the range and steps supported by the active model.
- Preserve unknown mapping bytes until the user selects a supported replacement.
- Keep EGG button action types in the EGG protocol module.
- Cover button offsets and action encoding round trips with tests.
Expose the sensor controls that differ across the supported EGG 8K models while retaining the restrictions required by PAW3395 devices.
- Add Glass Mode for OP1 8K Purple Frost, OP1 8K v2, and XM2 8K v2.
- Add sensor angle tuning, maximum sensor FPS, and lift-off LED control for v2 models.
- Disable the custom polling divider while Glass Mode controls it.
- Block Motion Sync at 8K only on PAW3395 OP1 8K and XM2 8K models.
- Keep Motion Sync available at 8K on PAW3950 models.
- Add config reload and confirmed factory reset actions.
@snekxs
snekxs merged commit 6157b87 into OpenMouse-Project:mainAug 2, 2026
dwei30 added a commit to dwei30/openmouse that referenced this pull request Aug 12, 2026
Rebuild the Compx/Keychron stage editor on DpiCard after the Preact rewrite, move Terra Pro DPI lighting to the Lighting tab, and refresh preview fixtures now that protocol OpenMouse-Project#7 is on main.
dwei30 added a commit to dwei30/openmouse that referenced this pull request Aug 14, 2026
Rebuild the Compx/Keychron stage editor on DpiCard after the Preact rewrite, move Terra Pro DPI lighting to the Lighting tab, and refresh preview fixtures now that protocol OpenMouse-Project#7 is on main.
Sign up for freeto 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.

2 participants

@qsxcv@snekxs