[Nut-upsdev] Re: About blazer, powermust and mustek
Carlos Rodrigues
carlos.efr at mail.telepac.pt
Sat Oct 22 21:52:18 UTC 2005
Arnaud Quette wrote:
> maybe megatec would be a good name!
> considering my above remark, things might be huger than I (we) have
> thought at first...
>
> I like the starting of your patch (more generic...), although the
> unknown values in mfr/model aren't the best. Some switch (ie
> -mode={mustek,blazer,fenton} should be fine to handle this.
The attached patch transforms "powermust" into "megatec", including
entries in drivers.list and manpages. It also generifies the driver.
By default it still shows "unknown" for manufacturer, model and serial
number, as it isn't possible to tell these UPSes from one another (as I
said), however it adds three options "mfr", "model" and "serial" which
can be set in "ups.conf".
It would be nice to see this tested with hardware now officially
supported by esupssmart and blazer.
Carlos Rodrigues
PS: besides "esupssmart", "blazer", "mustek" and "megatec/powermust"
(which are, for all effects, similar), the drivers "bestups",
"fentonups", "ippon", "masterguard" and "sms" also seem to drive the
same protocol with some variations (seemingly extra commands to
indentify the UPS and stuff like that). Since, AFAIK, this protocol
states that the UPS should output the input given if it doesn't
understand it, it could be possible to make one superdriver unifiying
this protocol (I don't have the hardware though, so this could only be
done with the collaboration of people who do, if they feel like doing it).
-------------- next part --------------
diff -ruN nut.orig/data/driver.list nut/data/driver.list
--- nut.orig/data/driver.list 2005-10-22 20:41:16.000000000 +0100
+++ nut/data/driver.list 2005-10-22 22:21:47.000000000 +0100
@@ -138,6 +138,8 @@
"Masterguard" "(various)" "" "masterguard"
+"Maxxtro" "(various)" "" "megatec"
+
"Meta System" "HF Line" "1..4 boards" "metasys"
"Meta System" "HF Line \/2" "5..8 boards" "metasys"
"Meta System" "HF Millennium 810" "" "metasys"
@@ -230,12 +232,12 @@
"Mustek" "Various" "" "mustek"
-"Mustek" "Powermust" "400VA Plus" "powermust"
-"Mustek" "Powermust" "600VA Plus" "powermust"
-"Mustek" "Powermust" "800VA Pro" "powermust"
-"Mustek" "Powermust" "1000VA Plus" "powermust"
-"Mustek" "Powermust" "1400VA Plus" "powermust"
-"Mustek" "Powermust" "2000VA USB" "powermust"
+"Mustek" "Powermust" "400VA Plus" "megatec"
+"Mustek" "Powermust" "600VA Plus" "megatec"
+"Mustek" "Powermust" "800VA Pro" "megatec"
+"Mustek" "Powermust" "1000VA Plus" "megatec"
+"Mustek" "Powermust" "1400VA Plus" "megatec"
+"Mustek" "Powermust" "2000VA USB" "megatec"
"Nitram" "Elite 500" "" "genericups upstype=8"
"Nitram" "Elite 2002" "" "genericups upstype=16"
@@ -244,7 +246,7 @@
"Online" "P-Series" "" "genericups upstype=14"
-"OnLite" "AQUA" "50" "powermust"
+"OnLite" "AQUA" "50" "megatec"
"Orvaldi Power Protection" "various" "not 400 or 600" "fentonups"
@@ -299,7 +301,7 @@
"Soyntec" "Sekury C 500" "" "powermust"
"Soyntec" "Sekury C 800" "" "powermust"
-"SquareOne Power" "QP1000" "" "powermust"
+"SquareOne Power" "QP1000" "" "megatec"
"SuperPower" "HP360, Hope-550" "" "fentonups"
diff -ruN nut.orig/drivers/Makefile.drvbuild nut/drivers/Makefile.drvbuild
--- nut.orig/drivers/Makefile.drvbuild 2005-10-22 20:41:17.000000000 +0100
+++ nut/drivers/Makefile.drvbuild 2005-10-22 21:29:04.000000000 +0100
@@ -60,8 +60,8 @@
$(CC) $(CFLAGS) $(LDFLAGS) -o metasys metasys.o main.o serial.o dstate.o ../common/state.o ../common/upsconf.o ../common/parseconf.o $(LIBOBJ)
bestfcom: bestfcom.o main.o serial.o dstate.o ../common/state.o ../common/upsconf.o ../common/parseconf.o $(LIBDEP)
$(CC) $(CFLAGS) $(LDFLAGS) -o bestfcom bestfcom.o main.o serial.o dstate.o ../common/state.o ../common/upsconf.o ../common/parseconf.o $(LIBOBJ)
-powermust: powermust.o main.o serial.o dstate.o ../common/state.o ../common/upsconf.o ../common/parseconf.o $(LIBDEP)
- $(CC) $(CFLAGS) $(LDFLAGS) -o powermust powermust.o main.o serial.o dstate.o ../common/state.o ../common/upsconf.o ../common/parseconf.o $(LIBOBJ)
+megatec: megatec.o main.o serial.o dstate.o ../common/state.o ../common/upsconf.o ../common/parseconf.o $(LIBDEP)
+ $(CC) $(CFLAGS) $(LDFLAGS) -o megatec megatec.o main.o serial.o dstate.o ../common/state.o ../common/upsconf.o ../common/parseconf.o $(LIBOBJ)
bcmxcp: bcmxcp.o main.o serial.o dstate.o ../common/state.o ../common/upsconf.o ../common/parseconf.o bcmxcp_ser.o $(LIBDEP)
$(CC) $(CFLAGS) $(LDFLAGS) -o bcmxcp bcmxcp.o main.o serial.o dstate.o ../common/state.o ../common/upsconf.o ../common/parseconf.o bcmxcp_ser.o $(LIBOBJ)
upscode2: upscode2.o main.o serial.o dstate.o ../common/state.o ../common/upsconf.o ../common/parseconf.o $(LIBDEP)
@@ -273,11 +273,11 @@
../include/upsconf.h dstate.h ../include/parseconf.h \
../include/upshandler.h ../include/extstate.h serial.h powercom.h \
../include/timehead.h
-powermust.o: powermust.c main.h ../include/common.h \
+megatec.o: megatec.c main.h ../include/common.h \
../include/attribute.h ../include/config.h ../include/proto.h \
../include/version.h ../include/upsconf.h dstate.h \
../include/parseconf.h ../include/upshandler.h ../include/extstate.h \
- serial.h powermust.h
+ serial.h megatec.h
safenet.o: safenet.c main.h ../include/common.h ../include/attribute.h \
../include/config.h ../include/proto.h ../include/version.h \
../include/upsconf.h dstate.h ../include/parseconf.h \
diff -ruN nut.orig/drivers/Makefile.in nut/drivers/Makefile.in
--- nut.orig/drivers/Makefile.in 2005-10-22 20:41:17.000000000 +0100
+++ nut/drivers/Makefile.in 2005-10-22 21:28:43.000000000 +0100
@@ -12,7 +12,7 @@
PROGS = bestups fentonups apcsmart everups belkin masterguard powercom \
cyberpower tripplite victronups genericups mge-utalk bestuferrups \
isbmex etapro liebert sms esupssmart tripplitesu blazer safenet \
- belkinunv oneac ippon cpsups mustek metasys bestfcom powermust \
+ belkinunv oneac ippon cpsups mustek metasys bestfcom megatec \
bcmxcp upscode2 solis gamatronic al175 nitram
LDFLAGS = @LDFLAGS@
LIBDEP = @LIBOBJ@
diff -ruN nut.orig/drivers/megatec.c nut/drivers/megatec.c
--- nut.orig/drivers/megatec.c 1970-01-01 01:00:00.000000000 +0100
+++ nut/drivers/megatec.c 2005-10-22 22:12:11.000000000 +0100
@@ -0,0 +1,485 @@
+/* -*- mode: c; c-basic-offset: 8; indent-tabs-mode: t; -*-
+ *
+ * megatec.c: support for Megatec protocol based UPSes
+ *
+ * Copyright (C) 2003-2005 Carlos Rodrigues <carlos.efr at mail.telepac.pt>
+ *
+ * megatec.c created on 4/10/2003
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ */
+
+
+#include "main.h"
+#include "serial.h"
+#include "megatec.h"
+
+#include <stdio.h>
+#include <limits.h>
+
+
+#define ENDCHAR '\r'
+#define IGNCHARS "(#"
+
+#define RECV_BUFFER_LEN 128
+
+/* The expected reply lengths (without IGNCHARS) */
+#define F_CMD_REPLY_LEN 20
+#define Q1_CMD_REPLY_LEN 45
+
+#define IDENT_MAXTRIES 5
+#define IDENT_MINSUCCESS 2
+
+#define SEND_PACE 50000 /* 50ms interval between chars */
+#define READ_TIMEOUT 2 /* 2 seconds timeout on read */
+
+#define MAX_START_DELAY 9999
+#define MAX_SHUTDOWN_DELAY 99
+
+/* Maximum length of a string representing these values */
+#define MAX_START_DELAY_LEN 4
+#define MAX_SHUTDOWN_DELAY_LEN 2
+
+#define N_FLAGS 8
+
+/* The UPS status flags */
+#define FL_ON_BATT 0
+#define FL_LOW_BATT 1
+#define FL_BOOST_TRIM 2
+#define FL_FAILED 3
+#define FL_UPS_TYPE 4
+#define FL_BATT_TEST 5
+#define FL_LOAD_OFF 6
+#define FL_BEEPER_ON 7 /* seemingly not used */
+
+/*
+ * Battery voltage limits
+ *
+ * These are hardcoded values for the PowerMust 600VA Plus (12V) and the
+ * 1000VA Plus (24V). If you have another model and these values should
+ * be different, let me know.
+ */
+#define BATT_VOLT_MIN_12 9.7 /* Estimate by looking at Commander Pro */
+#define BATT_VOLT_MAX_12 13.7
+#define BATT_VOLT_MIN_24 19.4 /* Estimate from LB at 22.2V (using same factor as 12V models) */
+#define BATT_VOLT_MAX_24 27.4
+
+
+/* The values returned by the UPS for a "F" query */
+typedef struct {
+ float volt;
+ float current;
+ float battvolt;
+ float freq;
+} FirmwareValues;
+
+
+/* The values returned by the UPS for a "Q1" query */
+typedef struct {
+ float ivolt;
+ float fvolt;
+ float ovolt;
+ float load;
+ float freq;
+ float battvolt;
+ float temp;
+ char flags[N_FLAGS + 1];
+} QueryValues;
+
+
+/* Defined in upsdrv_initinfo */
+static float battvolt_min;
+static float battvolt_max;
+
+/* Minimum and maximum voltage seen on input */
+static float ivolt_min = INT_MAX;
+static float ivolt_max = -1;
+
+/* In minutes: */
+static short start_delay = 3; /* wait this amount of time to come back online */
+static short shutdown_delay = 2; /* wait until going offline */
+
+
+static float batt_charge_pct(float battvolt);
+static int check_ups(void);
+static int get_firmware_values(FirmwareValues *values);
+static int run_query(QueryValues *values);
+int instcmd(const char *cmdname, const char *extra);
+int setvar(const char *varname, const char *val);
+
+
+/* I know, macros should evaluate their arguments only once */
+#define CLAMP(x, min, max) (((x) < (min)) ? (min) : (((x) > (max)) ? (max) : (x)))
+
+
+static float batt_charge_pct(float battvolt)
+{
+ float value;
+
+ battvolt = CLAMP(battvolt, battvolt_min, battvolt_max);
+ value = (battvolt - battvolt_min) / (battvolt_max - battvolt_min);
+
+ return value * 100;
+}
+
+
+static int check_ups(void)
+{
+ char buffer[RECV_BUFFER_LEN];
+ int ret;
+
+ ser_send_pace(upsfd, SEND_PACE, "F%c", ENDCHAR);
+ ret = ser_get_line(upsfd, buffer, RECV_BUFFER_LEN, ENDCHAR, IGNCHARS, READ_TIMEOUT, 0);
+ if (ret < F_CMD_REPLY_LEN) {
+ return -1;
+ }
+
+ ser_send_pace(upsfd, SEND_PACE, "Q1%c", ENDCHAR);
+ ret = ser_get_line(upsfd, buffer, RECV_BUFFER_LEN, ENDCHAR, IGNCHARS, READ_TIMEOUT, 0);
+ if (ret < Q1_CMD_REPLY_LEN) {
+ return -1;
+ }
+
+ return 0;
+}
+
+
+static int get_firmware_values(FirmwareValues *values)
+{
+ char buffer[RECV_BUFFER_LEN];
+ int ret;
+
+ ser_send_pace(upsfd, SEND_PACE, "F%c", ENDCHAR);
+ ret = ser_get_line(upsfd, buffer, RECV_BUFFER_LEN, ENDCHAR, IGNCHARS, READ_TIMEOUT, 0);
+ if (ret < F_CMD_REPLY_LEN) {
+ return -1;
+ }
+
+ sscanf(buffer, "%f %f %f %f", &values->volt, &values->current,
+ &values->battvolt, &values->freq);
+
+ return 0;
+}
+
+
+static int run_query(QueryValues *values)
+{
+ char buffer[RECV_BUFFER_LEN];
+ int ret;
+
+ ser_send_pace(upsfd, SEND_PACE, "Q1%c", ENDCHAR);
+ ret = ser_get_line(upsfd, buffer, RECV_BUFFER_LEN, ENDCHAR, IGNCHARS, READ_TIMEOUT, 0);
+ if (ret < Q1_CMD_REPLY_LEN) {
+ return -1;
+ }
+
+ sscanf(buffer, "%f %f %f %f %f %f %f %s", &values->ivolt, &values->fvolt, &values->ovolt,
+ &values->load, &values->freq, &values->battvolt, &values->temp, values->flags);
+
+ return 0;
+}
+
+
+void upsdrv_initinfo(void)
+{
+ int i;
+ int success = 0;
+ FirmwareValues values;
+
+ /* try to detect the UPS */
+ for (i = 0; i < IDENT_MAXTRIES; i++) {
+ if (check_ups() == 0) {
+ success++;
+ }
+ }
+
+ if (success < IDENT_MINSUCCESS) {
+ fatalx("Megatec protocol UPS not detected.");
+ }
+ upslogx(LOG_INFO, "Megatec protocol UPS detected.");
+
+ dstate_setinfo("driver.version.internal", "%s", DRV_VERSION);
+
+ dstate_setinfo("ups.mfr", "%s", getval("mfr") ? getval("mfr") : "unknown");
+ dstate_setinfo("ups.model", "%s", getval("model") ? getval("model") : "unknown");
+ dstate_setinfo("ups.serial", "%s", getval("serial") ? getval("serial") : "unknown");
+
+ if (get_firmware_values(&values) < 0) {
+ fatalx("Error reading firmware values from UPS!");
+ }
+
+ if (values.battvolt == 12) {
+ battvolt_min = BATT_VOLT_MIN_12;
+ battvolt_max = BATT_VOLT_MAX_12;
+ } else { /* 24V battery */
+ battvolt_min = BATT_VOLT_MIN_24;
+ battvolt_max = BATT_VOLT_MAX_24;
+ }
+
+ dstate_setinfo("output.voltage.target.battery", "%.1f", values.volt);
+ dstate_setinfo("battery.voltage.nominal", "%.1f", values.battvolt);
+
+ dstate_setinfo("ups.delay.start", "%d", start_delay);
+ dstate_setflags("ups.delay.start", ST_FLAG_RW | ST_FLAG_STRING);
+ dstate_setaux("ups.delay.start", MAX_START_DELAY_LEN);
+
+ dstate_setinfo("ups.delay.shutdown", "%d", shutdown_delay);
+ dstate_setflags("ups.delay.shutdown", ST_FLAG_RW | ST_FLAG_STRING);
+ dstate_setaux("ups.delay.shutdown", MAX_SHUTDOWN_DELAY_LEN);
+
+ dstate_addcmd("test.battery.start");
+ dstate_addcmd("shutdown.return");
+ dstate_addcmd("shutdown.stayoff");
+ dstate_addcmd("shutdown.stop");
+ dstate_addcmd("load.on");
+ dstate_addcmd("load.off");
+ dstate_addcmd("reset.input.minmax");
+
+ upsh.instcmd = instcmd;
+ upsh.setvar = setvar;
+
+ /* clean up a possible shutdown in progress */
+ ser_send_pace(upsfd, SEND_PACE, "C%c", ENDCHAR);
+}
+
+
+void upsdrv_updateinfo(void)
+{
+ QueryValues query;
+
+ if (run_query(&query) < 0) {
+ /*
+ * Query wasn't successful (we got some weird
+ * response), however we won't fatalx() as this
+ * happens sometimes when the ups is offline.
+ *
+ * Some fault tolerance is good, we just assume
+ * that the UPS is just taking a nap. ;)
+ */
+ dstate_datastale();
+
+ return;
+ }
+
+ dstate_setinfo("input.voltage", "%.1f", query.ivolt);
+ dstate_setinfo("input.voltage.fault", "%.1f", query.fvolt);
+ dstate_setinfo("output.voltage", "%.1f", query.ovolt);
+ dstate_setinfo("ups.load", "%.1f", query.load);
+ dstate_setinfo("output.frequency", "%.1f", query.freq);
+ dstate_setinfo("battery.voltage", "%.1f", query.battvolt);
+
+ /* this value seems to be bogus, it always reports 37.8 */
+ /*dstate_setinfo("ups.temperature", "%.1f", query.temp);*/
+
+ dstate_setinfo("battery.charge", "%.1f", batt_charge_pct(query.battvolt));
+
+ /* For debug purposes (I know it isn't good to create new variables) */
+ /*dstate_setinfo("ups.flags", query.flags);*/
+
+ status_init();
+
+ if (query.flags[FL_LOAD_OFF] == '1') {
+ status_set("OFF");
+ } else if (query.flags[FL_ON_BATT] == '1' || query.flags[FL_BATT_TEST] == '1') {
+ status_set("OB");
+ } else {
+ status_set("OL");
+
+ if (query.flags[FL_BOOST_TRIM] == '1') {
+ if (query.ivolt < query.ovolt) {
+ status_set("BOOST");
+ } else if (query.ivolt > query.ovolt) {
+ status_set("TRIM");
+ } else {
+ status_set("BYPASS");
+ }
+ }
+ }
+
+ if (query.flags[FL_LOW_BATT] == '1') {
+ status_set("LB");
+ }
+
+ if (query.flags[FL_FAILED] == '1') {
+ status_set("FAILED");
+ }
+
+ status_commit();
+
+ /* Update minimum and maximum input voltage levels only when on line */
+ if (query.flags[FL_ON_BATT] == '0') {
+ if (query.ivolt < ivolt_min) {
+ ivolt_min = query.ivolt;
+ }
+
+ if (query.ivolt > ivolt_max) {
+ ivolt_max = query.ivolt;
+ }
+
+ dstate_setinfo("input.voltage.minimum", "%.1f", ivolt_min);
+ dstate_setinfo("input.voltage.maximum", "%.1f", ivolt_max);
+ }
+
+ dstate_dataok();
+}
+
+
+void upsdrv_shutdown(void)
+{
+ upslogx(LOG_INFO, "Shutting down UPS immediately.");
+
+ ser_send_pace(upsfd, SEND_PACE, "C%c", ENDCHAR);
+ ser_send_pace(upsfd, SEND_PACE, "S00R0001%c", ENDCHAR);
+}
+
+
+int instcmd(const char *cmdname, const char *extra)
+{
+ if (strcasecmp(cmdname, "test.battery.start") == 0) {
+ ser_send_pace(upsfd, SEND_PACE, "C%c", ENDCHAR);
+ ser_send_pace(upsfd, SEND_PACE, "T%c", ENDCHAR);
+
+ upslogx(LOG_INFO, "Start battery test for 10 seconds.");
+
+ return STAT_INSTCMD_HANDLED;
+ }
+
+ if (strcasecmp(cmdname, "shutdown.return") == 0) {
+ ser_send_pace(upsfd, SEND_PACE, "C%c", ENDCHAR);
+ ser_send_pace(upsfd, SEND_PACE, "S%02dR%04d%c", shutdown_delay, start_delay, ENDCHAR);
+
+ upslogx(LOG_INFO, "Shutdown (return) initiated.");
+
+ return STAT_INSTCMD_HANDLED;
+ }
+
+ if (strcasecmp(cmdname, "shutdown.stayoff") == 0) {
+ ser_send_pace(upsfd, SEND_PACE, "C%c", ENDCHAR);
+ ser_send_pace(upsfd, SEND_PACE, "S%02dR0000%c", shutdown_delay, ENDCHAR);
+
+ upslogx(LOG_INFO, "Shutdown (stayoff) initiated.");
+
+ return STAT_INSTCMD_HANDLED;
+ }
+
+ if (strcasecmp(cmdname, "shutdown.stop") == 0) {
+ ser_send_pace(upsfd, SEND_PACE, "C%c", ENDCHAR);
+
+ upslogx(LOG_INFO, "Shutdown canceled.");
+
+ return STAT_INSTCMD_HANDLED;
+ }
+
+ if (strcasecmp(cmdname, "load.on") == 0) {
+ ser_send_pace(upsfd, SEND_PACE, "C%c", ENDCHAR);
+
+ upslogx(LOG_INFO, "Turning load on.");
+
+ return STAT_INSTCMD_HANDLED;
+ }
+
+ if (strcasecmp(cmdname, "load.off") == 0) {
+ ser_send_pace(upsfd, SEND_PACE, "C%c", ENDCHAR);
+ ser_send_pace(upsfd, SEND_PACE, "S00R0000%c", ENDCHAR);
+
+ upslogx(LOG_INFO, "Turning load off.");
+
+ return STAT_INSTCMD_HANDLED;
+ }
+
+ if (strcasecmp(cmdname, "reset.input.minmax") == 0) {
+ ivolt_min = INT_MAX;
+ ivolt_max = -1;
+
+ dstate_setinfo("input.voltage.minimum", "%.1f", ivolt_min);
+ dstate_setinfo("input.voltage.maximum", "%.1f", ivolt_max);
+
+ upslogx(LOG_INFO, "Resetting minimum and maximum input voltage values.");
+
+ return STAT_INSTCMD_HANDLED;
+ }
+
+ upslogx(LOG_NOTICE, "instcmd: unknown command [%s]", cmdname);
+
+ return STAT_INSTCMD_UNKNOWN;
+}
+
+
+int setvar(const char *varname, const char *val)
+{
+ int delay;
+
+ if (sscanf(val, "%d", &delay) != 1) {
+ return STAT_SET_UNKNOWN;
+ }
+
+ if (strcasecmp(varname, "ups.delay.start") == 0) {
+ delay = CLAMP(delay, 0, MAX_START_DELAY);
+ start_delay = delay;
+ dstate_setinfo("ups.delay.start", "%d", delay);
+
+ dstate_dataok();
+
+ return STAT_SET_HANDLED;
+ }
+
+ if (strcasecmp(varname, "ups.delay.shutdown") == 0) {
+ delay = CLAMP(delay, 0, MAX_SHUTDOWN_DELAY);
+ shutdown_delay = delay;
+ dstate_setinfo("ups.delay.shutdown", "%d", delay);
+
+ dstate_dataok();
+
+ return STAT_SET_HANDLED;
+ }
+
+ return STAT_SET_UNKNOWN;
+}
+
+
+void upsdrv_help(void)
+{
+}
+
+
+void upsdrv_makevartable(void)
+{
+ addvar(VAR_VALUE, "mfr", "Manufacturer name");
+ addvar(VAR_VALUE, "model", "Model name");
+ addvar(VAR_VALUE, "serial", "UPS serial number");
+}
+
+
+void upsdrv_banner(void)
+{
+ printf("Network UPS Tools - Megatec protocol driver %s (%s)\n", DRV_VERSION, UPS_VERSION);
+ printf("Carlos Rodrigues (c) 2003-2005\n\n");
+}
+
+
+void upsdrv_initups(void)
+{
+ upsfd = ser_open(device_path);
+ ser_set_speed(upsfd, device_path, B2400);
+}
+
+
+void upsdrv_cleanup(void)
+{
+ ser_close(upsfd, device_path);
+}
+
+
+/* EOF - megatec.c */
diff -ruN nut.orig/drivers/megatec.h nut/drivers/megatec.h
--- nut.orig/drivers/megatec.h 1970-01-01 01:00:00.000000000 +0100
+++ nut/drivers/megatec.h 2005-10-22 21:20:03.000000000 +0100
@@ -0,0 +1,24 @@
+/* -*- mode: c; c-basic-offset: 8; indent-tabs-mode: t; -*-
+ *
+ * megatec.h: support for Megatec protocol based UPSes
+ *
+ * Copyright (C) 2003-2005 Carlos Rodrigues <carlos.efr at mail.telepac.pt>
+ *
+ * megatec.c created on 4/10/2003
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ */
+
+#define DRV_VERSION "1.2"
diff -ruN nut.orig/drivers/powermust.c nut/drivers/powermust.c
--- nut.orig/drivers/powermust.c 2005-09-12 13:38:35.000000000 +0100
+++ nut/drivers/powermust.c 1970-01-01 01:00:00.000000000 +0100
@@ -1,481 +0,0 @@
-/* -*- mode: c; c-basic-offset: 8; indent-tabs-mode: t; -*-
- *
- * powermust.c: support for Mustek (and others) models
- *
- * Copyright (C) 2003, 2004 Carlos Rodrigues <carlos.efr at mail.telepac.pt>
- *
- * powermust.c created on 4/10/2003
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
- */
-
-
-#include "main.h"
-#include "serial.h"
-#include "powermust.h"
-
-#include <stdio.h>
-#include <limits.h>
-
-
-#define ENDCHAR '\r'
-#define IGNCHARS "(#"
-
-#define RECV_BUFFER_LEN 128
-
-/* The expected reply lengths (without IGNCHARS) */
-#define F_CMD_REPLY_LEN 20
-#define Q1_CMD_REPLY_LEN 45
-
-#define IDENT_MAXTRIES 5
-#define IDENT_MINSUCCESS 2
-
-#define SEND_PACE 50000 /* 50ms interval between chars */
-#define READ_TIMEOUT 2 /* 2 seconds timeout on read */
-
-#define MAX_START_DELAY 9999
-#define MAX_SHUTDOWN_DELAY 99
-
-/* Maximum length of a string representing these values */
-#define MAX_START_DELAY_LEN 4
-#define MAX_SHUTDOWN_DELAY_LEN 2
-
-#define N_FLAGS 8
-
-/* The UPS status flags */
-#define FL_ON_BATT 0
-#define FL_LOW_BATT 1
-#define FL_BOOST_TRIM 2
-#define FL_FAILED 3
-#define FL_UPS_TYPE 4
-#define FL_BATT_TEST 5
-#define FL_LOAD_OFF 6
-#define FL_BEEPER_ON 7 /* seemingly not used */
-
-/*
- * Battery voltage limits
- *
- * These are hardcoded values for the PowerMust 600VA Plus (12V) and the
- * 1000VA Plus (24V). If you have another model and these values should
- * be different, let me know.
- */
-#define BATT_VOLT_MIN_12 9.7 /* Estimate by looking at Commander Pro */
-#define BATT_VOLT_MAX_12 13.7
-#define BATT_VOLT_MIN_24 19.4 /* Estimate from LB at 22.2V (using same factor as 12V models) */
-#define BATT_VOLT_MAX_24 27.4
-
-
-/* The values returned by the UPS for a "F" query */
-typedef struct {
- float volt;
- float current;
- float battvolt;
- float freq;
-} FirmwareValues;
-
-
-/* The values returned by the UPS for a "Q1" query */
-typedef struct {
- float ivolt;
- float fvolt;
- float ovolt;
- float load;
- float freq;
- float battvolt;
- float temp;
- char flags[N_FLAGS + 1];
-} QueryValues;
-
-
-/* Defined in upsdrv_initups */
-static float battvolt_min;
-static float battvolt_max;
-
-/* Minimum and maximum voltage seen on input */
-static float ivolt_min = INT_MAX;
-static float ivolt_max = -1;
-
-/* In minutes: */
-static short start_delay = 3; /* wait this amount of time to come back online */
-static short shutdown_delay = 2; /* wait until going offline */
-
-
-static float batt_charge_pct(float battvolt);
-static int check_ups(void);
-static int get_firmware_values(FirmwareValues *values);
-static int run_query(QueryValues *values);
-int instcmd(const char *cmdname, const char *extra);
-int setvar(const char *varname, const char *val);
-
-
-/* I know, macros should evaluate their arguments only once */
-#define CLAMP(x, min, max) (((x) < (min)) ? (min) : (((x) > (max)) ? (max) : (x)))
-
-
-static float batt_charge_pct(float battvolt)
-{
- float value;
-
- battvolt = CLAMP(battvolt, battvolt_min, battvolt_max);
- value = (battvolt - battvolt_min) / (battvolt_max - battvolt_min);
-
- return value * 100;
-}
-
-
-static int check_ups(void)
-{
- char buffer[RECV_BUFFER_LEN];
- int ret;
-
- ser_send_pace(upsfd, SEND_PACE, "F%c", ENDCHAR);
- ret = ser_get_line(upsfd, buffer, RECV_BUFFER_LEN, ENDCHAR, IGNCHARS, READ_TIMEOUT, 0);
- if (ret < F_CMD_REPLY_LEN) {
- return -1;
- }
-
- ser_send_pace(upsfd, SEND_PACE, "Q1%c", ENDCHAR);
- ret = ser_get_line(upsfd, buffer, RECV_BUFFER_LEN, ENDCHAR, IGNCHARS, READ_TIMEOUT, 0);
- if (ret < Q1_CMD_REPLY_LEN) {
- return -1;
- }
-
- return 0;
-}
-
-
-static int get_firmware_values(FirmwareValues *values)
-{
- char buffer[RECV_BUFFER_LEN];
- int ret;
-
- ser_send_pace(upsfd, SEND_PACE, "F%c", ENDCHAR);
- ret = ser_get_line(upsfd, buffer, RECV_BUFFER_LEN, ENDCHAR, IGNCHARS, READ_TIMEOUT, 0);
- if (ret < F_CMD_REPLY_LEN) {
- return -1;
- }
-
- sscanf(buffer, "%f %f %f %f", &values->volt, &values->current,
- &values->battvolt, &values->freq);
-
- return 0;
-}
-
-
-static int run_query(QueryValues *values)
-{
- char buffer[RECV_BUFFER_LEN];
- int ret;
-
- ser_send_pace(upsfd, SEND_PACE, "Q1%c", ENDCHAR);
- ret = ser_get_line(upsfd, buffer, RECV_BUFFER_LEN, ENDCHAR, IGNCHARS, READ_TIMEOUT, 0);
- if (ret < Q1_CMD_REPLY_LEN) {
- return -1;
- }
-
- sscanf(buffer, "%f %f %f %f %f %f %f %s", &values->ivolt, &values->fvolt, &values->ovolt,
- &values->load, &values->freq, &values->battvolt, &values->temp, values->flags);
-
- return 0;
-}
-
-
-void upsdrv_initinfo(void)
-{
- int i;
- int success = 0;
- FirmwareValues values;
-
- /* try to detect the UPS */
- for (i = 0; i < IDENT_MAXTRIES; i++) {
- if (check_ups() == 0) {
- success++;
- }
- }
-
- if (success < IDENT_MINSUCCESS) {
- fatalx("Mustek PowerMust UPS, or compatible, not detected.");
- }
- upslogx(LOG_INFO, "Mustek PowerMust UPS, or compatible, detected.");
-
- dstate_setinfo("driver.version.internal", "%s", DRV_VERSION);
- dstate_setinfo("ups.mfr", "Mustek");
- dstate_setinfo("ups.model", "PowerMust");
- dstate_setinfo("ups.serial", "unknown");
-
- if (get_firmware_values(&values) < 0) {
- fatalx("Error reading firmware values from UPS!");
- }
-
- if (values.battvolt == 12) {
- battvolt_min = BATT_VOLT_MIN_12;
- battvolt_max = BATT_VOLT_MAX_12;
- } else { /* 24V battery */
- battvolt_min = BATT_VOLT_MIN_24;
- battvolt_max = BATT_VOLT_MAX_24;
- }
-
- dstate_setinfo("output.voltage.target.battery", "%.1f", values.volt);
- dstate_setinfo("battery.voltage.nominal", "%.1f", values.battvolt);
-
- dstate_setinfo("ups.delay.start", "%d", start_delay);
- dstate_setflags("ups.delay.start", ST_FLAG_RW | ST_FLAG_STRING);
- dstate_setaux("ups.delay.start", MAX_START_DELAY_LEN);
-
- dstate_setinfo("ups.delay.shutdown", "%d", shutdown_delay);
- dstate_setflags("ups.delay.shutdown", ST_FLAG_RW | ST_FLAG_STRING);
- dstate_setaux("ups.delay.shutdown", MAX_SHUTDOWN_DELAY_LEN);
-
- dstate_addcmd("test.battery.start");
- dstate_addcmd("shutdown.return");
- dstate_addcmd("shutdown.stayoff");
- dstate_addcmd("shutdown.stop");
- dstate_addcmd("load.on");
- dstate_addcmd("load.off");
- dstate_addcmd("reset.input.minmax");
-
- upsh.instcmd = instcmd;
- upsh.setvar = setvar;
-
- /* clean up a possible shutdown in progress */
- ser_send_pace(upsfd, SEND_PACE, "C%c", ENDCHAR);
-}
-
-
-void upsdrv_updateinfo(void)
-{
- QueryValues query;
-
- if (run_query(&query) < 0) {
- /*
- * Query wasn't successful (we got some weird
- * response), however we won't fatalx() as this
- * happens sometimes when the ups is offline.
- *
- * Some fault tolerance is good, we just assume
- * that the UPS is just taking a nap. ;)
- */
- dstate_datastale();
-
- return;
- }
-
- dstate_setinfo("input.voltage", "%.1f", query.ivolt);
- dstate_setinfo("input.voltage.fault", "%.1f", query.fvolt);
- dstate_setinfo("output.voltage", "%.1f", query.ovolt);
- dstate_setinfo("ups.load", "%.1f", query.load);
- dstate_setinfo("output.frequency", "%.1f", query.freq);
- dstate_setinfo("battery.voltage", "%.1f", query.battvolt);
-
- /* this value seems to be bogus, it always reports 37.8 */
- /*dstate_setinfo("ups.temperature", "%.1f", query.temp);*/
-
- dstate_setinfo("battery.charge", "%.1f", batt_charge_pct(query.battvolt));
-
- /* For debug purposes (I know it isn't good to create new variables) */
- /*dstate_setinfo("ups.flags", query.flags);*/
-
- status_init();
-
- if (query.flags[FL_LOAD_OFF] == '1') {
- status_set("OFF");
- } else if (query.flags[FL_ON_BATT] == '1' || query.flags[FL_BATT_TEST] == '1') {
- status_set("OB");
- } else {
- status_set("OL");
-
- if (query.flags[FL_BOOST_TRIM] == '1') {
- if (query.ivolt < query.ovolt) {
- status_set("BOOST");
- } else if (query.ivolt > query.ovolt) {
- status_set("TRIM");
- } else {
- status_set("BYPASS");
- }
- }
- }
-
- if (query.flags[FL_LOW_BATT] == '1') {
- status_set("LB");
- }
-
- if (query.flags[FL_FAILED] == '1') {
- status_set("FAILED");
- }
-
- status_commit();
-
- /* Update minimum and maximum input voltage levels only when on line */
- if (query.flags[FL_ON_BATT] == '0') {
- if (query.ivolt < ivolt_min) {
- ivolt_min = query.ivolt;
- }
-
- if (query.ivolt > ivolt_max) {
- ivolt_max = query.ivolt;
- }
-
- dstate_setinfo("input.voltage.minimum", "%.1f", ivolt_min);
- dstate_setinfo("input.voltage.maximum", "%.1f", ivolt_max);
- }
-
- dstate_dataok();
-}
-
-
-void upsdrv_shutdown(void)
-{
- upslogx(LOG_INFO, "Shutting down UPS immediately.");
-
- ser_send_pace(upsfd, SEND_PACE, "C%c", ENDCHAR);
- ser_send_pace(upsfd, SEND_PACE, "S00R0001%c", ENDCHAR);
-}
-
-
-int instcmd(const char *cmdname, const char *extra)
-{
- if (strcasecmp(cmdname, "test.battery.start") == 0) {
- ser_send_pace(upsfd, SEND_PACE, "C%c", ENDCHAR);
- ser_send_pace(upsfd, SEND_PACE, "T%c", ENDCHAR);
-
- upslogx(LOG_INFO, "Start battery test for 10 seconds.");
-
- return STAT_INSTCMD_HANDLED;
- }
-
- if (strcasecmp(cmdname, "shutdown.return") == 0) {
- ser_send_pace(upsfd, SEND_PACE, "C%c", ENDCHAR);
- ser_send_pace(upsfd, SEND_PACE, "S%02dR%04d%c", shutdown_delay, start_delay, ENDCHAR);
-
- upslogx(LOG_INFO, "Shutdown (return) initiated.");
-
- return STAT_INSTCMD_HANDLED;
- }
-
- if (strcasecmp(cmdname, "shutdown.stayoff") == 0) {
- ser_send_pace(upsfd, SEND_PACE, "C%c", ENDCHAR);
- ser_send_pace(upsfd, SEND_PACE, "S%02dR0000%c", shutdown_delay, ENDCHAR);
-
- upslogx(LOG_INFO, "Shutdown (stayoff) initiated.");
-
- return STAT_INSTCMD_HANDLED;
- }
-
- if (strcasecmp(cmdname, "shutdown.stop") == 0) {
- ser_send_pace(upsfd, SEND_PACE, "C%c", ENDCHAR);
-
- upslogx(LOG_INFO, "Shutdown canceled.");
-
- return STAT_INSTCMD_HANDLED;
- }
-
- if (strcasecmp(cmdname, "load.on") == 0) {
- ser_send_pace(upsfd, SEND_PACE, "C%c", ENDCHAR);
-
- upslogx(LOG_INFO, "Turning load on.");
-
- return STAT_INSTCMD_HANDLED;
- }
-
- if (strcasecmp(cmdname, "load.off") == 0) {
- ser_send_pace(upsfd, SEND_PACE, "C%c", ENDCHAR);
- ser_send_pace(upsfd, SEND_PACE, "S00R0000%c", ENDCHAR);
-
- upslogx(LOG_INFO, "Turning load off.");
-
- return STAT_INSTCMD_HANDLED;
- }
-
- if (strcasecmp(cmdname, "reset.input.minmax") == 0) {
- ivolt_min = INT_MAX;
- ivolt_max = -1;
-
- dstate_setinfo("input.voltage.minimum", "%.1f", ivolt_min);
- dstate_setinfo("input.voltage.maximum", "%.1f", ivolt_max);
-
- upslogx(LOG_INFO, "Resetting minimum and maximum input voltage values.");
-
- return STAT_INSTCMD_HANDLED;
- }
-
- upslogx(LOG_NOTICE, "instcmd: unknown command [%s]", cmdname);
-
- return STAT_INSTCMD_UNKNOWN;
-}
-
-
-int setvar(const char *varname, const char *val)
-{
- int delay;
-
- if (sscanf(val, "%d", &delay) != 1) {
- return STAT_SET_UNKNOWN;
- }
-
- if (strcasecmp(varname, "ups.delay.start") == 0) {
- delay = CLAMP(delay, 0, MAX_START_DELAY);
- start_delay = delay;
- dstate_setinfo( "ups.delay.start", "%d", delay);
-
- dstate_dataok();
-
- return STAT_SET_HANDLED;
- }
-
- if (strcasecmp(varname, "ups.delay.shutdown") == 0) {
- delay = CLAMP(delay, 0, MAX_SHUTDOWN_DELAY);
- shutdown_delay = delay;
- dstate_setinfo( "ups.delay.shutdown", "%d", delay);
-
- dstate_dataok();
-
- return STAT_SET_HANDLED;
- }
-
- return STAT_SET_UNKNOWN;
-}
-
-
-void upsdrv_help(void)
-{
-}
-
-
-void upsdrv_makevartable(void)
-{
-}
-
-
-void upsdrv_banner(void)
-{
- printf("Network UPS Tools - Mustek PowerMust UPS driver %s (%s)\n", DRV_VERSION, UPS_VERSION);
- printf("Carlos Rodrigues (c) 2003, 2004\n\n");
-}
-
-
-void upsdrv_initups(void)
-{
- upsfd = ser_open(device_path);
- ser_set_speed(upsfd, device_path, B2400);
-}
-
-
-void upsdrv_cleanup(void)
-{
- ser_close(upsfd, device_path);
-}
-
-
-/* EOF - powermust.c */
diff -ruN nut.orig/drivers/powermust.h nut/drivers/powermust.h
--- nut.orig/drivers/powermust.h 2005-09-12 13:38:35.000000000 +0100
+++ nut/drivers/powermust.h 1970-01-01 01:00:00.000000000 +0100
@@ -1,24 +0,0 @@
-/* -*- mode: c; c-basic-offset: 8; indent-tabs-mode: t; -*-
- *
- * powermust.h: support for Mustek (and others) models
- *
- * Copyright (C) 2003, 2004 Carlos Rodrigues <carlos.efr at mail.telepac.pt>
- *
- * powermust.c created on 4/10/2003
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
- */
-
-#define DRV_VERSION "1.1"
diff -ruN nut.orig/man/Makefile.in nut/man/Makefile.in
--- nut.orig/man/Makefile.in 2005-10-22 20:41:18.000000000 +0100
+++ nut/man/Makefile.in 2005-10-22 21:30:14.000000000 +0100
@@ -43,7 +43,7 @@
nitram.8 \
oneac.8 \
powercom.8 \
- powermust.8 \
+ megatec.8 \
safenet.8 \
sms.8 \
solis.8 \
diff -ruN nut.orig/man/megatec.8 nut/man/megatec.8
--- nut.orig/man/megatec.8 1970-01-01 01:00:00.000000000 +0100
+++ nut/man/megatec.8 2005-10-22 22:17:00.000000000 +0100
@@ -0,0 +1,86 @@
+.TH MEGATEC 8 "Fri May 14 2004" "" "Network UPS Tools (NUT)"
+.SH NAME
+megatec \(hy Driver for Megatec protocol based UPS equipment
+.SH NOTE
+This man page only documents the hardware\(hyspecific features of the
+megatec driver. For information about the core driver, see
+\fBnutupsdrv\fR(8).
+
+.SH SUPPORTED HARDWARE
+The megatec driver is known to work with the following UPSes:
+
+ Mustek PowerMust 400VA Plus
+ Mustek PowerMust 600VA Plus
+ Mustek PowerMust 800VA Pro
+ Mustek PowerMust 1000VA Plus
+ Mustek PowerMust 1400VA Plus
+ Mustek PowerMust 2000VA USB
+ OnLite AQUA 50
+ Square One Power QP 1000
+
+It may also work with other UPSes, but they haven't been tested.
+
+On models with both a serial port (RS-232) and an USB port, only
+the serial port is supported.
+
+.SH EXTRA ARGUMENTS
+
+.IP "mfr=\fIstring\fR"
+
+Optional. Specify the UPS manufacturer name.
+
+.IP "model=\fIstring\fR"
+
+Optional. Specify the UPS model name.
+
+.IP "serial=\fIstring\fR"
+
+Optional. Specify the UPS serial number.
+
+.SH UPS COMMANDS
+
+This driver supports some extra commands (see \fBupscmd\fR(8)):
+
+.IP shutdown.return
+Turn off the load and return when power is back
+
+.IP shutdown.stayoff
+Turn off the load and remain off
+
+.IP shutdown.stop
+Stop a shutdown in progress
+
+.IP load.on
+Turn on the load immediately
+
+.IP load.off
+Turn off the load immediately
+
+.IP reset.input.minmax
+Reset minimum and maximum input voltage status
+
+.SH USER VARIABLES
+
+The behavior of the driver can be controlled by some user definable
+variables (see \fBupsrw\fR(8)):
+
+.IP ups.delay.shutdown
+Interval to wait after shutdown with delay command (seconds)
+
+.IP ups.delay.start
+Interval to wait before (re)starting the load (seconds)
+
+.SH BUGS
+
+No known bugs at the moment.
+
+.SH AUTHOR
+Carlos Rodrigues <carlos.efr at mail.telepac.pt>
+
+.SH SEE ALSO
+
+.SS The core driver:
+\fBnutupsdrv\fR(8)
+
+.SS Internet resources:
+The NUT (Network UPS Tools) home page: http://www.networkupstools.org/
diff -ruN nut.orig/man/powermust.8 nut/man/powermust.8
--- nut.orig/man/powermust.8 2005-05-04 10:36:37.000000000 +0100
+++ nut/man/powermust.8 1970-01-01 01:00:00.000000000 +0100
@@ -1,75 +0,0 @@
-.TH POWERMUST 8 "Fri May 14 2004" "" "Network UPS Tools (NUT)"
-.SH NAME
-powermust \(hy Driver for Mustek PowerMust series UPS equipment
-.SH NOTE
-This man page only documents the hardware\(hyspecific features of the
-powermust driver. For information about the core driver, see
-\fBnutupsdrv\fR(8).
-
-.SH SUPPORTED HARDWARE
-The powermust driver is known to work with the following UPSes:
-
- Mustek PowerMust 400VA Plus (12V)
- Mustek PowerMust 600VA Plus (12V)
- Mustek PowerMust 800VA Pro (12V)
- Mustek PowerMust 1000VA Plus (24V)
- Mustek PowerMust 1400VA Plus (?V)
- Mustek PowerMust 2000VA USB (?V)
- OnLite AQUA 50 (12V)
- Square One Power QP 1000 (?V)
-
-It may also work with other UPSes in the PowerMust series, but they
-haven't been tested.
-
-.SH EXTRA ARGUMENTS
-
-This driver does not support any extra settings in the
-\fBups.conf\fR(5).
-
-.SH UPS COMMANDS
-
-This driver supports some extra commands (see \fBupscmd\fR(8)):
-
-.IP shutdown.return
-Turn off the load and return when power is back
-
-.IP shutdown.stayoff
-Turn off the load and remain off
-
-.IP shutdown.stop
-Stop a shutdown in progress
-
-.IP load.on
-Turn on the load immediately
-
-.IP load.off
-Turn off the load immediately
-
-.IP reset.input.minmax
-Reset minimum and maximum input voltage status
-
-.SH USER VARIABLES
-
-The behavior of the driver can be controlled by some user definable
-variables (see \fBupsrw\fR(8)):
-
-.IP ups.delay.shutdown
-Interval to wait after shutdown with delay command (seconds)
-
-.IP ups.delay.start
-Interval to wait before (re)starting the load (seconds)
-
-.SH BUGS
-
-No known bugs at the moment.
-
-.SH AUTHOR
-Carlos Rodrigues <carlos.efr at mail.telepac.pt>
-
-.SH SEE ALSO
-
-.SS The core driver:
-\fBnutupsdrv\fR(8)
-
-.SS Internet resources:
-The NUT (Network UPS Tools) home page: http://www.networkupstools.org/
diff -ruN nut.orig/packaging/mandriva/nut.spec nut/packaging/mandriva/nut.spec
--- nut.orig/packaging/mandriva/nut.spec 2005-06-23 22:09:22.000000000 +0100
+++ nut/packaging/mandriva/nut.spec 2005-10-22 21:31:36.000000000 +0100
@@ -246,7 +246,7 @@
%{_mandir}/man8/bestfcom.8.bz2
%{_mandir}/man8/metasys.8.bz2
%{_mandir}/man8/mustek.8.bz2
-%{_mandir}/man8/powermust.8.bz2
+%{_mandir}/man8/megatec.8.bz2
%files
%defattr(-,root,root)
diff -ruN nut.orig/packaging/mandriva/nut.spec.in nut/packaging/mandriva/nut.spec.in
--- nut.orig/packaging/mandriva/nut.spec.in 2005-06-23 22:09:22.000000000 +0100
+++ nut/packaging/mandriva/nut.spec.in 2005-10-22 21:31:38.000000000 +0100
@@ -247,7 +247,7 @@
%{_mandir}/man8/bestfcom.8.bz2
%{_mandir}/man8/metasys.8.bz2
%{_mandir}/man8/mustek.8.bz2
-%{_mandir}/man8/powermust.8.bz2
+%{_mandir}/man8/megatec.8.bz2
%files
%defattr(-,root,root)
diff -ruN nut.orig/README nut/README
--- nut.orig/README 2005-10-22 20:41:16.000000000 +0100
+++ nut/README 2005-10-22 21:26:47.000000000 +0100
@@ -294,6 +294,9 @@
mustek - Mustek UPS hardware
+ megatec - Megatec protocol based UPSes (Mustek Powermust,
+ OnLite 50, Maxxtro units, etc.)
+
newhidups - Experimental Meta driver for USB HID UPSes
on various platforms (will replace hidups
in the future)
@@ -316,8 +319,6 @@
- Advice Partner/King PR750
- Socomec Sicon Egys 420 VA
- powermust - Mustek Powermust (and OnLite 50) units
-
safenet - Units typically bundled with Safenet software:
- Ever-Power UF 010C2EJA
More information about the Nut-upsdev
mailing list