ATK mouse stuff
README.md

openatk-rs #

An experimental Rust SDK for reverse-engineered ATK mouse protocols.

The first supported model is the ATK Blazing Zero (373b:1155 wireless dongle and 373b:1154 wired). Battery telemetry, DPI control, and polling-rate control use the verified 64-byte 0x72 protocol. Other capability traits are scaffolding and currently call unimplemented!().

Workspace #

  • atk-core: shared device types, errors, report transport, and capability traits.
  • atk-hid: HIDAPI discovery and report I/O.
  • atk-blazing-zero: Blazing Zero protocol and model implementation.
  • openatk-cli: battery, DPI, polling-rate, and Waybar CLI output.

Build and run #

cargo build
cargo run
cargo run -- --json
cargo run -- --watch 120 --json
cargo run -- --connection wired
cargo run -- dpi
cargo run -- dpi --set 1600
cargo run -- polling-rate
cargo run -- polling-rate --set 1000

The default command reads battery, DPI, and polling rate once. When wired and wireless endpoints are both present, automatic selection prefers a responsive wired endpoint and falls back to the dongle. Use --connection wired or --connection wireless to override selection. The dpi and polling-rate subcommands read their current value; pass --set <VALUE> to change it and verify the result.

Documentation #

Linux permissions #

Install the included udev rule and reconnect the mouse or dongle:

sudo cp 60-atk-hidraw.rules /etc/udev/rules.d/
sudo udevadm control --reload
sudo udevadm trigger --subsystem-match=hidraw

Verified protocol #

  • HID usage page: 0xFF05, usage: 0x0001, report ID: 0x08
  • Request: 08 <checksum> 72 02 00 <bank> <address> 01 00...
  • Battery register: 0x07
  • Charging register: 0x0f
  • DPI table read command: 0x17
  • DPI write command: 0x02
  • Polling-rate read command: 0x09
  • Polling-rate write command: 0x01
  • Wireless bank: 0x01
  • Wired bank: 0x00

A reported battery value of zero is treated as unavailable telemetry and retried, because the dongle returns zero while the mouse radio is asleep.

License #

Licensed under either of

at your option.

Contributing #

Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion in the work by you, as defined in the Apache-2.0 license, shall be dual licensed as above, without any additional terms or conditions.