[Nut-upsuser] Liebert PSP
Will Cooke
will at whizzy.org
Fri Sep 17 13:00:56 UTC 2010
On 17 September 2010 13:26, Charles Lepple <clepple at gmail.com> wrote:
<snip>
> What would be interesting is to compare this with the corresponding
> initialization message from the driver which says how the driver
> interprets that bit. Can you post a log starting from when the driver
> is launched, and ending once it starts printing messages like the ones
> quoted above? (I'd suggest gzipping the log in case it gets big.)
Is this the "Report Descriptor" section? If so, attached.
It was generated using the stub driver, so it might not be quite what
you're after. I've attached two files, one where there was input AC
power applied to the UPS and one without.
> The HID Report Descriptor (that the usbhid-ups driver reads at
> startup) contains the mapping between the ReportID and its bitfields,
> and the symbolic "Path" that the rest of the driver uses. In theory,
> the UPS provides all the information needed to find out which bit
> controls OL/OB, but in practice it seems that most manufacturers don't
> do interoperability testing, and they just make sure their UPS works
> with their software. If possible, we would like to find a general
> correction, rather than hardcoding a specific bit to mean something.
Is this the "offset" stuff? I can see from the log file that it talks
about different paths using the same "ReportID" but with a different
offset. This seems to be understood by the driver, but the values
reported are always zero.
> Also, if you want to include the output of "diff -u" (or "svn diff")
> from your changes, we can take a look at that. You're probably close,
> but the HID parsing code is pretty complex.
I love your optimism ;). I risk having my Linux Users licence revoked
by sharing that "code". Basically all I've done is modify the
hid_into_t thus:
{ "BOOL", 0, 0, "UPS.PowerSummary.PresentStatus.ACPresent", NULL,
"%s", HU_FLAG_QUICK_POLL,
liebertpsp_presentstatus_acpresent_conversion },
to make it call my function which then just prints out "value" using
the upsdebugx function. Once I could see the correct value I was
going to work out an IF statement.
My problems are two fold:
* I don't understand what all the sections of the hid_info_t line do.
I've been wildly changing values from NULL to various %s, %e etc etc
to try and work out what it does to no avail.
* I'm ignorant of C and am having to use guess work and blind luck
Thanks for your interest in this, I appreciate it.
Cheers, WIll
-------------- next part --------------
A non-text attachment was scrubbed...
Name: ups_powerapplied.txt.gz
Type: application/x-gzip
Size: 2913 bytes
Desc: not available
URL: <http://lists.alioth.debian.org/pipermail/nut-upsuser/attachments/20100917/9493e16f/attachment.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: ups_nopower_2.txt.gz
Type: application/x-gzip
Size: 2981 bytes
Desc: not available
URL: <http://lists.alioth.debian.org/pipermail/nut-upsuser/attachments/20100917/9493e16f/attachment-0001.bin>
More information about the Nut-upsuser
mailing list