audiohacked / opencorsairlink Goto Github PK
View Code? Open in Web Editor NEWLinux and Mac OS support for the CorsairLink Devices
License: GNU General Public License v2.0
Linux and Mac OS support for the CorsairLink Devices
License: GNU General Public License v2.0
https://github.com/audiohacked/OpenCorsairLink/blob/master/protocol/rmi/fan.c#L22
It appears that fan speed retrieval functionality is currently disabled for the RMi driver. Is there a reason why? It also appears the the fan RPMs parameter would need to be a pointer to a uint16.
I am trying to compile this project on my MacOS, but I am getting a lot of errors. Would you help me?
It returns 'libusb.h' file not found
So you know how to fix it?
EDIT: Creating a C++ project on Xcode solved many problems, but I found some another problem:
Seems that method doesn't exist, I did a research on a old code and the code is there, what happened?
EDIT 2: This seems to be a compiler problem, Xcode is not able to build the struct based on parameters/pointers.
Once you started to work on Corsair Link USB Dongle for AX860i so maybe you can at the same time add AX1200i ? :) Here's corresponding lsusb output:
Bus 003 Device 002: ID 1b1c:1c00 Corsair
Device Descriptor:
bLength 18
bDescriptorType 1
bcdUSB 1.10
bDeviceClass 0 (Defined at Interface level)
bDeviceSubClass 0
bDeviceProtocol 0
bMaxPacketSize0 64
idVendor 0x1b1c Corsair
idProduct 0x1c00
bcdDevice 1.00
iManufacturer 1 Silicon Labs
iProduct 2 Corsair Link TM USB Dongle
iSerial 3 R57U0633
bNumConfigurations 1
Configuration Descriptor:
bLength 9
bDescriptorType 2
wTotalLength 32
bNumInterfaces 1
bConfigurationValue 1
iConfiguration 0
bmAttributes 0x80
(Bus Powered)
MaxPower 100mA
Interface Descriptor:
bLength 9
bDescriptorType 4
bInterfaceNumber 0
bAlternateSetting 0
bNumEndpoints 2
bInterfaceClass 255 Vendor Specific Class
bInterfaceSubClass 0
bInterfaceProtocol 0
iInterface 2 Corsair Link TM USB Dongle
Endpoint Descriptor:
bLength 7
bDescriptorType 5
bEndpointAddress 0x81 EP 1 IN
bmAttributes 2
Transfer Type Bulk
Synch Type None
Usage Type Data
wMaxPacketSize 0x0040 1x 64 bytes
bInterval 0
Endpoint Descriptor:
bLength 7
bDescriptorType 5
bEndpointAddress 0x01 EP 1 OUT
bmAttributes 2
Transfer Type Bulk
Synch Type None
Usage Type Data
wMaxPacketSize 0x0040 1x 64 bytes
bInterval 0
Device Status: 0x0000
(Bus Powered)
If anything is needed from my side an additional info or testing just let me know. Thanks!
I can set the pump no problem. Toggling between 3, 4, 5 sets the pump speed. The problem is setting the fan speeds and temps. I look at the options header and I see can both are six values.
./OpenCorsairLink.elf --device 0 --fan-speeds 40,50,60,70,80,100
./OpenCorsairLink.elf --device 0 --fan-temps 20,25,29,33,37,40
Both those seem to do absolutely nothing. No error, no change in fan speed.
Dev=0, CorsairLink Device Found: H115i!
Vendor: Corsair
Product: H115i
Firmware: 2.8.0.0
Temperature 0: 34.20
Fan Speed 0: 2460
Pump Speed: 2880
No matter if I set fan-speeds to something like 40,40,40,40,40,40 It doesn't matter. Fans are pegged and running at 100%.
In windows the speeds are tied to profiles and you have to set the profile. Do I somehow have to set the profile to custom to get the temps and speeds to be recognized?
Thanks!
Hi!
When I specify a set of temps and speeds the first time it apparently works fine. I can notice the change of fans speeds after setting a "performance mode"
./OpenCorsairLink.elf --device 0 --fan-temps 20,25,29,33,37,40 --fan-speeds 1380,1680,1920,2220,2400,2820
the thing is that now I can not go back to the quiet mode, I mean, the fans speed up at maximum speed and can't go back to the predetermined state. It seems to ignore the commands after that.
The first time I change the "profile", what ever values I use it kind of get it right, the subsequent commands are "ignored" by the program. I have to restart the PC, go to Windows and change the profile on Corsair Link and it starts working fine again (at least the first command I use).
I've tested the recent version with RM650i and it seems to work really good.
You can set this as supported too.
All numbers I could verify like temp / voltage / amp / watt are in agreement with official windows software.
sudo ./OpenCorsairLink.elf --dev 0
Dev=0, CorsairLink Device Found: RM650i!
Vendor: CORSAIR
Product: RM650i
Firmware: NA
Temperature 0: 51.00 C
Temperature 1: 41.00 C
Powered: 29923016 (346d. 7h)
Uptime: 39416 (0d. 10h)
Supply Voltage: 230.00
Total Watts: 52.00
Output 12v:
Voltage 12.22
Amps 3.00
Watts 36.00
Output 5v:
Voltage 5.06
Amps 2.12
Watts 11.00
Output 3.3v:
Voltage 3.34
Amps 1.12
Watts 4.00
sudo lsusb -v
Bus 001 Device 003: ID 1b1c:1c0a Corsair
Device Descriptor:
bLength 18
bDescriptorType 1
bcdUSB 2.00
bDeviceClass 0 (Defined at Interface level)
bDeviceSubClass 0
bDeviceProtocol 0
bMaxPacketSize0 8
idVendor 0x1b1c Corsair
idProduct 0x1c0a
bcdDevice 0.02
iManufacturer 1
iProduct 2
iSerial 0
bNumConfigurations 1
Configuration Descriptor:
bLength 9
bDescriptorType 2
wTotalLength 41
bNumInterfaces 1
bConfigurationValue 1
iConfiguration 0
bmAttributes 0xc0
Self Powered
MaxPower 100mA
Interface Descriptor:
bLength 9
bDescriptorType 4
bInterfaceNumber 0
bAlternateSetting 0
bNumEndpoints 2
bInterfaceClass 3 Human Interface Device
bInterfaceSubClass 0 No Subclass
bInterfaceProtocol 0 None
iInterface 0
HID Device Descriptor:
bLength 9
bDescriptorType 33
bcdHID 1.11
bCountryCode 0 Not supported
bNumDescriptors 1
bDescriptorType 34 Report
wDescriptorLength 28
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
Endpoint Descriptor:
bLength 7
bDescriptorType 5
bEndpointAddress 0x01 EP 1 OUT
bmAttributes 3
Transfer Type Interrupt
Synch Type None
Usage Type Data
wMaxPacketSize 0x0040 1x 64 bytes
bInterval 1
Device Status: 0x0001
Self Powered
Given up.
I installed this and when I run the GUI, it gives me an error saying No Corsair Link Present
. If I run it in cli as a super user, it says, Error: Unable to open Corsair H80i, H100i or H110i CPU Cooler
. I can confirm that that it's connected properly because it works in my windows vm. Is the H110i GTX not supported yet? Is it possible that it will be supported in the future?
CLI Help: The led mode is shown in hex (0x80) but the program doesn't strip off the 0x. A few examples at the end might help. Also, no indication of the cycle speed (is 1 fast or F fast? Is zero legal?)
Suggest adding.
Examples:
Slow fade between Red, Green, and Blue:
OpenCorsairLinkCli -l 1 --led-mode 80 --rgb1 FF0000 --rgb2 00FF00 --rgb3 0000FF --rgb4 FFFFFF
Fast fade between Red, Green, and Blue:
OpenCorsairLinkCli -l 1 --led-mode 8f --rgb1 FF0000 --rgb2 00FF00 --rgb3 0000FF --rgb4 FFFFFF
Note: If USB device is owned by root, the commands may need to be run as root.
hi everyone,
I am trying to control the pump and fan speeds with this tool. I can bring down the pump speeds to something like 1800 but the fan doesnt seem to have any effect. here is snapshot:
Am i using the command wrongly ? In the list only one fan appears and the command "sudo ./OpenCorsairLink.elf --device 0 --fan-speeds 25 --fan-temps 25 --pump-mode 3" has no effect on it. I assumed it will bring down the fan speed to 25 and will set the temprature at which the fan will kick off at 65 but it has no effect.
My casing has 3 fans at front, 2 at top, 1 at backside.
Any help much appreciated!
Hey all, sorry if this is a complete noob issue. I'm relatively new, but i followed all the steps to install on the wiki and cloned the repository, but i'm getting an error when i try to do the "qmake OpenCorsairLink.pro" command. Any help would be appreciated- thanks in advance!
In main.c 141 it only does temperature to celsius for asetek.
if (dev->driver == &corsairlink_driver_asetek) {
uint8_t v1 = (temperature>>8);
uint8_t v2 = (temperature&0xFF);
msg_debug("DEBUG: %02X %02X\n", v1, v2);
celsius = (double)v1 + ((double)v2/10);
}
After commenting out lines 141 and 146 I get:
Vendor: Corsair
Product: H80i
Firmware: 0.59.0.0
Temperature 0: 81.90
Temperature 1: 64.60
Temperature 2: 0.00
Fan Speed 0: 33030
Fan Speed 1: 33542
Fan Speed 2: 34054
Fan Speed 3: 34566
Pump Speed: 59
Whereas before it was:
Vendor: Corsair
Product: H80i
Firmware: 0.59.0.0
Temperature 0: 0.00
Temperature 1: 0.00
Temperature 2: 0.00
Fan Speed 0: 33030
Fan Speed 1: 33542
Fan Speed 2: 34054
Fan Speed 3: 34566
Pump Speed: 59
Until I changed the .pump_index from 5 to 4 on line 58 I was always getting a Pump Speed of 0, now I get what looks to be a realistic value, around 2100.
--pump-mode 3 or 5 seems to have no effect on this value, so I may be wrong again...
Dev=0, CorsairLink Device Found: H80i!
Vendor: Corsair
Product: H80i
Firmware: 0.59.0.0
Temperature 0: 55.38
Temperature 1: 256.00
Fan Speed 0: 2477
Fan Speed 1: 0
Fan Speed 2: 0
Fan Speed 3: 0
Pump Speed: 2118
My 2nd fan is broken, waiting for the replacement. Hope that fixes the temp1 and fan2.
I have a H115i (1b1c:0c0a
) and ran sudo ./OpenCorsairLink.elf --device 0
to see what this app knew about my cooler.
The output seems correct:
$ sudo ./OpenCorsairLink.elf --device 0
Dev=0, CorsairLink Device Found: H115i!
Vendor: Corsair
Product: H115i
Firmware: 2.8.0.0
Temperature 0: 36.10
but running this command modified my cooler's LED from the color I'd set in Windows to a dark grey. I would normally expect that just running the command without specifying --led
would not modify any LED settings.
I have not confirmed whether it also modified pump/fan settings.
Hi, maybe I'm screwing something up, but getting an error when running make command:
cc -std=c99 -pedantic-errors -I/usr/include/libusb-1.0 -g -c -o options.o options.c
In file included from options.c:26:0:
options.c: In function ‘options_parse’:
common.h:26:23: error: expected ‘)’ before string constant
#define VERSION MAJOR "." MINOR "." PATCH
^
print.h:37:39: note: in definition of macro ‘msg_info’
#define msg_info(...) print(MSG_INFO, VA_ARGS)
^~~~~~~~~~~
options.c:82:44: note: in expansion of macro ‘VERSION’
msg_info("OpenCorsairLink Version: %s", VERSION);
^~~~~~~
options.c:82:13: warning: format ‘%s’ expects argument of type ‘char *’, but argument 3 has type ‘int’ [-Wformat=]
msg_info("OpenCorsairLink Version: %s", VERSION);
^
print.h:37:39: note: in definition of macro ‘msg_info’
#define msg_info(...) print(MSG_INFO, VA_ARGS)
^~~~~~~~~~~
Makefile:41: recipe for target 'options.o' failed
make: *** [options.o] Error 1
Does have changes been made to support the rgb/led ram?
Running OpenCorsairLink with no arguments resets predefined settings. This is not desired behavior. If not explicit options are provided, running OpenCorsairLink shouldn't touch that setting.
Just tried building from master on Ubuntu16.04 and ran into the error below. Wondering if you've ever come across something similar, or have any ideas how to fix?:)
$ sudo ./OpenCorsairLink.elf --debug
usb device 9
corsair device 0
libusb: error [submit_control_transfer] submiturb failed error -1 errno=16
libusb: error [submit_bulk_transfer] submiturb failed error -1 errno=16
device_id 0x00
corsair device 1
libusb: error [submit_control_transfer] submiturb failed error -1 errno=16
libusb: error [submit_bulk_transfer] submiturb failed error -1 errno=16
device_id 0x00
corsair device 2
libusb: error [submit_control_transfer] submiturb failed error -1 errno=16
libusb: error [submit_bulk_transfer] submiturb failed error -1 errno=16
device_id 0x00
corsair device 3
libusb: error [submit_control_transfer] submiturb failed error -1 errno=16
libusb: error [submit_bulk_transfer] submiturb failed error -1 errno=16
device_id 0x00
corsair device 4
corsair device 5
corsair device 6
corsair device 7
dmesg
shows a bunch of the following lines:
usbfs: process 23727 (OpenCorsairLink) did not claim interface 0 before use
And the libusb-1.0
version in use is:
Source: libusb-1.0
Version: 2:1.0.20-1
Hi there, thank you for doing linux support for Corsair devices!
I am owner Corsair H110i GTX Extreme and I need to monitor and control it from Linux. I downloaded OpenCorsairLink and found that it does not recognize H110i GTX Extreme. Quickly looking into the code, I found that my cooler does not fall under any of your device definitions. I added a new entry to corsair_device_info corsairlink_devices structure based on the data from lsusb:
{
.vendor_id = 0x1b1c,
.product_id = 0x0c07,
.device_id = 0xFF,
.name = "H110i GTX", /** H110i GTX */
.read_endpoint = 0x02|LIBUSB_ENDPOINT_IN,
.write_endpoint = 0x02|LIBUSB_ENDPOINT_OUT,
.driver = &corsairlink_driver_asetek,
.led_control_count = 1,
.fan_control_count = 1,
.pump_index = 0,
},
So, with this it works fine and I can see some info and some temperature
Dev=0, CorsairLink Device Found: H110i GTX!
Vendor: Corsair
Product: H110i GTX
Firmware: 2.4.0.0
Temperature 0: 30.30
and even to change the pump mode:
sudo ./OpenCorsairLink.elf --device 0 --pump-mode 5
Also I see that I can change FanCurves and LED color which is nice, but is there a way to retrieve the rest of information that provided by CorsairLink like pump and fan rpm-speeds ?
sudo ./OpenCorsairLinkCli -f 1 --fan-mode 4 --fan-rpm 716
Setting fan to mode Fixed RPM
Setting fan RPM to 716
Cannot set fan RPM.
It works, and reads out data, but every time the executable is run and it outputs the data, I can hear the fan and/or the pump rev up then fall back to normal very fast.
I was originally planning on using this in consort with conky (hw monitoring +++) where the executable would be run 'n' times a second or every 'n' seconds.
This went well until I tried to slowly have it update faster where the fan and pump suddenly went full blast until I rebooted since I could not access the usb device anymore.
I was planning on trying to filter out what was needed to build a smaller more directed version of your code for my H115i so it didn't need to scan.
Any ideas what this all could be related to ?
OpenCorsairLink detects that the H115i is there, but you cannot actually change anything using the software.
how to boost fan?
I have an H100i and its hooked into the USB header on the motherboard:
bryant@bryant-linux:OpenCorsairLink$ lsusb
Bus 002 Device 002: ID 8087:0024 Intel Corp. Integrated Rate Matching Hub
Bus 002 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 001 Device 004: ID 1b1c:0c04 Corsair
...
...
When I run the CLI command, it gives me an error:
bryant@bryant-linux:OpenCorsairLink$ sudo ./OpenCorsairLinkCli -i
Error: Unable to write() (null)
Error: Unable to read() (null)
Device ID: 7 mismatch. Not Corsair H80i or H100i CPU Cooler
Cannot initialize link.
I'm not sure what device ID 7 relates to. Any thoughts?
/usr/bin/ld: cannot find -lGL
collect2: error: ld returned 1 exit status
Makefile:159: recipe for target '../OpenCorsairLinkGui' failed
make[1]: *** [../OpenCorsairLinkGui] Error 1
make[1]: Leaving directory '/home/towheed/OpenCorsairLink/Gui'
Makefile:126: recipe for target 'sub-Gui-make_first-ordered' failed
This is the full output from make:
cd CorsairLinkLib/ && ( test -e Makefile || /usr/lib/x86_64-linux-gnu/qt5/bin/qmake /home/towheed/OpenCorsairLink/CorsairLinkLib/CorsairLinkLib.pro -o Makefile ) && make -f Makefile
make[1]: Entering directory '/home/towheed/OpenCorsairLink/CorsairLinkLib'
g++ -c -m64 -pipe -g -fPIC -Wall -W -D_REENTRANT -I/usr/lib/x86_64-linux-gnu/qt5/mkspecs/linux-g++-64 -I. -o Fan.o Fan.cpp
g++ -c -m64 -pipe -g -fPIC -Wall -W -D_REENTRANT -I/usr/lib/x86_64-linux-gnu/qt5/mkspecs/linux-g++-64 -I. -o Led.o Led.cpp
g++ -c -m64 -pipe -g -fPIC -Wall -W -D_REENTRANT -I/usr/lib/x86_64-linux-gnu/qt5/mkspecs/linux-g++-64 -I. -o Link.o Link.cpp
g++ -c -m64 -pipe -g -fPIC -Wall -W -D_REENTRANT -I/usr/lib/x86_64-linux-gnu/qt5/mkspecs/linux-g++-64 -I. -o Temperature.o Temperature.cpp
rm -f libCorsairLink.a
ar cqs libCorsairLink.a Fan.o Led.o Link.o Temperature.o
rm -f ../libCorsairLink.a
mv -f libCorsairLink.a ../
make[1]: Leaving directory '/home/towheed/OpenCorsairLink/CorsairLinkLib'
cd Cli/ && ( test -e Makefile || /usr/lib/x86_64-linux-gnu/qt5/bin/qmake /home/towheed/OpenCorsairLink/Cli/Cli.pro -o Makefile ) && make -f Makefile
make[1]: Entering directory '/home/towheed/OpenCorsairLink/Cli'
g++ -c -m64 -pipe -O2 -Wall -W -D_REENTRANT -fPIE -DQT_NO_DEBUG -I/usr/lib/x86_64-linux-gnu/qt5/mkspecs/linux-g++-64 -I. -I../CorsairLinkLib -o cli.o cli.cpp
g++ -c -m64 -pipe -O2 -Wall -W -D_REENTRANT -fPIE -DQT_NO_DEBUG -I/usr/lib/x86_64-linux-gnu/qt5/mkspecs/linux-g++-64 -I. -I../CorsairLinkLib -o options.o options.cpp
g++ -m64 -Wl,-O1 -o ../OpenCorsairLinkCli cli.o options.o -L.. -lCorsairLink -lhidapi-hidraw -lpthread
make[1]: Leaving directory '/home/towheed/OpenCorsairLink/Cli'
cd Gui/ && ( test -e Makefile || /usr/lib/x86_64-linux-gnu/qt5/bin/qmake /home/towheed/OpenCorsairLink/Gui/Gui.pro -o Makefile ) && make -f Makefile
make[1]: Entering directory '/home/towheed/OpenCorsairLink/Gui'
g++ -c -m64 -pipe -g -D_REENTRANT -Wall -W -fPIE -DQT_WIDGETS_LIB -DQT_GUI_LIB -DQT_CORE_LIB -I/usr/lib/x86_64-linux-gnu/qt5/mkspecs/linux-g++-64 -I. -I../CorsairLinkLib -isystem /usr/include/x86_64-linux-gnu/qt5 -isystem /usr/include/x86_64-linux-gnu/qt5/QtWidgets -isystem /usr/include/x86_64-linux-gnu/qt5/QtGui -isystem /usr/include/x86_64-linux-gnu/qt5/QtCore -I. -o main.o main.cpp
g++ -c -m64 -pipe -g -D_REENTRANT -Wall -W -fPIE -DQT_WIDGETS_LIB -DQT_GUI_LIB -DQT_CORE_LIB -I/usr/lib/x86_64-linux-gnu/qt5/mkspecs/linux-g++-64 -I. -I../CorsairLinkLib -isystem /usr/include/x86_64-linux-gnu/qt5 -isystem /usr/include/x86_64-linux-gnu/qt5/QtWidgets -isystem /usr/include/x86_64-linux-gnu/qt5/QtGui -isystem /usr/include/x86_64-linux-gnu/qt5/QtCore -I. -o window.o window.cpp
g++ -c -m64 -pipe -g -D_REENTRANT -Wall -W -fPIE -DQT_WIDGETS_LIB -DQT_GUI_LIB -DQT_CORE_LIB -I/usr/lib/x86_64-linux-gnu/qt5/mkspecs/linux-g++-64 -I. -I../CorsairLinkLib -isystem /usr/include/x86_64-linux-gnu/qt5 -isystem /usr/include/x86_64-linux-gnu/qt5/QtWidgets -isystem /usr/include/x86_64-linux-gnu/qt5/QtGui -isystem /usr/include/x86_64-linux-gnu/qt5/QtCore -I. -o FanWidget.o FanWidget.cpp
g++ -c -m64 -pipe -g -D_REENTRANT -Wall -W -fPIE -DQT_WIDGETS_LIB -DQT_GUI_LIB -DQT_CORE_LIB -I/usr/lib/x86_64-linux-gnu/qt5/mkspecs/linux-g++-64 -I. -I../CorsairLinkLib -isystem /usr/include/x86_64-linux-gnu/qt5 -isystem /usr/include/x86_64-linux-gnu/qt5/QtWidgets -isystem /usr/include/x86_64-linux-gnu/qt5/QtGui -isystem /usr/include/x86_64-linux-gnu/qt5/QtCore -I. -o LedWidget.o LedWidget.cpp
g++ -c -m64 -pipe -g -D_REENTRANT -Wall -W -fPIE -DQT_WIDGETS_LIB -DQT_GUI_LIB -DQT_CORE_LIB -I/usr/lib/x86_64-linux-gnu/qt5/mkspecs/linux-g++-64 -I. -I../CorsairLinkLib -isystem /usr/include/x86_64-linux-gnu/qt5 -isystem /usr/include/x86_64-linux-gnu/qt5/QtWidgets -isystem /usr/include/x86_64-linux-gnu/qt5/QtGui -isystem /usr/include/x86_64-linux-gnu/qt5/QtCore -I. -o StatusWidget.o StatusWidget.cpp
g++ -c -m64 -pipe -g -D_REENTRANT -Wall -W -fPIE -DQT_WIDGETS_LIB -DQT_GUI_LIB -DQT_CORE_LIB -I/usr/lib/x86_64-linux-gnu/qt5/mkspecs/linux-g++-64 -I. -I../CorsairLinkLib -isystem /usr/include/x86_64-linux-gnu/qt5 -isystem /usr/include/x86_64-linux-gnu/qt5/QtWidgets -isystem /usr/include/x86_64-linux-gnu/qt5/QtGui -isystem /usr/include/x86_64-linux-gnu/qt5/QtCore -I. -o TemperatureWidget.o TemperatureWidget.cpp
/usr/lib/x86_64-linux-gnu/qt5/bin/moc -DQT_WIDGETS_LIB -DQT_GUI_LIB -DQT_CORE_LIB -I/usr/lib/x86_64-linux-gnu/qt5/mkspecs/linux-g++-64 -I/home/towheed/OpenCorsairLink/Gui -I/home/towheed/OpenCorsairLink/CorsairLinkLib -I/usr/include/x86_64-linux-gnu/qt5 -I/usr/include/x86_64-linux-gnu/qt5/QtWidgets -I/usr/include/x86_64-linux-gnu/qt5/QtGui -I/usr/include/x86_64-linux-gnu/qt5/QtCore -I/usr/include/c++/4.9 -I/usr/include/x86_64-linux-gnu/c++/4.9 -I/usr/include/c++/4.9/backward -I/usr/lib/gcc/x86_64-linux-gnu/4.9/include -I/usr/local/include -I/usr/lib/gcc/x86_64-linux-gnu/4.9/include-fixed -I/usr/include/x86_64-linux-gnu -I/usr/include window.h -o moc_window.cpp
g++ -c -m64 -pipe -g -D_REENTRANT -Wall -W -fPIE -DQT_WIDGETS_LIB -DQT_GUI_LIB -DQT_CORE_LIB -I/usr/lib/x86_64-linux-gnu/qt5/mkspecs/linux-g++-64 -I. -I../CorsairLinkLib -isystem /usr/include/x86_64-linux-gnu/qt5 -isystem /usr/include/x86_64-linux-gnu/qt5/QtWidgets -isystem /usr/include/x86_64-linux-gnu/qt5/QtGui -isystem /usr/include/x86_64-linux-gnu/qt5/QtCore -I. -o moc_window.o moc_window.cpp
/usr/lib/x86_64-linux-gnu/qt5/bin/moc -DQT_WIDGETS_LIB -DQT_GUI_LIB -DQT_CORE_LIB -I/usr/lib/x86_64-linux-gnu/qt5/mkspecs/linux-g++-64 -I/home/towheed/OpenCorsairLink/Gui -I/home/towheed/OpenCorsairLink/CorsairLinkLib -I/usr/include/x86_64-linux-gnu/qt5 -I/usr/include/x86_64-linux-gnu/qt5/QtWidgets -I/usr/include/x86_64-linux-gnu/qt5/QtGui -I/usr/include/x86_64-linux-gnu/qt5/QtCore -I/usr/include/c++/4.9 -I/usr/include/x86_64-linux-gnu/c++/4.9 -I/usr/include/c++/4.9/backward -I/usr/lib/gcc/x86_64-linux-gnu/4.9/include -I/usr/local/include -I/usr/lib/gcc/x86_64-linux-gnu/4.9/include-fixed -I/usr/include/x86_64-linux-gnu -I/usr/include FanWidget.h -o moc_FanWidget.cpp
g++ -c -m64 -pipe -g -D_REENTRANT -Wall -W -fPIE -DQT_WIDGETS_LIB -DQT_GUI_LIB -DQT_CORE_LIB -I/usr/lib/x86_64-linux-gnu/qt5/mkspecs/linux-g++-64 -I. -I../CorsairLinkLib -isystem /usr/include/x86_64-linux-gnu/qt5 -isystem /usr/include/x86_64-linux-gnu/qt5/QtWidgets -isystem /usr/include/x86_64-linux-gnu/qt5/QtGui -isystem /usr/include/x86_64-linux-gnu/qt5/QtCore -I. -o moc_FanWidget.o moc_FanWidget.cpp
/usr/lib/x86_64-linux-gnu/qt5/bin/moc -DQT_WIDGETS_LIB -DQT_GUI_LIB -DQT_CORE_LIB -I/usr/lib/x86_64-linux-gnu/qt5/mkspecs/linux-g++-64 -I/home/towheed/OpenCorsairLink/Gui -I/home/towheed/OpenCorsairLink/CorsairLinkLib -I/usr/include/x86_64-linux-gnu/qt5 -I/usr/include/x86_64-linux-gnu/qt5/QtWidgets -I/usr/include/x86_64-linux-gnu/qt5/QtGui -I/usr/include/x86_64-linux-gnu/qt5/QtCore -I/usr/include/c++/4.9 -I/usr/include/x86_64-linux-gnu/c++/4.9 -I/usr/include/c++/4.9/backward -I/usr/lib/gcc/x86_64-linux-gnu/4.9/include -I/usr/local/include -I/usr/lib/gcc/x86_64-linux-gnu/4.9/include-fixed -I/usr/include/x86_64-linux-gnu -I/usr/include LedWidget.h -o moc_LedWidget.cpp
g++ -c -m64 -pipe -g -D_REENTRANT -Wall -W -fPIE -DQT_WIDGETS_LIB -DQT_GUI_LIB -DQT_CORE_LIB -I/usr/lib/x86_64-linux-gnu/qt5/mkspecs/linux-g++-64 -I. -I../CorsairLinkLib -isystem /usr/include/x86_64-linux-gnu/qt5 -isystem /usr/include/x86_64-linux-gnu/qt5/QtWidgets -isystem /usr/include/x86_64-linux-gnu/qt5/QtGui -isystem /usr/include/x86_64-linux-gnu/qt5/QtCore -I. -o moc_LedWidget.o moc_LedWidget.cpp
/usr/lib/x86_64-linux-gnu/qt5/bin/moc -DQT_WIDGETS_LIB -DQT_GUI_LIB -DQT_CORE_LIB -I/usr/lib/x86_64-linux-gnu/qt5/mkspecs/linux-g++-64 -I/home/towheed/OpenCorsairLink/Gui -I/home/towheed/OpenCorsairLink/CorsairLinkLib -I/usr/include/x86_64-linux-gnu/qt5 -I/usr/include/x86_64-linux-gnu/qt5/QtWidgets -I/usr/include/x86_64-linux-gnu/qt5/QtGui -I/usr/include/x86_64-linux-gnu/qt5/QtCore -I/usr/include/c++/4.9 -I/usr/include/x86_64-linux-gnu/c++/4.9 -I/usr/include/c++/4.9/backward -I/usr/lib/gcc/x86_64-linux-gnu/4.9/include -I/usr/local/include -I/usr/lib/gcc/x86_64-linux-gnu/4.9/include-fixed -I/usr/include/x86_64-linux-gnu -I/usr/include StatusWidget.h -o moc_StatusWidget.cpp
g++ -c -m64 -pipe -g -D_REENTRANT -Wall -W -fPIE -DQT_WIDGETS_LIB -DQT_GUI_LIB -DQT_CORE_LIB -I/usr/lib/x86_64-linux-gnu/qt5/mkspecs/linux-g++-64 -I. -I../CorsairLinkLib -isystem /usr/include/x86_64-linux-gnu/qt5 -isystem /usr/include/x86_64-linux-gnu/qt5/QtWidgets -isystem /usr/include/x86_64-linux-gnu/qt5/QtGui -isystem /usr/include/x86_64-linux-gnu/qt5/QtCore -I. -o moc_StatusWidget.o moc_StatusWidget.cpp
/usr/lib/x86_64-linux-gnu/qt5/bin/moc -DQT_WIDGETS_LIB -DQT_GUI_LIB -DQT_CORE_LIB -I/usr/lib/x86_64-linux-gnu/qt5/mkspecs/linux-g++-64 -I/home/towheed/OpenCorsairLink/Gui -I/home/towheed/OpenCorsairLink/CorsairLinkLib -I/usr/include/x86_64-linux-gnu/qt5 -I/usr/include/x86_64-linux-gnu/qt5/QtWidgets -I/usr/include/x86_64-linux-gnu/qt5/QtGui -I/usr/include/x86_64-linux-gnu/qt5/QtCore -I/usr/include/c++/4.9 -I/usr/include/x86_64-linux-gnu/c++/4.9 -I/usr/include/c++/4.9/backward -I/usr/lib/gcc/x86_64-linux-gnu/4.9/include -I/usr/local/include -I/usr/lib/gcc/x86_64-linux-gnu/4.9/include-fixed -I/usr/include/x86_64-linux-gnu -I/usr/include TemperatureWidget.h -o moc_TemperatureWidget.cpp
g++ -c -m64 -pipe -g -D_REENTRANT -Wall -W -fPIE -DQT_WIDGETS_LIB -DQT_GUI_LIB -DQT_CORE_LIB -I/usr/lib/x86_64-linux-gnu/qt5/mkspecs/linux-g++-64 -I. -I../CorsairLinkLib -isystem /usr/include/x86_64-linux-gnu/qt5 -isystem /usr/include/x86_64-linux-gnu/qt5/QtWidgets -isystem /usr/include/x86_64-linux-gnu/qt5/QtGui -isystem /usr/include/x86_64-linux-gnu/qt5/QtCore -I. -o moc_TemperatureWidget.o moc_TemperatureWidget.cpp
g++ -m64 -o ../OpenCorsairLinkGui main.o window.o FanWidget.o LedWidget.o StatusWidget.o TemperatureWidget.o moc_window.o moc_FanWidget.o moc_LedWidget.o moc_StatusWidget.o moc_TemperatureWidget.o -L/usr/X11R6/lib64 -L.. -lCorsairLink -lhidapi-hidraw -lQt5Widgets -lQt5Gui -lQt5Core -lGL -lpthread
/usr/bin/ld: cannot find -lGL
collect2: error: ld returned 1 exit status
Makefile:159: recipe for target '../OpenCorsairLinkGui' failed
make[1]: *** [../OpenCorsairLinkGui] Error 1
make[1]: Leaving directory '/home/towheed/OpenCorsairLink/Gui'
Makefile:126: recipe for target 'sub-Gui-make_first-ordered' failed
make: *** [sub-Gui-make_first-ordered] Error 2
Any assistance welcomed.
Thanks for supporting this on Linux. Hope I can get it working.
Towheed
Hi,
I have a syno with chroot installed and the link isn't working.. I tried everything I could find online, but no sigar :( it's picking up something on the controllers, OpenCorsairLink still says cannot initialize link..
i used this tutorial https://forum.teksyndicate.com/t/corsair-h100i-linux-howto/75829
any ideas?
if I use
sudo bash -c "echo -n 3-2:1.0 >/sys/bus/usb/drivers/usbhid/unbind"
lsusb sees
lsusb -d 1b1c:0c04 -v
Bus 003 Device 002: ID 1b1c:0c04 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 0x0c04
bcdDevice 2.00
iManufacturer 1 Corsair Memory, Inc.
iProduct 2 Integrated USB Bridge
iSerial 0
bNumConfigurations 1
Configuration Descriptor:
bLength 9
bDescriptorType 2
wTotalLength 34
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 No Subclass
bInterfaceProtocol 0 None
iInterface 0
HID Device Descriptor:
bLength 9
bDescriptorType 33
bcdHID 1.11
bCountryCode 0 Not supported
bNumDescriptors 1
bDescriptorType 34 Report
wDescriptorLength 37
Report Descriptor: (length is 37)
Item(Global): Usage Page, data= [ 0x00 0xff ] 65280
(null)
Item(Local ): Usage, data= [ 0x01 ] 1
(null)
Item(Main ): Collection, data= [ 0x01 ] 1
Application
Item(Global): Logical Minimum, data= [ 0x00 ] 0
Item(Global): Logical Maximum, data= [ 0xff 0x00 ] 255
Item(Global): Report Size, data= [ 0x08 ] 8
Item(Global): Report Count, data= [ 0x40 ] 64
Item(Local ): Usage Minimum, data= [ 0x01 ] 1
(null)
Item(Local ): Usage Maximum, data= [ 0x40 ] 64
(null)
Item(Main ): Input, data= [ 0x02 ] 2
Data Variable Absolute No_Wrap Linear
Preferred_State No_Null_Position Non_Volatile Bitfield
Item(Local ): Usage, data= [ 0x01 ] 1
(null)
Item(Global): Report Size, data= [ 0x08 ] 8
Item(Global): Report Count, data= [ 0x40 ] 64
Item(Local ): Usage Minimum, data= [ 0x01 ] 1
(null)
Item(Local ): Usage Maximum, data= [ 0x40 ] 64
(null)
Item(Main ): Output, data= [ 0x02 ] 2
Data Variable Absolute No_Wrap Linear
Preferred_State No_Null_Position Non_Volatile Bitfield
Item(Local ): Usage, data= [ 0x01 ] 1
(null)
Item(Main ): End Collection, data=none
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)
with
sudo bash -c "echo -n 3-2:1.0 >/sys/bus/usb/drivers/usbhid/bind"
HID Device Descriptor is unavailable
other outputs:
root@StevieSyn:/# cat /sys/class/usbmisc/hiddev9/uevent
MAJOR=180
MINOR=105
DEVNAME=usb/hiddev9
PHYSDEVPATH=/devices/pci0000:00/0000:00:1d.2/usb3/3-2/3-2:1.0
PHYSDEVBUS=usb
PHYSDEVDRIVER=usbhid
root@StevieSyn:~/hidapi/OpenCorsairLink# sudo ./OpenCorsairLinkCli -
i
sudo: unable to resolve host StevieSyn
Error: Unable to open Corsair H80i, H100i or H110i CPU Cooler
Cannot initialize link.
root@StevieSyn:~/hidapi/OpenCorsairLink# cat /sys/class/usbmisc/hidd
ev9/device/uevent
DEVNAME=3-2:1.0
DEVTYPE=usb_interface
DRIVER=usbhid
PHYSDEVBUS=usb
PHYSDEVDRIVER=usbhid
PRODUCT=1b1c/c04/200
TYPE=0/0/0
INTERFACE=3/0/0
MODALIAS=usb:v1B1Cp0C04d0200dc00dsc00dp00ic03isc00ip00in00
root@StevieSyn:~/hidapi/OpenCorsairLink# cat /sys/class/usbmisc/hidd
ev9/device/0003:1B1C:0C04.0002/uevent
DEVNAME=0003:1B1C:0C04.0002
DRIVER=hid-generic
PHYSDEVBUS=hid
PHYSDEVDRIVER=hid-generic
HID_ID=0003:00001B1C:00000C04
HID_NAME=Corsair Memory, Inc. Integrated USB Bridge
HID_PHYS=usb-0000:00:1d.2-2/input0
HID_UNIQ=
MODALIAS=hid:b0003g0001v00001B1Cp00000C04
root@StevieSyn:/hidapi/OpenCorsairLink# cat /sys/class/usbmisc/hidd/hidapi/Op
ev9/device/0003:1B1C:0C04.0002/report_descriptor
�ÿ �¡��&ÿ•@��)@ � �•@��)@‘� �Àroot@StevieSyn:
ev9/device/0003:1B1C:0C04.0002/report_descriptor
�ÿ �¡��&ÿ•@��)@ � �•@��)@‘� �Àroot@StevieSyn:~/hidapi/Op
inCorsairLink# sudo ./OpenCorsairLinkCli -
sudo: unable to resolve host StevieSyn
Error: Unable to open Corsair H80i, H100i or H110i CPU Cooler
Cannot initialize link.
root@StevieSyn:~/hidapi/OpenCorsairLink# cat /sys/class/usbmisc/hidd
ev9/device/uevent
DEVNAME=3-2:1.0
DEVTYPE=usb_interface
DRIVER=usbhid
PHYSDEVBUS=usb
PRODUCT=1b1c/c04/200
TYPE=0/0/0
INTERFACE=3/0/0
MODALIAS=usb:v1B1Cp0C04d0200dc00dsc00dp00ic03isc00ip00in00
root@StevieSyn:/hidapi/OpenCorsairLink# cat /sys/class/usbmisc/hidd/hidapi/OpenCorsairLink# usbhid-dump
ev9/uevent
MAJOR=180
MINOR=105
DEVNAME=usb/hiddev9
PHYSDEVPATH=/devices/pci0000:00/0000:00:1d.2/usb3/3-2/3-2:1.0
PHYSDEVBUS=usb
PHYSDEVDRIVER=usbhid
root@StevieSyn:
lsusb
Bus 002 Device 002: ID 1130:cc00 Tenx Technology, Inc.
Bus 003 Device 002: ID 1b1c:0c04 Corsair
~/hidapi/OpenCorsairLink# usbhid-dump -d 1b1c:0c04
003:002:000:DESCRIPTOR 1439828913.087843
06 00 FF 09 01 A1 01 15 00 26 FF 00 75 08 95 40
19 01 29 40 81 02 09 01 75 08 95 40 19 01 29 40
91 02 09 01 C0
Will this work with the hx1000i? All I need is the wattage usage.
Thanks
fails with:
$ make
cc -std=c99 -pedantic-errors -I/usr/include/libusb-1.0 -lm -lusb-1.0 main.o device.o driver.o options.o print.o scan.o protocol/asetek4/core.o protocol/asetek4/fan.o protocol/asetek4/led.o protocol/asetek4/pump.o protocol/asetek4/temperature.o protocol/rmi/core.o protocol/rmi/power.o protocol/rmi/temperature.o protocol/rmi/time.o protocol/hid/core.o protocol/hid/led.o protocol/hid/temperature.o lowlevel/asetek4.o lowlevel/hid.o lowlevel/rmi.o -o OpenCorsairLink.elf
main.o: In function main': /home/jonathan/code/openCorsairLink/OpenCorsairLink/main.c:172: undefined reference to
libusb_init'
/home/jonathan/code/openCorsairLink/OpenCorsairLink/main.c:177: undefined reference to `libusb_set_debug'
and a whole lot more relating to libusb functions. I have installed libusb-1.0-0-dev and I'm pretty sure it is found because I had other errors before.
Can you use the https protocole instead of the ssh one to access your submodule. I was not able to update the module by using ssh.
Hello! Just got a new Linux machine with an HX750i and trying to give this library a try before attempting to write on in Go.
It appears that @awoland added HX850i, so I've tried to copy that device's configuration and modified the product ID to fit the HX750i (0x1c05). OCL is able to pick up the device, but it appears that all queries to the device are returning 03 FE 00 00 00 00
. I noticed a similar behavior when attempting to talk with the device from Go.
Is some kind of initialization handshake necessary to communicate with the device?
Here's what I've added so far:
diff --git a/device.c b/device.c
index 60d0df9..4dfd2c2 100644
--- a/device.c
+++ b/device.c
@@ -164,7 +164,19 @@ struct corsair_device_info corsairlink_devices[] = {
.led_control_count = 0,
.fan_control_count = 1,
.pump_index = 0,
- },
+ },
+ {
+ .vendor_id = 0x1b1c,
+ .product_id = 0x1c05,
+ .device_id = 0xFF,
+ .name = "HX750i",
+ .read_endpoint = 0x01|LIBUSB_ENDPOINT_IN,
+ .write_endpoint = 0x01|LIBUSB_ENDPOINT_OUT,
+ .driver = &corsairlink_driver_rmi,
+ .led_control_count = 0,
+ .fan_control_count = 1,
+ .pump_index = 0,
+ },
};
size_t corsairlink_device_count = sizeof(corsairlink_devices)/sizeof(corsairlink_devices[0]);
And here are a couple of gists with lsusb
and OCL output:
sudo lsusb -d 1b1c: -v > lsusb.txt
https://gist.github.com/mdlayher/9357a20cb2f1252788b87ae5c257f186
sudo ./OpenCorsairLink.elf --debug --device 0 > ocl.txt
https://gist.github.com/mdlayher/ebc53483b285459015f7fec44c454157
If anyone reading is able to provide some insight, I'd greatly appreciate it. Thanks for your time.
I'm thinking as 850 works, this just needs a minor fix if someone would point me in the right direction. Output is now:
$ sudo ./OpenCorsairLink.elf --debug --device 0
usb device 1
corsair device 0
corsair device 1
corsair device 2
corsair device 3
corsair device 4
corsair device 5
corsair device 6
corsair device 7
device_id 0xFF
Dev=0, CorsairLink Device Found: RM650i!
DEBUG: scan done, start routines
DEBUG: device_number = 0
DEBUG: shortcuts set
DEBUG: init done
Vendor:
Product:
Firmware: NA
DEBUG: string done
03 FE 00 00 00 00
Temperature 0: 0.00 C
03 FE 00 00 00 00
Temperature 1: 0.00 C
Powered: 0 (0d. 0h)
Uptime: 0 (0d. 0h)
DEBUG: time done
03 FE 00 00 00 00
Supply Voltage: 0.00
03 FE 00 00 00 00
Total Watts: 0.00
DEBUG: supply done
Output 12v:
03 FE 00 00 00 00
Voltage 0.00
03 FE 00 00 00 00
Amps 0.00
03 FE 00 00 00 00
Watts 0.00
Output 5v:
03 FE 00 00 00 00
Voltage 0.00
03 FE 00 00 00 00
Amps 0.00
03 FE 00 00 00 00
Watts 0.00
Output 3.3v:
03 FE 00 00 00 00
Voltage 0.00
03 FE 00 00 00 00
Amps 0.00
03 FE 00 00 00 00
Watts 0.00
I have a Corsair H110i HID (1B1C:0C04) with device_id of 0x42 (reported as Extreme). My issue is that results are printed correctly on first run, like below:
Dev=0, CorsairLink Device Found: H110i Extreme!
Checking USB device 13 (1d6b:0002)...
DEBUG: scan done, start routines
DEBUG: device_number = 0
DEBUG: shortcuts set
DEBUG: init done
Vendor: Corsair
Product: H110i Extreme
Firmware: 0.66.0.0
Fan Speed 0: 563
Fan Speed 1: 0
Fan Speed 2: 956
Fan Speed 3: 0
Pump Speed: 2911
DEBUG: deinit done`
Values reported seem correct. On second run though, device can no longer be found!
No (device_id 0xFF)
Checking USB device 13 (1d6b:0002)...
DEBUG: scan done, start routines
DEBUG: device_number = 0
Σφάλμα κατάτμησης (segmentation fault)
The only wait to find it again is to power off computer or physically disconnect from USB bus.
Any hint?
I've confirmed the pump working on Windows and a Windows VM under Linux. So technically reading the data works.
lsusb shows the device:
Device: ID 1b1c:0c04 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 0x0c04
bcdDevice 2.00
iManufacturer 1 Corsair Memory, Inc.
iProduct 2 Integrated USB Bridge
iSerial 0
bNumConfigurations 1
Configuration Descriptor:
bLength 9
bDescriptorType 2
wTotalLength 34
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 No Subclass
bInterfaceProtocol 0 None
iInterface 0
HID Device Descriptor:
bLength 9
bDescriptorType 33
bcdHID 1.11
bCountryCode 0 Not supported
bNumDescriptors 1
bDescriptorType 34 Report
wDescriptorLength 37
Report Descriptor: (length is 37)
Item(Global): Usage Page, data= [ 0x00 0xff ] 65280
(null)
Item(Local ): Usage, data= [ 0x01 ] 1
(null)
Item(Main ): Collection, data= [ 0x01 ] 1
Application
Item(Global): Logical Minimum, data= [ 0x00 ] 0
Item(Global): Logical Maximum, data= [ 0xff 0x00 ] 255
Item(Global): Report Size, data= [ 0x08 ] 8
Item(Global): Report Count, data= [ 0x40 ] 64
Item(Local ): Usage Minimum, data= [ 0x01 ] 1
(null)
Item(Local ): Usage Maximum, data= [ 0x40 ] 64
(null)
Item(Main ): Input, data= [ 0x02 ] 2
Data Variable Absolute No_Wrap Linear
Preferred_State No_Null_Position Non_Volatile Bitfield
Item(Local ): Usage, data= [ 0x01 ] 1
(null)
Item(Global): Report Size, data= [ 0x08 ] 8
Item(Global): Report Count, data= [ 0x40 ] 64
Item(Local ): Usage Minimum, data= [ 0x01 ] 1
(null)
Item(Local ): Usage Maximum, data= [ 0x40 ] 64
(null)
Item(Main ): Output, data= [ 0x02 ] 2
Data Variable Absolute No_Wrap Linear
Preferred_State No_Null_Position Non_Volatile Bitfield
Item(Local ): Usage, data= [ 0x01 ] 1
(null)
Item(Main ): End Collection, data=none
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)
I've replaced the 0x41 device ID on device.c with 0x00 just to see if the USB communication itself would work and it's 'detected' as H110i as expected but no data can be read from USB.
Based on my order I got SKU CW-9060026-WW which is the plain H110i.
debug output (at least part of it):
usb device 4
corsair device 0
device_id 0x00
corsair device 1
device_id 0x00
corsair device 2
device_id 0x00
Dev=0, CorsairLink Device Found: H110i!
usb device 5
Dev=0, CorsairLink Device Found: H110i!
Vendor: Corsair
Product: H110i
Firmware: 0.0.0.0
Temperature 0: 0.00
Temperature 1: 0.00
Temperature 2: 0.00
I'd be happy to snoop into the USB protocol under Windows if this helps identifying the device.
Just a note that I created and added a couple ebuilds to my overlay for users of gentoo systems. One for legacy branch that uses hidraw and one for current master branch that uses libusb.
I dropped the .elf from the binaries. It is not needed and not part of any standard that I know of.
I'm getting a Segmentation fault: 11
when running OpenCorsairLink. I have a Corsair H80i installed in my Mac running Mac OS 10.12.2 (16C67).
Output of ioreg -p IOUSB -w0 -l
and the dtruss
attached. It looks like the culprit is:
dtrace: error on enabled probe ID 2132 (ID 156: syscall::write:return): invalid kernel access in action #12 at DIF offset 92
After opening /System/Library/Extensions/IOUSBFamily.kext/Contents/PlugIns/IOUSBLib.bundle/Contents/MacOS/IOUSBLib
Here the lsusb
lsusb -d 1b1c:1c0d -v
Bus 001 Device 002: ID 1b1c:1c0d Corsair
Device Descriptor:
bLength 18
bDescriptorType 1
bcdUSB 2.00
bDeviceClass 0
bDeviceSubClass 0
bDeviceProtocol 0
bMaxPacketSize0 8
idVendor 0x1b1c Corsair
idProduct 0x1c0d
bcdDevice 0.02
iManufacturer 1
iProduct 2
iSerial 0
bNumConfigurations 1
Configuration Descriptor:
bLength 9
bDescriptorType 2
wTotalLength 41
bNumInterfaces 1
bConfigurationValue 1
iConfiguration 0
bmAttributes 0xc0
Self Powered
MaxPower 100mA
Interface Descriptor:
bLength 9
bDescriptorType 4
bInterfaceNumber 0
bAlternateSetting 0
bNumEndpoints 2
bInterfaceClass 3 Human Interface Device
bInterfaceSubClass 0
bInterfaceProtocol 0
iInterface 0
HID Device Descriptor:
bLength 9
bDescriptorType 33
bcdHID 1.11
bCountryCode 0 Not supported
bNumDescriptors 1
bDescriptorType 34 Report
wDescriptorLength 28
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
Endpoint Descriptor:
bLength 7
bDescriptorType 5
bEndpointAddress 0x01 EP 1 OUT
bmAttributes 3
Transfer Type Interrupt
Synch Type None
Usage Type Data
wMaxPacketSize 0x0040 1x 64 bytes
bInterval 1
can't get device qualifier: Resource temporarily unavailable
can't get debug descriptor: Resource temporarily unavailable
Device Status: 0x0001
Self Powered
Hi! I've been trying to use OpenCorsairLink on my H100i v2. The device is correctly recognized:
Dev=0, CorsairLink Device Found: H100i V2!
Vendor: Corsair
Product: H100i V2
Firmware: 2.8.0.0
Temperature 0: 33.60
Fan Speed 0: 1380
Pump Speed: 2850
I can change the pump mode with
./OpenCorsairLink.elf --device 0 --pump-mode 3
The problem is that I made a list of possible profiles for fan speeds and its corresponding temperatures. For example:
#quiet
20,25,29,33,37,40
1000,1000,1200,1380,1680,1920
#Balanced
20,25,29,33,37,40
1200,1380,1680,1920,2220,2400
#Performance
20,25,29,33,37,40
1380,1680,1920,2220,2400,2820
the thing is that that part is not working, I put that lists as an argument for example:
./OpenCorsairLink.elf --device 0 --fan-speeds 1380,1680,1920,2220,2400,2820
and nothing happens. And if I check the water temperature that change should definitely speed up the fans.
I also tried passing the temperatures as a CSV file like this:
./OpenCorsairLink.elf --device 0 --fan-speeds fanspeedsper.csv
it did not work.
I checked the code and confirmed that that is the right amount of temperatures and speeds (six). Debugging does not help a lot in my case.
What can it be? Is that the correct way to do it? Thanks.
Hi,
I have an H100i v2 cooler and OpenCorsairLink (OCL) seems to fail to correctly read its temperature.
For instance when running a sysbench test, lm_sensors detects temperature ranges of around ~80C and my case fans ramp up (since I configure their fan curves in the BIOS), however OCL shows temperatures that start from ~30C and very slowly increase the longer I run the benchmark. After stopping the benchmark the reported temperature takes some time to decrease. This is making me think that perhaps OCL is detecting the liquid temperature and not the cpu temperature.
With regard to all the other functionality OCL seems to work fine, I can change the led color, warning led color and temperature, fan curves and pump speed.
I made an attempt to investigate the cause and thus I had modified the corsairlink_asetek_temperature()
function in protocol/asetek4/temperature.c
to print out the entire response
array, but none of the values seemed to match those reported by lm_sensors (this is unfortunately my limit in understanding C so I don't know what to do beyond this).
Screenshot of benchmark and temperature readings:
Top left: OCL readings, I waited several seconds before re-running the command.
Bottom left: sysbench benchmark.
Right: lm_sensors readout.
Thanks for giving us a linux alternative since Corsair won't. Unfortunately I couldn't get it to work with an AX860i over the PMBus/USB Adapter. My MB does have an I2C SMBus Powersupply port connected to BMC/IPMI - but since Corsair isn't even giving out the pinout of the I2C cable, I haven't even tried.
OpenCorsairLink just throws a segfault when running.
Here's the lsusb trace:
Bus 003 Device 004: ID 1b1c:1c00 Corsair Controller for Corsair Link
Device Descriptor:
bLength 18
bDescriptorType 1
bcdUSB 1.10
bDeviceClass 0
bDeviceSubClass 0
bDeviceProtocol 0
bMaxPacketSize0 64
idVendor 0x1b1c Corsair
idProduct 0x1c00 Controller for Corsair Link
bcdDevice 1.00
iManufacturer 1 Silicon Labs
iProduct 2 Corsair Link TM USB Dongle
iSerial 3 6525fguhngyh
bNumConfigurations 1
Configuration Descriptor:
bLength 9
bDescriptorType 2
wTotalLength 32
bNumInterfaces 1
bConfigurationValue 1
iConfiguration 0
bmAttributes 0x80
(Bus Powered)
MaxPower 100mA
Interface Descriptor:
bLength 9
bDescriptorType 4
bInterfaceNumber 0
bAlternateSetting 0
bNumEndpoints 2
bInterfaceClass 255 Vendor Specific Class
bInterfaceSubClass 0
bInterfaceProtocol 0
iInterface 2 Corsair Link TM USB Dongle
Endpoint Descriptor:
bLength 7
bDescriptorType 5
bEndpointAddress 0x81 EP 1 IN
bmAttributes 2
Transfer Type Bulk
Synch Type None
Usage Type Data
wMaxPacketSize 0x0040 1x 64 bytes
bInterval 0
Endpoint Descriptor:
bLength 7
bDescriptorType 5
bEndpointAddress 0x01 EP 1 OUT
bmAttributes 2
Transfer Type Bulk
Synch Type None
Usage Type Data
wMaxPacketSize 0x0040 1x 64 bytes
bInterval 0
can't get debug descriptor: Resource temporarily unavailable
Device Status: 0x0000
(Bus Powered)
Am I doing it wrong or is the AX860i not supported? I'd really like to get temp/power metrics out of the PS to collect with https://github.com/firehol/netdata/wiki
Hi,
I'm using a Corsair H115i on GNU/Debian.
How could I help to support this HW?
Thanks
I've begun work on protocol work for the 'H100i v2', which I bought September 6th 2016. It might take sometime due to my class schedule and Senior Design project. No later than Spring 2017, I should have something working.
I was able to make my H100i GTX work after adding another device entry:
index 60d0df9..4dc29bf 100644
--- a/device.c
+++ b/device.c
@@ -47,6 +47,18 @@ struct corsair_device_info corsairlink_devices[] = {
},
{
.vendor_id = 0x1b1c,
+ .product_id = 0x0c03,
+ .device_id = 0xFF, /** H100i GTX*/
+ .name = "H100i GTX",
+ .read_endpoint = 0x02|LIBUSB_ENDPOINT_IN,
+ .write_endpoint = 0x02|LIBUSB_ENDPOINT_OUT,
+ .driver = &corsairlink_driver_asetek,
+ .led_control_count = 1,
+ .fan_control_count = 1,
+ .pump_index = 0,
+ },
+ {
+ .vendor_id = 0x1b1c,
.product_id = 0x0c04,
.device_id = 0x41, /** H110i */
.name = "H110i",
Led works, pump speed seems to work although I can't really tell the difference. I just see temperature drop at 5 and rise to 60c+ at 3. pump mode = 5 brings it almost below 50c.
Do these settings get saved somewhere? I didn't have any LED after a reboot and had to restore it with sudo ./OpenCorsairLink.elf --device 0 --led 00FF00 --led-warn FF0000
I also guess the default setting is 3? I never had Windows on this PC and it was always going over 60 under full load.
Hello! I was spelunking through the source code today when I noticed the function convert_bytes_double
.
https://github.com/audiohacked/OpenCorsairLink/blob/master/protocol/rmi/core.c#L35
Can you explain how this formula was obtained? I've ported it to Go and it appears to work fine in my programs as well, though I haven't the faintest idea why.
Thanks for your time.
I am working with my H110i and current code lucks some features that H110i and possibly other Corsair HID devices support. Features include:
I am willing to code the above features if original author agrees. I don't know if there are plans of implementing this on his side, or if specific implementation guidelines are needed. Feel free to comment.
It shows:
Vendor: Corsair
Product: H80i
Firmware: 0.59.0.0
Temperature 0: 0.00
Temperature 1: 0.00
Temperature 2: 0.00
Fan Speed 0: 0
Fan Speed 1: 0
Fan Speed 2: 0
Fan Speed 3: 0
Pump Speed: 0
Looking at the code in protocol/hid/*.c some message lengths are 32 instead of 64. Based on http://forum.corsair.com/v3/showthread.php?t=120092&page=4 the messages are all to 64 bytes, not sure if that is intentional/works for other models...
So in protocol/hid/*.c made the following changes :
uint8_t response[64];
uint8_t commands[64];
and the same for the length parameter in the dev->driver->read() calls.
Then it gives me:
Vendor: Corsair
Product: H80i
Firmware: 0.59.0.0
Temperature 0: 0.00
Temperature 1: 0.00
Temperature 2: 0.00
Fan Speed 0: 33030
Fan Speed 1: 33542
Fan Speed 2: 34054
Fan Speed 3: 34566
Pump Speed: 59
I made some ubuntu install docs..
https://github.com/audiohacked/OpenCorsairLink/wiki/How-to-build-and-use.
however I get
jose@PBOH-SNUG:~/OpenCorsairLink$ ./OpenCorsairLinkGui
Error: Unable to open Corsair H80i or H100i CPU Cooler
Cannot initialize link.
Any idea what I'm doing wrong? The cable is plugged into the USB header and into the pump..
jose@PBOH-SNUG:~/OpenCorsairLink$ lsusb
Bus 002 Device 004: ID 1b1c:0c04 Corsair
...
Hello,
I've got an H110i on my desktop and I wanted to enable the feature that changes the LED color based on the cpu temperature.
I run the following command, which I expected to set the 3 colors to white, yellow and red:
./OpenCorsairLinkCli --led 1 --led-mode C0 --rgb1 ffffff --rgb2 ffff00 --rgb3 ff0000
But the LED changed to green!
Here is the output from the -print parameter:
./OpenCorsairLinkCli -p
H110i: Firmware v1108
Number of Controllable LEDs: 1
LED Mode: C0
LED Color:
Red: 0
Green: 205
Blue: 49
...
Based on the documentation, I'm supposed to set the 3 rgb colors by using HTML color codes.
Any help would be appreciated.
Thank you.
On master branch, when device is not found, it just segfaults.
desktop OpenCorsairLink # ./OpenCorsairLink.elf
Segmentation fault
desktop OpenCorsairLink #
Update: using gdb:
Thread 1 "OpenCorsairLink" received signal SIGSEGV, Segmentation fault.
0x0000000000400e63 in main (argc=1, argv=0x7fffffffdbb8) at main.c:72
72 r = dev->driver->init(handle, dev->write_endpoint);
(gdb) print dev
$1 = (struct corsair_device_info *) 0x0
I got the obvious ones, but I believe there's still room for improvements on documentation, specially setting fan speed for different temperatures.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.