You are not logged in.

#1 2010-07-04 20:14:25

dem0stenes
Member
Registered: 2010-05-16
Posts: 2

repeating USB disconnect and reconnect with CyberPower UPS device

Hi all.

Recently I bought Cyber Power DX600E-FR UPS but I can't seem to make it talk to my PC. UPS without the ability to safely shutdown my computer when the power is almost drained is pretty useless sad After googling for two days I'm still in the woods with this issue.

The first problem I noticed is endless disconnect-reconnect cycle (every minute or so) is dmesg.

usb 4-3: new low speed USB device using ohci_hcd and address 72
generic-usb 0003:0764:0501.0047: hiddev0,hidraw0: USB HID v1.10 Device [CPS DX600E] on usb-0000:00:12.1-3/input0
usb 4-3: USB disconnect, address 72
usb 4-3: new low speed USB device using ohci_hcd and address 73
generic-usb 0003:0764:0501.0048: hiddev0,hidraw0: USB HID v1.10 Device [CPS DX600E] on usb-0000:00:12.1-3/input0
usb 4-3: USB disconnect, address 73
usb 4-3: new low speed USB device using ohci_hcd and address 74
generic-usb 0003:0764:0501.0049: hiddev0,hidraw0: USB HID v1.10 Device [CPS DX600E] on usb-0000:00:12.1-3/input0
usb 4-3: USB disconnect, address 74

This doesn't seem to be hardware issue - I booted Ubuntu LiveCD on this machine and UPS device connected only once and was properly detected.

Second issue appeared after configuring network-ups-utils. When running upsd I get

Can't connect to UPS [upsik] (usbhid-ups-upsik): No such file or directory

but when I run usbhid-ups driver manually with raised debug level I see this

   1.288854     failed to claim USB device: could not claim interface 0: Device or resource busy
   1.289094     detached kernel driver from USB device...
   1.292706     Unable to get HID descriptor (error sending control message: Timer expired)
   1.292737     HID descriptor, method 2: (9 bytes) => 09 21 10 01 21 01 22 78 01
   1.292749     HID descriptor length 376
   1.294609     Unable to get Report descriptor: Timer expired

Any help with resolving this issue will be greatly appreciated. Thanks in advance.

Offline

#2 2010-09-05 19:45:02

dem0stenes
Member
Registered: 2010-05-16
Posts: 2

Re: repeating USB disconnect and reconnect with CyberPower UPS device

*bump*

Offline

#3 2011-05-29 00:11:14

android
Member
From: San Diego
Registered: 2003-04-18
Posts: 160

Re: repeating USB disconnect and reconnect with CyberPower UPS device

This is an ongoing issue. CyberPower UPS here is model CP425HG.

May 28 14:48:53 nexus kernel: [95200.240524] usb 3-1: USB disconnect, address 21
May 28 14:48:54 nexus kernel: [95200.717175] usb 3-1: new low speed USB device using uhci_hcd and address 22
May 28 14:48:54 nexus kernel: [95201.033654] generic-usb 0003:0764:0501.10D1: hiddev0,hidraw0: USB HID v1.10 Device [CPS CP425HG] on usb-0000:00:1d.1-1/input0
May 28 14:49:15 nexus kernel: [95221.740519] usb 3-1: USB disconnect, address 22
May 28 14:49:16 nexus kernel: [95222.717174] usb 3-1: new low speed USB device using uhci_hcd and address 23
May 28 14:49:16 nexus kernel: [95223.037032] generic-usb 0003:0764:0501.10D2: hiddev0,hidraw0: USB HID v1.10 Device [CPS CP425HG] on usb-0000:00:1d.1-1/input0
May 28 14:49:37 nexus kernel: [95243.990535] usb 3-1: USB disconnect, address 23
May 28 14:49:38 nexus kernel: [95244.967176] usb 3-1: new low speed USB device using uhci_hcd and address 24
May 28 14:49:38 nexus kernel: [95245.283470] generic-usb 0003:0764:0501.10D3: hiddev0,hidraw0: USB HID v1.10 Device [CPS CP425HG] on usb-0000:00:1d.1-1/input0

