T-Troll / alienfx-tools

Alienware systems lights, fans, and power control tools and apps
MIT License
492 stars 45 forks source link

Add AW3423DW Support #194

Closed translucentfocus closed 2 years ago

translucentfocus commented 2 years ago

This request provides the initial PCAP (change file extension back to .pcap to open in WireShark) for adding Alienware AW3423DW QD-OLED Monitor support.

AW3423DW QD-OLED Monitor Device Information:

HID\VID_187C&PID_100B&REV_0200 HID\VID_187C&PID_100B HID\VID_187C&UP:FF00_U:0001 HID_DEVICE_UP:FF00_U:0001 HID_DEVICE_UPR:FF00-FFFF HID_DEVICE

Methodology for PCAP Collection:

  1. Found a USB root hub that was separated from everything else on the machine to reduce unnecessary PCAP data. Did this by opening USBPCAP and moving one USB device to different USB ports until that device showed up on a separate hub from everything else.
  2. Stopped the AWCC Service from the Services App [can also open with Windows Key + R >> services.msc]
  3. Unplugged Monitor USB cable from machine
  4. Killed AWCC.exe in Task Manager now that the AWCC Service was stopped
  5. Started PCAP
  6. Plugged monitor USB cable back into machine so that USB discovery is run and is captured in PCAP
  7. Started AWCC Service
  8. Opened AWCC
  9. Set all 4 lights to a preset Green {RGB: 20,220,18}
  10. Set all 4 lights to a preset Red {RGB: 240,0,0}
  11. Ended PCAP (may have set lights back to Green) AW3423DW.txt

If this is satisfactory, I will continue using the very helpful wiki to collect the rest of the data.

Update: Added PCAP below (change to pcap extension) for turning each of the lights off and then to the color red (RGB 255,0,0) Need to right-click SaveAs... then rename to .pcap

EachLightOnOffRedColor

T-Troll commented 2 years ago

Don't need to play with AWCC/service right now. It needs to be stopped, then we start testing the device only. VID is Alienware.

Let me check interface, this issue can be a duplicate of #56, please read it.

T-Troll commented 2 years ago

Yes, it's the same interface as #56.

Can you please run alienfx-cli probe=a (answer "n" for light set) and share output to me?

translucentfocus commented 2 years ago

Yes, it's the same interface as #56.

Can you please run alienfx-cli probe=a (answer "n" for light set) and share output to me?

PS C:\Program Files\AlienFX Tools> .\alienfx-cli.exe probe=a
alienfx-cli v7.0.4
Dell API not found, Low-level device 0 ready.
===== Device VID_187c, PID_100b =====
Version 512, block size 12
Report Lengths: Output 65, Input 65, Feature 0
Usage ID 0x1, Usage page 0xff00, Output caps 1, Index 64
+++++ Detected as: Alienware,  +++++
Do you want to set devices and lights names? n
Done.
T-Troll commented 2 years ago

Here is the test cli - alienfx-cli.zip Can you, please:

translucentfocus commented 2 years ago

It detects API v6!

PS ~\Downloads\alienfx-cli> .\alienfx-cli.exe probe=a
alienfx-cli v7.1.0
Dell API not found, Low-level device 0 ready.
===== Device VID_187c, PID_100b =====
Version 512, block size 12
Report Lengths: Output 65, Input 65, Feature 0
Usage ID 0x1, Usage page 0xff00, Output caps 1, Index 64
+++++ Detected as: Alienware, Monitor, APIv6 +++++

Tried changing light colors, appears to not be working properly.

PS ~\Downloads\alienfx-cli> .\alienfx-cli.exe set-one=0,15,255,0,0
alienfx-cli v7.1.0
Dell API not found, Low-level device 0 ready.
Done.

PCAP (change file extension back to PCAP) of .\alienfx-cli.exe set-one=0,15,255,0,0 alienfx-cliLightChangePCAP.txt

T-Troll commented 2 years ago

Ok, detection work correctly. Can you please use this test version - alienfx-cli.zip Only second command (set-one). Did it change the lights?

translucentfocus commented 2 years ago

Ok, detection work correctly. Can you please use this test version - alienfx-cli.zip Only second command (set-one). Did it change the lights?

PS ~\Downloads\alienfx-cli (1)> .\alienfx-cli.exe set-one=0,15,255,0,0
alienfx-cli v7.1.0
Dell API not found, Low-level device 0 ready.
Done.

No luck. No lights changed. PCAP attached (change extension back to .pcap) set-oneCommand.txt

