Repository navigation
feat(ajazz): driver for the NJ07 and NJ08 family - #177
Merged
Merged
Conversation
…panel Requested for the NJ07 MC in Discord ticket 0156. The vendor's WebHID panel (nacodex.yjx2012.com, "V1" device class) speaks the K-snake command family with a different frame: output report 0xF0 with 63 body bytes, replies that echo the command, and different header bytes. Product ids 0x2157, 0x2158, 0x2167, 0x2168, 0x2177 and 0x2178 on VID 0xA8A4 (wired) and 0xA8A5 (dongle). 0x2255 stays with the K-snake driver. No capture exists; every byte comes from the panel's JavaScript. Covers identity, battery, firmware, DPI stages, polling rate, sleep timer and scroll direction. Every write reads the config block back and fails if the mouse kept the old value. The wake/move-light byte is carried opaque because the panel decodes it with a nibble bug. Buttons, macros, NJ08 lighting and wake mode are left for after a hardware test. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This was referenced Oct 7, 2026
|
yeah that's me |
|
🎉 This PR is included in version 0.28.0 🎉 The release is available on: Your semantic-release bot 📦🚀 |
snekxs
pushed a commit
to Linspen/mouse-protocol
that referenced
this pull request
Oct 8, 2026
Resolve add/add conflicts with PR OpenMouse-Project#177 (NJ07/NJ08) so both Ajazz families coexist: - src/ajazz/index.ts keeps the NJ07/NJ08 codec; AK820 constants move to src/ajazz/ak820.ts with AK820-infixed export names. - src/drivers/ajazz/hid.ts keeps the NJ07 client; the AK820 identity client moves to src/drivers/ajazz/ak820-hid.ts (+ ak820-hid.test.ts). - registry.ts registers both drivers; vendors.ts keeps both filter sets. - package-lock.json keeps the AGPL license field (matches main's package.json).
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 free
to 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.
Requested for the AJAZZ NJ07 MC in a Discord support ticket (0156). The reporter found the vendor's WebHID panel, https://nacodex.yjx2012.com/, and this driver is written from its JavaScript.
What the mice are
The panel's "V1" device class speaks the same command family as the K-snake X11 with a different frame. Output report
0xF0with 63 body bytes, replies that echo the command at data[0], and different header bytes (read config0E 01 0B 2E, write config0F 01 0A 2F). The config block offsets match the K-snake's once the report id is stripped. Control collection is usage page 0xFF01, usage 0x10, on VID0xA8A4(wired) and0xA8A5(2.4 GHz dongle).Claimed product ids:
0x2157NJ07,0x2158NJ08,0x2167NJ07 MC,0x2168NJ08 MC,0x2177NJ07 MC PRO,0x2178NJ08 MC PRO.0x2255stays with the K-snake driver: it is shared with the K-snake X11 and the NJ07/NJ08 V2 and Ultra, and telling them apart needs a descriptor dump.What this adds
src/ajazz/index.ts: constants, one encode/decode per field, the config block codec.src/drivers/ajazz/hid.ts:AjazzHidClient. Identity, battery, firmware, DPI stages (read, edit one stage, pick the active stage), polling rate, sleep timer, scroll direction. Replies are matched by echoed command because the mouse also pushes DPI and battery reports unprompted. SET rewrites the whole block, so each setter reads the block, patches one field, writes, then reads back and fails if the mouse kept the old value../ajazzexport and tsconfig path, README row,docs/ajazz-nj07.md.setMouseConfigDataframe plus a mock mouse (unsolicited reports, silent mouse, a mouse that ignores writes).One deliberate difference from the panel: it writes
wakeup << 4 | move_lightbut reads both fields back from the high nibble, so a save flips the move-light bit. The driver keeps that byte opaque.Not done
Buttons and macros (same slot layout as the K-snake, commands
0x08/0x09), NJ08 lighting, wake mode, line correction. The panel has no lift-off or debounce controls.Testing
npm run buildand the full suite pass. No capture or hardware exists for any of these mice, so this is untested; the ticket reporter has an NJ07 MC and can test once it ships.App wiring: OpenMouse-Project/openmouse#658 (draft). Catalog: OpenMouse-Project/openmouse-landing-page#35.