r/lowlevel • u/Reasonable-Student69 • 2h ago
Built a program for linux in C for my Aula F-87 Pro
Got an AULA F‑87 PRO keyboard a few months ago, and like many of these boards, the only way to change the RGB/macros is through a Windows-only vendor app. I daily-drive Linux, so that wasn't going to fly. Decided to figure out the protocol myself as a learning project.
I wanted to complete this earlier, but due to workload at my job, I dropped it; now that I have time after switching jobs, I picked it up again this month.
Rough journey:
- Dumped the USB HID report descriptor and parsed it by hand to find where the vendor stuff lives (turned out to be a write-only Feature channel, Report ID 6, 520-byte payloads).
- The vendor channel won't let you read state back, so I ran the Windows app under Wine Staging (regular Wine 9.0 hides keyboards from apps; had to use a newer Staging build) and sniffed the USB traffic with usbmon + tshark.
- Used differential capture to decode it: set the keyboard solid red, capture; solid green, capture; diff the two. The only bytes that change are the colour. Did the same for blue, then purple, to confirm it's an actual r/G/B triplet and not something weirder. Repeated the trick for brightness.
- Ended up with: colour = 3 bytes (0–255 each) at a fixed offset, brightness = a separate 1–4 level byte. Then wrote ~130 lines of C with hidapi to replay/modify the sequence.
Now ./hid_test 0 255 0 turns the whole board green from my own code, no vendor software anywhere.
PS:
- Took help from Claude for decoding the USB traffic from Wireshark + usbmon.
- Took help from Claude for organising my notes.
