[Nut-upsuser] Liebert PSP
clepple at gmail.com
Sun Sep 19 14:27:11 UTC 2010
On Sep 17, 2010, at 9:00 AM, Will Cooke wrote:
> On 17 September 2010 13:26, Charles Lepple <clepple at gmail.com> wrote:
>> 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
>> 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.
Yes, I was looking for both the hex dump and the interpreted section.
>> 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
>> 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.
I will have to double-check the code, but I am pretty sure that
"Offset" and "Size" are in bits, and they apply to the 2nd and
subsequent bytes of the "Report[buf]" lines. The first byte is the
> * 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.
Here's the definition:
And the info_lkp_t structure is at line 61 in the same file.
In drivers/usbhid-ups.c, can you change %f to %g in the following
lines (2 occurrences) :
upsdebugx(2, "Path: %s, Type: %s, ReportID: 0x%02x, Offset: %i, Size:
%i, Value: %f",
This changes it from a fixed-point notation to floating point.
More information about the Nut-upsuser