audiohacked / OpenCorsairLink

Linux and Mac OS support for the CorsairLink Devices
GNU General Public License v2.0
707 stars 125 forks source link

Support for H100i RGB Platinum #146

Closed Teque5 closed 4 years ago

Teque5 commented 5 years ago

New H100i RGB Platinum cooler, lsusb identified as 1b1c:0c18

I tried adding this device to device.c, copying 0x0c16:

{
.vendor_id = 0x1b1c,
.product_id = 0x0c18,
.device_id = 0xFF,
.name = "H100i RGB Platinum",
.read_endpoint = 0x01 | LIBUSB_ENDPOINT_IN,
.write_endpoint = 0x01 | LIBUSB_ENDPOINT_OUT,
.driver = &corsairlink_driver_asetekpro,
.led_control_count = 1,
.fan_control_count = 2,
.pump_index = 0,
},

but it doesn't really seem to work:

$sudo ./OpenCorsairLink.elf --device=0 --debug
XXX
Checking USB device 8 (1b1c:0c18)...
Corsair product detected. Checking if device is H100i RGB Platinum... Dev=0, CorsairLink Device Found: H100i RGB Ultimate!
XXXX

DEBUG: scan done, start routines
DEBUG: device_number = 0
DEBUG: shortcuts set
DEBUG: init done
Vendor: Corsair
Product: H100i RGB Platinum
Firmware: 0.0.0.0
00 00
Temperature 0:  0.00 C
00 00
Temperature 1:  0.00 C
00 00
Temperature 2:  0.00 C
00
00 00
Fan 0:  Mode 0x00
    Current/Max Speed 0/0 RPM
00
00 00
Fan 1:  Mode 0x00
    Current/Max Speed 0/0 RPM
Unsupported Generic Pump Function
00 00
Pump:   Mode 0x00
    Current/Max Speed 0/0 RPM
DEBUG: deinit done
rigred commented 5 years ago

For starters are you sure if this is using an Asetek / CoolIT pump?

Teque5 commented 5 years ago

No idea. I'm simply assuming the H100i would be like the H100i RGB. It may not be compatible. I tried all the drivers I found in devices.c.

audiohacked commented 5 years ago

@Teque5 Can you upload or post a lsusb -d 1b1c:0c18 -vvv

Teque5 commented 5 years ago

Sure, but the device is clearly not recognized:

$ lsusb -d 1b1c:0c18 -vvv

Bus 001 Device 004: ID 1b1c:0c18 Corsair 
Couldn't open device, some information will be missing
Device Descriptor:
  bLength                18
  bDescriptorType         1
  bcdUSB               2.00
  bDeviceClass            0 (Defined at Interface level)
  bDeviceSubClass         0 
  bDeviceProtocol         0 
  bMaxPacketSize0        64
  idVendor           0x1b1c Corsair
  idProduct          0x0c18 
  bcdDevice            1.00
  iManufacturer           1 
  iProduct                2 
  iSerial                 0 
  bNumConfigurations      1
  Configuration Descriptor:
    bLength                 9
    bDescriptorType         2
    wTotalLength           34
    bNumInterfaces          1
    bConfigurationValue     1
    iConfiguration          0 
    bmAttributes         0xc0
      Self Powered
    MaxPower              100mA
    Interface Descriptor:
      bLength                 9
      bDescriptorType         4
      bInterfaceNumber        0
      bAlternateSetting       0
      bNumEndpoints           1
      bInterfaceClass         3 Human Interface Device
      bInterfaceSubClass      0 No Subclass
      bInterfaceProtocol      1 Keyboard
      iInterface              0 
        HID Device Descriptor:
          bLength                 9
          bDescriptorType        33
          bcdHID               1.11
          bCountryCode            0 Not supported
          bNumDescriptors         1
          bDescriptorType        34 Report
          wDescriptorLength      27
         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     0x0040  1x 64 bytes
        bInterval               7
audiohacked commented 5 years ago

Looks like the H100i uses a Interrupt-type USB control interface, at least one-half of the protocol. Since lsusb didn't report what the other End Point was, I'm assuming its a control-type packet. I'm currently unable to do any reverse-engineering due to lack of money and hardware to work on this.

audiohacked commented 5 years ago

@Teque5 Can you upload or post a sudo lsusb -d 1b1c:0c18 -vvv apparently lsusb didn't have full access to the USB as stated by the line: 'Couldn't open device, some information will be missing'.

Teque5 commented 5 years ago

my mistake:

$ sudo lsusb -d 1b1c:0c18 -vvv

Bus 001 Device 004: ID 1b1c:0c18 Corsair
Device Descriptor:
  bLength                18
  bDescriptorType         1
  bcdUSB               2.00
  bDeviceClass            0 (Defined at Interface level)
  bDeviceSubClass         0
  bDeviceProtocol         0
  bMaxPacketSize0        64
  idVendor           0x1b1c Corsair
  idProduct          0x0c18
  bcdDevice            1.00
  iManufacturer           1 Corsair Inc.
  iProduct                2 H100i Platinum
  iSerial                 0
  bNumConfigurations      1
  Configuration Descriptor:
    bLength                 9
    bDescriptorType         2
    wTotalLength           34
    bNumInterfaces          1
    bConfigurationValue     1
    iConfiguration          0
    bmAttributes         0xc0
      Self Powered
    MaxPower              100mA
    Interface Descriptor:
      bLength                 9
      bDescriptorType         4
      bInterfaceNumber        0
      bAlternateSetting       0
      bNumEndpoints           1
      bInterfaceClass         3 Human Interface Device
      bInterfaceSubClass      0 No Subclass
      bInterfaceProtocol      1 Keyboard
      iInterface              0
        HID Device Descriptor:
          bLength                 9
          bDescriptorType        33
          bcdHID               1.11
          bCountryCode            0 Not supported
          bNumDescriptors         1
          bDescriptorType        34 Report
          wDescriptorLength      27
         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     0x0040  1x 64 bytes
        bInterval               7
