Expand description
§katana-v2x
Linux control library for the Creative Sound Blaster Katana V2 and V2X soundbars.
Reverse-engineered USB protocol implementation for controlling RGB lighting,
10-band equalizer, Scout Mode, and audio routing over the CDC ACM interface.
Both models share the protocol; the connected Model is detected automatically.
§Quick start
use v2x::{Katana, Color, AnimationMode};
let mut dev = Katana::open_auto()?;
dev.set_lighting(true)?;
dev.set_color(Color::new(0xFF, 0x00, 0x80))?;
dev.set_brightness(200)?;
dev.set_mode(AnimationMode::Wave)?;
dev.set_colors(&[Color::RED, Color::GREEN, Color::BLUE])?;
dev.set_speed_bpm(20)?;§Device access
The Katana exposes a CDC ACM serial port (typically /dev/ttyACM0).
You may need to add your user to the dialout group or set up a udev rule:
# /etc/udev/rules.d/99-katana.rules
SUBSYSTEM=="tty", ATTRS{idVendor}=="041e", ATTRS{idProduct}=="3283", MODE="0666" # V2X
SUBSYSTEM=="tty", ATTRS{idVendor}=="041e", ATTRS{idProduct}=="3260", MODE="0666" # V2Modules§
- cmd
- Low-level protocol command builders, for advanced use.
Structs§
- Color
- An RGB color.
- EqState
- Current EQ state as reported by the device.
- Katana
- A connection to a Creative Sound Blaster Katana (V2 or V2X).
- Lighting
State - Current lighting state as reported by the device.
Enums§
- Animation
Mode - LED animation mode.
- EqBand
- 10-band equalizer frequency band.
- EqPreset
- Built-in EQ presets.
- Error
- Errors that can occur during Katana communication.
- Model
- A supported Creative Sound Blaster Katana model.
- Output
- Audio output target.
- Wave
Direction - Wave animation direction.
Functions§
- find_
device - Find the serial port path for a connected Katana (any supported model).