[Nut-upsuser] Emerson/Liebert GXT3

Charles Lepple clepple at gmail.com
Sun Nov 9 14:39:28 UTC 2014


On Nov 9, 2014, at 8:13 AM, Marcelo Fernandez <marcelo.fidel.fernandez at gmail.com> wrote:

> 2014-11-09 9:59 GMT-03:00 Charles Lepple <clepple at gmail.com>:
>> 
>> Strange, I would have thought that the "Value: 0" would show the actual number. Does it look like drivers/libhid.o got rebuilt?
> 
> Yes, at first I thought the same (that I did something wrong), but
> everything seems ok:

My apologies, you did say the numbers looked different.

Here's how the numbers get interpreted:

In hidparser.c:GetValue(), the bits get extracted from the report (example: "Report[buf]: (5 bytes) => 05 51 00 48 00"). For ConfigVoltage, the offset is 16 bits, and we skip the first 8 (the report ID; 05 in this case). The size is 16 bits, so that is "48 00" -> "0048", which should be 72.

However, this UPS still has a logical Min/Max of 0/1 in effect when the parser reads this.

Can you add the attached patch to your tree? I guess leave the other line commented out; I think there is some other scaling that needs to be addressed. The proper way to fix this is to override the HID descriptor, and that will take a little more coding.

-- 
Charles Lepple
clepple at gmail


-------------- next part --------------
A non-text attachment was scrubbed...
Name: hidparser_fix_logical_max.patch
Type: application/octet-stream
Size: 747 bytes
Desc: not available
URL: <http://lists.alioth.debian.org/pipermail/nut-upsuser/attachments/20141109/b29c662e/attachment.obj>


More information about the Nut-upsuser mailing list