AlienFxLite icon indicating copy to clipboard operation
AlienFxLite copied to clipboard

Try to run AlienFxLite on Alienware M17 R4, but no controller available yet.

Open liusida opened this issue 7 years ago • 15 comments

$ java -jar AlienFX.jar Device found: 187c:0530

and a window pop up and said "Device unknow: no controller available. Please report this issue..."

So I am here reporting. ^_^

===== 10 Minuts Later ========

I try to run my M17 R4 (1748) as M17x or M17x R3 by modify the static pids in /src/java/uk/co/progger/alienFXLite/led/LEDController.java.

The GUI is there, but when i try to apply modify of color, it said: "Error occured while trying to communicate with the AlienFX device: Data length should be 9 but was -9"

===== 10 Minuts Later ========

I replace "return write(data);" with "return 9;" in LEDController.java, the prev error msg is gone. But, there is no reaction after I click the apply button or the "Reset AlienFX" in the menu.

liusida avatar Jan 01 '17 14:01 liusida

I failed with this, and my keyboard light were still blue. Nothing happened.

alienfx

liusida avatar Jan 01 '17 15:01 liusida

I am sorry!!! I thought my Alienware 1748 is M17x R4, but NOT...

1748 is a Chinese version, maybe... there must be a lot of differences.

I gave up. :cry:

liusida avatar Jan 01 '17 15:01 liusida

This is fixed with my pull request

jakeday avatar Jan 17 '17 01:01 jakeday

@liusida can you confirm that the PR from @jakeday solved your issue (merged to master)?

bchretien avatar Jan 18 '17 20:01 bchretien

I have the Alienware 17 R4 and the newest source does not work with this machine, but it does get much further along than the source before about 14 days ago. I was just trying to send the email below to someone on this team.

Hello, I have been watching your alienfx project on github. After your recent updates, I have been able to get the project running on my hardware. I have an Alienware 17 R4, that I recently got in Dec 2016. I would very much like to use your software to control the lights on my hardware. However, it does not quite work just yet. Is there anything I could do to help you incorporate my hardware into your software? I can send you and machine information that might be needed. I have been a developer for many years, and I used to write Java code. It has been a while since I have, but I am sure I could help add the controller that is needed. However, I do not know much about C++, and it looks like there are some pretty specific hex codes that I don't understand.

Please let me know, as I would really love to be able to use this in Linux on my laptop.

ghost avatar Jan 31 '17 04:01 ghost

@vowell When you run it, what device is reported as found in the console? Should be something like Device found: 187c:0530. Also, at which point are you seeing problems now?

jakeday avatar Jan 31 '17 12:01 jakeday

Yes it displays Device found: 187c:0530. However when applying, it gives the error in the screencap. screenshot from 2017-01-31 11-49-04

ghost avatar Jan 31 '17 17:01 ghost

I (Alienware 17 R4), too, have this issue ("Data length should be 9 but was -9").

My sudo lsusb -v is as follows:

Bus 001 Device 003: ID 187c:0530 Alienware Corporation 
Device Descriptor:
  bLength                18
  bDescriptorType         1
  bcdUSB               0.02
  bDeviceClass            0 
  bDeviceSubClass         0 
  bDeviceProtocol         0 
  bMaxPacketSize0        64
  idVendor           0x187c Alienware Corporation
  idProduct          0x0530 
  bcdDevice            0.00
  iManufacturer           1 Alienware
  iProduct                2 AW1517
  iSerial                 3 02.90
  bNumConfigurations      1
  Configuration Descriptor:
    bLength                 9
    bDescriptorType         2
    wTotalLength           41
    bNumInterfaces          1
    bConfigurationValue     1
    iConfiguration          0 
    bmAttributes         0xe0
      Self Powered
      Remote Wakeup
    MaxPower                0mA
    Interface Descriptor:
      bLength                 9
      bDescriptorType         4
      bInterfaceNumber        0
      bAlternateSetting       0
      bNumEndpoints           1
      bInterfaceClass         3 Human Interface Device
      bInterfaceSubClass      0 
      bInterfaceProtocol      0 
      iInterface              0 
        HID Device Descriptor:
          bLength                 9
          bDescriptorType        33
          bcdHID               1.01
          bCountryCode            0 Not supported
          bNumDescriptors         1
          bDescriptorType        34 Report
          wDescriptorLength      56
         Report Descriptors: 
           ** UNAVAILABLE **
      Endpoint Descriptor:
        bLength                 7
        bDescriptorType         5
        bEndpointAddress     0x81  EP 1 IN
        bmAttributes            3
          Transfer Type            Interrupt
          Synch Type               None
          Usage Type               Data
        wMaxPacketSize     0x000a  1x 10 bytes
        bInterval              10
