[Nut-upsdev] Problem with bestfcom and old Ferrups

Charles Lepple clepple at gmail.com
Thu Feb 7 01:08:49 UTC 2008


On Feb 6, 2008 2:44 PM, Chris Adams <cmadams at hiwaay.net> wrote:
> Once upon a time, Chris Adams <cmadams at hiwaay.net> said:
> > I have an old (1997) Best Ferrups (model FE18KVA) that I am trying to
> > monitor for the first time, but all the Best drivers fail to communicate
> > with it.
>
> Okay, I think I have bestfcom working with my old UPS.  Here's a patch
> verses 2.2.1 that fixes three issues I saw with my UPS:
>
> - the "time" command sends a prompt, so always send an empty command
>   after "time" (on versions that prompt, hitting return doesn't change
>   the time, and on UPSes that don't, this just sends an empty command)
>
> - the spacing in the "id" command is different, so match a second string
>   for Ferrups
>
> - the sscanf calls have various combinations of space and tab before the
>   matched valud, which is unneeded; scanf will skip any amount of white
>   space in the input when the format has a space
>
> With this, bestfcom starts and reports valid values.  I have not tried
> cutting the power yet (just to be safe I will need to do that outside
> normal business hours).

Sounds good. This applies cleanly to the trunk (with "patch -l" to
ignore spaces), so if there are no objections from the other
developers, I can go ahead and commit that.

>         if (strlen(rstring) < 80 ) {
> +               ser_get_line(upsfd, rstring, sizeof(rstring), '>', "\012", 3, 0);
>                 upsdrv_init_nofc();

I assume this is safe for owners of the newer Ferrups units? (I am not
familiar with this protocol in particular.)

-- 
- Charles Lepple



More information about the Nut-upsdev mailing list