[Nut-upsdev] Liebert PowerSure PSA 500
Charles Lepple
clepple at gmail.com
Wed Sep 7 23:09:59 UTC 2005
On 9/7/05, Jochen Bern <bern at ti.uni-trier.de> wrote:
> Peter Selinger wrote:
> > Jochen Bern wrote:
> > > -- lsusb -v claims it "cannot get report descriptor".
> > This is because the kernel driver is attached, and lsusb can't attach
> > itself to this device.
>
> Sorry, I should've included a larger part of the output; it's *only* the
> report descriptor that lsusb cannot access/read, as in:
it's OK. lsusb only has to "attach" to the device to read that
descriptor, and you provided the hex dump, so that's something to go
on.
> > Then you also need to add a
> > new file drivers/liebert-hid.h, modeled on drivers/apc-hid.h, changing
> > APC to LIEBERT everywhere, and making sure this new file is also
> > #include'd in drivers/newhidups.c. Then you have to customize that file.
>
> Umh ... I suppose that's the part where I'm supposed to pull a Liebert
> internal tech manual, listing their vendor-specific encodings, out of
> some pocket ... ? :-}
that would be a good trick :-)
on the other hand, in the UPS.PowerSummary section, there are a lot of
useful variables. The NUT names are listed in nut-*/docs/new-names.txt
or some such file.
> > > [... pulling mains cable]
> > > -- UPS has changed bus ID from 2:2 to 2:6 after the experiment. (Note
> > > that I pulled the cable *twice* to verify some detail ...)
> > That is normal. When you unplug and re-plug the UPS, it gets assigned
> > a new bus ID. This can also sometimes be caused by software that
> > "resets" the device.
>
> I'm sorta stumped. If it's normal that the USB communication gets
> reset when I yank the *POWER* cable (to simulate an outage), and also
> (I assume) normal that the driver cannot keep talking to the hiddev
> device it has open()ed because of the reset, how will the USBHID drivers
> *ever* be able to detect online <--> on battery switchovers without
> throwing an I/O error message?
It is normal for IDs to get reassigned after pulling the USB cable. It
is not normal for the UPS to act like you pulled the USB cable when it
switches to battery power (that is a sign of electrical design
problems, most likely).
It would be nice to support cleanly re-attaching to devices once they
are unplugged. It's tricky, though.
> Charles Lepple wrote:
> > For the record, the problem with the kernel HID interface is that it
> > does not allow access to nested HID elements as seen in many high-end
> > HID UPSes. (I think this has been fixed in later 2.6.x kernels, but
> > don't quote me on that.)
>
> (Will try a newer kernel version as soon as time permits.)
gah! no, that won't help.
if hidups works, it is a fluke.
repeat after me: "I will not use the old hidups driver"
the newer kernels have an expanded API, but hidups *does not use it*.
It won't be patched any time soon, either (well, not by me - someone
may take this as a challenge, and write a full-fledged hidups driver,
but I hope they won't bother). It really isn't worth our time to cater
to every OS's individual HID API (and in this case, only be able to
support Linux 2.x.y where x > 4) if, instead, we can portably access
the device through libusb like newhidups does.
> Can't retrieve Report 40 (-75/75)
these sorts of messages are somewhat disconcerting.
--
- Charles Lepple
More information about the Nut-upsdev
mailing list