can't get debug descriptor: Resource temporarily unavailable
Device Status:     0x0000
  (Bus Powered)

I'm running Arch Linux 4.11.3.

I'm also happy to provide any additional information or runtime tests that might be useful :)

mgruben avatar Jun 06 '17 02:06 mgruben

I'm having the same problem in Linux Mint 18.1

Alienware M17x R4

safkhet avatar Jun 16 '17 03:06 safkhet

Additionally, AlienFX incorrectly reports Device: as Alienware M17x R4, when the device is an Alienware 17 R4.

Interestingly, I am still able to turn off all lights by using Help > Reset AlienFX.

mgruben avatar Jun 17 '17 18:06 mgruben

By adding a line to ProfileSelectionPanel.java, I was able to obtain the following stack trace of the Data Length should be 9 but was -9 error:

uk.co.progger.alienFXLite.led.AlienFXCommunicationException: Data length should be 9 but was -9
        at uk.co.progger.alienFXLite.led.AlienFXController.setSpeed(AlienFXController.java:218)
        at uk.co.progger.alienFXLite.alienfx.AlienFXEngine.applyProfile(AlienFXEngine.java:66)
        at uk.co.progger.alienFXLite.gui.ProfileSelectionPanel$ApplyListener.actionPerformed(ProfileSelectionPanel.java:193)
        at javax.swing.AbstractButton.fireActionPerformed(AbstractButton.java:2022)
        at javax.swing.AbstractButton$Handler.actionPerformed(AbstractButton.java:2348)
        at javax.swing.DefaultButtonModel.fireActionPerformed(DefaultButtonModel.java:402)
        at javax.swing.DefaultButtonModel.setPressed(DefaultButtonModel.java:259)
        at javax.swing.plaf.basic.BasicButtonListener.mouseReleased(BasicButtonListener.java:252)
        at java.awt.AWTEventMulticaster.mouseReleased(AWTEventMulticaster.java:289)
        at java.awt.Component.processMouseEvent(Component.java:6533)
        at javax.swing.JComponent.processMouseEvent(JComponent.java:3324)
        at java.awt.Component.processEvent(Component.java:6298)
        at java.awt.Container.processEvent(Container.java:2236)
        at java.awt.Component.dispatchEventImpl(Component.java:4889)
        at java.awt.Container.dispatchEventImpl(Container.java:2294)
        at java.awt.Component.dispatchEvent(Component.java:4711)
        at java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:4888)
        at java.awt.LightweightDispatcher.processMouseEvent(Container.java:4525)
        at java.awt.LightweightDispatcher.dispatchEvent(Container.java:4466)
        at java.awt.Container.dispatchEventImpl(Container.java:2280)
        at java.awt.Window.dispatchEventImpl(Window.java:2746)
        at java.awt.Component.dispatchEvent(Component.java:4711)
        at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:758)
        at java.awt.EventQueue.access$500(EventQueue.java:97)
        at java.awt.EventQueue$3.run(EventQueue.java:709)
        at java.awt.EventQueue$3.run(EventQueue.java:703)
        at java.security.AccessController.doPrivileged(Native Method)
        at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:80)
        at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:90)
        at java.awt.EventQueue$4.run(EventQueue.java:731)
        at java.awt.EventQueue$4.run(EventQueue.java:729)
        at java.security.AccessController.doPrivileged(Native Method)
        at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:80)
        at java.awt.EventQueue.dispatchEvent(EventQueue.java:728)
        at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:201)
        at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:116)
        at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:105)
        at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:101)
        at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:93)
        at java.awt.EventDispatchThread.run(EventDispatchThread.java:82)

