Cyborg V.7 volume bar on Linux

While playing with the Cyborg V.7 macro keys I though: how hard can it be to get the volume bar working on the keyboard as well? As it turns out, not too hard.


The big difference is that instead of reading what happens on USB, you'll actually need to write to USB to change the volume bar leds. So I started to play around with LibUSB, grabbed some scripts and monitored what windows did on my USB port when adjusting the volume bar via the "official" driver. 


The end result is a wee piece of C code that sends a signal to the relevant USB device (06a3:0728) and you're done. You can download the code here, untar it, go into the cyborg directory, run make and if all goes well you should have a binary called "cyborgLeds".


Just run this binary as root with a argument 0 to 20 and it'll change the volume bar on your keyboard: 

sudo /path/to/cyborgLeds 20

To run as root, add the following line to /etc/sudoers:

user ALL=NOPASSWD:/path/to/cyborgLeds [0-9]*


BTW, reverse engineering windows drivers actually became a lot easier with virtual machines. Get a windows VM up and running on a Linux box, attach the relevant USB device, start usbmon, use wireshark or just cat the usb device (cat /sys/kernel/debug/usb/usbmon/0u) to monitor what windows and the device are doing to each other.


Comments (0)

Captcha

XHTML 1.1 valid CSS 3.0 valid JavaScript 1.6 valid Vivaldi valid Os-linux valid Ws-apache valid Php valid Jas valid