search for: dstate_datastale

Displaying 20 results from an estimated 23 matches for "dstate_datastale".

2008 Jul 10
2
[PATCH] tripplite driver updates
...har buf[256]; - int bp; - float bv; + int bp, volt, temp, load, vmax, vmin, stest, len; + int bcond, lstate, tstate, mode; + float bv, freq; + + len = send_cmd(":D\r", buf, sizeof buf); + if (len != 21) { + ser_comm_fail("Data command failed: [%d] bytes != 21 bytes.", len); + dstate_datastale(); + return; + } + + volt = hex2d(buf + 2, 2); + temp = (int)(hex2d(buf + 6, 2)*0.3636 - 21.0); + load = hex2d(buf + 12, 2); + freq = hex2d(buf + 18, 3) / 10.0; + bcond = buf[0]; + lstate = buf[1]; + tstate = buf[4]; + mode = buf[5]; + if (volt > INVOLT_MAX || volt < INVOLT_MIN || + temp &...
2007 Jun 26
2
[nut-commits] svn commit r988 - in trunk: . docs
> Author: adkorte-guest > Date: Mon Jun 25 19:26:09 2007 > New Revision: 988 > > Log: > Update to reflect changes in the way we deal with dstate_dataok() and > dstate_datastale(). > > Historically it was needed to call dstate_dataok() regularly, to prevent > staleness warnings. This is no longer needed, now the server will PING > drivers it has not heard of recently. If they answer with PONG, they won't > be flagged stale anymore, no matter how long ago...
2007 Jun 21
2
[nut-commits] svn commit r971 - in trunk: . drivers
...=========================="); > upsdebugx(2, "= device has been disconnected, try to reconnect ="); > @@ -1001,8 +1001,12 @@ > udev = NULL; > #endif > > - if ((hd = HIDOpenDevice(&udev, &curDevice, reopen_matcher, > MODE_REOPEN)) == NULL) > - dstate_datastale(); > + if ((hd = HIDOpenDevice(&udev, &curDevice, reopen_matcher, > MODE_REOPEN)) == NULL) { > + dstate_datastale(); > + > + /* Wait a bit before retrying... */ > + sleep(5); > + } > } > } > > > _______________________________________________ &...
2007 Feb 07
2
some megatec-usb issues
Hi All, I've finally found solutions for my previous problems. But since this includes changes in the shared files, I'd like to discuss them here. 1. Driver restart problem. When I start the driver for the first time, everything is ok. But when I want to restart it, problems begin. The driver fails to read Report descriptor for the second time (libusb_open is used to open the device).
2006 Oct 11
2
Adding TrippLite SMART550 / Protocol 2001 Support
...y state unknown"); */ + break; + case '5': + status_set("OVER"); + dstate_setinfo("battery.test.status", "Battery fail - overcurrent?"); + break; + default: + upslogx(LOG_ERR, "Unknown value for s[2]: 0x%02x", s_value[2]); + dstate_datastale(); + break; + } + + /* Online/on battery: */ + if(s_value[4] & 1) { + status_set("OB"); + } else { + status_set("OL"); + } + } + if(tl_model == TRIPP_LITE_SMARTPRO) { switch(s_value[2]) { case '0': @@ -949,7 +991,7 @@ status_commit(); - if(...
2006 May 12
1
Fwd: RE New xanto driver for NUT
Dear Andreas, some googling revealed, you created a driver for the xanto series of online-usv.de. In what state it is currently? I've to manage a S2000 and would like to use nut for it, is it usable by now? Do you need another tester? TIA, Pete
2008 Aug 06
1
possible regression in genericups with Tripplite UPS
reported through launchpad: https://bugs.launchpad.net/bugs/253999 the possible regression is between nut 2.0.1 (sarge) and 2.2.1 (confirmed Jamie?) @Arjen: it may be related to some of your changes there... @Jamie: we'll need some debug output from the drivers (-DDD) Arnaud
2005 Oct 09
1
The latest newhidups changes
...g/drivers/al175.c nut-2.1.dev/drivers/al175.c --- nut-2.1.dev.orig/drivers/al175.c 2005-10-08 17:39:02.000000000 -0400 +++ nut-2.1.dev/drivers/al175.c 2005-10-09 12:55:50.000000000 -0400 @@ -1087,11 +1087,11 @@ err = al175_read(x ## reg, 0x ## reg, sizeof(x ## reg)); \ if (err==-1) { \ dstate_datastale(); \ -/* goto out; \ */ alarm(0); \ return; \ } \ } while (0) +/* goto out; \ */ RECV(4000); RECV(4048); ----------------------------------------------------------------------------- -- -------------------------------------------------------------...
2006 Jan 26
0
Suspend-to-disk & NUT (solved?)
...estarting the driver or upsmon did not help, only a restart of upsd did. The attached patch will also solve this, although I'm still not really sure why or whether this will create too much load on the upsd process by not only signalling the changes in dstate, but every time dstate_dataok() or dstate_datastale() is called. Regards, Arjen -------------- next part -------------- A non-text attachment was scrubbed... Name: dstate.diff Type: text/x-patch Size: 454 bytes Desc: not available Url : http://lists.alioth.debian.org/pipermail/nut-upsdev/attachments/20060126/60c29014/dstate.bin
2006 Jan 27
0
Suspend-to-disk & NUT (solved!)
I finally nailed down the problem with upsd declaring data stale when resuming from suspend. The problem is two fold (not surprisingly): 1) The dstate_dataok() and dstate_datastale() routines in 'drivers/dstate.c' will only 'broadcast' *changes* in the driver state. Since the driver has no notion of time, it won't notice at all that it was suspended. Therefor, after resuming it is business as usual for the driver and it won't broadcast any state change...
2007 May 23
2
Bogus "UPS not available" messages
Belkin F6C1200-UNV on Ubuntu 7.04, megatec_usb driver, Every few minutes I get a beep and a "UPS not available" message that seems to be bogus; upsc reports real data, not at complaint that it's stale. Is there some timeout I need to lengthen? Also, shouldn't upsc report the poll time associated with the data it displays? -- >>esr>>
2007 Jan 27
2
"no longer stale" when disconnected with 2.0.5 newhidups
Hello, I'm using driver newhidups with APC Back-UPS CS 500. Most things works fine except the following: After I disconnect the UPS the upsd write "Data for UPS [apc] is stale - check driver" in /var/log/messages. In the same second it tells "UPS [apc] data is no longer stale". This repeats all the time the ups is disconnected: Jan 25 14:45:03 degpn026w226 kernel: usb
2007 May 13
0
No subject
...id upsdrv_updateinfo(void) { unsigned char reply[REPLY_PACKETSIZE]; int ret, online, battery_normal; unsigned char test; ret = query_ups(reply); if (ret < 0) { upslog_with_errno(LOG_INFO, "Query to UPS failed"); dstate_datastale(); return; } /* * 3rd bit of 4th byte indicates whether the UPS is on line (1) * or on battery (0) */ online = (reply[3]&4)>>2; /* * 2nd bit of 4th byte indicates battery status; normal (1) * or...
2007 May 13
0
No subject
...; } void upsdrv_updateinfo(void) { unsigned char reply[REPLY_PACKETSIZE]; int ret, online, battery_normal; unsigned char test; ret = query_ups(reply); if (ret < 0) { upslog_with_errno(LOG_INFO, "Query to UPS failed"); dstate_datastale(); return; } /* * 3rd bit of 4th byte indicates whether the UPS is on line (1) * or on battery (0) */ online = (reply[3]&4)>>2; /* * 2nd bit of 4th byte indicates battery status; normal (1) * or low (0)...
2007 May 13
0
No subject
...; } void upsdrv_updateinfo(void) { unsigned char reply[REPLY_PACKETSIZE]; int ret, online, battery_normal; unsigned char test; ret = query_ups(reply); if (ret < 0) { upslog_with_errno(LOG_INFO, "Query to UPS failed"); dstate_datastale(); return; } /* * 3rd bit of 4th byte indicates whether the UPS is on line (1) * or on battery (0) */ online = (reply[3]&4)>>2; /* * 2nd bit of 4th byte indicates battery status; normal (1) * or low (0)...
2008 Nov 30
4
Sweex 1000VA UPS (Lakeview Research)
Hi all, i've read a thread about this UPS from Peter van Valderen. He tried to develop a driver for this specific type of UPS. I've downloaded nut-2.2.2 and tried to apply the patches (lakeview.patch & lakeview.v2.patch) but both resulted in rejected chunks. I've tried to ./configure with type lakeview and then a make, but the make command fails. Does anybody has any
2007 Aug 23
1
[nut-commits] svn commit r1073 - in trunk: . drivers
...; > - if ((hd = HIDOpenDevice(&udev, &curDevice, reopen_matcher, MODE_REOPEN)) == NULL) { > + if ((hd = HIDOpenDevice(&udev, &curDevice, reopen_matcher, &mode)) == NULL) { > upslogx(LOG_INFO, "Reconnecting to UPS failed; will retry later..."); > dstate_datastale(); > ret = 0; > @@ -1369,9 +1370,9 @@ > regex_array[4] = getval("serial"); /* probably won't see this */ > regex_array[5] = getval("bus"); > > - r = new_regex_matcher(&regex_matcher, regex_array, REG_ICASE | REG_EXTENDED); > + r = HIDNewReg...
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 Aug 14
2
Bestfortress driver, network serial patch for nut-2.0
...ed, so just set them to zero when missing. */ len = strlen(temp+2); temp[0] = '0'; temp[1] = '0'; p = temp+2; if (len == 78) p = temp; else if (len != 80) checksum_ok = 0; if (checksum_ok) break; sleep(SER_WAIT_SEC); } if (!checksum_ok) { dstate_datastale(); return; } //upslogx(LOG_INFO, "updateinfo: %s", p); setinfo_int ("input.voltage", p+24,4); setinfo_int ("output.voltage", p+28,4); setinfo_float ("battery.voltage", "%.1f", p+50,4, 0.1); setinfo_float ("output.current", "...
2008 Aug 11
5
Tripplite OMNIVS1500 Woes
Hello All, This is my first post to the list & I have tried to do as much searching and debugging on my own as I can bear. Please HELP! I am currently using up to date Centos 5.2 32-bit - kernel version: 2.6.18-92.1.10.el5PAE #1 SMP. I am using a Tripplite OMNIVS1500 via usb connection. I am using the tripplite_usb driver. I have tried to user versions 2.2.0 from an rpm, 2.2.2 & and the