I was getting: "Can't claim USB device [0764:0501]: could not detach kernel driver from interface 0: Operation not permitted" so I manually installed the udev rules the source (I installed the Gentoo ebuild). I am now getting: # upsdrvctl start Network UPS Tools - UPS driver controller 2.4.3 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 Can't initialize data from HID UPS Driver failed to start (exit status=1) which seems a bit better. $ lsusb Bus 002 Device 005: ID 0764:0501 Cyber Power System, Inc. CP1500 AVR UPS The udev rule is: # Dynex DX-800U? - usbhid-ups ATTR{idVendor}=="0764", ATTR{idProduct}=="0501", MODE="664", GROUP="nobody"
On Mon, May 10, 2010 at 1:49 AM, James <bjlockie at lockie.ca> wrote:> > I was getting: > "Can't claim USB device [0764:0501]: could not detach kernel driver from > interface 0: Operation not permitted" > so I manually installed the udev rules the source (I installed the Gentoo > ebuild). > > I am now getting: > > # ?upsdrvctl start > Network UPS Tools - UPS driver controller 2.4.3 > 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 > Can't initialize data from HID UPS > Driver failed to start (exit status=1) > > which seems a bit better.This seems to be a recent regression. What kernel version are you using?> $ lsusb > Bus 002 Device 005: ID 0764:0501 Cyber Power System, Inc. CP1500 AVR UPS > > The udev rule is: > # ?Dynex DX-800U? ?- usbhid-ups > ATTR{idVendor}=="0764", ATTR{idProduct}=="0501", MODE="664", GROUP="nobody"Can you also post the output from 'lsusb -vvv -d0764:', preferably run as root? The vendor name from lsusb (without -v) is usually a good guess, but often it is the name of the OEM (lsusb looks that up in a static number-to-name mapping file). The product and vendor strings returned by 'lsusb' with one or more '-v' flags are usually customized to match the name printed on the unit. -- - Charles Lepple
On Mon, 10 May 2010, James wrote:> Network UPS Tools - UPS driver controller 2.4.3 > 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 > Can't initialize data from HID UPS > Driver failed to start (exit status=1)FYI, I got that error yesterday with NUT 2.4.3, kernel 2.6.33.3, and a CyberPower CP1500AVRLCD using usbhid-ups and it seems fine after applying this patch: http://boxster.ghz.cc/projects/nut/changeset/2407?format=diff&new=2407 Bus 005 Device 002: ID 0764:0501 Cyber Power System, Inc. CP1500 AVR UPS Device Descriptor: bLength 18 bDescriptorType 1 bcdUSB 1.10 bDeviceClass 0 (Defined at Interface level) bDeviceSubClass 0 bDeviceProtocol 0 bMaxPacketSize0 8 idVendor 0x0764 Cyber Power System, Inc. idProduct 0x0501 CP1500 AVR UPS bcdDevice 0.01 iManufacturer 3 CPS iProduct 1 CP 1500C iSerial 0 bNumConfigurations 1 Configuration Descriptor: bLength 9 bDescriptorType 2 wTotalLength 34 bNumInterfaces 1 bConfigurationValue 1 iConfiguration 0 bmAttributes 0xc0 Self Powered MaxPower 50mA Interface Descriptor: bLength 9 bDescriptorType 4 bInterfaceNumber 0 bAlternateSetting 0 bNumEndpoints 1 bInterfaceClass 3 Human Interface Device bInterfaceSubClass 0 No Subclass bInterfaceProtocol 0 None iInterface 0 HID Device Descriptor: bLength 9 bDescriptorType 33 bcdHID 1.10 bCountryCode 33 US bNumDescriptors 1 bDescriptorType 34 Report wDescriptorLength 387 Report Descriptors: ** UNAVAILABLE ** Endpoint Descriptor: bLength 7 bDescriptorType 5 bEndpointAddress 0x81 EP 1 IN bmAttributes 3 Transfer Type Interrupt Synch Type None Usage Type Data wMaxPacketSize 0x0008 1x 8 bytes bInterval 10 Device Status: 0x0001 Self Powered Also FYI, the hardware compatibility list lists cyberpower or powerpanel under the Cyber Power section, but the cyberpower driver appears to have been removed from the source at some point. I had configure build usbhid-ups, powerpanel, and cyberpower in case I tried it via serial cable at some point in the future, cyberpower failed. Jason -- Jason Englander <jason at englanders.us> 394F 7E02 C105 7268 777A 3F5A 0AC0 C618 0675 80CA