T-Troll commented 2 years ago

Ok, another version (same process) - alienfx-cli.zip

translucentfocus commented 2 years ago

Ok, another version (same process) - alienfx-cli.zip

It worked! All LEDs were set to red. πŸ₯³πŸŽ‰

PCAP attached as .txt as usual

PS ~\Downloads\alienfx-tools-comment-1233653691> .\alienfx-cli.exe set-one=0,15,255,0,0
alienfx-cli v7.1.0
Dell API not found, Low-level device 0 ready.
Done.

3rdalienfx-cliTest.txt

T-Troll commented 2 years ago

Great!

translucentfocus commented 2 years ago

Here's the dark, light, dim pcap as mentioned in the wiki. Change extension to .pcap DarkLightDIM.txt

T-Troll commented 2 years ago

So.... New test version - alienfx-cli.zip Can you please check different light/color set:

translucentfocus commented 2 years ago

So.... New test version - alienfx-cli.zip Can you please check different light/color set:

  • command is alienfx-cli set-one=0,<ID>,<R>,<G>,<B>. ID = 1,2,3,4 - light number.

Lights work! And the colors change as expected.

Possible Issues:

T-Troll commented 2 years ago

No. It's from 1 in my app for now, because it's a bitmask, in fact. Will fix it later. But the point about white make sense.

T-Troll commented 2 years ago

Try this cli - alienfx-cli.zip

Warning: it can stop working or have other side effects, let me know.

I try to fix white flash here. Also, on/dim/off should work too, but here is an issue - it will always drop light colors to black for now (and dimming not stored into cli), so use dimming and set light colors after (into one command line!) for check.

translucentfocus commented 2 years ago

Command:

PS ~\alienfx-cli-comment-1233730236> .\alienfx-cli.exe status
alienfx-cli v7.1.0
Dell API not found, Low-level device 0 ready.
Device #0 - Unknown, #4107, Display, VID#6268, PID#4107, APIv6, 0 lights
Done.

Behavior: All lights turned off, no change if running with or without AWCC Service running.


Command:

PS ~\alienfx-cli-comment-1233730236> .\alienfx-cli.exe reset
alienfx-cli v7.1.0
Dell API not found, Low-level device 0 ready.
Done.

Behavior All lights turned off, no change if running with or without AWCC Service running.


Command:

PS ~\alienfx-cli-comment-1233730236> .\alienfx-cli.exe set-one=0,0,255,0,0 set-one=0,1,255,0,0 set-one=0,2,255,0,0 set-one=0,3,255,0,0
alienfx-cli v7.1.0
Dell API not found, Low-level device 0 ready.
Done.

❌Unexpected Behavior Lights 1, 2, & 4 all turned red. Light # 3 (the downlight) did not turn on at all. The same command run with other colors sets the colors correctly, but light # 3 still stays dark.


Command:

PS ~\alienfx-cli-comment-1233730236> .\alienfx-cli.exe set-one=0,4,255,0,0
alienfx-cli v7.1.0
Dell API not found, Low-level device 0 ready.
Done.

❌Unexpected Behavior All lights turned off; this probably shouldn't do anything, since set-one=0,4 doesn't exist


Command:

PS ~\alienfx-cli-comment-1233730236> .\alienfx-cli.exe set-all=0,255,0
alienfx-cli v7.1.0
Dell API not found, Low-level device 0 ready.
Done.

❌Unexpected Behavior If lights are on, they turn off. If the lights are already off, they remain off.


Command:

PS ~\alienfx-cli-comment-1233730236> .\alienfx-cli.exe set-power=0,3,255,0,0,0,255,0
alienfx-cli v7.1.0
Dell API not found, Low-level device 0 ready.
Done.

βœ… Behavior Power button turned to red and stayed that way. No white flash was observed after the first run of the command. Subsequent runs only caused the light to very quickly blink off and back on (barely noticeable.) Even restarting AWCC Service and setting lights in AlienFX and then running the commands did not cause a white flash.

T-Troll commented 2 years ago

This version was for test only, it's not intended to work correctly. I just try other way to init device. And your device does not support hardware power button, so it's the same as set-one (hardware PB is for notebooks - with different color AC/Battery and charging/critlcal/sleep effects).

So... I need one more pcap. Effects, yes. Please run AWCC, set some lights to different effects (please remember colors for it), then share it for me.

PS: Try to play with release gui/cli - it should work with white flash, but stable.

translucentfocus commented 2 years ago

