[Nut-upsuser] Can't get iDowell to work

Arnaud Quette aquette.dev at gmail.com
Mon Jan 10 12:19:34 UTC 2011


Hi Mick

2011/1/9 Mick <michaelkintzios at gmail.com>

> (Apologies for the long message, but there's a lot to report here.)
>
> After a lot of help from Kjell (thank you!) I am now testing the
> 2.6.0-pre1 version with a usbhid-ups that recognises my UPS:
>
> # /etc/init.d/upsdrv start
>  * Starting UPS drivers ...
> Network UPS Tools - UPS driver controller 2.6.0-pre1
> Network UPS Tools - Generic HID driver 0.35 (2.6.0-pre1)
> USB communication driver 0.31
> Using subdriver: iDowell HID 0.1
> libusb_get_report: No error
> libusb_get_report: No error
> libusb_get_report: No error
> libusb_get_report: No error
> libusb_get_report: No error
> libusb_get_report: No error
> libusb_get_report: No error
> libusb_get_report: No error
> libusb_get_report: No error
> libusb_get_report: No error
> libusb_get_report: No error
> libusb_get_report: No error
> libusb_get_report: No error
> libusb_get_report: No error
> libusb_get_report: No error
> libusb_get_report: No error                                               [
> ok ]
>
> # /etc/init.d/upsd start
>  * Starting upsd ...
> Network UPS Tools upsd 2.6.0-pre1
> listening on 127.0.0.1 port 3493
> Connected to UPS [iDowell]: usbhid-ups-iDowell
> allowfrom in upsd.users is no longer used                                 [
> ok ]
>
> # upsc iDowell
> battery.capacity: 0.03
> battery.charge: 100
> battery.charge.low: 15
> battery.runtime: 342  <--this seems to fluctuate
>

this is calculated and reported by the device .
nothing we can do about in NUT...

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

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.
since UPower is running as root, it will prevent usbhid-ups from claiming
back your UPS after software disconnection.
you may try to run nut as root to check if you still see the claim interface
failure.

I'll have to check UPower, since iirc, it wasn't previously running as root
(or I'm maybe confusing with HAL...)

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/20110110/b2b8121e/attachment-0001.htm>


More information about the Nut-upsuser mailing list