[Nut-upsdev] [PATCH 26/36] suggested adjustment of blazer_vendor() parsing as per GE Digital Energy GT Series.
Greg A. Woods
woods at planix.com
Thu Mar 8 23:21:37 UTC 2012
From: "Greg A. Woods" <woods at planix.com>
also add a comment reinforcing the need for ondelay=3
---
drivers/blazer.c | 15 ++++++++++++++-
1 file changed, 14 insertions(+), 1 deletion(-)
diff --git a/drivers/blazer.c b/drivers/blazer.c
index 05324b6..b8c646a 100644
--- a/drivers/blazer.c
+++ b/drivers/blazer.c
@@ -352,7 +352,7 @@ static int blazer_vendor(const char *cmd)
const int len;
} information[] = {
{ "ups.mfr", 15 },
- { "ups.model", 10 },
+ { "ups.model", 11 },
{ "ups.firmware", 10 },
{ NULL }
};
@@ -361,8 +361,14 @@ static int blazer_vendor(const char *cmd)
int i, index;
/*
+ * (The second example is from a GE Digital Energy GT Series 1500T.
+ * I'm not 100% sure, but I think the '1' is part of the model name,
+ * and the entire firmware section is empty, at least on my unit.
+ * Perhaps it's actually supposed to be another field.)
+ *
* > [I\r]
* < [#------------- ------ VT12046Q \r]
+ * < [#GE GT Series 1 \r]
* 012345678901234567890123456789012345678
* 0 1 2 3
*/
@@ -428,6 +434,13 @@ static int blazer_instcmd(const char *cmdname, const char *extra)
}
if (!strcasecmp(cmdname, "shutdown.return")) {
+ /*
+ * Note: "S01R0001" and "S01R0002" may not work on early
+ * firmware versions. The failure mode is that the UPS turns
+ * off and never returns. The fix is to push the return value
+ * up by 2, i.e. S01R0003, and it will return online properly.
+ * (thus the default of ondelay=3 mins)
+ */
if (offdelay < 60) {
snprintf(buf, sizeof(buf), "S.%dR%04d\r", offdelay / 6, ondelay);
} else {
--
1.7.9.2
More information about the Nut-upsdev
mailing list