wgottwalt / corsair-psu

Linux hardware monitoring driver for Corsair RMi/HXi series power supplies with sensors USB interface (mainlined 5.11)
GNU General Public License v3.0
27 stars 3 forks source link

ax 1600i support? #10

Open gilvbp opened 1 year ago

gilvbp commented 1 year ago

Hello, would it be possible to have support for the PSU Ax 1600i? I saw that you already have the dump file.

wgottwalt commented 1 year ago

It is very hard to do. The AXi series uses a Silicon Labs CP2103 USB<->UART bridge connected to a Silicon Labs C5081F300 mixed mode DSP with a firmware (possibly talking SMBUS to the PSU). On the OS site you see a plain serial port but you can not use it as such, because it "speaks" only a proprietary "language". This means you have to write 2 in 1 drivers, and fake UART drivers are a bit problematic. It would also mean to duplicate code which may not be accepted into the mainline kernel. This is the reason only serial port connecting userspace tools exists to query the PSUs micro-controller.

Jon0 commented 1 year ago

I created something for reading rail details and setting fan speed here: https://github.com/Jon0/ax1600i

gilvbp commented 1 year ago

@Jon0, great work! Thanks for the update!

wgottwalt commented 1 year ago

@Jon0 Just another https://github.com/ka87/cpsumon copy, this time in Rust, but with the same 256 byte raw data block (without understanding it?). And also again a virtual serial port connecting tool (because of the usb<->serial bridge), but this time able to set the fan speed but supporting only the AX1600i. I wonder if there ever was an attempt to write a driver.

Jon0 commented 1 year ago

Its mostly similar to cpsumon but I found that didn't work - I looked at some wireshark dumps of the corsair software and found the ax1600i needs an extra byte (0x12) written on every message https://github.com/Jon0/ax1600i/blob/05b6b7a403e070e10c3bdbd6fe53fbba0b174e84/src/psu.rs#L83