To deal with small model string differences that are present on the BestPower 
FerrUPS 2.1Kva ups, I have the patch below. The change in formatting seams to 
exist in firmware 9.28 and I think even older firmware.

The patch is against the 2.7.1 bestfcom driver. Please pardon any errors in my 
patch submission has I have only submitted a patch once or twice before. This 
patch should fix a situation where some BestPower FerrUPS FE2.1KVA UPS 
detection fails because of extra whitespace in the model ID.


diff -rupN release-orig/nut-2.7.1/drivers/bestfcom.c 
release-patched/nut-2.7.1/drivers/bestfcom.c
--- release-orig/nut-2.7.1/drivers/bestfcom.c   2013-07-31 13:41:31.000000000 
-0700
+++ release-patched/nut-2.7.1/drivers/bestfcom.c        2014-02-10 
10:22:35.405305828 -0800
@@ -582,6 +582,13 @@ void upsdrv_init_nofc(void)
                fc.type = FERRUPS;
                snprintf(fc.name, sizeof(fc.name), "%s", "Ferrups");
        } else
+       /* For FE2.1KVA running 9.28 firmware and possibly older */ 
+       if (strstr(rstring, "Model:      FE2.1KVA")
+           || strstr(rstring, "Model:      FE")){
+                fc.model = FExxxx;
+                fc.type = FERRUPS;
+                snprintf(fc.name, sizeof(fc.name), "%s", "Ferrups");
+        } else
        if (strlen(rstring) < 300 ) {
                /* How does the old Fortress respond to this? */
                upsdebugx(2, "Old Best Fortress???");



Nicholas 



_______________________________________________
Nut-upsdev mailing list
[email protected]
http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/nut-upsdev

Reply via email to