Dell XPS Vanity Lights Blink!
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.
Attachments
- 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.
This work is licensed under a
Creative Commons Attribution 3.0 License.
Print This Post
Add New Comment
Viewing 34 Comments
Thanks. Your comment is awaiting approval by a moderator.
Do you already have an account? Log in and claim this comment.
Do you already have an account? Log in and claim this comment.
Do you already have an account? Log in and claim this comment.
Thanks for pointing this out. The links were dead as I forgot to move the files when I moved my blog to a new site. They work now. :-)
Do you already have an account? Log in and claim this comment.
Thanks!
Do you already have an account? Log in and claim this comment.
I compiled the exe with cygwin and it seems to require that to run. I will try and see about getting a version that doesn't. If you install just a minimal configuration of cygwin from here, it should work.
Furthermore, you might be interested in the XPS Winamp plugin that I recently stumbled across. Sadly, I have not been able to find the source code for this.
~Johannes
Do you already have an account? Log in and claim this comment.
Do you already have an account? Log in and claim this comment.
Cheers
M
Do you already have an account? Log in and claim this comment.
On my system, the file is in C:\WINDOWS\system32\drivers. I think it was installed with some of the Dell software that came with the computer. Probably the QuickSet program. Have you got that installed?
~Johannes
Do you already have an account? Log in and claim this comment.
Thanks!
M
Do you already have an account? Log in and claim this comment.
Do you already have an account? Log in and claim this comment.
I have been searching around, but I have not been able to find any similar programs. Sadly, the Winamp plugin is not hooked into the audio output, but into Winamp itself, so it is not usable.
But if you find out how to write a plug-in for a game, soundcard or similar in C, writing the actual XPS LED Light parts is very simple. See the attached C code and just call the setXpsColors(side_color, front_color, top_color, brightness) function.
Do you already have an account? Log in and claim this comment.
Do you already have an account? Log in and claim this comment.
I have finished the Eclipse plug-in that uses the XPS LEDs to display the results of a JUnit test run. It includes the C code described in this post. See http://code.google.com/p/eclipse-xps/
PS: Johannes, thanks again for relicensing the C source under Apache 2.0.
Do you already have an account? Log in and claim this comment.
------------------------------------------
@echo off
echo Police!
:test
xps_led_control.exe -front 1 -side 10 -top 1 -bright 2
xps_led_control.exe -front 1 -side 10 -top 1 -bright 2
xps_led_control.exe -front 1 -side 10 -top 1 -bright 2
xps_led_control.exe -front 1 -side 10 -top 1 -bright 2
xps_led_control.exe -front 1 -side 10 -top 1 -bright 4
xps_led_control.exe -front 1 -side 10 -top 1 -bright 4
xps_led_control.exe -front 1 -side 10 -top 1 -bright 7
xps_led_control.exe -front 1 -side 10 -top 1 -bright 7
xps_led_control.exe -front 1 -side 10 -top 1 -bright 7
xps_led_control.exe -front 1 -side 10 -top 1 -bright 7
xps_led_control.exe -front 1 -side 10 -top 1 -bright 4
xps_led_control.exe -front 1 -side 10 -top 1 -bright 4
xps_led_control.exe -front 1 -side 10 -top 1 -bright 2
xps_led_control.exe -front 1 -side 10 -top 1 -bright 2
xps_led_control.exe -front 1 -side 10 -top 1 -bright 2
xps_led_control.exe -front 1 -side 10 -top 1 -bright 2
xps_led_control.exe -front 10 -side 1 -top 10 -bright 2
xps_led_control.exe -front 10 -side 1 -top 10 -bright 2
xps_led_control.exe -front 10 -side 1 -top 10 -bright 2
xps_led_control.exe -front 10 -side 1 -top 10 -bright 2
xps_led_control.exe -front 10 -side 1 -top 10 -bright 4
xps_led_control.exe -front 10 -side 1 -top 10 -bright 4
xps_led_control.exe -front 10 -side 1 -top 10 -bright 7
xps_led_control.exe -front 10 -side 1 -top 10 -bright 7
xps_led_control.exe -front 10 -side 1 -top 10 -bright 7
xps_led_control.exe -front 10 -side 1 -top 10 -bright 7
xps_led_control.exe -front 10 -side 1 -top 10 -bright 4
xps_led_control.exe -front 10 -side 1 -top 10 -bright 4
xps_led_control.exe -front 10 -side 1 -top 10 -bright 2
xps_led_control.exe -front 10 -side 1 -top 10 -bright 2
xps_led_control.exe -front 10 -side 1 -top 10 -bright 2
xps_led_control.exe -front 10 -side 1 -top 10 -bright 2
goto test
Do you already have an account? Log in and claim this comment.
And if not, do you know a way to control Desktop Vanity Lights ?
- Phixx
Do you already have an account? Log in and claim this comment.
I have no idea. If you have a XPS Desktop, why don't you try it out. I am very interested to know if it works. If it doesn't work, but you're up for some hacking, you can use API monitor as per my original blog post to see how the lights are controlled.
Do you already have an account? Log in and claim this comment.
Oliver
Do you already have an account? Log in and claim this comment.
Do you already have an account? Log in and claim this comment.
libsmbios has support for this since 13.03.2007. And don't you say Dell doesn't support Linux ;)
http://linux.dell.com/libsmbios/
Do you already have an account? Log in and claim this comment.
Do you already have an account? Log in and claim this comment.
The xps_led_control is a command line program. You have to download it to a directory (e.g. c:\) and start up a cmd shell (Start -> Run: cmd). In the command shell, you enter "c:\xps_led_control -all 1", for example. Or "c:\xps_led_control -help" for more instructions.
Hope this helps.
Do you already have an account? Log in and claim this comment.
Do you already have an account? Log in and claim this comment.
Do you already have an account? Log in and claim this comment.
Do you already have an account? Log in and claim this comment.
but it is not exactly what I am looking for.