This version was for test only, it's not intended to work correctly. I just try other way to init device. And your device does not support hardware power button, so it's the same as set-one (hardware PB is for notebooks - with different color AC/Battery and charging/critlcal/sleep effects).

So... I need one more pcap. Effects, yes. Please run AWCC, set some lights to different effects (please remember colors for it), then share it for me.

PCAP process: Lights 1 through 4 (set in order, individually, via AlienFX)

  1. Initial color: Blue (0,0,255)
  2. Morph between red (255,0,0) and blue (0,0,255)
  3. Pulse blue (0,0,255)
  4. Breathing blue (0,0,255)
  5. Repeated for each light

Change attachment to .pcap extension AlienFXCycles.txt

translucentfocus commented 2 years ago

PS: Try to play with release gui/cli - it should work with white flash, but stable.

Thank you for all the hard work on this! Gave AlienFX Control 7.1.0 a test.

image

I selected Not Listed which then causes the program to stop responding.

image

Pcap of behavior attached. Change the extension to .pcap.
AlienFX Control.txt

T-Troll commented 2 years ago

Thank you for effect pcap, i don't need any other for now. But seems like it's a bug (again!) at clean configuration. I'll check.

PS: Do you really have x15/17, or it's a detection error?

T-Troll commented 2 years ago

Can you please share your configuration for check - i can't reproduce it! Just open regedit and export HKCU/Software/AlienFX_SDK and HKCU/Software/Alienfxgui.

translucentfocus commented 2 years ago

Thank you for effect pcap, i don't need any other for now. But seems like it's a bug (again!) at clean configuration. I'll check.

PS: Do you really have x15/17, or it's a detection error?

No, a x15/17 is not connected. Only Alienware component being tested/is connected is the AW3423DW. It would appear it is a detection error.

Can you please share your configuration for check - i can't reproduce it! Just open regedit and export HKCU/Software/AlienFX_SDK and HKCU/Software/Alienfxgui.

Configs attached. As usual, will need to rename the extensions to .reg if you don't want to work with them as text.

AlienFX_SDK.txt Alienfxgui.txt

T-Troll commented 2 years ago

No, a x15/17 is not connected. Only Alienware component being tested/is connected is the AW3423DW. It would appear it is a detection error.

It can be not error, but funny side effect. Check your keyboard VID/PID - is it 0D62/CABC?

translucentfocus commented 2 years ago

PS C:\Program Files\AlienFX Tools> .\alienfx-cli.exe probe alienfx-cli v7.2.0

AlienFX Control won't open at all and alienfx-clie.exe seems to hang completely now. I cleared the REG Keys for Alienfxgui and Alienfx_SDK and the keys are still empty.

PCAP attached. Change .txt to .pcap Alienfx-cli72.txt

T-Troll commented 2 years ago

I don't need pcap anymore, issue is not there!

T-Troll commented 2 years ago

Try this cli, it's debug - alienfx-cli.zip Please share the log.

T-Troll commented 2 years ago

Please also check this gui - if this is not device init it should help. alienfx-tools.zip Also detection bug fixed.

T-Troll commented 2 years ago

About effects: Seems like this - there are 4 types of command:

const byte colorSet[8]{0x92,0x37,0x0a,0x00,0x51,0x87,0xd0,0x04};
        //[3] - command length
        //[6] - command (87 - color, 88 - Pulse, 8c - morph/breath, 84 - timing?),
        //[8] - command type - 4 - color, 1 - morph, 2 - pulse, 3 - timing?
        //[9] - light mask,
        // 3,84 - [10] - Brightness, [11] - ???, [12] - checksum
        // 4,87 - [10,11,12] - RGB, [13] - Brightness (0..64), [14] - checksum
        // 2,88 - [10,11,12] - RGB, [13] - Brightness (0..64), [14] - Tempo?, [15] - checksum
        // 1,8c - [10,11,12] - RGB, [13,14,15] - RGB2, [16] - brightness, [17,18] - tempo, [19] - checksum

The only issue now, i can't calculate checksum correctly (i configure out there 8 come from before, but it doesn't work for other commands).

Can you please make another pcap from awcc with different colors and timings (length) -no matter what lights and kind?

T-Troll commented 2 years ago

And another task. Can you please:

I want to check how it init the device.

translucentfocus commented 2 years ago

Can you please make another pcap from awcc with different colors and timings (length) -no matter what lights and kind?

PCAP attached. (Change extension to .pcap) AWCCColorsTimeShifts.txt

Tempo was modified with this control: image

