Skip to content

hotfix(razer): retry corrupt replies after an 8K polling switch - #48

Merged
snekxs merged 1 commit into
OpenMouse-Project:devfrom
jazzstack:hotfix/razer-v3-pro-8k
Aug 9, 2026
Merged

snekxs merged 1 commit into
OpenMouse-Project:devfrom
jazzstack:hotfix/razer-v3-pro-8k

Conversation

@jazzstack

Copy link
Copy Markdown
Contributor

Summary

Hotfix for the Razer Viper V3 Pro (firmware 1.12): setting the polling rate to 8,000 Hz on the HyperSpeed receiver briefly reconfigures the wireless link, and feature-report exchanges sent into that window come back with a bad checksum.

Problem

  • After an 8K polling switch, the DPI read (0x04/0x85) and charging read (0x07/0x84) threw Class 0x04 command 0x85 returned a reply with a bad checksum. (and the equivalent for charging).
  • The lift-off (LOD) card silently disappeared, because readLiftOff degrades to null on a failed exchange.
  • The 8K apply sometimes failed outright.

Fix

  • exchange now re-sends a request whose reply came back corrupt (bad checksum / wrong length) instead of treating it as fatal, retrying within the existing response budget. Busy (0x01) replies still keep reading without a re-send.
  • setPollingRate pauses 150 ms after a wireless rate write so the read-back happens after the link settles (the Viper V4 Pro driver documents the same pause).

Testing

  • Added hid.test.ts cases: a corrupt reply is retried instead of surfacing a checksum error, and retrying does not break the command/response pairing of the multi-step lift-off write.
  • npm test (200 tests) and npm run build pass.

The receiver returns garbage while it reconfigures the wireless link after
switching to 8,000 Hz, so the DPI and charging reads failed with bad checksums
and the lift-off read silently hid the panel. exchange now re-sends a request
whose reply came back corrupt, and setPollingRate pauses 150 ms for the link to
settle before reading back.
@jazzstack

Copy link
Copy Markdown
Contributor Author

was verified working on hardware via discord user pochiko_ [531696159056461835}

@snekxs
snekxs merged commit e8f9abd into OpenMouse-Project:dev Aug 9, 2026
3 checks passed
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.

2 participants