:photos
:papers
:tutorials
:drm
:nmicrocoder
:daes
:dhex
:deadline
:dettuxx
:circdraw
:systemc
:xf86config
:qdslconfig
:bootfloppy
:6502
:alienware

:math

winscp.exe
putty.exe

:impressum

Alienware M11x R3 color cycle under linux

It seems like the Alienware M11x R3 comes with this great mood lighting feature. There is the AlienFX command center under Windows. It lets you set colors for your keyboard, the speakers, the logo and the status LEDs.
There are certain java applications out there which allow it do it under linux. But... They are quite huge. Lets try a smaller demo, shall we?

USE AT YOUR OWN RISK!

colorcycle.c- Just cycles through a number of colors on the keyboard. (01-May-2012)
goround.c- Turns the whole notebook into a revolving light. (01-May-2012)
Compile and run it like so:
% sudo apt-get install libusb-1.0
% gcc -o colorcycle colorcycle.c -lusb-1.0
% sudo ./colorcycle
When you run it, you'll see something like this, over and over again:
write 02 07 04 00 00 00 00 00 00 
write 02 03 05 00 00 01 6f f0 00 
write 02 04 00 00 00 00 00 00 00 
write 02 05 00 00 00 00 00 00 00 
write 02 07 04 00 00 00 00 00 00 
write 02 06 00 00 00 00 00 00 00 
read  11 00 00 00 00 00 00 00 
(All values are in hex). If not, try to change the usleep() values to something a little higher.

The AlienFX feature is an USB device. And it can be accessed as such. Apparently, you'll have to send commands to it (write), and receive replys. (read). The meaning of the commands is this:
write 02 07 04 00 00 00 00 00 00 
According to this aw-community entry, it means "RESET".

write 02 03 05 00 00 01 6f f0 00 
This one is setting the color. Colors are rgb values, each 4 bit wide. I do not fully know the meaning of "03 05 00" yet, but "00 01" means that you are setting the color of the keyboard. 00 02, 00 04, 00 08 would set the color of a different region on a M14x.
00 20 would set the color of the front left speaker, 00 40 of the front right one, 01 00 of the Logo, 02 00 of the Touchpad, 08 00 of the status LEDs, 20 00 SHOULD set the Power button, 40 00 of the HDD Led.

Next up is the color, as i said RGB. so in this case, 6ff would look like this
******

The next 3 nibbles are RGB values if you want to set it to automatic cycling. Which might have to do something with the "03 05 00" I mentioned earlier.

Next up,
write 02 04 00 00 00 00 00 00 00  
means Subroutine End (whatever. Ask the guy who posted the community entry).
write 02 05 00 00 00 00 00 00 00  
means Program End.

Then there is another reset, and a Check request
write 02 06 00 00 00 00 00 00 00
To which the lighting device answers
read  11 00 00 00 00 00 00 00
Which is good, it accepts new commands. To set the lighting for the logo, for example. If not, you have to repeat the Check request, and wait until it says 11 00...


So far, i only tested it under Ubuntu Linux on an M11x R3. Which is VendorID 0x187C, and Product ID 0x0522. The Product ID changes with different models, you can easily check it with lsusb.