My newest computer is a Dell XPS thing. It’s a huge monster of a laptop (really a gaming laptop, good for the performance). It comes with external LED lights on the top, sides and bottom. These lights are normally only configurable though a custom program. Since I got the PC, I have been dying to find a way to control these LEDs from a script. Finally, today, I found out how.
A post on Notebookforums made med aware of the tool API Monitor, which allows me to see how a program is using the Win32-API. From there, it was easy to recreate a program to do the same. The hardest part was that I decided to try to use the Ruby Win32API interface to call the methods. It was hard to find out how to pass the arguments, and in the end, I ended up with a pure C solution.
The final solution is a command line program, which allows me to script it. I have encapsulated the modification of the LEDs in a simple function for easier reuse.
For any reader with an XPS who would like to replicate it, I have posted the C source code and Executable. These files are licensed under a Creative Commons Attribution2.5 License.
- XPS Led Control C source code
- XPS Led Control executable program (“xps_led_control -help” for usage)
Update: The previous version of the xps_led_control.exe required cygwin installed on the client PC. I have compiled a new version that presumably should run without cygwin.dll. If you have the chance to test this out, I appreciate positive or negative feedback as to whether it works. Thanks.