[Nut-upsdev] [PATCH 26/36] suggested adjustment of blazer_vendor() parsing as per GE Digital Energy GT Series.
Arnaud Quette
aquette.dev at gmail.com
Tue May 15 09:22:24 UTC 2012
2012/3/9 Greg A. Woods <woods at planix.com>:
> 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
> */
I'm discarding this part, at least for now.
AFAICT, the protocol states that:
Company_Name : 15 characters, leave space if less than 15 characters
UPS_Model : 10 characters, leave space if less than 10 characters
Version : 10 characters, leave space if less than 10 characters
refer to: http://old.networkupstools.org/protocols/megatec.html
so there, "1" stands for the firmware revision.
> @@ -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 {
I've applied this part to trunk, r3594.
thanks.
Arnaud
--
Linux / Unix Expert R&D - Eaton - http://powerquality.eaton.com
Network UPS Tools (NUT) Project Leader - http://www.networkupstools.org/
Debian Developer - http://www.debian.org
Free Software Developer - http://arnaud.quette.free.fr/
More information about the Nut-upsdev
mailing list