This shows the matching VENDORID:PRODUCTID of model DX600E-FR and model CP425HG: 0764:0501

I had simultaneous issues with network ups tool's interface to the UPS.  That issue involved the buffer size max being 8 bytes for a low-speed usb device:

http://www.mail-archive.com/nut-upsuser … 05550.html
http://boxster.ghz.cc/projects/nut/chan … f&new=2407

The patch from this link worked for the 2.4 version of nut. I had this UPS in service for months. Now rev 2.6 doesn't exactly take this patch, and it seems the underlying issue is in the usbhid drivers.

I don't know if it's related (seems unlikely) but I also had a lot of trouble initially getting this same UPS model working on a FreeBSD server. A system upgrade there, from 7.1 to 7.3, fixed the issue. Then in a recent upgrade to FreeBSD 8.1 the UPS interface is broken again. Almost an identical sequence and time line as the same occurrences in usbhid driver on arch.

[root@nexus /]# cat /sys/kernel/debug/usb/devices 
...
T:  Bus=03 Lev=01 Prnt=01 Port=00 Cnt=01 Dev#= 32 Spd=1.5  MxCh= 0
D:  Ver= 1.10 Cls=00(>ifc ) Sub=00 Prot=00 MxPS= 8 #Cfgs=  1
P:  Vendor=0764 ProdID=0501 Rev= 0.01
S:  Manufacturer=CPS
S:  Product=CP425HG
C:* #Ifs= 1 Cfg#= 1 Atr=80 MxPwr= 50mA
I:* If#= 0 Alt= 0 #EPs= 1 Cls=03(HID  ) Sub=00 Prot=00 Driver=usbhid
E:  Ad=81(I) Atr=03(Int.) MxPS=   8 Ivl=10ms

Offline

#4 2011-05-29 00:26:40

android
Member
From: San Diego
Registered: 2003-04-18
Posts: 160

Re: repeating USB disconnect and reconnect with CyberPower UPS device

OK, I just upgraded to kernel26 2.6.38.7-1, no change hid disconnects.

I captured usbmon3 with tshark:

[root@nexus /]# tshark -V -i usbmon3 > tshark-V-iusbmon3-2xdisconnect.txt
Running as user "root" and group "root". This could be dangerous.
Capturing on USB bus number 3
^C362 packets captured

The end of Frame 2 shows this:

[Malformed Packet: USB]
    [Expert Info (Error/Malformed): Malformed Packet (Exception occurred)]
        [Message: Malformed Packet (Exception occurred)]
        [Severity level: Error]
        [Group: Malformed]

Here's the full dump in human readable text:

http://johnea.net/download/tshark-V-ius … onnect.txt

Here's a similar two cycle capture in libpcap format for opening with wireshark;

http://johnea.net/download/tshark-V-ius … onnect.cap

Last edited by android (2011-05-29 00:48:11)

Offline

#5 2011-06-23 23:28:56

android
Member
From: San Diego
Registered: 2003-04-18
Posts: 160

Re: repeating USB disconnect and reconnect with CyberPower UPS device

Just to follow up,

This issue was eventually determined to be the UPS device itself, disconnecting from the bus if no driver connected to it within 20sec of enumeration.

Once the usbhid-ups driver connects to the hardware it stays connected, no more disconnect/reconnect.

This was purely a case of poorly implemented device firmware, it's not due to a linux regression or an arch packaging issue.

The workaround for me was to move 'upsd' to the beginning of the DAEMONS line in rc.conf (at least before 'network')

The reason the installation here worked in the past, was because the affected machine had a static network configuration at that time. Changing the network configuration, to the slower DHCP, caused the UPS to time out and start to disconnect/reconnect.

Solution: When using this UPS, make sure the usbhid-ups driver connects to the UPS within 20sec of enumeration.

Someone please mark this one SOLVED

Last edited by android (2011-06-23 23:30:04)

Offline

Board footer

Powered by FluxBB