trackmastersteve / alienfx

AlienFX is a CLI and GUI utility to control the lighting effects of your Alienware computer.
GNU General Public License v3.0
285 stars 70 forks source link

Alienware m-series, x-series, Dell G5/G7, Aurora R10-R13 support. #101

Open T-Troll opened 2 years ago

T-Troll commented 2 years ago

Hello, @trackmastersteve, i glad to see you still support this project.

I maintain cli/gui for Windows (alienfx-tools), and will be glad to help you add the newest systems into your package as well.

So, starting from m15R1 Dell use new chip with PID_0550. It uses a more complex 34-byte command interface. All later devices (both m15-17RX, x15-17Rx and Aurora 10-13) uses the same chip, but different mappings.

Additionally, RGB keyboards have other device (OEM from DARFON), 64-byte feature-controlled, so any notebook with RGB keyboard utilize 2 devices at once (one for keyboard, other for tron/power lights).

You can check all protocol commands here, as well as command chains and control sequences here.

I also have some mapping's database (but not full) here.

Feel free to use my data to support newer devices, as well as ask any questions about it!

macdabby commented 2 years ago

I just got an x15 r1 and i'd like to see this work - i'm happy to donate my time and energy but i'm a noob when it comes to dealing with this kind of usb access

T-Troll commented 2 years ago

In case Steve have no time for this, you can do it yourself - fork this repo and use his access procedures, you just need to change command generation into his code and provide a separate page for your gear. You can use his access methods for tron, but need to alter it a bit (feature instead of report) for keyboard.

But keep in mind - you need to add support for multi-devices, in case you have RGB keyboard.

All commands code referenced by link above, you have V4 tron and V5 keyboard.

Unfortunately, i can't do it myself - i don't have standalone Linux at my gear, WSL is enough for me.

JustCryen commented 2 years ago

I'll try with my Alienware m15 R1 when I have a bit more time. For now I've checked your code and I just don't really understand how the mapping database works. Where are you reading it?

T-Troll commented 2 years ago

For Windows, i keep it into registry.

My tools is universal, so i don't know real light mappings to IDs (especially for 0x550 (v4) and v5 devices, same device PID can have different light ID mappings).

As a result, i need to keep user-defined lightID and names into registry, and use .csv file to define it from possible choices.

You don't need this functionality for this app - he implements different .py files (with model name) instead and keep mappings inside.

For m15R1 (fortunately, i have it) you can check .csv file - it has all mappings for it. BTW, AWCC use one hidden ID which not really have light for GoDark/Dim operations. Maybe a bug, it works without it, but i keep it for compatibility.

kindrowboat commented 2 years ago

Hey @T-Troll, I was taking a stab at this today, and I found out that I was way out of my depth. Would you be interested in remote pairing? I have the hardware (Dell G5) and Linux setup; I just need some hand-holding through the USB stuff.

(cc @trackmastersteve)

T-Troll commented 2 years ago

@motevets, i'm not so skilled in Linux USB ops, but you can reach me at AlienFX-Tools support server in Discord, and i can explain in details what you need to change. Please keep in mind, i'm in GMT+7.

JustCryen commented 2 years ago

I still haven't had enough time to really dig into this. But I found out that OpenRGB detects LEDs on my M15 R1 and I can change their colour and brightness. Not every zone works separately but they all can be controlled at once.

Power button just "fights" between the battery status and currently chosen colour, other than that it's quite usable and it can be fixed by turning off the laptop with no AC plugged in for about 10 seconds.

AlienFX still can't get me through the zone scanning and still shows "No supported Alien FX controller found" OpenRGB shows the keyboard as "Dell G Series LED Controller" and its location as /dev/hidraw4 and serial 00.01, maybe this will be useful for somebody.

T-Troll commented 2 years ago

@JustCryen, interesting fact - i use m15R1 as one of developer's gear. So it definitely supported. Power button is really tricky in hardware, your situation is common if just set color to it. It need other command chain, and, most annoying, sometimes freeze device up to 10 seconds (AWCC too).

Both Dell G-series, all m- x- and even Aurora R10+ utilize the same chip (PID 0x550), but light IDs different for every model. Per-key (not zoned) RGB keyboards are other OEM (not Dell) chip.

kindrowboat commented 2 years ago

I was able to take the work that @T-Troll has done and make a targetted cross-OS library for my purposes. https://github.com/motevets/tower-colour-api

T-Troll commented 2 years ago

@motevets Nice job! But you only support APIv4. Yes, it's used widely (all m and x-series tron, R10-R13, all g-series), but m and x also have different device - RGB keyboard (APIv5). You can also read full APIs list and device example for it here.

@all - Another way for porting - just use HID data from alienfx-controls.h. The only issue is device-wide operations (hardware on, off, dimming) require a list of light IDs.