[Nut-upsuser] CyberPower usbhid-ups continuously disconnects/reconnects

Arnaud Quette aquette.dev at gmail.com
Wed Jun 8 07:35:49 UTC 2011


Hi

2011/6/7 <nut at johnea.net>

>
> Hello,
>
> I've had this same model CyberPower connected to a linux server and a
> freebsd server.
>
> [root at sensor003 menon]# lsusb
> Bus 005 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
> Bus 004 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
> Bus 003 Device 004: ID 0764:0501 Cyber Power System, Inc. CP1500 AVR UPS
> Bus 003 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
> Bus 002 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
> Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
>
> When the nut daemons start attempting to monitor the UPS, the device
> begins a cycle of disconnecting and reconnecting every 20sec.
>
> Running 'usbhid-ups -a nexups' manually, yields permissions issues:
>
> [root at sensor003 menon]# usbhid-ups -a nexups
> Network UPS Tools - Generic HID driver 0.34 (2.4.3)
> USB communication driver 0.31
> Using subdriver: CyberPower HID 0.3
> libusb_get_report: could not claim interface 0: Device or resource busy
> Got disconnected by another driver: Device or resource busy
>

this msg is typical of multiple driver instances running, and fighting to
get the hand on the device.
you can confirm this with an 'ls', and fix it by stopping / killing
everything, then starting the driver using upsdrvctl.


> Can't initialize data from HID UPS
>
> [root at sensor003 network-ups-tools]# ls -l /dev/bus/usb/003/
> total 0
> crw-rw-r-- 1 root root 189, 256 Jun  7 10:55 001
> crw-rw---- 1 root nut  189, 270 Jun  7 11:58 015
>
> There is a udev rule to set permissions on this device:
>
> [root at sensor003 menon]# cat /etc/udev/rules.d/91-local.rules
> # set permissions for CyberPower UPS -jea 2010-06-02
> SUBSYSTEM=="usb", ATTRS{idVendor}=="0764", GROUP="nut", MODE="0660"
>

there should already be a set of rules generated by NUT and named
52-nut-usbups.rules and located in /lib/udev/rules.d


> The group and permissions show that this has been applied.
>
> I'm not a linux-usb developer, and I don't quite get the depth of this,
> but it seems the system hid driver is attaching to this device as it
> enumerates, preventing the nut driver from attaching.
>
> This device was finally attached before (nut 2.4) after applying the
> patch mentioned here:
>
>
> http://www.mail-archive.com/nut-upsuser@lists.alioth.debian.org/msg05550.html
>
> This corrected for this low speed device not providing packets greater
> than 8 bytes in length.
>
> This patch didn't apply directly to the nut 2.6 source.
>
> Can anyone confirm if this 8byte low speed device buffer size limit is
> applied in 2.6?
>

2.6.1 has a smarter fix for this, since having a hard-coded 8 bytes length
caused regressions on some other devices.

cheers
Arnaud
-- 
Linux / Unix Expert R&D - Eaton - http://powerquality.eaton.com
Network UPS Tools (NUT) Project Leader - http://www.networkupstools.org/
Debian Developer - http://www.debian.org
Free Software Developer - http://arnaud.quette.free.fr/
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.alioth.debian.org/pipermail/nut-upsuser/attachments/20110608/5240f0ea/attachment.html>


More information about the Nut-upsuser mailing list