Skip to content

feat(ksnake): add X11 driver draft (VID 0xA8A4/0xA8A5 PID 0x2255) - #54

Closed
yanhenrique-dev wants to merge 3 commits into
OpenMouse-Project:mainfrom
yanhenrique-dev:ksnake-x11-driver
Closed

feat(ksnake): add X11 driver draft (VID 0xA8A4/0xA8A5 PID 0x2255)#54
yanhenrique-dev wants to merge 3 commits into
OpenMouse-Project:mainfrom
yanhenrique-dev:ksnake-x11-driver

Conversation

@yanhenrique-dev

Copy link
Copy Markdown
Contributor

Draft driver for K-snake X11.

Protocol reverse-engineered from vendor WebHID panel https://x1a11.yjx2012.com/ (Next.js page chunk):

  • Transport: sendReport(0, 64B starting 0x55) + queued inputreport reply. Control collection 0xFF01:0x10.
  • VIDs 0xA8A4 (USB, reports USB) / 0xA8A5 (2.4G dongle), PID 0x2255.
  • Commands: getVersion [0x55,0x03] (ASCII at reply[23..25]), getBattery [0x55,0x30,0xA5,0x0B,0x2E...] (pct at [8], charge at [9]), getConfig [0x55,0x0E,0xA5,0x0B,0x2F...] with 6x LE DPI stages at [13..24], reportRate wire+1 at [10], dpiIndex wire+1 at [12], setConfig [0x55,0x0F,0xAE,0x0A,0x2F...].

Hardware evidence so far:

  • User HID Diagnostic Report (dongle): 3x USB Receiver VID_A8A5 PARTIAL; first interface Vendor (0xFF01) is the control channel, others FFA5 / FF05+FF06. PARTIAL expected (no feature reports, output-report protocol).

What this PR adds:

  • src/ksnake codec (pure, transport-independent) with defaults 800/1200/1600/3200/5000/12000.
  • src/drivers/ksnake HID client (readStatus/setDpi/setPollingRate, battery, version).
  • vendors filters + registry + MouseStatus brand + package export + index.
  • registry.test usage 0x10 coverage.

TODO before merge (needs hardware):

  • Confirm polling table order (assumed [125,250,500,1000,2000,4000,8000], default idx 3 = 1000Hz).
  • Confirm DPI limits/steps.
  • Resolve wakeup/move-light nibble swap (decode low/high vs encode high/low — kept vendor-exact).
  • Paste a real getConfig hex reply + setDpi/setPollingRate readback.
  • Flip KSNAKE_PRODUCTS verified once exercised.

Checks: npm run check passes (build + tests + pack).

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.

1 participant

@yanhenrique-dev