Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Corsair H110i #664

Open
ciberkids opened this issue Jan 15, 2024 · 8 comments
Open

Corsair H110i #664

ciberkids opened this issue Jan 15, 2024 · 8 comments
Assignees
Labels
new device Support for a new device

Comments

@ciberkids
Copy link

ciberkids commented Jan 15, 2024

Device type

AIO LIquid cooler

Product page

https://www.corsair.com/us/en/p/cpu-coolers/cw-9060026-ww/hydro-series-h110i-280mm-extreme-performance-liquid-cpu-cooler-cw-9060026-ww

First-party software

Icue

What monitoring functionality does the device support?

temperatures, fan/pump speeds or duty cycles

What configuration functionality does the device support?

fan/pump speeds or duty cycles, voltages, current or power limits

Physical connection

USB header

Connection protocol

USB

Additional information about the device

$ lsusb
Bus 001 Device 004: ID 1b1c:0c04 Corsair Link Cooling Node
$ sudo OpenCorsairLink status
Dev=0, CorsairLink Device Found: H110i!
 $ sudo OpenCorsairLink --device 0
Dev=0, CorsairLink Device Found: H110i!

Vendor: Corsair
Product: H110i
Firmware: 2.0.0
Temperature 0: 26.98 C
Fan 0:	Default Mode (4PIN)
	Current/Max Speed 701/2128 RPM
Fan 1:	Default Mode (4PIN)
	Current/Max Speed 685/2148 RPM
Pump:	Mode 0x87
	Current/Max Speed 701/2128 RPM
sudo lsusb -d 1b1c:0c04 -v

Bus 001 Device 004: ID 1b1c:0c04 Corsair Link Cooling Node
Device Descriptor:
  bLength                18
  bDescriptorType         1
  bcdUSB               2.00
  bDeviceClass            0 [unknown]
  bDeviceSubClass         0 [unknown]
  bDeviceProtocol         0 
  bMaxPacketSize0        64
  idVendor           0x1b1c Corsair
  idProduct          0x0c04 Link Cooling Node
  bcdDevice            2.00
  iManufacturer           1 Corsair Memory, Inc.
  iProduct                2 Integrated USB Bridge
  iSerial                 0 
  bNumConfigurations      1
  Configuration Descriptor:
    bLength                 9
    bDescriptorType         2
    wTotalLength       0x0022
    bNumInterfaces          1
    bConfigurationValue     1
    iConfiguration          0 
    bmAttributes         0x80
      (Bus Powered)
    MaxPower              100mA
    Interface Descriptor:
      bLength                 9
      bDescriptorType         4
      bInterfaceNumber        0
      bAlternateSetting       0
      bNumEndpoints           1
      bInterfaceClass         3 Human Interface Device
      bInterfaceSubClass      0 [unknown]
      bInterfaceProtocol      0 
      iInterface              0 
        HID Device Descriptor:
          bLength                 9
          bDescriptorType        33
          bcdHID               1.11
          bCountryCode            0 Not supported
          bNumDescriptors         1
          bDescriptorType        34 Report
          wDescriptorLength      37
          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               1
Device Status:     0x0080
  (Bus Powered)

Can you help with implementing or testing the changes needed for liquidctl to support this device?

testing changes on Linux

@ciberkids ciberkids added the new device Support for a new device label Jan 15, 2024
@jonasmalacofilho
Copy link
Member

jonasmalacofilho commented Jan 15, 2024

Related: #142, PR #637

Also: Porting drivers from OpenCorsairLink

@ciberkids
Copy link
Author

thanks, i didn't read that bug number and PR :)

also how can i help?

should i start as described in the article and porting the device ex novo or i build on top that pr?

@jonasmalacofilho
Copy link
Member

You'll be almost certainly better building on top of that PR, since (IIRC the OpenCorsairLink code) those devices are all super similar.

Besides any specific changes needed for the non GT model, you'll likely need to fix the bug that PR is currently stuck on. Otherwise it should be fairly straightforward, I hope.

@jonasmalacofilho
Copy link
Member

Ping: @Serphentas

@ciberkids
Copy link
Author

ciberkids commented Jan 15, 2024

i see, thanks for the fast answer, i will have a look this evening :)

i have just given a quick try on my machine, the driver coolit works in reading, but it does something to the usb, the Opencorsair link now is not able to communicate with the pump but the liquidctl can. that is interesting :)

 $ sudo OpenCorsairLink list


 $ sudo liquidctl status
Corsair H110i GT (experimental)
├── Liquid temperature    27.1  °C
├── Fan 1 speed            724  rpm
├── Fan 2 speed            709  rpm
└── Pump speed            2364  rpm

@Serphentas
Copy link
Collaborator

Sorry I didn't see the ping @jonasmalacofilho. I think OCL supports this device (non-GT) with the same driver, so perhaps we need fine tuning.

@ciberkids are you able to run OCL from the start (to avoid the issues you noted) in debug mode, or possibly capture from Windows using Corsair's tool ? Thanks.

@Serphentas Serphentas self-assigned this Apr 30, 2024
@ciberkids
Copy link
Author

ciberkids commented May 7, 2024

i have seen a couple of commits and i tried with the latest release on my machine, now it seems to work correctly

liquidctl-git 1.13.0.r70.01ef92f-1

$ sudo liquidctl status
Corsair H110i GT
├── Liquid temperature    26.7  °C
├── Fan 1 speed            648  rpm
├── Fan 2 speed            639  rpm
└── Pump speed            2356  rpm
 $ sudo liquidctl --verbose list
Device #0: Corsair H110i GT
├── Vendor ID: 0x1b1c
├── Product ID: 0x0c04
├── Release number: 0x0200
├── Bus: hid
├── Address: /dev/hidraw0
└── Driver: Coolit

@jonasmalacofilho
Copy link
Member

Oh, we forgot to query the devices for their ID, and we're binding with any CoolIT device from that era.

One way to fix this would be to add a custom probe function to the driver that queries the ID and matches the response to a set of know devices. However, that would result in traffic being sent to the device every time liquidctl lists (any) devices, which seems far from ideal.

I think a better way is for the driver to keep using the default probe logic and at that stage only recognize device as a generic CoolIT cooler. The on connect the driver can fetch the device ID and adjust the behavior based on it. We do something somewhat similar for ASUS GPUs.


Relevant OpenCorsairLink code for querying the device ID:

int
corsairlink_coolit_device_id(
    struct corsair_device_info* dev, struct libusb_device_handle* handle, uint16_t* device_id )
{
    int rr;
    uint8_t response[64];
    uint8_t commands[64];
    memset( response, 0, sizeof( response ) );
    memset( commands, 0, sizeof( commands ) );


    uint8_t ii = 0;


    commands[++ii] = CommandId++; // Command ID
    commands[++ii] = ReadOneByte; // Command Opcode
    commands[++ii] = DeviceID; // Command data...
    commands[0] = ii; // Length


    rr = dev->lowlevel->write( handle, dev->write_endpoint, commands, 64 );
    rr = dev->lowlevel->read( handle, dev->read_endpoint, response, 64 );


    memcpy( device_id, response + 2, 1 );


    dump_packet( response, sizeof( response ) );


    return 0;
}

https://github.com/audiohacked/OpenCorsairLink/blob/61d336a61b85705a5e128762430dc136460b110e/protocol/coolit/core.c#L32-L57

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
new device Support for a new device
Projects
None yet
Development

No branches or pull requests

3 participants