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.
Comments:
[Chris Kaczor] - Jun 7, 2006
Is the C code for this still available? The links seem dead. Thanks!
johannes - Jun 8, 2006
Hi, Chris
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. :-)
[Jason Dudley] - Aug 21, 2006
I’m sure this is a dumb question and I apologize. I have thought from the day that I got my XPS that those LED’s should be programmable to be able to display status of anything from System Temp, CPU load, Memory use, bounce to music, etc etc. I was overjoyed when I found your name on another forum somewhere saying you created the first app to be able to call the leds to do your bidding. I googled you and found your page here but I do not know anything about programming and I would like to try to use this utility you’ve created. Could you please explain how I can get this to work on my XPS? I tried running the EXE but I get a cygwin.dll missing error.
Thanks!
Johannes Brodwall - Aug 30, 2006
Hi, Jason
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
Johannes Brodwall - Sep 10, 2006
Scott Quibell shows how to use the XPS lights for Continuous Integration feedback here: http://blogs.quibell.net/blogs/scott/archive/2006/07/23/10.aspx
[Martin Harris] - Sep 18, 2006
I’ve downloaded the source code, but can’t seem to get it to work. The call to CreateFile fails and GetLastError returns 0x2 (The system cannot find the file specified.). I’ve done a search on my machine (an XPS M1710 running XP Pro) and the file appdrv.sys doesn’t seem to exist. Any ideas?
Cheers
M
Johannes Brodwall - Sep 18, 2006
Hi, Martin
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
[Martin Harris] - Sep 19, 2006
Reinstalling the QuickSet program did the trick
Thanks!
M
[Oz] - Oct 25, 2006
I love the winamp plugin. Are there any similar programs to control the LEDs? Say changing with a games audio? Or perhaps a general program that does a similar visualization effect to any audio output from the sound card?
Johannes Brodwall - Nov 5, 2006
Hi, Oz
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.
[Litrik De Roy] - Dec 11, 2006
I have just started working on some Java code that plugs into Eclipse and uses xps_led_control.exe to use the LEDs to show the results of a JUnit test run. I plan to get rid of the exe and call the C-code directly through JNI later on. See http://litrik.blogspot.com/2006/12/dell-xps-led-aware-junit-listener.html for more details.
[Daniel Nicholson] - Jan 22, 2007
I was just mucking around with calls to ‘xps_led_control’ and came up with this to make your XPS flash like a police car, just create a new DOS batch script paste in the following, save it to the same directory as ‘xps_led_control.exe’ and run it: ——————————————
@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
Litrik De Roy - Jan 9, 2007
To all Java developers out there,
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.
Phixx - Feb 22, 2007
Do you know if this utility works on the XPS Desktops ?
And if not, do you know a way to control Desktop Vanity Lights ?
- Phixx
Johannes Brodwall - Feb 22, 2007
Hi, Phixx
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.
[Oliver] - Mar 19, 2007
Did anyone ever found out what appdrv.sys does? I really would like to see this working on Linux.
Oliver
Johannes Brodwall - Mar 19, 2007
Hi, Oliver. I haven’t heard of anyone who has gotten this to work under Linux. To other readers: A solution would be very welcome!
[Oliver] - Mar 20, 2007
Hard to find as Google didn’t spider it so far:
libsmbios has support for this since 13.03.2007. And don’t you say Dell doesn’t support Linux ;)
http://linux.dell.com/libsmbios/
[Marcus Bakker] - Apr 24, 2007
i have tried to download this link “XPS Led Control executable program (â€xps_led_control -help†for usage)” but after pressing run the second time it jst dissapears and never popups again. can u tell me why this is or give more detailed instructions on how to change the colours? ty
Johannes Brodwall - Apr 24, 2007
Hi, Marcus
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.
[fLaMeCoRe] - Sep 12, 2007
hi there, the prog is done realy nice. i just got one question!
its about WoW (World of Warcraft) do u think it is possible to accsess the leds through an addoningame? im justing playing around with the ace2 libs. just can create easy addons for the game, but dont have the know-how to say its possible or to create/implement the code.
hope u can give me the answer im searching 4 and may help me in my wish of an XPS LED WoW addon!
fLaMeCoRe
[Marcus Bakker] - Apr 25, 2007
i’m gona try it l8ter.ty 4 ure help
[Marcus Bakker] - Apr 25, 2007
still doesnt do anything.i find it easier to use the dell quickset program for the xps or the effect builder program to control the leds.this is to complicated. ty anyway.
Johannes Brodwall - Apr 26, 2007
Thanks for the feedback Marcus. The tool is meant mostly for scripting and automatically changing the colors. If you just want the lights to be a different colors, the quickset program is your friend.
[gameman] - Apr 28, 2007
I like this program. Do you have the option of fading and chasing also? How many colors can it display in this programe. I have found something semilar in this website www.lunaraccents.com/technology-programmable-LED-controller.html but it is not exactly what I am looking for.
Johannes Brodwall - Sep 14, 2007
Hi fLaMeCoRe,
I see no reason why you shouldn’t be able to get the lights to work from a WoW addon, and I think it sounds like a super-cool idea. However, I would recommend that you look into the official Dell LightFX SDK for this. It is no harder to use than my code, and it comes official from Dell.
Cheers, ~Johannes
[Jim Danz] - Jan 15, 2008
This is totally cool stuff. Does anyone know if the front lights on the XPS m1210 laptop can be controlled in a similar fashion? I’m a little bit pessimistic because I’ve only manually turned them on/off from the BIOS and don’t see a way to do it with the OS running… but I have been dreaming about sound-reactive front lights since day one of this system! Any help or direction greatly appreciated.
[Chris Groothoff] - Dec 31, 2007
This looks like a great utility but when I have tried this utility on my XPS M1730 and it generates the following error, any suggestions
Chris
D:\Downloads>xps_led_control /? usage: xps_led_control [-all color] [-front color] [-top color] [-side color] [- bright value] [-touchpad 0|1] Where color is a number from 0-16 and brightness value is a number from 0-7
(C) Copyright Johannes Brodwall , 2006 Some rights reserved: http://creativecommons.org/licenses/by/2.5/
D:\Downloads>xps_led_control -touchpad 0 CreateFileA(\\.\APPDRV) failed: 0x2
D:\Downloads>xps_led_control -touchpad 0 CreateFileA(\\.\APPDRV) failed: 0x2
Johannes Brodwall - Jan 1, 2008
Hi, Chris
Thank you for your question. This really should be a FAQ entry by now. Probably the most asked question about the tool.
xps_led_control doesn’t work without the Dell drivers. It looks like you need the QuickSet tool http://support.dell.com/support/downloads/download.aspx?libid=25&fileid=174171
Also notice that there after my post, Dell came out with new tools for the XPS. You can find more info at http://www.dell.com/html/global/xps/lightfx/index.html.
Hope this helps.
Johannes Brodwall - Jan 18, 2008
Hi, Jim
Thanks for the positive feedback. I see no reason that XPS M1210 could be controlled the same way. You probably need the QuickSet tool from Dell (http://support.dell.com/support/downloads/download.aspx?libid=25&fileid=174171). This lets you control the lights directly, and it also installs the drivers needed for my program.
There is actually a WinAmp plugin for XPS lights that does what you want: http://www.winamp.com/plugins/details/146182. Sadly, there is not source code available for it.
Johannes Brodwall - Apr 18, 2008
Hi, Patrick
I expect that Dell has a different driver for the XPS 720. As I don’t have access to an XPS 720 it is not possible for me to fix this. If you’re familiar with C code, you can twiddle around the indices in the buffer and see what happens. If you can find out how to work it, I’ll include your modifications in my source code (if we can make a version that works with both the laptop and desktop).
Also, you could look into the Dell official Light FX program, which is roughly equivalent to mine. See http://www.dell.com/html/global/xps/lightfx/index.html
Regarding color choice - this is sadly not possible. My program exposes the full range supported by the XPS laptop at least.
[Sean] - Apr 20, 2008
Is there anyway to get this to run on VISTA, when I run the exe, it opens a Command window but immediatly closes.
Any help would be appreciated.
Johannes Brodwall - Apr 21, 2008
HI, Sean
The program is a command line program, double clicking will produce exactly the message you see. Please execute the command on the command. If you don’t know how to do this, you can try out Daniel’s description in these comments.
[Chris Kaczor] - Jun 7, 2006
Is the C code for this still available? The links seem dead. Thanks!
[patrick] - Apr 17, 2008
congratulations! nice work.
i tried your app on a xps720 desktop. it works basically, but has glitches. i tested the modified lightcycle-version of Scott Quibell with 50 cycles and found the following:
-side: will turn back&frontlow OFF, fronttop=static on
-front: will turn back&fronttop OFF, frontlow=static on
-top: will turn frontlow&fronttop OFF, back pluses 50 times
-all: all 3 groups pluse 50 times correctly
does this help you to pinpoint the difference? can you fix things for xps720?
and finally: in the making, did yousee ANY chance that the LED’s could be adressed with RGB values os something more precise than the 16 basecolors?
[sal] - Dec 16, 2012
Really neat piece of code, I think it would be very cool to implement. but would it be possible to create a linux version that doesn’t use windows.h?
Johannes Brodwall - Dec 17, 2012
It should be possible, but I’m not the person to do it as I no longer have a Dell computer. See http://linux.dell.com/libsmbios/main/index.html for more about Linux libraries from Dell