translucentfocus commented 2 years ago

And another task. Can you please:

  • run USBPcap
  • THEN run AWCC
  • Stop pCap

I want to check how it init the device.

Based on some experiments, it seems the background services do the actually init, so if it helps, here's the PCAP:

Rename to .pcap InitPCAP.txt

T-Troll commented 2 years ago

Thank you.

In fact, i'm implement effects already (but a bit weird way), so we only need to test it. Did AlienFX-GUI and CLI work for you now? (check beta versions above)

translucentfocus commented 2 years ago

Try this cli, it's debug - alienfx-cli.zip Please share the log.

Where is the log? I ran it, but can't find a log anywhere. Is there an option I need to run it with? Thanks!

Btw, when I run this debug alienfx-cli, it causes the monitor to go black but on. Windows stops recognizing the monitor. Powering-cycling the monitor fixes it.

PS ~\alienfx-cli> .\alienfx-cli.exe probe
alienfx-cli v7.2.0
Scan: VID: 0x187c, PID: 0x100b, Version: 512, Length: 12
Dell API ready, Low-level device 0 ready.
===== Device VID_187c, PID_100b =====
Version 512, block size 12
Report Lengths: Output 65, Input 65, Feature 0
Usage ID 0x1, Usage page 0xff00, Output caps 1, Index 64
+++++ Detected as: Alienware, Monitor, APIv6 +++++
Do you want to set devices and lights names?yes

For each light please enter LightFX SDK light ID or light name if ID is not available
Tested light become green, and turned off after testing.
Just press Enter if no visible light at this ID to skip it.
Probing low-level access... Found 1 device(s)
Dell API version 5.2.0.0 detected
Device #0 - AW3423DW (Display), 4 lights
  Light #0 - Back, Position (0,0,0), Color (0,0,0,0)
  Light #1 - Stand, Position (0,0,0), Color (0,0,0,0)
  Light #2 - Downlights, Position (0,0,0), Color (0,0,0,0)
  Light #3 - Power Button, Position (0,0,0), Color (0,0,0,0)
Probing device VID_187c, PID_100b...Old device name is , Enter device name or LightFX id: 0
Final device name is AW3423DW
translucentfocus commented 2 years ago

Please also check this gui - if this is not device init it should help. alienfx-tools.zip Also detection bug fixed.

This version behaves just like the last, except it detects no devices at all. It then freezes and becomes unresponsive. I can't access any light controls in the GUI before it freezes.

T-Troll commented 2 years ago

Well... Thanks.

I mean console log for CLI, not logfile, so you share it already. So now detection not hangs.... .... but what's wrong with gui? Let me check deeper.

except it detects no devices at all

It's not devices, in fact, but known light schemes.

Device detected, but something going wrong with UI init....

T-Troll commented 2 years ago

Try this version of GUI - alienfx-gui.zip It's debug too, and i also change potential issue with init.

translucentfocus commented 2 years ago

Try this version of GUI - alienfx-gui.zip It's debug too, and i also change potential issue with init.

Doesn't seem to detect anything & still freezes on launch. However, I did discover the program will unfreeze if I power cycle the monitor. Unfortunately, power cycling doesn't fix anything. PCAP with power cycle attached. Alienfx-gui-1238759317.txt

T-Troll commented 2 years ago

Interesting..... Do you have AWCCService running? Try to stop it.

T-Troll commented 2 years ago

Ohh... I found a bug! Try this one, should work now - alienfx-gui.zip

translucentfocus commented 2 years ago

Ohh... I found a bug! Try this one, should work now - alienfx-gui.zip

Awesome! You are doing great! Getting closer! Yes! It does work (sort of)! I can control each light [0-3] from the Devices and Grids tab. image However, there's some issues I've noticed such as:

  1. On first run, it works, but if I quit AlienFX completely, then run it again, the monitor screen goes black again (LEDs continue to work) and I have to power cycle.
  2. The light #s are not correct as seen below. image
  3. I can't seem to assign lights to any zone etc. but maybe I'm doing something wrong.

image

  1. Also, clicking Detect Devices is still blank, if that matters image
T-Troll commented 2 years ago

Great.

  1. Ugh.... Seems like this monitor can be fully controlled this way, including sleep and off! That's why i ask you for AWCC init sequence, let's play with it to find correct command.
  2. It's as it should be. BTW, you can type any name there.
  3. Read this first!
  4. Define all lights and set it to grid, then press "save lights" and share .csv with me - i'll add it into detection database for other users.
