search for: mge_command

Displaying 4 results from an estimated 4 matches for "mge_command".

Did you mean: mdm_command
2010 May 16
1
MGE-UTALK regression since nut-server-2.2.2
....html Here are results of my tests (differences are in *red*): Results of nut-server v2.4.1 [root at xxx ups]# mge-utalk -DDDDDDDD -a pex10 Network UPS Tools - MGE UPS SYSTEMS/U-Talk driver *0.89 (2.4.1)* send_to_all: SETINFO driver.parameter.port "/dev/ttyS0" debug level is '8' mge_command: sending [S] mge_command: sending [i] mge_command: sending [0D] mge_command: sending [0A] mge_command: *received 0 byte(s)* send_to_all: SETINFO ups.mfr "MGE UPS SYSTEMS" send_to_all: SETINFO driver.version.internal "0.89" mge_command: sending [S] mge_command: sending [i] mge_co...
2005 Dec 19
1
MGE Pulsar ES 8+
...iting cleaning up As you can see, the driver said that the 'Si 1' command is unavailable and it can't get the output of the Syst Stat ('Ss') command. Playing with the source code, I found that with a small wait before the command is sent, the driver works better: static int mge_command(char *reply, int replylen, const char *fmt, ...) { const char *p; char command[BUFFLEN]; int bytes_sent = 0; int bytes_rcvd = 0; int ret; va_list ap; /* wait */ usleep(100000); ... ... ... } [root@srv01 ~]# /home/rog/src/nut...
2011 Oct 03
2
patch: Replace many usleep and some sleep calls with nanosleep
...alk.c 2011-05-31 13:36:49.000000000 +0300 +++ b/drivers/mge-utalk.c 2011-08-17 03:26:12.000000000 +0300 @@ -89,7 +89,7 @@ upsdrv_info_t upsdrv_info = { #define MGE_REPLY_DELAY 1000 /* delay after enable_ups_comm */ -#define MGE_CONNECT_DELAY 500000 +#define MGE_CONNECT_DELAY 500e6 #define MGE_COMMAND_ENDCHAR "\r\n" /* some UPS need \r and \n */ #define MGE_REPLY_ENDCHAR '\r' @@ -644,7 +644,7 @@ static void disable_ups_comm(void) { upsdebugx(1, "disable_ups_comm()"); ser_flush_in(upsfd, "?\r\n", 0); - usleep(MGE_CONNECT_DELAY); + struct timespec de...
2011 Aug 27
1
[PATCH 2/3] Fix use of uninitialized variable
...-utalk.c index c6114c7..616e2ad 100644 --- a/drivers/mge-utalk.c +++ b/drivers/mge-utalk.c @@ -465,7 +465,8 @@ void upsdrv_shutdown(void) { char buf[BUFFLEN]; /* static time_t lastcmd = 0; */ - + memset(buf, 0, sizeof(buf)); + if (sdtype == SD_RETURN) { /* enable automatic restart */ mge_command(buf, sizeof(buf), "Sx 5"); -- 1.7.4.4