UMBRA-7: Add DeviceSpecs for the Mamba line (7 PIDs) #16

Merged
David merged 2 commits from feat/mamba-line-devicespecs-UMBRA-7 into main 2026-06-07 02:33:56 +02:00
Owner

Implements UMBRA-7: adds the seven Mamba PIDs from OpenRazer's razermouse_driver.h that were missing (the Mamba Elite 0x006C landed earlier).

Devices added

PID Model Lighting Battery Idle Poll
0x0024 Razer Mamba 2012 (Wired) none (classic LED) yes (0xFF) yes (0xFF) 0xFF
0x0025 Razer Mamba 2012 (Wireless) none (classic LED) yes (0xFF) yes (0xFF) 0xFF
0x0044 Razer Mamba 2015 (Wired) none (class 0x03) yes (0xFF) yes (0xFF) 0xFF
0x0045 Razer Mamba 2015 (Wireless) none (class 0x03) yes (0xFF) yes (0xFF) 0xFF
0x0046 Razer Mamba Tournament Edition none (class 0x03) n/a n/a n/a
0x0072 Razer Mamba Wireless 2018 (Receiver) Logo + Scroll (0x0F) yes (0x3f) yes (0xFF) 0x3f
0x0073 Razer Mamba Wireless 2018 (Wired) Logo + Scroll (0x0F) yes (0x3f) yes (0xFF) 0x3f

How the values were derived

Each spec's per-command transaction IDs, poll rates, lighting zones, effect kinds and battery/idle support were read individually off the matching razermouse_driver.c branches (firmware, serial, dpi read+write, poll read+write, charge_level, charge_status, idle read+write) cross-checked against the probe attribute groups, not assumed.

  • 2012 pair (0x0024/0x0025): standard 2-byte DPI on 0xFF (NOSTORE, not the 1-byte legacy path), poll/battery/idle on 0xFF. Scroll lighting goes through the classic on/off set_led_state path umbra has no builder for, so lighting is None (the naga_2012 precedent). DPI max 6400 (Philips twin-eye sensor, documented assumption).
  • 2015 pair (0x0044/0x0045): DPI/battery/idle on 0xFF; the single backlight zone uses the standard-matrix (class 0x03) path umbra does not build, so lighting is None (the naga_chroma / diamondback_chroma precedent). Poll is modeled on the read-path 0xFF that umbra info exercises; the driver's poll WRITE path uses 0x3f for these PIDs, a known driver inconsistency documented in each file. DPI max 16000 (5G laser sensor, assumption).
  • Tournament Edition (0x0046): wired-only. The driver registers no poll/charge/idle attributes for it and drives its backlight through the standard-matrix path, so only firmware/serial/dpi (0xFF) survive. DPI max 16000.
  • 2018 Wireless receiver/wired (0x0072/0x0073): firmware/serial/dpi/poll/lighting/battery on 0x3f, idle on 0xFF (split, mirroring deathadder_v2_pro_wired). Two extended-matrix (class 0x0F) zones, Logo + Scroll, with static/spectrum/reactive/breath/none, the same builder family umbra already ships for the DeathAdder V2 line. DPI max 16000 (5G optical sensor, assumption).

Tests

Adds every_mamba_line_pid_is_registered, asserting registration of all seven PIDs plus per-variant transaction IDs, DPI maxima, lighting zones, and battery/idle presence. cargo test --package umbra-hid --no-default-features passes (25 tests). cargo build and cargo fmt --check are clean.

Note: local cargo clippy (rust 1.94) flags a doc_lazy_continuation lint in three pre-existing Basilisk files unrelated to this change; the new Mamba files are clippy-clean.

🤖 Generated with Claude Code

