I have a Chinese USB gaming mouse (04d9:a070) which has 4 color modes and 4 light levels. I know for a fact that this mouse is capable for showing at least 5 different color so it must be an RGB led (4 legs). The software is the worst I've ever seen and it's incredibly hard to change the color, brightness and mode so it works and doesn't just turn off. Now I'm planning to make my own control software (for Linux first).
I have started with a simple guide "Reverse Engineering a USB mouse (Updated 3rd May 2017)" at Bytepunk (can't post a link but Google or DuckDuckGo should find that guide)
I have already sniffed most of the things I need. I used USBlyzer on Windows with the awful control software and got a few hex strings and figured out how to change the color, brightness and mode in the hex strings. I pasted the data I discovered here (Pastebin)
Clicking turn on lights from the Windows control software
out: 07 07 01 00 00 00 00 00 <-- Is this a "Commands coming in call"?
out: 07 09 01 02 00 00 00 00 <-- 07 09 01 0X where X is the color
out: 07 0C 01 04 00 00 00 00 <-- 07 0Y 01 0Z where Y is the brightness and Z is the mode
out: 07 13 04 00 00 00 00 00 <-- Is this a "Commands sent call"?
X - OFF: 0 RED: 1 BLUE: 2 GREEN: 3 PINK: 4
Y - LOW: B MED: 9 HIGH: C
Z - STATIC: 1 SLOW PULSE: 2 MED PULSE: 3 FAST PULSE: 4
My problem is that when I try to "write" anything to the device it just hangs and I get a "[Errno2] Entity not found" error and the mouse needs to be replugged in order to make it work again. It doesn't "disconnect" but it stays in lsusb
and nothing special shows up in dmesg
.
I pasted my modified python script to Pastebin
I also applied a custom udev rule
SUBSYSTEM=="usb", ATTR{idVendor}=="04d9", ATTR{idProduct}=="a070", GROUP:="plugdev", MODE="0666"
I'm new to serial communications and reverse engineering so I don't know what to search for. I think I can post pictures and more data from the USBlyzer in the comments. This is my first post here so I don't have the reputation to give more links.
Greetings, Santeri