[Nut-upsuser] CyberPower usbhid-ups continuously disconnects/reconnects
nut at johnea.net
nut at johnea.net
Thu Jun 16 17:51:59 UTC 2011
On 06/16/2011 04:15 AM, Charles Lepple wrote:
> Double-check the cabling, because disconnect messages such as the following are
> reported to the kernel by the USB host controller chip:
>
> Jun 8 18:07:28 sensor003 kernel: [ 411.500020] usb 3-2: USB disconnect,
> address 19
>
> Is it consistently disconnecting every 20 seconds? That almost sounds like some
> proprietary extension to the HID protocol - the UPS expects the computer to send
> something that only the CyberPower software knows to send.
Ah So...
It does disconnect exactly every 20sec.
I did check the cable, and moved it to each of the host receptacles. Also tried
it on several different computers, with the exact same results (including
FreeBSD 8.2)
So this seems like a usb device originating issue.
Once the usbhid-ups driver connects, the disconnect/reconnect cycle stops.
In this light, the problem seems to be that the device may be temporarily
unavailable at the moment the usbhid-ups driver attempts to connect, at boot time.
ASIDE
Maybe this is a relatively fixed, but unknown asyncronous delay at boot time.
When this delay is favorable, so that the device is available when the driver
checks, the connection is established, and nut starts successfully at system
boot.
When the delay is unfavorable, the device is in the middle of
disconnect/reconnect when the driver checks and nut fails to connect and
start.
This would explain why some combinations of kernel, drivers, boot order, etc,
just _seemed_ to work reliably.
/ASIDE
If this is correct, it seems the 'fix' would be to build a small delay, and
retry, into the initial connection code of the usbhid-ups driver. Before giving
up on finding the device.
Is this practical?
Thank you Again Charles and Arnaud!
johnea
More information about the Nut-upsuser
mailing list