Uh oh!
There was an error while loading. Please reload this page.
corsair: add read-only NIGHTSWORD RGB driver (VID 0x1b1c, PID 0x1b5c) - #63
Closed
kfrancis wants to merge 2 commits into
Closed
corsair: add read-only NIGHTSWORD RGB driver (VID 0x1b1c, PID 0x1b5c)#63kfrancis wants to merge 2 commits into
kfrancis wants to merge 2 commits into
Conversation
New vendor. Pure codec in src/corsair and a WebHID client in src/drivers/corsair that reads identity, firmware, the enabled-stage mask, the current stage, every enabled DPI stage with its colour, lift-off height and angle snapping over 64-byte feature reports on the 0xffc2 / usage 4 config interface. Read-only for now: settingsReady is false, no setters, getDpiOptions() is empty. Protocol facts honoured, all verified on fw 3.41 / bl 3.08: - GET = sendFeatureReport → ~20 ms → receiveFeatureReport, reply must echo request bytes 0–3 (retried on a stale buffer); SET has no reply. - Byte 3 must be 0 (live profile); 1 returns zeros on this device. - DPI is big-endian in GET replies and little-endian in SET payloads; identity fields are little-endian. Tested explicitly. - A MOUSE_DPIPROF write without RGB bytes clears the stage colour, so setStageDpi requires the triple. - Slot d0 is iCUE's Sniper stage; numbered stages are d1–d5. - isSupported() requires usage 4 with a feature report on id 0 so the MI_00 usage-3 collection is never claimed; the picker filter includes usage: 4. The "NotAllowedError when iCUE is running" note from the original probe turned out to be the wrong picker entry: the usage-3 collection has no feature report and throws exactly that error, while the usage-4 interface keeps answering with iCUE active. The error is still mapped to guidance, leading with the interface choice. Registry wiring: DEVICE_DRIVERS, SupportedClient, VENDOR_ID.corsair, SUPPORTED_HID_FILTERS, the brand union, the registry probe matrix (0xffc2 page and usage 4), the ./corsair subpath export, tsconfig path and root namespace. Fixtures and the protocol write-up live in captures/corsair-nightsword. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
kfrancis
commented
Sep 6, 2026
ContributorAuthor
Matching app PR: OpenMouse-Project/openmouse#187 (NEEDS_OPEN entry, supported-devices row, device-image fallback). |
…range) Run against the NIGHTSWORD RGB on fw 3.41 with iCUE running: selecting a stage with 07 13 02 00 <n> takes effect immediately (cursor speed changes and the GET reads the new slot), angle snap accepts the write with or without ckb-next's trailing 0x05, and lift height reads back every value from 1 to 5. Raw log in captures/corsair-nightsword/ write-probe.txt; PROTOCOL.md's write table and open-questions list updated. No driver behaviour changes. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for freeto join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
New vendor: Corsair, starting with the NIGHTSWORD RGB (VID
0x1b1c, PID0x1b5c). Read-only phase 1: the driver identifies the mouse and reports firmware, bootloader, polling rate, the enabled-stage mask, the current DPI stage, every enabled stage with its colour, lift-off height, and angle snapping.ui.settingsReadyis false, there are no setters, andgetDpiOptions()is empty.src/corsair/index.ts— pure codec (constants, product table,corsairEncode.*,corsairDecode.*,corsairIsEcho).src/drivers/corsair/hid.ts—CorsairHidClient(serialised feature-report request queue, best-effort DPI reads that degrade to identity-only).DEVICE_DRIVERS,SupportedClient,VENDOR_ID.corsair,SUPPORTED_HID_FILTERS(withusage: 4), the brand union, the registry probe matrix,./corsairsubpath export, tsconfig path, root namespace.captures/corsair-nightsword/— protocol write-up, hex fixtures, and a README listing them.Device, firmware, connection
0xffc2, usage4, 64-byte feature reports on report id 0.MI_00also exposes an0xffc2usage-3 collection with no feature report;isSupported()rejects it and the picker filter pins usage 4.Tested on hardware
Windows 11, Chrome 152, OpenMouse control-panel with this package linked in:
0x0f, current stage,d0–d3with colours, lift 5, snap 0. Background refreshes over a 130 s session all succeeded.sendFeatureReporton it throws exactlyNotAllowedError: Failed to write the feature report., while the usage-4 interface answers. The error is still mapped to guidance that leads with re-picking the interface and falls back to closing iCUE.d0is iCUE's Sniper stage; iCUE's numbered Stage 1–3 ared1–d3. Confirmed against the iCUE DPI panel. The driver reports the Sniper slot separately and numbersdpiStages/activeDpiStagethe way iCUE does.Protocol evidence
ckb-next's NXP protocol (
nxp_proto.h,dpi.c,device_mouse.c) with two corrections found on hardware, both covered by explicit tests:Other facts honoured: profile flag byte 3 must be 0 (1 returns zeros on this device); a
MOUSE_DPIPROFwrite without RGB bytes 9–11 clears the stage colour, sosetStageDpirequires the triple; live writes are volatile across a power cycle.Unknowns and assumptions
Lift-off height 5in the firmware lines) andliftOffDistancestays null: the scale has not been mapped against iCUE's Surface Calibration settings.MOUSE_SNAPSET carries a trailing0x05in ckb-next; unverified (encoded and tested, never sent).setStage,setStageDpi,setDpiMask,setLift,setSnap,setPollMs) are in the codec with tests but the driver does not use them yet.Checks
npm run checkpasses (1060 tests).NEEDS_OPENentry, the supported-devices row, and a device-image fallback.🤖 Generated with Claude Code