Skip to content

Fix Naga V3 Pro (00E8) polling/save-to-mouse, add echo-checked button I/O and --verbose tracing - #97

Open
Zedris wants to merge 5 commits into
infinityInfinite:mainfrom
Zedris:fix/naga-v3-pro-profile-upload
Open

Zedris wants to merge 5 commits into
infinityInfinite:mainfrom
Zedris:fix/naga-v3-pro-profile-upload

Conversation

@Zedris

@Zedris Zedris commented Nov 28, 2026

Copy link
Copy Markdown

What it does

Fixes Razer Naga V3 Pro (Wireless, 00E8, #91) polling rate detection and on-board button saving ("Save to mouse"), adds a "Saved on the mouse" shortcut tile to the Profile section, and adds opt-in Protocol 2.5 packet tracing to the CLI:

  1. devices.json (00E8): Sets "interface": 3 and "polling": "standard" for the Naga V3 Pro (Wireless) based on Providing a full report. everything seems to be working. new naga v3 pro #91 (00:85 answers 01, while 00:C0 returns NotSupported; 8000 Hz high-speed polling is only on the Mouse Dock Pro 00A4 / V2 Pro 00F1).
  2. Echo-matched button I/O & on-board slot read-back (buttons.rs, device.rs):
    • read_input, set_input, and set_slot_input now require replies to echo [slot, id] (get_echo / transact_echo / new transact_slow_echo, 2-byte echo because the Naga V3 Pro does not always echo layer in args[2]), preventing stale cached replies on wireless receivers/docks from corrupting save.before or causing set_slot_input to skip writes.
    • set_slot_input now reads back the on-board slot after writing and retries up to 3 times (matching create_macro), returning an explicit error (the device didn't keep ...) if the slot doesn't retain the assignment.
  3. Profile section shortcut (editor.html): Adds a "Saved on the mouse" tile in the Profile section for mice so users can save to the mouse directly from Profiles as well as Buttons.
  4. Packet tracing (-v / --verbose or SECBIRD_TRACE=1): Logs Protocol 2.5 requests and replies to stderr for diagnosing device issues. Serial replies (00:82) are redacted.

What I tested, on which device

  • Hardware verified on Razer Naga V3 Pro (Wireless, 00E8, firmware v1.0, Windows, no Synapse installed):
    • secbird -d 00E8 info reads Polling 1000 Hz cleanly.
    • Live remapping (secbird -v -d 00E8 button grid-1 key:u) works immediately.
    • secbird -v -d 00E8 button save-to-mouse writes Normal + HyperShift remaps to on-board slot 1 and reads them back cleanly via 02:8C.
    • Power-cycle persistence verified: after power-cycling the mouse with secbird-tray closed and no Synapse installed, pressing grid-1 still outputs u from on-board memory.
  • Automated tests:
    • cargo test: 143/143 (secbird-core), 8/8 (secbird-tray), 1 doc-test — all pass (including 4 new tests in db.rs and sim.rs).
    • cargo clippy --all-targets -- -D warnings: pass, zero warnings.
    • node --test crates/secbird-tray/tests/*.test.cjs: 7/7 pass.

What I couldn't test

  • Wired Naga V3 Pro (00E7) and Mouse Dock Pro / V2 Pro (00A4 / 00F1) — only tested on the Naga V3 Pro's own 2.4 GHz wireless dongle (00E8).

Risks / impact on other devices

  • Low risk: echo-matching checks only [slot, id] (args[0..2]), which Protocol 2.5 echoes for both 02:0C/02:8C and 02:0D/02:8D. set_slot_input read-back only runs on explicit "Save to mouse" / "Put back" actions and compares against Action::decode(function, data) so rounded turbo rates do not false-fail.
  • devices.json only changes PID 00E8 (backed by Providing a full report. everything seems to be working. new naga v3 pro #91); 00E7 (wired) and other models are untouched.

Checklist

  • cargo test and cargo clippy --all-targets -- -D warnings pass
  • node --test crates/secbird-tray/tests/*.test.cjs passes
  • Simulator test for new device behaviour; a source comment for each protocol fact
  • No new network calls, dependencies or system changes
  • CHANGELOG line under [Unreleased]

This branch has not been deployed

No deployments
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.

1 participant