Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 13 Feb 2009 11:01:21 +0100
From:      Hans Petter Selasky <hselasky@c2i.net>
To:        freebsd-usb@freebsd.org
Subject:   Re: USB2 & apcupsd
Message-ID:  <200902131101.22522.hselasky@c2i.net>
In-Reply-To: <86y6wbf2nc.wl%bowie@nrik.jp>
References:  <86y6wbf2nc.wl%bowie@nrik.jp>

next in thread | previous in thread | raw e-mail | index | archive | help
On Friday 13 February 2009, Noriyoshi Kawano wrote:
> Hi,
>
> I want to use apcupsd under USB2.
>
> [dmesg]
> ugen0.2: <American Power Conversion> at usbus0
> uhid0: <American Power Conversion Uninterruptible Power Supply, class 0/0,
> rev 1.10/1.06, addr 2> on usbus0 Symlink: uhid0 -> usb0.2.0.16
>
> 1. I recompile apcupsd to use the generic USB drvier.
>
> --- /usr/ports/sysutils/apcupsd/Makefile: line 109 ----
> CONFIGURE_ARGS+=        --enable-usb --with-generic-usb
> --------------------------------------------------------
>
> 2. I use libmap.conf to make apcupsd use libusb20.
>
> --- /etc/libmap.conf -------
> [apcupsd]
> libusb-0.1.so.8 libusb20.so
>
> [apctest]
> libusb-0.1.so.8 libusb20.so
>
> [apcaccess]
> libusb-0.1.so.8 libusb20.so
> ----------------------------
>
> It seems to work. But ups communication is interrupted repeatedly.
>
> [/var/log/message]
> Feb 13 11:20:33 brain kernel: uhid0: at ushub0, port 1, addr 2
> (disconnected) Feb 13 11:20:34 brain kernel: uhid0: <American Power
> Conversion Uninterruptible Power Supply, class 0/0, rev 1.10/1.06, addr 2>
> on usbus0 Feb 13 11:20:34 brain kernel: Symlink: uhid0 -> usb0.2.0.16
> Feb 13 11:20:35 brain apcupsd[5846]: Communications with UPS restored.
> Feb 13 11:21:41 brain kernel: uhid0: at ushub0, port 1, addr 2
> (disconnected) Feb 13 11:21:42 brain kernel: uhid0: <American Power
> Conversion Uninterruptible Power Supply, class 0/0, rev 1.10/1.06, addr 2>
> on usbus0 Feb 13 11:21:42 brain kernel: Symlink: uhid0 -> usb0.2.0.16
> Feb 13 11:21:43 brain apcupsd[5846]: Communications with UPS restored.
>
>
> Of course, it works fine under old usb stack.
> Any suggestion ?

Turn on debugging:

sysctl hw.usb2.uhid.debug=15
sysctl hw.usb2.uhub.debug=15

And send me dmesg.

I see that the interval is relativly long, so it might be problem to trace.

--HPS



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200902131101.22522.hselasky>