ka87 / cpsumon

Corsair AXi Series PSU monitoring application
Other
23 stars 10 forks source link

is AX1500i supported? #4

Open tchwpkgorg opened 6 years ago

tchwpkgorg commented 6 years ago

I'm trying to use cpsumoncli with Corsair AX1500i - however, /dev/ttyUSB0 is not even created when I connect the PSU. lsusb shows the power supply.

lsusb -v:

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          0x1c02 
  bcdDevice            1.00
  iManufacturer           1 Silicon Labs
  iProduct                2 Corsair Link TM USB Dongle
  iSerial                 3 0001
  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)
psblah commented 6 years ago

you need to bind the driver:

lsusb -t

you'll see output similar to this:

root@RIG1:~/cpsumon# lsusb -t /: Bus 04.Port 1: Dev 1, Class=root_hub, Driver=xhci_hcd/2p, 10000M /: Bus 03.Port 1: Dev 1, Class=root_hub, Driver=xhci_hcd/2p, 480M /: Bus 02.Port 1: Dev 1, Class=root_hub, Driver=xhci_hcd/10p, 5000M /: Bus 01.Port 1: Dev 1, Class=root_hub, Driver=xhci_hcd/16p, 480M | Port 6: Dev 2, If 0, Class=Vendor Specific Class, Driver=rt2800usb, 480M | Port 11: Dev 3, If 0, Class=Vendor Specific Class, Driver=cp210x, 12M

only your Driver=cp210x will probably just say Driver=, 12M

you need to bind /dev/ttyUSB0 with the driver using the following command:

echo -n "1-11:1.0" > /sys/bus/usb/drivers/cp210x/bind

1-11:1.0 was my case because the device is on bus 1 port 11, substitute your bus / port number in place of my "1-11"

i also had to do echo -n "1-11:1.0" > /sys/bus/usb/drivers/cp210x/unbind

then

echo -n "1-11:1.0" > /sys/bus/usb/drivers/cp210x/bind

again before the device would answer.

then

~/cpsumon# ./cpsumoncli /dev/ttyUSB0 Corsair AXi Series PSU Monitor (c) 2014 Andras Kovacs - andras@sth.sze.hu

Dongle name: USB to SMB Bridge (Firmware by Ross Fosler) Dongle version: 0.9 PSU type: AX1200i Fan mode: Auto Fan speed: 0.00 RPM Temperature: 41.25 °C Voltage: 237.00 V Current: 2.42 A Input power: 566.99 W Output power: 542.00 W Efficiency: 95.59 %

Took me a bit to find this out too!

bernardoaraujor commented 6 years ago

I'm having similar problems:

[bernardo@localhost cpsumon]$ lsusb
Bus 002 Device 003: ID 0eef:7910 D-WAV Scientific Co., Ltd 
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 039: ID 04f2:b36e Chicony Electronics Co., Ltd 
Bus 001 Device 003: ID 8087:07da Intel Corp. 
Bus 001 Device 002: ID 8087:0024 Intel Corp. Integrated Rate Matching Hub
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 004 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub
Bus 003 Device 005: ID 1b1c:1c02 Corsair 
Bus 003 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
[bernardo@localhost cpsumon]$ ./cpsumoncli /dev/ttyUSB0
Corsair AXi Series PSU Monitor
(c) 2014 Andras Kovacs - andras@sth.sze.hu
-------------------------------------------

Serial port (/dev/ttyUSB0) open error.
[bernardo@localhost cpsumon]$ 
[bernardo@localhost cpsumon]$ 
[bernardo@localhost cpsumon]$ cd
[bernardo@localhost ~]$ sudo su
[sudo] password for bernardo: 
[root@localhost bernardo]# lsusb -t
/:  Bus 04.Port 1: Dev 1, Class=root_hub, Driver=xhci_hcd/4p, 5000M
/:  Bus 03.Port 1: Dev 1, Class=root_hub, Driver=xhci_hcd/4p, 480M
    |__ Port 2: Dev 5, If 0, Class=Vendor Specific Class, Driver=, 12M
/:  Bus 02.Port 1: Dev 1, Class=root_hub, Driver=ehci-pci/2p, 480M
    |__ Port 1: Dev 2, If 0, Class=Hub, Driver=hub/6p, 480M
        |__ Port 6: Dev 3, If 0, Class=Human Interface Device, Driver=usbhid, 12M
/:  Bus 01.Port 1: Dev 1, Class=root_hub, Driver=ehci-pci/2p, 480M
    |__ Port 1: Dev 2, If 0, Class=Hub, Driver=hub/6p, 480M
        |__ Port 1: Dev 3, If 1, Class=Wireless, Driver=btusb, 12M
        |__ Port 1: Dev 3, If 0, Class=Wireless, Driver=btusb, 12M
        |__ Port 3: Dev 39, If 0, Class=Video, Driver=uvcvideo, 480M
        |__ Port 3: Dev 39, If 1, Class=Video, Driver=uvcvideo, 480M
[root@localhost bernardo]# echo -n "3-2:1.0" > /sys/bus/usb/drivers/cp210x/bind 
bash: echo: write error: No such device
[root@localhost bernardo]# echo -n "3-2:1.0" > /sys/bus/usb/drivers/cp210x/unbind 
bash: echo: write error: No such device
[root@localhost bernardo]# echo -n "3-2:1.0" > /sys/bus/usb/drivers/cp210x/bind 
bash: echo: write error: No such device
[root@localhost bernardo]#