https://github.com/srn/hyperx-cloud-flight-wireless
Reverse engineered module for interfacing with HyperX Cloud Flight Wireless
https://github.com/srn/hyperx-cloud-flight-wireless
battery-percentage hyperx reverse-engineering usb-hid
Last synced: 4 months ago
JSON representation
Reverse engineered module for interfacing with HyperX Cloud Flight Wireless
- Host: GitHub
- URL: https://github.com/srn/hyperx-cloud-flight-wireless
- Owner: srn
- License: mit
- Created: 2020-12-27T22:39:05.000Z (almost 5 years ago)
- Default Branch: main
- Last Pushed: 2022-01-24T08:20:27.000Z (over 3 years ago)
- Last Synced: 2025-04-13T03:09:02.408Z (6 months ago)
- Topics: battery-percentage, hyperx, reverse-engineering, usb-hid
- Language: JavaScript
- Homepage:
- Size: 22.5 KB
- Stars: 43
- Watchers: 1
- Forks: 6
- Open Issues: 4
-
Metadata Files:
- Readme: readme.md
- License: LICENSE
Awesome Lists containing this project
README
# hyperx-cloud-flight-wireless
> Module for interfacing with [HyperX Cloud Flight Wireless](https://www.hyperxgaming.com/unitedstates/us/headsets/cloud-flight-wireless-gaming-headset)
Supports Windows 10 x64 and Linux following the [instructions](https://github.com/srn/hyperx-cloud-flight-wireless#linux-support).
Current functionality:
- Power state
- Microphone state
- Volume state
- Charging state
- Battery percentage## Install
```sh
$ npm install srn/hyperx-cloud-flight-wireless
```## Usage
```js
const hyperxCloudFlight = require('hyperx-cloud-flight-wireless')()hyperxCloudFlight.on('power', state) // 'on' | 'off'
hyperxCloudFlight.on('muted', muted) // Boolean
hyperxCloudFlight.on('volume', direction) // 'up' | 'down'
hyperxCloudFlight.on('charging', charging) // Boolean
hyperxCloudFlight.on('battery', percentage) // 0-100 | null
hyperxCloudFlight.on('error', error) // instanceof Error
```## Notes
The battery percentage is only an estimate based on the "status" report.
## Linux support
To work with linux it is necessary to run as root, or define rules for udev.
```
echo 'KERNEL=="hidraw*", SUBSYSTEM=="hidraw", MODE="0664", GROUP="plugdev"' | sudo tee -a /etc/udev/rules.d/99-hidraw-permissions.rules && sudo udevadm control --reload-rules
```disconnect and reconnect the device
## License
MIT © [Søren Brokær](https://srn.io)