Device Status:     0x0001
  Self Powered
xserban commented 5 years ago

I'm also looking forward to this. @audiohacked can I help you do some reverse engineering?

rzrpt commented 5 years ago

If it helps, here's my output:

sudo lsusb -d 1b1c:0c18 -vvv

Bus 001 Device 009: ID 1b1c:0c18 Corsair 
Device Descriptor:
  bLength                18
  bDescriptorType         1
  bcdUSB               2.00
  bDeviceClass            0 (Defined at Interface level)
  bDeviceSubClass         0 
  bDeviceProtocol         0 
  bMaxPacketSize0        64
  idVendor           0x1b1c Corsair
  idProduct          0x0c18 
  bcdDevice            1.00
  iManufacturer           1 Corsair Inc.
  iProduct                2 H100i Platinum
  iSerial                 0 
  bNumConfigurations      1
  Configuration Descriptor:
    bLength                 9
    bDescriptorType         2
    wTotalLength           34
    bNumInterfaces          1
    bConfigurationValue     1
    iConfiguration          0 
    bmAttributes         0xc0
      Self Powered
    MaxPower              100mA
    Interface Descriptor:
      bLength                 9
      bDescriptorType         4
      bInterfaceNumber        0
      bAlternateSetting       0
      bNumEndpoints           1
      bInterfaceClass         3 Human Interface Device
      bInterfaceSubClass      0 No Subclass
      bInterfaceProtocol      1 Keyboard
      iInterface              0 
        HID Device Descriptor:
          bLength                 9
          bDescriptorType        33
          bcdHID               1.11
          bCountryCode            0 Not supported
          bNumDescriptors         1
          bDescriptorType        34 Report
          wDescriptorLength      27
         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     0x0040  1x 64 bytes
        bInterval               7
Device Status:     0x0001
  Self Powered
TikiTDO commented 5 years ago

I did a usbmon dump of the interaction between a H100i RGB Platinum, and the windows utility for managing it.

This starts from connecting the driver to my VM, then I go through a few with different colors / color modes, and finally I try setting a bunch of fan modes and create a new mode, and finishes with me disconnecting the device from the VM.

h100i_usb_dump.txt

I might come back at some point to poke at it, but this may be enough for someone with more experience to tell what's happening.

zatricky commented 5 years ago

It seems the lsusb output from my H115i RGB Platinum is almost identical. Likely if we get support for the H100i it'll mean support for a couple others as well.

markubiak commented 5 years ago

For anyone looking for a workaround while support for this is fleshed out, it's perfectly valid to just connect the fan headers to the motherboard instead of the water block. I did this to quiet down the fans and have had no problems with temperature.

Legion2 commented 4 years ago

I think the H100i PLATINUM, H115i PLATINUM and H100i PLATINUM SE all use the same protocol as the Commander PRO.

audiohacked commented 4 years ago

@Legion2 I can personally vouch that the H100i Platinum and the Commander Pro don't share the same protocol.

Legion2 commented 4 years ago

But they are very similar. I can flash an Arduino with the Commander Pro firmware and use the H100i Platinum USB ids and iCUE thinks the Arduino is a H100i Platinum and I can see the commands send by iCUE on the arduino.

audiohacked commented 4 years ago

What do you mean "very similar"? Can your Arduino correctly interpret and feedback all the statuses and sensors as expected of iCUE?

Legion2 commented 4 years ago

No, it can only handle the Commander Pro commands correctly, but the structure of the H100i Platinum protocol is similar, only the commands themself differ.

After some debugging I realized that the protocols are completely different. ICUE only coincidentally detected the Arduino as H100i Platinum.

gitcoinbot commented 4 years ago

Issue Status: 1. Open 2. Started 3. Submitted 4. Done


This issue now has a funding of 0.43 ETH (50.35 USD @ $117.09/ETH) attached to it.

tkruger206 commented 4 years ago

Super excited to get support for the H100i Platinum for my Hackintosh! @shnqdr thanks for jumping on this. I can do testing if you need.

makk50 commented 4 years ago

Hi, I have tested your latest changes, and now i can read the cooling liquid temperature on my h115i platinum: marco@pc-kubuntu:/datos/OpenCorsairLink-testing$ sudo ./OpenCorsairLink.elf --device 0 Dev=0, CorsairLink Device Found: H115i Platinum!

Vendor: Corsair Product: H115i Platinum Firmware: 1.1.15 Temperature 0: 30.18 C Fan 0: Unknown (STUB) Current/Max Speed 296/65535 RPM Fan 1: Unknown (STUB) Current/Max Speed 296/65535 RPM Pump: Mode 0x00

It seems you are getting closer to provide support for CoolIT AIOs. Great work! If i can help you with my limited knowledge, I can test, or provide you info if you need

cometta commented 4 years ago

guys, anyone knows a way to off the rgb colors on linux?

gitcoinbot commented 4 years ago

Issue Status: 1. Open 2. Cancelled


The funding of 0.43 ETH (163.02 USD @ $379.11/ETH) attached to this issue has been cancelled by the bounty submitter

ShnQdr commented 4 years ago

Cool what shall I do?

TikiTDO commented 4 years ago

The liquidctl project now supports this device, so this issue can be closed.