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

Creative Commons License

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.

Creative Commons License
This work is licensed under a Creative Commons Attribution 3.0 License.

Print This Post Print This Post
  • Chris Kaczor

    Is the C code for this still available? The links seem dead. Thanks!

  • Chris Kaczor

    Is the C code for this still available? The links seem dead. Thanks!

  • johannes

    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. :-)

  • johannes

    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

    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!

  • Jason Dudley

    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!

  • http://brodwall.com/johannes/ Johannes Brodwall

    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

  • http://brodwall.com/johannes/ Johannes Brodwall

    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

  • http://brodwall.com/johannes/ Johannes Brodwall

    Scott Quibell shows how to use the XPS lights for Continuous Integration feedback here: http://blogs.quibell.net/blogs/scott/archive/20…

  • http://brodwall.com/johannes/ Johannes Brodwall

    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

    I've downloaded the source code, but can't seem to get it to work. The call to CreateFile fails and GetLastError returns 0×2 (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

  • http://brodwall.com/johannes/ Johannes Brodwall

    Hi, Martin

    On my system, the file is in C:WINDOWSsystem32drivers. 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

    I’ve downloaded the source code, but can’t seem to get it to work. The call to CreateFile fails and GetLastError returns 0×2 (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

  • http://brodwall.com/johannes/ Johannes Brodwall

    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

    Reinstalling the QuickSet program did the trick

    Thanks!

    M

  • Martin Harris

    Reinstalling the QuickSet program did the trick

    Thanks!

    M

  • Oz

    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?

  • Oz

    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?

  • http://brodwall.com/johannes/ Johannes Brodwall

    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.

  • http://brodwall.com/johannes/ Johannes Brodwall

    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

    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… for more details.

  • Litrik De Roy

    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.

  • http://code.google.com/p/eclipse-xps/ Litrik De Roy

    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.

  • http://code.google.com/p/eclipse-xps/ Litrik De Roy

    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.

  • Daniel Nicholson

    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

  • Daniel Nicholson

    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

  • http://phixx.com Phixx

    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

  • http://brodwall.com/johannes/ Johannes Brodwall

    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.

  • http://phixx.com Phixx

    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

  • http://brodwall.com/johannes/ Johannes Brodwall

    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

    Did anyone ever found out what appdrv.sys does? I really would like to see this working on Linux.

    Oliver

  • Oliver

    Did anyone ever found out what appdrv.sys does? I really would like to see this working on Linux.

    Oliver

  • http://brodwall.com/johannes/ Johannes Brodwall

    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!

  • http://brodwall.com/johannes/ Johannes Brodwall

    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

    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/

  • Oliver

    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

    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

  • Marcus Bakker

    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

  • http://brodwall.com/johannes/ Johannes Brodwall

    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.

  • http://brodwall.com/johannes/ Johannes Brodwall

    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.

  • Marcus Bakker

    i'm gona try it l8ter.ty 4 ure help

  • Marcus Bakker

    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.

  • Marcus Bakker

    i’m gona try it l8ter.ty 4 ure help

  • Marcus Bakker

    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.

  • http://brodwall.com/johannes/ Johannes Brodwall

    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.

  • http://brodwall.com/johannes/ Johannes Brodwall

    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

    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 http://www.lunaraccents.com/technology-programmable-LE...
    but it is not exactly what I am looking for.

  • gameman

    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 http://www.lunaraccents.com/technology-programmable-LED-controller.html
    but it is not exactly what I am looking for.

  • fLaMeCoRe

    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

  • fLaMeCoRe

    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

Creative Commons Attribution 3.0 Unported
This work is licensed under a Creative Commons Attribution 3.0 Unported.