translucentfocus commented 2 years ago
  1. Define all lights and set it to grid, then press "save lights" and share .csv with me - i'll add it into detection database for other users.

CSV Attached! AW3423DW.csv Back: image image

Front: image image

See if that makes sense to you.

translucentfocus commented 2 years ago
  1. Ugh.... Seems like this monitor can be fully controlled this way, including sleep and off! That's why i ask you for AWCC init sequence, let's play with it to find correct command.

After some testing, Colors work correctly. The pulse effect also works, A value of 1 causes it to pulse ~370/sec. A value of 255 causes it to pulse at ~1 pulse per 12 secs.

I had no luck with the other effects.

T-Troll commented 2 years ago

Thanks for CSV!

You can use smaller grid size (this one for keyboards), but this ok too. I'll add it to database, so it will be detected at next versions.

So, only pulse works... In fact, morph and breathing are the same, breathing just a morph to black under the hood.

We are close to the finish now, all we need now is fix morph (I have some hints what can be wrong with it) and find correct start sequence (current one works, but turns monitor off). I see 2 other into AWCC CSV, so let's try them as well. I'll share the test version tomorrow for check.

T-Troll commented 2 years ago

Meanwhile, can you please do some testing for Morph?

First, morph require 2 colors (actions) Second, can you set it any color, but Speed exactly at 2, and Length exactly at 20 (it's what AWCC set)? Maybe i wrong with one of these parameters (first one, i guess). Third, can you please capture and share pcap for morph set into app? Just for sure it's done the right way?

T.I.A!

T-Troll commented 2 years ago

Try this CLI - alienfx-cli.zip

It uses another init way (from AWCC), as well as i fix Morph (i hope i found an issue).

translucentfocus commented 2 years ago

Third, can you please capture and share pcap for morph set into app? Just for sure it's done the right way?

T.I.A!

PCAP attached, just change extension to .pcap AWCCMorph.txt

T-Troll commented 2 years ago

No, not AWCC, my app! Anyway, does it work in general?

Thanks anyway!

translucentfocus commented 2 years ago

Try this CLI - alienfx-cli.zip

It uses another init way (from AWCC), as well as i fix Morph (i hope i found an issue).

This (the init portion) seems to work much more reliably, and I've had zero issues with the test monitor going blank or otherwise.

However, the Downlights (Light # 2 below) does not activate using any configuration.

.\alienfx-cli.exe probe
alienfx-cli v7.2.1
Dell API ready, Low-level device 0 ready.
===== Device VID_187c, PID_100b =====
Version 512, block size 12
Report Lengths: Output 65, Input 65, Feature 0
Usage ID 0x1, Usage page 0xff00, Output caps 1, Index 64
+++++ Detected as: Alienware, Monitor, APIv6 +++++
Do you want to set devices and lights names?yes

For each light please enter LightFX SDK light ID or light name if ID is not available
Tested light become green, and turned off after testing.
Just press Enter if no visible light at this ID to skip it.
Probing low-level access... Found 1 device(s)
Dell API version 5.2.0.0 detected
Device #0 - AW3423DW (Display), 4 lights
  Light #0 - Back, Position (0,0,0), Color (0,0,0,0)
  Light #1 - Stand, Position (0,0,0), Color (0,0,0,0)
  Light #2 - Downlights, Position (0,0,0), Color (0,0,0,0)
  Light #3 - Power Button, Position (0,0,0), Color (0,0,0,0)
Probing device VID_187c, PID_100b...Old device name is AW3423DW, Enter device name or LightFX id: 0
Final device name is AW3423DW
Testing light #0, old name Back (ENTER for skip):
Skipped, Testing light #1, old name Stand (ENTER for skip):
Skipped, Testing light #2, old name Downlights (ENTER for skip):
Skipped, Testing light #3, old name Power Button (ENTER for skip):
Skipped, Testing light #4(ENTER for skip): Skipped,

Also, I'm unsure of the syntax for set-global=<dev>,<type>,<mode>,r,g,b,r2,g2,b2 (what is type vs. mode?) but the following did not change the lights at all.

.\alienfx-cli.exe set-global=0,2,2,255,0,0,0,0,255
alienfx-cli v7.2.1
Dell API ready, Low-level device 0 ready.
Done.
translucentfocus commented 2 years ago

No, not AWCC, my app! Anyway, does it work in general?

Thanks anyway!

I'm having great difficulties getting alienfx-gui.exe to start reliably. Sometimes it just doesn't open. If I can get it to open and not crash, I'll get a new pcap.