[Nut-upsuser] Re: Xserve, USB, NUT

Charles Lepple clepple at gmail.com
Sat Jan 7 21:43:11 UTC 2006


On 1/7/06, Ted Bardusch <nups at bjmoose.com> wrote:
> This is all on the exact same machine, yes.  The libusb is from
> darwinports, looks like 0.1.10a_1
>
> On 2.0.2 of NUT the driver connected, but had no awareness of an APC
> (as the docs state, newhidups on 2.0.2 only knew about MGE).   2.0.3
> however fails to "steal" the USB connection from the default USB UPS
> handler in OS X as the 2.0.2 version did.  Exact same machine, only
> difference is the newer version of NUT (latest download of 2.0.3).

Hmm, then the question in my mind is whether 2.0.2 really did claim
the UPS, or if you just found a corner case where it got some generic
USB information, but didn't actually do any HID transactions.

The thing is, although the libhid docs say to claim the interface
first, you can sometimes still do other operations on the device. If
the OS power management routines see your UPS, though, chances are
that those other operations are going to interfere with what the OS is
doing.

On OS X, with supported UPSes (APC, MGE, possibly others), the
solution might be to connect to the power management routines, and
avoid the whole "steal the USB interface" dilemma. I'll look into that
later.

For now, a quicker solution might be to create a stub driver that
prevents the HID toolbox from claiming the device. I'll try and dig up
that code later today.

--
- Charles Lepple



More information about the Nut-upsuser mailing list