Implements UMBRA-7: adds the seven Mamba PIDs from OpenRazer's `razermouse_driver.h` that were missing (the Mamba Elite `0x006C` landed earlier). ## Devices added | PID | Model | Lighting | Battery | Idle | Poll | |--------|----------------------------------------|-------------------------|---------|------|------| | 0x0024 | Razer Mamba 2012 (Wired) | none (classic LED) | yes (0xFF) | yes (0xFF) | 0xFF | | 0x0025 | Razer Mamba 2012 (Wireless) | none (classic LED) | yes (0xFF) | yes (0xFF) | 0xFF | | 0x0044 | Razer Mamba 2015 (Wired) | none (class 0x03) | yes (0xFF) | yes (0xFF) | 0xFF | | 0x0045 | Razer Mamba 2015 (Wireless) | none (class 0x03) | yes (0xFF) | yes (0xFF) | 0xFF | | 0x0046 | Razer Mamba Tournament Edition | none (class 0x03) | n/a | n/a | n/a | | 0x0072 | Razer Mamba Wireless 2018 (Receiver) | Logo + Scroll (0x0F) | yes (0x3f) | yes (0xFF) | 0x3f | | 0x0073 | Razer Mamba Wireless 2018 (Wired) | Logo + Scroll (0x0F) | yes (0x3f) | yes (0xFF) | 0x3f | ## How the values were derived Each spec's per-command transaction IDs, poll rates, lighting zones, effect kinds and battery/idle support were read individually off the matching `razermouse_driver.c` branches (firmware, serial, dpi read+write, poll read+write, charge_level, charge_status, idle read+write) cross-checked against the probe attribute groups, not assumed. - **2012 pair (0x0024/0x0025):** standard 2-byte DPI on 0xFF (NOSTORE, not the 1-byte legacy path), poll/battery/idle on 0xFF. Scroll lighting goes through the classic on/off `set_led_state` path umbra has no builder for, so lighting is `None` (the `naga_2012` precedent). DPI max 6400 (Philips twin-eye sensor, documented assumption). - **2015 pair (0x0044/0x0045):** DPI/battery/idle on 0xFF; the single backlight zone uses the standard-matrix (class 0x03) path umbra does not build, so lighting is `None` (the `naga_chroma` / `diamondback_chroma` precedent). Poll is modeled on the read-path 0xFF that `umbra info` exercises; the driver's poll WRITE path uses 0x3f for these PIDs, a known driver inconsistency documented in each file. DPI max 16000 (5G laser sensor, assumption). - **Tournament Edition (0x0046):** wired-only. The driver registers no poll/charge/idle attributes for it and drives its backlight through the standard-matrix path, so only firmware/serial/dpi (0xFF) survive. DPI max 16000. - **2018 Wireless receiver/wired (0x0072/0x0073):** firmware/serial/dpi/poll/lighting/battery on 0x3f, idle on 0xFF (split, mirroring `deathadder_v2_pro_wired`). Two extended-matrix (class 0x0F) zones, Logo + Scroll, with static/spectrum/reactive/breath/none, the same builder family umbra already ships for the DeathAdder V2 line. DPI max 16000 (5G optical sensor, assumption). ## Tests Adds `every_mamba_line_pid_is_registered`, asserting registration of all seven PIDs plus per-variant transaction IDs, DPI maxima, lighting zones, and battery/idle presence. `cargo test --package umbra-hid --no-default-features` passes (25 tests). `cargo build` and `cargo fmt --check` are clean. Note: local `cargo clippy` (rust 1.94) flags a `doc_lazy_continuation` lint in three pre-existing Basilisk files unrelated to this change; the new Mamba files are clippy-clean. 🤖 Generated with [Claude Code](https://claude.com/claude-code)
feat(umbra-hid): add DeviceSpecs for the Mamba line
Some checks failed
Check / fmt + clippy + build + tests (pull_request) Failing after 4s
ea2050ecb7
Adds the seven Mamba PIDs from OpenRazer's razermouse_driver.h that were missing (the Mamba Elite 0x006C landed earlier): Mamba 2012 wired/wireless (0x0024/0x0025), Mamba 2015 wired/wireless (0x0044/0x0045), Mamba Tournament Edition (0x0046), and the Mamba Wireless 2018 receiver/wired (0x0072/0x0073).

Each spec's per-command transaction IDs, poll rates, lighting zones, effect kinds and battery/idle support are read individually off the matching razermouse_driver.c branches (firmware, serial, dpi read+write, poll read+write, charge_level, idle, plus the probe attribute groups), not assumed:

- 2012 pair: standard 2-byte DPI on 0xFF (NOSTORE), poll/battery/idle on 0xFF. Scroll lighting uses the classic on/off set_led_state path umbra does not build, so lighting is None (naga_2012 precedent). DPI max 6400 (Philips twin-eye sensor, assumption).
- 2015 pair: DPI/battery/idle on 0xFF; the single backlight zone uses the standard-matrix (class 0x03) path umbra does not build, so lighting is None (naga_chroma / diamondback_chroma precedent). Poll is modeled on the read-path 0xFF that `umbra info` uses; the driver's poll WRITE path uses 0x3f (documented inconsistency). DPI max 16000 (5G laser sensor, assumption).
- Tournament Edition: wired-only; the driver registers no poll/charge/idle attributes and drives its backlight through the standard-matrix path, so only firmware/serial/dpi (0xFF) survive. DPI max 16000.
- 2018 Wireless receiver/wired: firmware/serial/dpi/poll/lighting/battery on 0x3f, idle on 0xFF (split, like deathadder_v2_pro_wired). Two extended-matrix (class 0x0F) zones Logo + Scroll with static/spectrum/reactive/breath/none, the same builder family umbra already ships. DPI max 16000 (5G optical sensor, assumption).

Registers all seven in models::mod.rs, adds the every_mamba_line_pid_is_registered unit test asserting registration and the per-variant txn / zone / battery / idle expectations, and lists each device in the README Supported devices table.

#UMBRA-7
Merge branch 'main' into feat/mamba-line-devicespecs-UMBRA-7
Some checks failed
Create release / Create release from merged PR (pull_request) Has been skipped
Check / fmt + clippy + build + tests (pull_request) Failing after 4s
f95ed1cb14
David merged commit 0e1b198ab5 into main 2026-06-07 02:33:56 +02:00
David deleted branch feat/mamba-line-devicespecs-UMBRA-7 2026-06-07 02:33:56 +02:00
Sign in to join this conversation.
No reviewers
No labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
pandoras-box/umbra!16
No description provided.