When [Jespersaur] purchased a Luxeed LED keyboard, he was disappointed to find that the drivers were not open source and didn’t support all the features he wanted. His solution? Hack the drivers that come with it, and implement his own. In his article, he gives a basic rundown of beginning reverse engineering by multiple methods and a brief introduction to libusb. For the Linux drivers, check out [Kurt Stephens]’s site, where he supplies a link to the source code, instructions on building it, and a tutorial on sending commands to the keyboard.
17 thoughts on “Reverse Engineering USB Drivers”
Leave a Reply
Please be kind and respectful to help make the comments section excellent. (Comment Policy)
Hey I can write a subroutine to change the color of each key pressed, and have it stay lit a little bit longer and steel peoples passwords. WIN!
Nice hack.
He can now easily make the keyboard adapt to the environment he is working on.
I would love to integrate one of these with VIM. Make it highlight the bracket close key when a function was left open for example. fade out less important keys for programming in C. Change color of keys regarding the syntax highlighting color of the keyword it is being typed.
One can also edit the gnome sourcecode to grab a list of all accelerators for a given window and highlight them in the keyboard.
The possibilities are endless.
mrx –>
or show the gray scale from an optical mouse ;)
or a zoom around the cursor point ;)
i better stop . . . the possibilities are endless
i have used this to gain control of my nikon D40 to make quick HDR images before i got my D90 … i used a slightly diffrent approch tho
@mrx: It wouldn’t even have to stop at vim. Tied in with Gnome or another desktop manager, this could be a powerful tool for application-specific scripts and shortcut key coloring. Color packs could even be provided in a method similar to TextMate’s bundles.
Slightly off topic, but is it possible to change the device name of a USB device?
Like when I plug in my USB flash drive it identifies itself as Lenovo USB flash drive, or my Seagate drive identifies itself as a Seagate Free Agent Drive (strange usb enclosure doesn’t show the hard drive model number)
Is it possible to change that?
drake – Or, since you have root access to the machine (to install drivers), you can set up a keylogger which will work better and is less obtrusive. your idea = fail.
@aw
You have to check which usb controller the device has. For simple devices (like HID) the name is most probably hardcoded on the chip. For more complex usb devices, there is a chance it is firmware driven so you might be able to re-flash the microcontroller or external rom.
It’s a good start… I’ll buy in once the keyboard can be turned 90 degrees and used to play Tetris.
nice work. i wonder when thinkgeek will get the white ones back in.
kernel code under Linux and BSD is blatantly simple not matter what type of driver it is. In windows you have to deal with poorly documented hooks and data structures.
I would of just used syser, softice or modified ollydbg for it, but that’s being naive. Anything to do with reversing on NT at a assembler level is usually aggravating.
If you know the pe structure good enough you can usually unpack and modify fairly easy targets, but the kernel level is nasty, and even more of a headache on vista and 7.
Nice work Hackaday on delivering an article that is the epitome of what hacking is all about.
maybe this approach can be used to have access
also to xbox 360 chatpad device ?
Lot of people try to have this working
in PC without luck…
m.
I’m trying to reverse engineer usb drivers for windows and a n52 gamepad by belkin but i don’t know where to start any ideas?
one of these needs hacking to light up on wow cooldowns
I’m with myspacee, please point me in the right direction to get the ms chatpad working in windows or show how it is impossible, so that I can stop looking!
Nice work there. The reverse engineering pertaining to the blinking of the keyboard was particularly interesting. I’ve written a post about reverse engineering a webcam I’m currently trying to write a driver for.
You’d like to check it out:
http://opensourcethefuture.blog.co.in/2009/08/15/reverse-engineering-windows-webcam-drivers/