[Nut-upsuser] Megatec and Belkin F6H550-UPS

Arjen de Korte nut+users at de-korte.org
Fri Jun 27 10:00:59 UTC 2008


>>> I wrote you some time ago about whether NUT would support the Belkin
>>> F6H550-UPS device in the future.
>>>
> [snip]
>>>
>>> I managed to get the device sort-of working, but i'm getting the
>>> "unsupported combination of battery voltage..." error when attempting
>>> to
>>> bring upsdrvctl online.
>
> That's not really an error, but a warning. The way to get rid of it is
> by using the "battvolts" option in upsd.conf. Just check the manpage
> for more details ("man 8 megatec").
>
> To get the values required, just let the UPS charge completely. Then,
> run "megatec -DDD -a yourups > somefile.txt", unplug the UPS from
> mains and let it discharge until it shuts itself down (it must be
> powering something, but probably not your computer...).

He already did (see the remainder of the message). It looks like the
megatec driver is unable to correctly parse the response to the Q1
command, since it is reporting neither the battery voltage, nor the
frequency (although both are in the return message):

> Asking for UPS status [Q1]...
> Q1 => OK [(119.8 119.8 121.6 NNN 60.2 13.6 N/.A 00001001]

The sscanf() function won't deal with this properly, since the return
value contains non-numeric fields, where it expects floats. In order to
correct this, you'd need to break up the reply fields on the whitespace,
so that errors in the parsing of one field don't propagate into following
fields (similar to what is done for the temperature now).

Best regards, Arjen
-- 
Eindhoven - The Netherlands
Key fingerprint - 66 4E 03 2C 9D B5 CB 9B  7A FE 7E C1 EE 88 BC 57




More information about the Nut-upsuser mailing list