Skip to content

atk: complete VXE R1 SE+ controls - #57

Merged
snekxs merged 7 commits into
mainfrom
pr53-fix
Sep 6, 2026
Merged

snekxs merged 7 commits into
mainfrom
pr53-fix

Conversation

@snekxs

@snekxs snekxs commented Sep 6, 2026

Copy link
Copy Markdown
Member

Rebase/merge of #53 onto current main resolving additive conflicts in mouse-types.ts (brand union, ATK/K-snake/MCHOSE field additions from #54/#55). Closes #53.

SakethKanchi and others added 7 commits September 4, 2026 15:21
The ATK driver applied the A9's PAW3950Ultra DPI encoding to every device
behind vendor id 0x373b. ATK HUB Web 3.2.21 branches that decoder per
sensor: PAW3950/PAW3950DM/PAW3395/PAW3395Ultra pack a plain 10-bit count
of 50-DPI steps instead. A PAW3395 stage read with the A9 encoding is a
fifth of the real value.

A receiver's product id cannot say which sensor a mouse has: 0x373b:0x1085
is a generic "Wireless mouse 1k dongle" reused across models, and the R1
alone ships with PAW3311, PAW3395, PAW3395SE, PAW3395Ultra, PAW3950Ultra
and CORE26K. So identify the mouse the way the vendor's own HUB does, with
GetMouseCIDMID (command 0x10), and look the pair up in a catalog that
carries the sensor.

- add per-sensor profiles and the step-50 codec to src/atk
- add src/drivers/atk/products.ts, keyed "<cid>,<mid>"
- pick the DPI encoding, ceiling and DPI ladder from the sensor, for reads
  and writes alike; an unidentified mouse keeps the A9 behaviour, matching
  the HUB's own fallback
- report VXE as its own brand via deviceBrand(), as Lamzu/CRDRAKO already do
- claim VXE's wired transport (0x3554:0xf58f, "Compx VXE R1"), which speaks
  the same 0xff02/report-0x08 channel. Product-id gated: 0x3554 is shared
  with the VGN Dragonfly F2, so the id also joins the Pulsar fallback's
  CLAIMED_VGN_PRODUCT_IDS
- decode the rest of GetBatteryLevel: the reply carries a charge flag and a
  cell voltage next to the percentage, so report batteryState and
  batteryVoltageMv instead of a hardcoded "Unknown"
- treat an unprogrammed angle register as unsupported. It reads 0xff and
  fails the (value, 0x55-value) pair, but decoded as -1 degrees
- retry identification instead of caching a timeout, so a mouse that was
  asleep is not left misnamed and mis-decoded for the session

Sensors whose DPI mapping is a lookup table (PAW3395SE, PAW3315, PAW3311,
PAW3320) are deliberately not implemented; those tables are not captured
here and a guessed step would misreport DPI silently.

Verified on a VXE R1 (CID/MID 2,12, PAW3395, firmware Mouse 3.13) over both
transports: DPI now reads 1600 rather than 320, ceiling 30000 rather than
42000, and the mouse names itself "VXE R1". Battery was captured across a
charge cycle: flag 0 with a steady voltage on battery, flag 1 with the
voltage climbing on the cable. Writes were not exercised.
See docs/atk-testing.md.
Co-authored-by: sakethkanchi <sakethkanchi3@gmail.com>
# Conflicts:
#	src/drivers/mouse-types.ts
@snekxs
snekxs merged commit f13fbb5 into main Sep 6, 2026
2 checks passed
@snekxs
snekxs deleted the pr53-fix branch September 6, 2026 08:10
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.

3 participants