[Nut-upsuser] Re: MGE Protection Center and Suse

Johannes Schatz johannes@dung.de
Fri, 1 Jul 2005 09:21:50 +0200


Hi


> thanks to send back:
> - output of "ls -lR /proc/bus/usb"
> - output of "lsusb"
> - output of "ls -l /etc/hotplug/usb/"
> - output of "rpm -q nut"
> - files: /etc/ups/*



> Be sure to use nut 2.0.2 as I've made important
> changes to newhidups in this release...

Done

> So, if not already done, install the NUT packages from MGE:
> http://opensource.mgeups.com/suse/RPMS/i586/nut-2.0.2-1.i586.rpm
>
> then:
> - validate that the right privileges are set on the 
> /proc/bus/usb/XXX/YYY
> You can get XXX and YYY for lsusb output (ie Bus 002 Device 001: ID 
> 0463:ffff
> give XXX = 002 and YYY = 001)

what for rights must be there?

backup:/proc/bus/usb/002 # l
total 0
dr-xr-xr-x  2 root root  0 Jul  1 08:48 ./
drwxr-xr-x  4 root root  0 Jul  1 08:48 ../
-rw-r--r--  1 root root 43 Jul  1 08:48 001
-rw-r--r--  1 root root 52 Jul  1 08:48 002
backup:/proc/bus/usb/002 # cd /proc/bus/usb/001/
backup:/proc/bus/usb/001 # l
total 0
dr-xr-xr-x  2 root root  0 Jul  1 08:48 ./
drwxr-xr-x  4 root root  0 Jul  1 08:48 ../
-rw-r--r--  1 root root 43 Jul  1 08:48 001


> If it's not good, unplug / replug the USB UPS cord (maybe need a 
> reboot,
> as restarting hotplug seems not sufficient enough on SuSE).
> - when the above is ok, stop NUT and validate newhidups is stopped
> ("/etc/init.d/ups stop" and "killall -9 newhidups" will ensure this)
> - then "export USB_DEBUG=3", start newhidups in debug mode
> ("/usr/lib/ups/drivers/newhidups -DDDDD auto") and send us back
> the output.

backup:~ # /usr/lib/ups/driver/newhidups -DDDDD auto
Network UPS Tools: New HID UPS driver 0.21 (2.0.2-pre1)

Warning: This is an experimental driver.
Some features may not function correctly.

debug level is '5'
usb_set_debug: Setting debugging level to 3 (on)
usb_os_init: Found USB VFS at /proc/bus/usb
usb_os_find_busses: Found 002
usb_os_find_busses: Found 001
usb_os_find_busses: Skipping non bus directory devices
usb_os_find_devices: Found 002 on 002
skipped 1 class/vendor specific interface descriptors
usb_os_find_devices: Found 001 on 002
usb_os_find_devices: Found 001 on 001
002/002     0463/FFFF

Opening new device
Found 0x463
USB error: could not claim interface 0: Operation not permitted
failed to claim USB device, trying 2 more time(s)...
detaching kernel driver from USB device...
USB error: could not detach kernel driver from interface 0: Operation 
not permitted
failed to detach kernel driver from USB device...
trying again to claim USB device...
USB error: could not claim interface 0: Operation not permitted
failed to claim USB device, trying 1 more time(s)...
detaching kernel driver from USB device...
USB error: could not detach kernel driver from interface 0: Operation 
not permitted
failed to detach kernel driver from USB device...
trying again to claim USB device...
USB error: could not claim interface 0: Operation not permitted
failed to claim USB device, trying 0 more time(s)...
detaching kernel driver from USB device...
USB error: could not detach kernel driver from interface 0: Operation 
not permitted
failed to detach kernel driver from USB device...
trying again to claim USB device...
USB error: could not claim interface 0: Operation not permitted
USB error: error sending control message: Operation not permitted
- Unable to fetch manufacturer string
USB error: error sending control message: Operation not permitted
-        Unable to fetch product string
USB error: error sending control message: Operation not permitted
- Unable to fetch serial number string
USB error: error sending control message: Operation not permitted
Unable to get HID descriptor (error sending control message: Operation 
not permitted)
002/001     0000/0000

Opening new device
001/001     0000/0000

Opening new device
found 0 (-1)
No USB/HID UPS found