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.

About Johannes Brodwall

Johannes is Principal Software Engineer in SopraSteria. In his spare time he likes to coach teams and developers on better coding, collaboration, planning and product understanding.
This entry was posted in Technology. Bookmark the permalink.
  • 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

  • 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

  • Chris Groothoff

    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

  • Chris Groothoff

    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

  • 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/downl

    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/ind….

    Hope this helps.

  • 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.

  • Jim Danz

    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.

  • Jim Danz

    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.

  • 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/downl…). 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.

  • 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.

  • patrick

    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?

  • patrick

    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?

  • 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/ind

    Regarding color choice – this is sadly not possible. My program exposes the full range supported by the XPS laptop at least.

  • 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

    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.

  • Sean

    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.

  • 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.

  • 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.

  • sal

    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?

  • 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