quadcast2 backlight driver with emulation in userspace for testing, backlight test signal tool and linux kernel driver
- Shell 47.1%
- C 40.1%
- Python 11.9%
- Makefile 0.9%
| Filename | Latest commit message | Latest commit date |
|---|---|---|
- Added qc2_usb.c to handle communication with interface 0 directly, bypassing HID layer limitations. - Updated qc2_hid.c to support both interfaces and adjusted brightness handling. - Created TESTING.md for detailed testing instructions and current driver status. - Introduced new Python scripts for brightness control and testing. - Updated Makefile to reflect changes in driver structure and naming conventions. |
||
| phases | ||
| src | ||
| README.md | ||
| TESTING.md | ||
quadcast2-linux-driver
Linux backlight driver for HyperX QuadCast 2 with userspace emulation for testing.
Note: This project is primarily designed and maintained by me. AI tools were used for tasks such as creating the Makefile, writing documentation, and code completion. I believe AI has the potential to both improve and degrade the quality of code maintenance—it can either add value or detract from it. Ultimately, the outcome depends on how you use it.
Live casting of this project:
This project provides:
- A userspace Python emulator simulating the USB HID interface of the QuadCast 2 RGB/backlight controller
- A kernel USB gadget driver (
f_qc2) implementing a minimal USB gadget emulator - Test tools to send brightness commands and commit settings, both to the emulator and real hardware
Roadmap
| Phase | Description | Done |
|---|---|---|
| 1 | Collect USB and kernel logs from real QuadCast 2 | ✅ |
| 2 | Build a Python emulator daemon for USB behavior | ✅ |
| 3 | Build a USB gadget kernel emulator for QuadCast 2 | ✅ |
| 4 | Set up Arch Linux VM for development | ✅ |
| 5 | Write kernel driver (loadable module) | ✅ |
| 6 | Test and debug via emulator | ✅ |
| 7 | Document and prepare patch for mailing list | ⚪ |
| 8 | Automate testing & maintenance | ⚪ |
Project structure
quadcast2-linux-driver
├── README.md
├── phases
│ ├── phase-1.md
│ ├── phase-2.md
│ ├── phase-3.5.md
│ └── phase-3.md
└── src
├── emulator
│ ├── gadget
│ │ ├── Makefile
│ │ ├── SETUP_GUIDE.md
│ │ ├── concat_all.sh
│ │ ├── f_qc2.c # USB gadget function driver
│ │ ├── quadcast2-gadget.sh # Setup script
│ │ └── test_brightness.sh
│ └── userspace
│ └── qc2_emulator.py # Userspace emulator (Mock)
└── tests
└── test_qc2.c # Test tool for sending test packages
7 directories, 13 files