The line that I added was e1.printStackTrace(); above existing line 195.

mgruben avatar Aug 15 '17 20:08 mgruben

I edited the writeDebug method of LEDController.java as follows:

static int writeDebug(byte[] data){
	if(AlienFXProperties.isDebug){
		System.out.print("Writing");
		for(byte b : data){
			System.out.printf(" 0x%x", b);
		}
		
		int resp = write(data);
		System.out.printf(" - Received response %d", resp);
		System.out.println();
		return 9;
	}
	return write(data);
}

Then, trying to apply this configuration: red right keyboard

I receive the following debug output:

Device found: 187c:0530
Writing 0x2 0x6 0x0 0x0 0x0 0x0 0x0 0x0 0x0 - Received response -9
Writing 0x2 0x7 0x3 0x0 0x0 0x0 0x0 0x0 0x0 - Received response 9
Writing 0x2 0x8 0x1 0x0 0x0 0x0 0x0 0x0 0x0 - Received response 9
Writing 0x2 0x3 0x1 0x0 0x0 0x1 0xf0 0x0 0x0 - Received response 9
Writing 0x2 0x8 0x1 0x0 0x0 0x0 0x0 0x0 0x0 - Received response 9
Writing 0x2 0x4 0x0 0x0 0x0 0x0 0x0 0x0 0x0 - Received response 9
Writing 0x2 0x9 0x0 0x0 0x0 0x0 0x0 0x0 0x0 - Received response 9
Writing 0x2 0x7 0x4 0x0 0x0 0x0 0x0 0x0 0x0 - Received response 9
Writing 0x2 0x6 0x0 0x0 0x0 0x0 0x0 0x0 0x0 - Received response 9
Writing 0x2 0xe 0x0 0x64 0x0 0x0 0x0 0x0 0x0 - Received response -9
Writing 0x2 0x3 0x10 0x0 0x0 0x1 0xf0 0x0 0x0 - Received response 9
Writing 0x2 0x4 0x0 0x0 0x0 0x0 0x0 0x0 0x0 - Received response 9
Writing 0x2 0x5 0x0 0x0 0x0 0x0 0x0 0x0 0x0 - Received response 9

mgruben avatar Aug 15 '17 20:08 mgruben

Interestingly, this has allowed me to actually change pretty much all of the lights on my Alienware 17 R4.

There are distinct quirks.

So long as I don't have anything set for the Standby Power Button, I can actually set and play around with the lights.

The last change that I made to get here was to enter debug mode.
That is under src/java/uk/co/progger/alienFXLite/AlienFXProperties.java, line 10, change public static final boolean isDebug = false; to true.

mgruben avatar Aug 15 '17 20:08 mgruben

@mgruben thanks for your captures, to make work AW17 on this repo a few changes needed: DATA_SIZE is 12 bytes no 9 Color codes is full RGB now 255(0xFF) per color I share my repo https://github.com/swarzesherz/alienware, this is only for AW17 R4 and maybe work in AW15 R3. Touch pad only work if activate always on in BIOS, i don't now how make work auto 20171019_223030 TODO: Power blink

swarzesherz avatar Oct 20 '17 05:10 swarzesherz

SEND_DATA_SIZE could be set dynamically from the Java code (for now it is indeed hardcoded to 9).

bchretien avatar Oct 20 '17 17:10 bchretien