Comments (18)
@fpoussin is it possible that your method could work here?
from opencorsairlink.
Hey,
Actually, it seems that i'm still having the issue if I don't "initialize" the psu through corsair link using usb over IP on my desktop. (the psu is on a server)
Corsair link reads 64 (empty) bytes from the control endpoint at each command, which we don't, that might be worth trying.
This is the first few packets.
There are no special init commands as far as I can tell.
There's only one configuration and one interface so no tricks here.
from opencorsairlink.
I think this outside my comfort zone...
"In", is that going "in"to the PSU or "out" from the PSU?
from opencorsairlink.
USB packet directions are always related to the host, so IN is a read from the PSU.
from opencorsairlink.
I'm not used to this low level communication protocols.
Do you have a testbed where you can issue single commands and read responses without compiling C programs?
from opencorsairlink.
You can do that with python:
https://gist.github.com/fpoussin/6c10f4a80e2792aed91bfb20c868dbca
from opencorsairlink.
This was not my strong side:
~/code/openCorsairLink/py_usb $ sudo python3 py_usb.py
Traceback (most recent call last):
File "py_usb.py", line 60, in
dev.set_configuration()
File "/usr/local/lib/python3.5/dist-packages/usb/core.py", line 869, in set_configuration
self._ctx.managed_set_configuration(self, configuration)
File "/usr/local/lib/python3.5/dist-packages/usb/core.py", line 102, in wrapper
return f(self, *args, **kwargs)
File "/usr/local/lib/python3.5/dist-packages/usb/core.py", line 148, in managed_set_configuration
self.backend.set_configuration(self.handle, cfg.bConfigurationValue)
File "/usr/local/lib/python3.5/dist-packages/usb/backend/libusb1.py", line 794, in set_configuration
_check(self.lib.libusb_set_configuration(dev_handle.handle, config_value))
File "/usr/local/lib/python3.5/dist-packages/usb/backend/libusb1.py", line 595, in _check
raise USBError(_strerror(ret), ret, _libusb_errno[ret])
usb.core.USBError: [Errno 16] Resource busy
from opencorsairlink.
Ok, so on with the work. That error was because some kernel driver had claimed the device.
This releases is:
if dev.is_kernel_driver_active(0):
print('Kernel driver was active, detaching')
dev.detach_kernel_driver(0)
from opencorsairlink.
This is what I get out from it:
request_string(CLINK_GET_POWER)
Out[77]: '\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00'
In [78]: request_string(CLINK_GET_PRODUCT)
Out[78]: '\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00'
In [79]: request_string(CLINK_GET_INPUT)
Out[79]: '\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00'
Can the instructions in ep_write be different for this PSU?
from opencorsairlink.
Tinkered a bit, now running a virtualbox with windows and letting wireshark dump from usbmon.
These are the requests with answers so far:
(3, 154) = RM650i
(3, 216) = 2.0
(3, 142) = 42.0
(2, 0) = 0.0
(3, 0) = 0.0
(3, 150) =128.0
from opencorsairlink.
Or in hex:
CLINK_GET_PRODUCT_650 = (0xFE, 0x03)
CLINK_GET_WHAT1 = (0x03, 0xD8)
CLINK_GET_WHAT2 = (0x03, 0x8E)
CLINK_GET_WHAT3 = (0x02, 0x00)
CLINK_GET_WHAT4 = (0x03, 0x00)
CLINK_GET_WHAT5 = (0x03, 0x96)
from opencorsairlink.
Ah yes sometimes the device needs to be released.
I already have the commands, they are the same for all RMi PSUs.
from opencorsairlink.
My bad, I interpreted the different commands in the guist as that there were differences in the RMIs api.
So all commands are already known?
from opencorsairlink.
Maybe not all, but most of them: https://github.com/audiohacked/OpenCorsairLink/tree/master/protocol/rmi
from opencorsairlink.
Ok, I was assuming something was missing as the program only reads 0 for everything.
from opencorsairlink.
The commands are correct, but there's some init somewhere that we are missing
from opencorsairlink.
anything I can test to help?
from opencorsairlink.
Fix committed to master branch. Please test
from opencorsairlink.
Related Issues (20)
- --help suggests --machine gives output in machine readable format, but prints nothing HOT 3
- H80i has an incorrect pump_index HOT 8
- (PROBLEM): Unable to claim USB device interface HOT 11
- Unsupported Generic LED Function with Lighting Node PRO + Suuport for it? HOT 4
- H100i GT V2 Can't set the pump mode HOT 1
- H100i GT V2 HOT 2
- h100i not detected HOT 5
- How to use libusbx instead of libusb HOT 1
- H100i RGB PRO XT HOT 4
- Machine Readable Format output does not produce any output for H150i Pro HOT 2
- Bash script to control OpenCorsairLink via CPU temperature HOT 1
- Corsair H100i Platinium and Commander Pro. Only Commander Pro gets detected HOT 1
- Commander Pro Fan Curve Temperature Sensor Reference HOT 1
- corsairlink_commanderpro_set_fan_connection_mode() un-used HOT 2
- (gcc 10.1.0) ld: multiple definition of 'scanlist' error HOT 5
- Device Support: iCUE H115i RGB Pro XT HOT 5
- Future of OpenCorsairLink HOT 8
- libusb_control_transfer returns error.
- Rainbow is just colour shift without being able to set the colours
- [Obsidian 1000D Commander Pro] Setting fan modes have no effect. HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from opencorsairlink.