Hi Mick<br><br><div class="gmail_quote">2011/1/9 Mick <span dir="ltr">&lt;<a href="mailto:michaelkintzios@gmail.com">michaelkintzios@gmail.com</a>&gt;</span><br><blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">
(Apologies for the long message, but there&#39;s a lot to report here.)<br>
<br>
After a lot of help from Kjell (thank you!) I am now testing the<br>
2.6.0-pre1 version with a usbhid-ups that recognises my UPS:<br>
<br>
# /etc/init.d/upsdrv start<br>
 * Starting UPS drivers ...<br>
Network UPS Tools - UPS driver controller 2.6.0-pre1<br>
Network UPS Tools - Generic HID driver 0.35 (2.6.0-pre1)<br>
<div class="im">USB communication driver 0.31<br>
</div>Using subdriver: iDowell HID 0.1<br>
libusb_get_report: No error<br>
libusb_get_report: No error<br>
libusb_get_report: No error<br>
libusb_get_report: No error<br>
libusb_get_report: No error<br>
libusb_get_report: No error<br>
libusb_get_report: No error<br>
libusb_get_report: No error<br>
libusb_get_report: No error<br>
libusb_get_report: No error<br>
libusb_get_report: No error<br>
libusb_get_report: No error<br>
libusb_get_report: No error<br>
libusb_get_report: No error<br>
libusb_get_report: No error<br>
libusb_get_report: No error                                               [ ok ]<br>
<br>
# /etc/init.d/upsd start<br>
 * Starting upsd ...<br>
Network UPS Tools upsd 2.6.0-pre1<br>
<div class="im">listening on 127.0.0.1 port 3493<br>
</div>Connected to UPS [iDowell]: usbhid-ups-iDowell<br>
<div class="im">allowfrom in upsd.users is no longer used                                 [ ok ]<br>
<br>
</div># upsc iDowell<br>
battery.capacity: 0.03<br>
battery.charge: 100<br>
battery.charge.low: 15<br>
battery.runtime: 342  &lt;--this seems to fluctuate<br></blockquote><div><br>this is calculated and reported by the device .<br>nothing we can do about in NUT...<br><br></div><blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">

device.mfr: iDowell<br>
device.model: iBox<br>
device.serial: 00000001<br>
device.type: ups<br>
driver.flag.pollonly: enabled<br>
<a href="http://driver.name" target="_blank">driver.name</a>: usbhid-ups<br>
driver.parameter.pollfreq: 30<br>
driver.parameter.pollinterval: 2<br>
driver.parameter.port: auto<br>
driver.version: 2.6.0-pre1<br>
driver.version.data: iDowell HID 0.1<br>
driver.version.internal: 0.35<br>
ups.delay.shutdown: 20<br>
ups.delay.start: 30<br>
ups.mfr: iDowell<br>
ups.model: iBox<br>
ups.productid: 0300<br>
ups.serial: 00000001<br>
ups.status: OL CHRG<br>
ups.vendorid: 075d<br>
<br>
There does seem to be one problem with my system which generates<br>
reports like this before I start upsdrv:<br>
===========================================================<br>
Jan  9 19:23:20 compaq kernel: usb 3-2: USB disconnect, address 4<br>
Jan  9 19:23:21 compaq kernel: usb 3-2: new low speed USB device using<br>
uhci_hcd and address 5<br>
Jan  9 19:23:21 compaq kernel: usb 3-2: new low speed USB device using<br>
uhci_hcd and address 5<br>
Jan  9 19:23:21 compaq kernel: usb 3-2: New USB device found,<br>
idVendor=075d, idProduct=0300<br>
Jan  9 19:23:21 compaq kernel: usb 3-2: New USB device found,<br>
idVendor=075d, idProduct=0300<br>
Jan  9 19:23:21 compaq kernel: usb 3-2: New USB device strings: Mfr=3,<br>
Product=1, SerialNumber=2<br>
Jan  9 19:23:21 compaq kernel: usb 3-2: New USB device strings: Mfr=3,<br>
Product=1, SerialNumber=2<br>
Jan  9 19:23:21 compaq kernel: usb 3-2: Product: iBox<br>
Jan  9 19:23:21 compaq kernel: usb 3-2: Product: iBox<br>
Jan  9 19:23:21 compaq kernel: usb 3-2: Manufacturer: iDowell<br>
Jan  9 19:23:21 compaq kernel: usb 3-2: Manufacturer: iDowell<br>
Jan  9 19:23:21 compaq kernel: usb 3-2: SerialNumber: 00000001<br>
Jan  9 19:23:21 compaq kernel: usb 3-2: SerialNumber: 00000001<br>
Jan  9 19:23:21 compaq kernel: generic-usb 0003:075D:0300.0005:<br>
<div class="im">hidraw1: USB HID v1.10 Device [iDowell iBox] on<br>
usb-0000:00:1d.1-2/input0<br>
</div>Jan  9 19:23:21 compaq kernel: generic-usb 0003:075D:0300.0005:<br>
<div class="im">hidraw1: USB HID v1.10 Device [iDowell iBox] on<br>
usb-0000:00:1d.1-2/input0<br>
</div>Jan  9 19:23:36 compaq kernel: usb 3-2: USB disconnect, address 5<br>
Jan  9 19:23:36 compaq kernel: usb 3-2: USB disconnect, address 5<br>
...<br>
===========================================================<br>
(it&#39;ll keep disconnecting and reconnecting)<br>
<br>
and like this after I connect to it with upsdrv:<br>
===========================================================<br>
Jan  9 19:24:45 compaq usbhid-ups[5228]: Startup successful<br>
Jan  9 19:24:45 compaq usbhid-ups[5228]: Startup successful<br>
Jan  9 19:24:45 compaq usbhid-ups[5228]: libusb_get_report: No error<br>
Jan  9 19:24:46 compaq upsd[4933]: Connected to UPS [iDowell]:<br>
usbhid-ups-iDowell<br>
Jan  9 19:24:46 compaq upsd[4933]: Connected to UPS [iDowell]:<br>
usbhid-ups-iDowell<br>
Jan  9 19:24:47 compaq usbhid-ups[5228]: libusb_get_report: could not<br>
<div class="im">claim interface 0: Device or resource busy<br>
</div>Jan  9 19:24:47 compaq usbhid-ups[5228]: Got disconnected by another<br>
driver: Device or resource busy<br>
Jan  9 19:24:49 compaq usbhid-ups[5228]: libusb_get_report: could not<br>
<div class="im">claim interface 0: Device or resource busy<br>
</div>Jan  9 19:24:49 compaq usbhid-ups[5228]: Got disconnected by another<br>
driver: Device or resource busy<br>
Jan  9 19:24:51 compaq usbhid-ups[5228]: libusb_get_report: could not<br>
<div class="im">claim interface 0: Device or resource busy<br>
</div>Jan  9 19:24:51 compaq usbhid-ups[5228]: Got disconnected by another<br>
driver: Device or resource busy<br>
Jan  9 19:24:53 compaq usbhid-ups[5228]: libusb_get_report: could not<br>
<div class="im">claim interface 0: Device or resource busy<br>
</div>===========================================================<br>
... and so on.<br>
<br>
<br>
At the first few attempts to connect with upsdrv I usually get this error:<br>
<br>
# /etc/init.d/upsdrv start<br>
 * Starting UPS drivers ...<br>
Network UPS Tools - UPS driver controller 2.6.0-pre1<br>
Network UPS Tools - Generic HID driver 0.35 (2.6.0-pre1)<br>
<div class="im">USB communication driver 0.31<br>
</div>Using subdriver: iDowell HID 0.1<br>
libusb_get_report: could not claim interface 0: Device or resource busy<br>
Got disconnected by another driver: Device or resource busy<br>
Can&#39;t initialize data from HID UPS<br>
Driver failed to start (exit status=1)<br>
 * Failed to start UPS drivers!                                           [ !! ]<br>
<br>
Eventually upsdrv will connect as shown further up, but a few minutes<br>
later (5 minutes or more) this error happens:<br>
===========================================================<br>
Jan  9 19:35:05 compaq usbhid-ups[5515]: libusb_get_report: could not claim inte<br>
rface 0: Device or resource busy<br>
Jan  9 19:35:05 compaq usbhid-ups[5515]: Got disconnected by another driver: Dev<br>
ice or resource busy<br>
Jan  9 19:35:07 compaq usbhid-ups[5515]: libusb_get_report: could not claim inte<br>
rface 0: Device or resource busy<br>
Jan  9 19:35:07 compaq usbhid-ups[5515]: Got disconnected by another driver: Dev<br>
ice or resource busy<br>
Jan  9 19:35:09 compaq kernel: usb 3-2: usbfs: USBDEVFS_CONTROL failed cmd usbhi<br>
d-ups rqt 128 rq 6 len 255 ret -75<br>
Jan  9 19:35:09 compaq kernel: hub 3-0:1.0: port 2 disabled by hub (EMI?), re-en<br>
abling...<br>
Jan  9 19:35:09 compaq kernel: usb 3-2: USB disconnect, address 10<br>
Jan  9 19:35:09 compaq kernel: usb 3-2: USB disconnect, address 10<br>
Jan  9 19:35:09 compaq upsd[5596]: Data for UPS [iDowell] is stale -<br>
check driver<br>
Jan  9 19:35:09 compaq upsd[5596]: Data for UPS [iDowell] is stale -<br>
check driver<br>
===========================================================<br>
Fair enough, that&#39;s upsc tells me too:<br>
<br>
# upsc iDowell<br>
Error: Data stale<br>
<br>
After that stage the device is rediscovered by the kernel, but the<br>
driver will not connect on its own:<br>
===========================================================<br>
Jan  9 19:35:41 compaq kernel: usb 3-2: new full speed USB device<br>
using uhci_hcd and address 22<br>
Jan  9 19:35:42 compaq kernel: usb 3-2: device not accepting address<br>
22, error -71<br>
Jan  9 19:35:42 compaq kernel: usb 3-2: new low speed USB device using<br>
uhci_hcd and address 23<br>
Jan  9 19:35:42 compaq kernel: usb 3-2: new low speed USB device using<br>
uhci_hcd and address 23<br>
Jan  9 19:35:42 compaq kernel: usb 3-2: device not accepting address<br>
23, error -71<br>
Jan  9 19:35:42 compaq kernel: hub 3-0:1.0: unable to enumerate USB<br>
device on port 2<br>
Jan  9 19:35:58 compaq kernel: usb 3-2: new full speed USB device<br>
using uhci_hcd and address 24<br>
Jan  9 19:35:58 compaq kernel: usb 3-2: new full speed USB device<br>
using uhci_hcd and address 24<br>
Jan  9 19:35:58 compaq kernel: usb 3-2: new full speed USB device<br>
using uhci_hcd and address 25<br>
Jan  9 19:35:58 compaq kernel: usb 3-2: new full speed USB device<br>
using uhci_hcd and address 25<br>
Jan  9 19:35:58 compaq kernel: usb 3-2: new full speed USB device<br>
using uhci_hcd and address 26<br>
Jan  9 19:35:58 compaq kernel: usb 3-2: new full speed USB device<br>
using uhci_hcd and address 26<br>
Jan  9 19:35:58 compaq kernel: usb 3-2: device not accepting address<br>
26, error -71<br>
Jan  9 19:35:58 compaq kernel: usb 3-2: new full speed USB device<br>
using uhci_hcd and address 27<br>
Jan  9 19:35:58 compaq kernel: usb 3-2: new full speed USB device<br>
using uhci_hcd and address 27<br>
Jan  9 19:35:59 compaq kernel: usb 3-2: device not accepting address<br>
27, error -71<br>
Jan  9 19:35:59 compaq kernel: hub 3-0:1.0: unable to enumerate USB<br>
device on port 2<br>
Jan  9 19:36:14 compaq kernel: usb 3-2: new low speed USB device using<br>
uhci_hcd and address 28<br>
Jan  9 19:36:14 compaq kernel: usb 3-2: new low speed USB device using<br>
uhci_hcd and address 28<br>
Jan  9 19:36:14 compaq kernel: usb 3-2: New USB device found,<br>
idVendor=075d, idProduct=0300<br>
Jan  9 19:36:14 compaq kernel: usb 3-2: New USB device found,<br>
idVendor=075d, idProduct=0300<br>
Jan  9 19:36:14 compaq kernel: usb 3-2: New USB device strings: Mfr=3,<br>
Product=1, SerialNumber=2<br>
Jan  9 19:36:14 compaq kernel: usb 3-2: New USB device strings: Mfr=3,<br>
Product=1, SerialNumber=2<br>
Jan  9 19:36:14 compaq kernel: usb 3-2: Product: iBox<br>
Jan  9 19:36:14 compaq kernel: usb 3-2: Product: iBox<br>
Jan  9 19:36:14 compaq kernel: usb 3-2: Manufacturer: iDowell<br>
Jan  9 19:36:14 compaq kernel: usb 3-2: Manufacturer: iDowell<br>
Jan  9 19:36:14 compaq kernel: usb 3-2: SerialNumber: 00000001<br>
Jan  9 19:36:14 compaq kernel: usb 3-2: SerialNumber: 00000001<br>
Jan  9 19:36:15 compaq kernel: generic-usb 0003:075D:0300.000B:<br>
<div class="im">hidraw1: USB HID v1.10 Device [iDowell iBox] on<br>
usb-0000:00:1d.1-2/input0<br>
</div>Jan  9 19:36:15 compaq kernel: generic-usb 0003:075D:0300.000B:<br>
<div class="im">hidraw1: USB HID v1.10 Device [iDowell iBox] on<br>
usb-0000:00:1d.1-2/input0<br>
</div>Jan  9 19:36:15 compaq usbhid-ups[5515]: libusb_get_report: could not<br>
<div class="im">claim interface 0: Device or resource busy<br>
</div>Jan  9 19:36:15 compaq usbhid-ups[5515]: Got disconnected by another<br>
driver: Device or resource busy<br>
Jan  9 19:36:17 compaq usbhid-ups[5515]: libusb_get_report: could not<br>
<div class="im">claim interface 0: Device or resource busy<br>
</div>Jan  9 19:36:17 compaq usbhid-ups[5515]: Got disconnected by another<br>
driver: Device or resource busy<br>
===========================================================<br>
<br>
The above log errors show that something is trying to capture the UPS,<br>
besides the usbhid-ups driver.  The above connection failure could be<br>
because of a clash between drivers.  The previous nut version 2.4.3-r2<br>
had been installed with the hal USE flag and I have:<br>
<br>
# ls -la /usr/libexec/hal*<br>
-rwxr-xr-x 1 root root 17816 Jul 25 11:45<br>
/usr/libexec/hal-storage-cleanup-all-mountpoints<br>
-rwxr-xr-x 1 root root 17816 Jul 25 11:45<br>
/usr/libexec/hal-storage-cleanup-mountpoint<br>
-rwxr-xr-x 1 root root 17840 Jul 25 11:45 /usr/libexec/hal-storage-closetray<br>
-rwxr-xr-x 1 root root 17868 Jul 25 11:45 /usr/libexec/hal-storage-eject<br>
-rwxr-xr-x 1 root root 30260 Jul 25 11:45 /usr/libexec/hal-storage-mount<br>
-rwxr-xr-x 1 root root 17844 Jul 25 11:45 /usr/libexec/hal-storage-unmount<br>
-rwxr-xr-x 1 root root  5392 Jul 25 11:45<br>
/usr/libexec/hal-system-power-pm-is-supported<br>
-rwxr-xr-x 1 root root  5372 Jul 25 11:45 /usr/libexec/hal-system-power-pmu<br>
-rwxr-xr-x 1 root root  5364 Jul 25 11:45 /usr/libexec/hal-system-setserial<br>
-rwxr-xr-x 1 root root  9508 Jul 25 11:45 /usr/libexec/hal-system-sonypic<br>
-rwxr-xr-x 1 root root 13736 Jul 25 11:45 /usr/libexec/hald-addon-acpi<br>
-rwxr-xr-x 1 root root 30284 Jul 25 11:45 /usr/libexec/hald-addon-cpufreq<br>
-rwxr-xr-x 1 root root 13756 Jul 25 11:45<br>
/usr/libexec/hald-addon-generic-backlight<br>
-rwxr-xr-x 1 root root 17840 Jul 25 11:45 /usr/libexec/hald-addon-hid-ups<br>
-rwxr-xr-x 1 root root  9580 Jul 25 11:45 /usr/libexec/hald-addon-imac-backlight<br>
-rwxr-xr-x 1 root root 22004 Jul 25 11:45 /usr/libexec/hald-addon-input<br>
-rwxr-xr-x 1 root root 17864 Jul 25 11:45 /usr/libexec/hald-addon-ipw-killswitch<br>
-rwxr-xr-x 1 root root 17904 Jul 25 11:45 /usr/libexec/hald-addon-leds<br>
-rwxr-xr-x 1 root root 13748 Jul 25 11:45<br>
/usr/libexec/hald-addon-macbook-backlight<br>
-rwxr-xr-x 1 root root 17816 Jul 25 11:45<br>
/usr/libexec/hald-addon-macbookpro-backlight<br>
-rwxr-xr-x 1 root root 13700 Jul 25 11:45 /usr/libexec/hald-addon-pmu<br>
-rwxr-xr-x 1 root root 17896 Jul 25 11:45<br>
/usr/libexec/hald-addon-rfkill-killswitch<br>
-rwxr-xr-x 1 root root 22036 Jul 25 11:45 /usr/libexec/hald-addon-storage<br>
-rwxr-xr-x 1 root root 22016 Jul 25 11:45 /usr/libexec/hald-generate-fdi-cache<br>
-rwxr-xr-x 1 root root  9536 Jul 25 11:45 /usr/libexec/hald-probe-hiddev<br>
-rwxr-xr-x 1 root root 13648 Jul 25 11:45 /usr/libexec/hald-probe-ieee1394-unit<br>
-rwxr-xr-x 1 root root  9540 Jul 25 11:45 /usr/libexec/hald-probe-input<br>
-rwxr-xr-x 1 root root 13684 Jul 25 11:45 /usr/libexec/hald-probe-net-bluetooth<br>
-rwxr-xr-x 1 root root  9504 Jul 25 11:45 /usr/libexec/hald-probe-pc-floppy<br>
-rwxr-xr-x 1 root root  9548 Jul 25 11:45 /usr/libexec/hald-probe-printer<br>
-rwxr-xr-x 1 root root  9504 Jul 25 11:45 /usr/libexec/hald-probe-serial<br>
-rwxr-xr-x 1 root root 13676 Jul 25 11:45 /usr/libexec/hald-probe-smbios<br>
-rwxr-xr-x 1 root root 38484 Jul 25 11:45 /usr/libexec/hald-probe-storage<br>
-rwxr-xr-x 1 root root  9556 Jul 25 11:45 /usr/libexec/hald-probe-video4linux<br>
-rwxr-xr-x 1 root root 42532 Jul 25 11:45 /usr/libexec/hald-probe-volume<br>
-rwxr-xr-x 1 root root 17888 Jul 25 11:45 /usr/libexec/hald-runner<br>
<br>
Could any of the above be causing the clash?<br></blockquote><div><br>indeed, /usr/libexec/hald-addon-hid-ups which is part of UPower (integrated power management), which is automatically launched when a new USB/HID UPS is plugged.<br>
since UPower is running as root, it will prevent usbhid-ups from claiming back your UPS after software disconnection.<br>you may try to run nut as root to check if you still see the claim interface failure.<br><br>I&#39;ll have to check UPower, since iirc, it wasn&#39;t previously running as root (or I&#39;m maybe confusing with HAL...)</div>
</div><br>cheers,<br>Arnaud<br>-- <br>Linux / Unix Expert R&amp;D - Eaton - <a href="http://powerquality.eaton.com" target="_blank">http://powerquality.eaton.com</a><br>Network UPS Tools (NUT) Project Leader - <a href="http://www.networkupstools.org/" target="_blank">http://www.networkupstools.org/</a><br>
Debian Developer - <a href="http://www.debian.org" target="_blank">http://www.debian.org</a><br>Free Software Developer - <a href="http://arnaud.quette.free.fr/" target="_blank">http://arnaud.quette.free.fr/</a><br><br>