[Nut-upsdev] Liebert GXT2 NUT driver

Richard Gregory R.Gregory at liverpool.ac.uk
Tue Apr 6 13:32:30 UTC 2010


Hi All,

There were other byte swap issues with the driver, making all the bit 
field flags wrong. Have swapped them and can confirm the OL, OB and CHRG 
flags work. CHaRGing is not the inverse of Liebert's BATTERY_CHARGED 
flag as that means CHRG is set when the UPS is on battery. Is it 
reasonable to correct for this by ANDing with the OL flag?

Byte swapping patch attached.


Richard

+--                               --+
|  Biological Sciences, Room 231    |
|  http://www.csc.liv.ac.uk/~greg   |
+--                               --+

Arjen de Korte wrote:
> Citeren Robert Jobbagy <jobbagy.robert at gmail.com>:
> 
>> The trouble  was in the command reply buffer use.
>> You compute the value that value = reply[6]*256+reply[5]  <- it's wrong
>>
>> The right solution: value = reply[5] * 256 + reply[6];
> 
> Thanks for this patch. I just committed it to the development version.  
> But please note that this is an experimental driver. Most of the  
> functions are untested (since nobody took the time to try it out and  
> post the results back to the mailing list).
> 
>> And other bug,
>>
>> battery.runtime compute, you divide this value 60 <- it's wrong
>>
>> right value: divide 1.0
> 
> Probably not. Per the NUT standard, the 'battery.runtime' value is  
> reported in seconds. As far as I understand, the UPS reports runtime  
> remaining in minutes, so we need to multiply by 60 here. See  
> 'docs/new-names.txt' for a listing of (almost) all variables supported  
> in NUT.
> 
>> I continue the work on this driver,and I will write if I make a something
>> new.
> 
> Please do. It should be trivial to add additional commands and  
> variables to the existing ones.
> 
> Best regards, Arjen
-------------- next part --------------
A non-text attachment was scrubbed...
Name: liebertgxt2.diff
Type: text/x-diff
Size: 2577 bytes
Desc: not available
URL: <http://lists.alioth.debian.org/pipermail/nut-upsdev/attachments/20100406/b00947f5/attachment.diff>


More information about the Nut-upsdev mailing list