Skip to content
oauthulPublic

About

A cross-platform and performant headset monitoring and management application built in Rust.

Resources

Stars

2 stars

Watchers

0 watching

Forks

Latest commit

 

History

158 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

hsctl [headset control]

A lightweight, cross-platform and performant headset monitoring and management application built in Rust.

OS Compatibility

hsctl is aimed to be cross-platform (Linux, Windows and macOS).

OS x86 x64 ARM ARM64 Tested Version
Debian / Ubuntu ? ? ? ✓ Debian 13.6 (trixie) ARM64
Fedora ? ? ? ✓ Fedora 44 ARM64
Arch Linux ? ✓ ? ? Arch Linux x64
Windows ? ✓ ? ✓ Windows 11 26H2 (26300.9974) ARM64
macOS ? ? ? ✓ macOS Tahoe 26.6.2 ARM64

A tick (✓) shows that hsctl was tested to successfully compile and run on that OS and it's targeted CPU architecture, while a question mark (?) shows that hsctl was not tested for that specific OS and CPU architecture combination, but may still work regardless.

hsctl should run on both ARM/ARM64 and x86-64 devices.

Supported Headsets

As of now, hsctl supports the HyperX Cloud Stinger 2 Wireless.

hsctl can:

  • Get the battery level of the Stinger 2 Wireless,
  • Get the charging status of the Stinger 2 Wireless,
  • Get the microphone status of the Stinger 2 Wireless,
  • Get and set the auto-shutdown time of the Stinger 2 Wireless

..and more.

Prerequisites

Before building hsctl, ensure you have the right dependencies for your system.

Linux

hsctl relies on the hidapi crate which needs the libudev development headers to compile and may not be preinstalled on Linux systems.

Ensure the libudev development headers are installed for your system:

Debian / Ubuntu

sudo apt install libudev-dev

Fedora

sudo dnf install systemd-devel

Arch Linux

sudo pacman -S pkgconf

Permissions

On Linux machines, hsctl requires permissions so it can access and open the headset successfully.

To do this, you can add a udev rule file in /etc/udev/rules.d or /usr/lib/udev/rules.d:

# /path/to/rules.d/99-<filename>.rules

SUBSYSTEM=="hidraw", ATTRS{idVendor}=="03f0", ATTRS{idProduct}=="0d93", TAG+="uaccess"
SUBSYSTEM=="usb", ATTRS{idVendor}=="03f0", ATTRS{idProduct}=="0d93", TAG+="uaccess"

Windows

If you're using Windows, you'll need the Visual Studio build tools to install the Rust compiler.

Rust has a guide for this.

macOS

macOS users do not have any prerequisites.

Build

There are no pre-made binaries available to use as hsctl is still in development.

To use hsctl, you can compile it using the instructions below.

Installing the Rust compiler

If you haven't done so already, install the Rust compiler here.
At minimum, you need Rust 1.95.0.

Cloning the repository

Clone the repository:

  • Git: git clone https://github.com/oauthul/hsctl.git
  • GitHub: Download the repository zip file

Building the binary

Run cargo build --release in the hsctl directory.

By default, the binary will be located at <hsctl_root>/target/release/hsctl on Linux and macOS systems, or <hsctl_root>/target/release/hsctl.exe on Windows systems.

Why?

While there are other projects similar to mine that are much more advanced and developed, hsctl is a hobby project. I have very little experience with programming, so I used this project as a way to learn how to program better in general (especially in Rust) and how to make open source projects like a developer in the industry. I am not a software engineer, though I would love to be one.

hsctl was only possible with the help of the hard work and dedication of other projects, most notably:

  • HyperHeadset by LennardKittner (helped with understanding Rust in the context of device I/O and using already existing code)
  • HyperX-Cloud-2-Battery-Monitor by auto94 (helped with understanding the protocol for the Stinger 2 Wireless)
  • hidapi-rs by ruabmbua (the Rust wrapper for the C hidapi library)
  • egui by emilk (the GUI library used in hsctl)
  • crossbeam by crossbeam-rs (tools for concurrent programming in Rust)
  • tracing by tokio-rs (logging library for Rust)
  • clap by clap-rs (command line argument parser for Rust)

About

A cross-platform and performant headset monitoring and management application built in Rust.

Resources

Stars

2 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages