Repository navigation
feat: add Redragon M901 Perdition (04d9:fc5e) - #291
Blitzedzz-3 wants to merge 1 commit into
Conversation
|
Warning Review limit reachedYou've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository. Next included review available in 39 minutes. View limit details
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. |
ApprovabilityVerdict: Approved at Macroscope's review found this PR approvable — Adds M901 support for DPI, polling and profiles using the existing Holtek driver, backed by captured hardware data and round-trip evidence. Unverified button and lighting controls remain disabled, while existing models retain their protocol defaults. Notes:
You can add or adjust custom eligibility rules. Learn more. |
Summary
Adds support for the Redragon M901 Perdition (
04d9:fc5e), the M901-K-2 "Perdition4" variant — a wired Holtek mouse that runs the same RDCfg OEM firmware family and settings memory layout as the Redragon M612/M724.REDRAGON_M901_MODELdescriptor (src/redragon/m901.ts) reuses the shared Holtek transport and the 0xCFF DPI table.RedragonModel.replyAddressBasecovers the one wire difference found: this firmware answers a read with byte 3 =0x60 + addressHigh, where the M612/M724 answer0x32 + addressHigh.buttonsandlightingare now optional in the model descriptor. The M901 model leaves both unset because the physical side-button order and effect names are not verified on this unit, so the status omits the button editor and lighting card instead of writing guesses.0xfc5etoo.Hardware verification
Tested on a real unit over hidraw (interface 2,
0xFFA0:0x01, feature report 2):0x0000-0x07ffsettings dump:captures/redragon-m901/memory-dump.hex.readStatus: 5 profiles, DPI stages 500 / 1000 / 2000 / 3000 / 6200, active profile 2.Public references for the device and protocol:
dokutan/mouse_m908lists0x04d9:0xfc5eas M901-K-2 "Perdition4" with generic support.ernesto-elsaesser/usb-mouse-configdocuments the sameF2/F3/F5framing, the0x42/0x102/0x1b2/0x262/0x312DPI blocks, the 20-slot keymap addresses and the 0xCFF DPI code table.Details:
docs/redragon-m901-testing.md.Checks
npm run check(build + full test suite + pack dry run) passes: 3049 tests, 0 failed.src/drivers/redragon/m901.test.ts(dispatch, read status, reply header, DPI codec, bracketed polling write, and the deliberate button/lighting omission).Note
Add Redragon M901 Perdition (04d9:fc5e) support to Redragon driver
RedragonModelin holtek.ts with optional button, lighting, and reply-address base fields, and letsredragonDecodeReadvalidate non-default reply headersreadStatusomits those fields andsetButtonMapping/setLightingthrow model-specific errors for the M901 in hid.tsRedragonModelbutton/lighting fields are now optional; models without them return status without button or lighting dataMacroscope summarized 069f9dc.