search for: upslogx

Displaying 20 results from an estimated 74 matches for "upslogx".

Did you mean: upslog
2007 Feb 01
2
Re: [Nut-upsuser] Ablerex 625L USB version
...ret = comm->recv(buffer, RECV_BUFFER_LEN, ENDCHAR, IGNCHARS); > if (ret < Q1_CMD_REPLY_LEN) { > upsdebugx(1, "UPS doesn't return any information > about its status."); > *************** > *** 564,571 **** > { > upslogx(LOG_INFO, "Shutting down UPS immediately."); > > ! ser_send_pace(upsfd, SEND_PACE, "C%c", ENDCHAR); > ! ser_send_pace(upsfd, SEND_PACE, "S%02dR%04d%c", > shutdown_delay, start_delay, ENDCHAR); > } > > > --- 569,576 ---- >...
2007 Jan 12
2
Makefiles driving me NUTs
I want to use upsdebugx, upslogx in 'clients/upsclient.c', however this fails with the following error messages (I trimmed the path to the build directory to <path> in order to prevent line wrapping): <path>/clients/upsclient.c:941: undefined reference to `upsdebugx' <path>/clients/upsclient.c:910: u...
2013 Oct 25
1
Shutdown problem with Mecer 1000VA Online UPS
...is sent, and not a 'operation not permitted' error. In any case, this is actually considered to be a success by the code. This is not right. Code as follows: 418 /* 419 * If a command is invalid, it will be echoed back 420 */ 421 if (blazer_command(buf, buf, sizeof(buf)) > 0) { 422 upslogx(LOG_ERR, "instcmd: command [%s] failed", cmdname); 423 return STAT_INSTCMD_FAILED; 424 } 425 426 upslogx(LOG_INFO, "instcmd: command [%s] handled", cmdname); 427 return STAT_INSTCMD_HANDLED; As far as I understand the code line 421 tries to test for a 'comms failure' (...
2013 Dec 05
0
Plea for a more loquacious nut
...many many years ago, and its based on this "experience" that I'm guessing that in upssched.c function exec_cmd the code > > snprintf(buf, sizeof(buf), "%s %s", cmdscript, cmd); > err = system(buf); > if (WIFEXITED(err)) { > if (WEXITSTATUS(err)) { > upslogx(LOG_INFO, "exec_cmd(%s) returned %d", buf, WEXITSTATUS(err)); > } > > attempts to send a command to the operating system, possibly to execute a Bash script. If system(buf) fails, the tests block the error message. Surely the error message is essential. An unattended box is no...
2007 Nov 20
2
Mustek Powermust 600VA
Hi, I'm having a hard time configuring a Mustek Powermust 600VA ups to work via USB with nut. I read somewhere that nut works OK via the rs232 cable, but unfortunately I don't have a COM port in my computer. The kernel detects the ups as an Xbox pad :) and loads the xpad module. I tried running /lib/nut/megatec with different /dev/ttySx but it displays megatec protocol UPS was not
2009 Jan 29
1
Fwd: upscode2.c
...rrect person, but I was wanting to submit a bug report for the upscode2.c driver but could not find a way to do that from the NUT website. Here is the problem code and what I have noticed in upscode2.c: void upsdrv_shutdown(void) { if (can_upsd && can_uppc) { upslogx(LOG_EMERG, "Emergency shutdown"); upscsend("UPSD"); /* Set shutdown delay */ upscsend("1"); /* 1 second (lowest possible. 0 returns current.*/ upslogx(LOG_EMERG, "Shutting down...");...
2013 Dec 04
5
Plea for a more loquacious nut
...to a class exercise many many years ago, and its based on this "experience" that I'm guessing that in upssched.c function exec_cmd the code snprintf(buf, sizeof(buf), "%s %s", cmdscript, cmd); err = system(buf); if (WIFEXITED(err)) { if (WEXITSTATUS(err)) { upslogx(LOG_INFO, "exec_cmd(%s) returned %d", buf, WEXITSTATUS(err)); } attempts to send a command to the operating system, possibly to execute a Bash script. If system(buf) fails, the tests block the error message. Surely the error message is essential. An unattended box is now in an eme...
2013 Oct 24
0
Shutdown problem with Mecer 1000VA Online UPS
Hi Johan, The driver is expecting either 'ACK' or no reply at all in case of success and the command itself echoed back in case of errors. On the other hand, your UPS replies '(ACK' in case of success and '(NAK' on failure. So.. when the driver first tries to stop pending shutdowns and you get the 'operation not permitted' error, the driver interprets it as a
2013 Jul 03
1
bcmxcp: Patch for adding ups.load and battery.voltage.low
On Jul 2, 2013, at 5:16 PM, Kjell Claesson wrote: >> I hope other people can also test this. >> >> Regards >> Alf Hogemark > > Due to some crashes on the disks and lack of time I don't have the git on the > pc now. But maybe some other can commit this. I'd like to ask people to specifically try the bcmxcp branch on GitHub - it includes some changes
2013 Aug 11
1
N-Power MEV-3000LT compatibility report and problem
Hello, the code below the failing part mentions this flavor of protocol, drivers/blazer_ser.c:463 /* * If a command is invalid, it will be echoed back. * As an exception, Best UPS units will report "ACK" in case of success! */ I prepared a patch, it adds a similar check and also checks (in both occurencies) for blazer_command()<0, the latter
2011 Aug 27
1
[PATCH 1/3] Fix file descriptor leak
...5 +++++ 1 files changed, 5 insertions(+), 0 deletions(-) diff --git a/common/common.c b/common/common.c index f443cb7..e8004d7 100644 --- a/common/common.c +++ b/common/common.c @@ -244,6 +244,7 @@ int sendsignalfn(const char *pidfn, int sig) if (fgets(buf, sizeof(buf), pidf) == NULL) { upslogx(LOG_NOTICE, "Failed to read pid from %s", pidfn); + fclose(pidf); return -1; } @@ -251,6 +252,7 @@ int sendsignalfn(const char *pidfn, int sig) if (pid < 2) { upslogx(LOG_NOTICE, "Ignoring invalid pid number %d", pid); + fclose(pidf); return -1; } @@ -...
2013 Oct 24
2
Shutdown problem with Mecer 1000VA Online UPS
Hi, There seems to be a problem turning of the inverter on a Mecer online 1000VA UPS. OS: Debian Wheezy Nut: Installed via apt - version 2.6.4-2.3 Debug output from driver. root at proxmox1:~# /lib/nut/blazer_usb -DDDDD -a mecer -k Network UPS Tools - Megatec/Q1 protocol USB driver 0.08 (2.6.4) 0.000000 send_to_all: SETINFO driver.parameter.port "auto" 0.000023
2008 Jul 10
2
[PATCH] tripplite driver updates
...nput.frequency", "%02.2f", freq); status_init(); /* Battery Voltage Condition */ - switch (buf[0]) { + switch (bcond) { case '0': /* Low Battery */ status_set("LB"); break; case '1': /* Normal */ break; default: /* Unknown */ - upslogx(LOG_ERR, "Unknown battery state: %c", buf[0]); + upslogx(LOG_ERR, "Unknown battery state: %c", bcond); break; } /* Load State */ - switch (buf[1]) { + switch (lstate) { case '0': /* Overload */ status_set("OVER"); break; case '1...
2006 Dec 05
3
megatec over USB - new driver patch
...s."); @@ -468,7 +462,7 @@ upsh.setvar = setvar; /* clean up a possible shutdown in progress */ - ser_send_pace(upsfd, SEND_PACE, "C%c", ENDCHAR); + comm->send("C%c", ENDCHAR); upsdebugx(1, "Done setting up the UPS."); } @@ -561,16 +555,16 @@ { upslogx(LOG_INFO, "Shutting down UPS immediately."); - ser_send_pace(upsfd, SEND_PACE, "C%c", ENDCHAR); - ser_send_pace(upsfd, SEND_PACE, "S00R%04d%c", start_delay, ENDCHAR); + comm->send("C%c", ENDCHAR); + comm->send("S00R%04d%c", start_delay, ENDC...
2006 Oct 11
2
Adding TrippLite SMART550 / Protocol 2001 Support
...UNKNOWN = 0, TRIPP_LITE_OMNIVS, TRIPP_LITE_SMARTPRO } +static enum tl_model_t { TRIPP_LITE_UNKNOWN = 0, TRIPP_LITE_OMNIVS, TRIPP_LITE_OMNIVS2, +TRIPP_LITE_SMARTPRO} tl_model = TRIPP_LITE_UNKNOWN; /*!@brief If a character is not printable, return a dot. */ @@ -387,6 +388,9 @@ case 0x1001: upslogx(3, "Using OMNIVS protocol (%x)", proto); return TRIPP_LITE_OMNIVS; + case 0x2001: + upslogx(3, "Using OMNIVS2 protocol (%x)", proto); + return TRIPP_LITE_OMNIVS2; case 0x3003: upslogx(3, "Using SMARTPRO protocol (%x)", proto); return TRIPP_LITE_SMAR...
2006 Jun 09
0
Cleaned up belkinunv diff
...is now back in upsdrv_shutdown() at the end and now looks like this: upsdrv_shutdown() /* decide if we're in waitonshutdown and set wos=1 if we are ... */ if (wos) { /* waitonshutdown: prepare things for going into belkin_wait() ... */ belkin_wait() upslogx(LOG_WARNING, " belkinunv: WARNING: An error occurred in wait mode. Falling back to the original behaviour."); } else { upslogx(LOG_WARNING, "belkinunv: WARNING: You are using the -k option, which is broken for this driver."); } upslogx(LOG_WARNING, "Sh...
2009 Jul 10
1
PowerWare USB debug messages
...o all of the calls in nut_usb.c? diff --git a/drivers/nut_usb.c b/drivers/nut_usb.c index 494a1fa..4ca2691 100644 --- a/drivers/nut_usb.c +++ b/drivers/nut_usb.c @@ -165,8 +165,8 @@ usb_dev_handle *nutusb_open(const char *port) if (usb_clear_halt(dev_h, 0x81) < 0) { - upslogx(LOG_ERR, "Can't reset POWERWARE USB endpoint"); - goto errout; + upslogx(LOG_ERR, "Can't reset POWERWARE USB endpoint: %s", usb_strerror()); + /* goto errout; */ } return dev_h; -- - Charles Lepple
2010 Mar 03
1
using upscode2 driver with Powerware 5119 RM
...down messages so the ups.delay.* values are reported. With all that, here's what upsdrv_shutdown looks like: void upsdrv_shutdown(void) { if (upsc_commandlist()) { if (!can_upsd || !can_uppc) { fatalx(LOG_EMERG, "Shutdown called, but UPS does not support it"); } } else { upslogx(LOG_EMERG, "Can't determine if shutdown is supported, attempting anyway"); } upslogx(LOG_EMERG, "Emergency shutdown"); char msg[100]; snprintf(msg, 100, "UPS will reboot %ld seconds after shutdown", strtol(dstate_getinfo("ups.delay.reboot"),NULL,1...
2007 May 13
0
No subject
...nel driver from USB device..."); + } + + upsdebugx(2, "trying again to claim USB device..."); + } + + if (dev_claimed == 0) + dev_claimed = 1; +#else if (usb_set_configuration(dev_h, 1) < 0) { upslogx(LOG_ERR, "Can't set POWERWARE USB configuration"); goto errout; } +#endif if (usb_claim_interface(dev_h, 0) < 0) { =================================================================== sweex_usb.c: =============================================...
2007 May 13
0
No subject
...ernel driver from USB device..."); + } + + upsdebugx(2, "trying again to claim USB device..."); + } + + if (dev_claimed == 0) + dev_claimed = 1; +#else if (usb_set_configuration(dev_h, 1) < 0) { upslogx(LOG_ERR, "Can't set POWERWARE USB configuration"); goto errout; } +#endif if (usb_claim_interface(dev_h, 0) < 0) - Show quoted text - { =================================================================== sweex_usb.c: ===========================...