[Nut-upsuser] can't find UPS on openwrt/arm

Matus UHLAR - fantomas uhlar at fantomas.sk
Fri Apr 5 07:04:09 UTC 2013


>On Apr 4, 2013, at 5:38 PM, Matus UHLAR - fantomas wrote:
>
>> libusb-1.0 - 1.0.9-1
>> libusb-compat - 0.1.4-1

On 04.04.13 22:14, Charles Lepple wrote:
>Does libusb-compat have an equivalent to the USB_DEBUG that was present in
> libusb-0.1?

>Also, the drivers drop privileges when run as root. Try "-u root" to see if
> it is a permissions problem.

there seems to be LIBUSB_DEBUG symbol in libusb-1.0.
libusb-compat apparently uses libusb, so I got this:

root at gw:~# export LIBUSB_DEBUG=9
root at gw:~# /lib/nut/usbhid-ups -a eaton -u root -D -D -D
Network UPS Tools - Generic HID driver 0.38 (2.6.5)
USB communication driver 0.31
    0.000000	debug level is '3'
    0.002127	upsdrv_initups...
libusb: 0.000000 error [get_config_descriptor] short output read 0/8
    0.008228	Checking device (1D6B/0002) (001/001)
    0.009258	- VendorID: 1d6b
    0.009537	- ProductID: 0002
    0.009749	- Manufacturer: Linux 3.8.3 ehci_hcd
    0.009961	- Product: EHCI Host Controller
    0.010173	- Serial Number: ehci-platform
    0.010370	- Bus: 001
    0.010562	Trying to match device
    0.010817	Device does not match - skipping
    0.011103	No appropriate HID device found

now this got somewhere...

open("/dev/bus/usb/001/003", O_RDONLY)  = 7
read(7, "\t\2\"\0\1\1\0\240", 8)        = 8
open("/dev/bus/usb/001/003", O_RDONLY)  = 7
read(7, "\t\2\"\0\1\1\0\240\n\t\4\0\0\1\3\0\0\0\t!\20\20!\1\"M\2\7\5\201\3\10"..., 34) = 34
open("/dev/bus/usb/001/003", O_RDONLY)  = 7
read(7, "\t\2\"\0\1\1", 6)              = 6
read(7, "", 8)                          = 0
write(2, "libusb: ", 8)                 = 8
write(2, "0", 1)                        = 1
write(2, ".", 1)                        = 1
write(2, "0", 1)                        = 1
write(2, "0", 1)                        = 1
write(2, "0", 1)                        = 1
write(2, "0", 1)                        = 1
write(2, "0", 1)                        = 1
write(2, "0", 1)                        = 1
write(2, " ", 1)                        = 1
write(2, "error", 5)                    = 5
write(2, " [", 2)                       = 2
write(2, "get_config_descriptor", 21)   = 21
write(2, "] ", 2)                       = 2
write(2, "short output read ", 18)      = 18
write(2, "0", 1)                        = 1
write(2, "/", 1)                        = 1
write(2, "8", 1)                        = 1
write(2, "\n", 1)                       = 1


-- 
Matus UHLAR - fantomas, uhlar at fantomas.sk ; http://www.fantomas.sk/
Warning: I wish NOT to receive e-mail advertising to this address.
Varovanie: na tuto adresu chcem NEDOSTAVAT akukolvek reklamnu postu.
Windows 2000: 640 MB ought to be enough for anybody



More information about the Nut-upsuser mailing list