search for: ser_send_pace

Displaying 20 results from an estimated 21 matches for "ser_send_pace".

2009 Jun 17
2
nut: megatec_usb shows error "ser_send_pace: Device detached" on periodically checks
...start: 2 > ups.load: 20.0 > ups.mfr: > ups.model: VT0105BG > ups.serial: unknown > ups.status: OL > ups.temperature: 30.0 > ups.type: standby > > > > But in /var/log/syslog I see the errors that adds every 5-20 seconds! > Jun 15 13:58:12 beam megatec_usb[15480]: ser_send_pace: Device detached? > (error -5: could not claim interface 0: Device or resource busy) > Jun 15 13:58:13 beam megatec_usb[15480]: Successfully reconnected > Jun 15 13:58:32 beam megatec_usb[15480]: ser_send_pace: Device detached? > (error -5: could not claim interface 0: Device or resourc...
2007 Feb 01
2
Re: [Nut-upsuser] Ablerex 625L USB version
...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 ---- > { > upslogx(LOG_INFO, "Shutting down UPS immediately."); > &...
2006 Dec 05
3
megatec over USB - new driver patch
...n) : (((x) > (max)) ? (max) : (x))) - static float batt_charge_pct(float battvolt) { float value; @@ -178,15 +173,14 @@ return value * 100; } - static int check_ups(void) { char buffer[RECV_BUFFER_LEN]; int ret; upsdebugx(2, "Sending \"F\" command..."); - ser_send_pace(upsfd, SEND_PACE, "F%c", ENDCHAR); - ret = ser_get_line(upsfd, buffer, RECV_BUFFER_LEN, ENDCHAR, IGNCHARS, READ_TIMEOUT, 0); + comm->send("F%c", ENDCHAR); + ret = comm->recv(buffer, RECV_BUFFER_LEN, ENDCHAR, IGNCHARS); if (ret < F_CMD_REPLY_LEN) { upsdebugx(2, &quo...
2010 Nov 18
1
Mustek PowerMust 600 USB on Gentoo
...1.6 (2.4.3) Serial-over-USB transport layer 0.10 libusb_get_interrupt: error sending control message: Operation not permitted libusb_get_interrupt: error submitting URB: Device or resource busy Megatec protocol UPS detected. libusb_set_report: error sending control message: Device or resource busy ser_send_pace: Device detached? (error -1: error sending control message: Device or resource busy) Successfully reconnected libusb_get_interrupt: could not claim interface 0: Device or resource busy libusb_get_interrupt: error submitting URB: Device or resource busy libusb_get_interrupt: error submitting URB: De...
2008 Dec 05
2
Mustek PowerMust 848
Hi, I'm not the maintainter for the "megatec_usb" driver (in fact, I'm no longer maintainer for the base "megatec" either), so I don't really know the status for that particular UPS. I'm forwarding this to the NUT mailing-list though. Regards, -- Carlos Rodrigues On Fri, Dec 5, 2008 at 10:30 AM, Adrian Czerniak <adrian.czerniak at becomo.com> wrote:
2008 Dec 05
2
Mustek PowerMust 848
Hi, I'm not the maintainter for the "megatec_usb" driver (in fact, I'm no longer maintainer for the base "megatec" either), so I don't really know the status for that particular UPS. I'm forwarding this to the NUT mailing-list though. Regards, -- Carlos Rodrigues On Fri, Dec 5, 2008 at 10:30 AM, Adrian Czerniak <adrian.czerniak at becomo.com> wrote:
2010 Oct 13
2
ups nut-2.4.x bug. driver megatec forceshutdown may dont work.
2010/10/13 Vitaly Lavrov > I found bug in nut/drivers/megatec.c - force shutdown may dont work. > See patch. > could you please give a try to blazer, since it is set to replace megatec with 2.6.0. Arjen will quite probably comment on your patch usefulness within the blazer scope. thanks for your contrib. cheers, Arnaud -- Linux / Unix Expert R&D - Eaton -
2008 Sep 24
2
[PATCH] disable nonblocking mode on serial port
...ing with -EAGAIN. The attached patch disabled nonblocking mode on the serial port and now it works fine. Is there a reason the port was put in non-blocking mode? There's no code I could find to deal with the inevitable -EAGAIN that you'd receive on writes. Maybe the delays introduced by ser_send_pace are why it might work for some people? -jim --- nut-2.2.2/drivers/serial.c 2007-09-09 15:33:15.000000000 -0400 +++ nut-2.2.2-jim/drivers/serial.c 2008-09-24 16:55:32.000000000 -0400 @@ -133,12 +133,19 @@ int ser_open(const char *port) { int fd; + int flags; fd = open(port, O_RDWR | O_NOCT...
2011 Mar 05
19
[RFC apcsmart V3 00/18] apcsmart driver updates
Sorry for a bit longer delay than I anticipated, I was stuffed with the work. This is the next iteration of the patch adding some functionality to apcsmart driver, and relying on 'ignorelb' recently added. Follow up from previous thread: http://www.mail-archive.com/nut-upsdev at lists.alioth.debian.org/msg02331.html Main differences is that V3 is split into many small patches, so the
2008 Jul 13
3
Unitek Alpha 650 ipE
Hello everyone, has anyone ever tried to make this device work with Linux and NUT? This is what udevadm monitor says: UEVENT[1215983089.652345] add /devices/pci0000:00/0000:00:0f.2/usb1/1-1 (usb) UEVENT[1215983089.652427] add /class/usb_endpoint/usbdev1.4_ep00 (usb_endpoint) UEVENT[1215983089.657975] add /devices/pci0000:00/0000:00:0f.2/usb1/1-1/1-1:1.0 (usb) UDEV
2011 Jun 05
0
Dynamix 1000 VA USB and NUT
...ch file for nut-server 2.4.3. My /etc/ups/ups.conf configuration is: [myups] driver = megatec_usb port = auto desc = "My UPS" vendorid = 0001 productid = 0000 subdriver = krauler With this, I get messages like: "Jun 5 20:27:31 wizards megatec_usb[28806]: ser_send_pace: Device detached? (error -5: error sending control message: Broken pipe) Jun 5 20:27:31 wizards megatec_usb[28806]: Successfully reconnected" In my logs every minute or two. It does however, seem to work. See output below. --------------------------------------- [root at wizards nelg]# up...
2010 Sep 11
2
Dynamix 650 VA USB UPS
Hi, Has anyone had success with the Dynamix 650VA, that uses the USB cable? I can't get megatec_usb to recognize it, I have tried both stable and development versions. Regards Glen Ogilvie
2007 Jan 23
2
Voltage override in megatec and megatec-over-usb [was: Re: nut-2.0.5 megatec + Online Xanto]
On 1/23/07, Henning Brauer <hb-nut@bsws.de> wrote: > good new first: the megatec driverin 2.0.5 now works with the Online > Xanto S3000R here - well, for the very basics. > > the UPS has NO way ofidentifying itself. It also does not respond to > the power ratings query ("F"). I previously used a hacked up fentonups > driver. This means the driver cannot figure out
2010 Mar 16
1
NUT megatec driver tunning
...I set it to 600000 usec and my problem go. > > May be put ? READ_PACE ? ?to config file ? It's best improvement. > __________________________________________ > > After this lines: > ? ? ? ?upsdebugx(1, "Cancelling any pending shutdown or battery test."); > ? ? ? ?ser_send_pace(upsfd, send_pace, "C%c", ENDCHAR); > need pause (READ_PACE for example) for UPS execute command. My UPS stupid > after 'C' and not accept immediately next command on 'upsdrv_initinfo' > procedure. > I strongly recommend to add its. > ________________________...
2007 Oct 03
2
[nut-commits] svn commit r1136 - in trunk: . drivers
> Author: agordeev-guest > Date: Wed Oct 3 00:09:21 2007 > New Revision: 1136 > > Log: > - drivers/megatec_usb.c: added ability to do subdriver-specific > initialization, and moved some shared code to agiler init function > since krauler doesn't need it. [...] I'm not very thrilled about this patch: 1) Down at the subdriver level, one shouldn't use
2011 Jan 25
1
[RFC] Updates to ACP smart driver
This patch introduces a handful of new options, I mentioned earlier in: http://www.mail-archive.com/nut-upsdev at lists.alioth.debian.org/msg02088.html See the large commit message in the follow-up for the details and rationale. I realize it's a bit larger diff - so if it's required I can split it into few smaller ones. Michal Soltys (1): APC smart driver update and new features.
2008 Feb 07
1
Megatec serial UPS woes
Hi! This is the weirdest problem I have found for a long time! Using nut-2.0.5 and a Gentoo powered HP Proliant ML350 I setup the config files just the same as I always do and tried to get the megatec driver chatting to the UPS. It worked fine on a Windoze server with Upsilon2000 so I have a bit of confidence in cable etc! When I ran upsc after starting upsd to complained about stale data! Most
2011 Feb 07
4
[PATCH/RFC v2 0/3] Updates to ACP smart driver
This is 2nd version of the earlier patch featuring a few new features and fixes to the apcsmart driver, following the remarks in: http://www.mail-archive.com/nut-upsdev at lists.alioth.debian.org/msg02294.html Major changes from v1: - handle battery.charge and battery.runtime checks at main.c level - handle "immutable but writable" conflict gracefully at driver level -
2009 Aug 14
2
Bestfortress driver, network serial patch for nut-2.0
...ouble)atoi (buf)); } static int upssend(const char *fmt,...) { int ret; char buf[1024], *p; va_list ap; unsigned int sent = 0; va_start(ap, fmt); ret = vsnprintf(buf, sizeof(buf), fmt, ap); va_end(ap); if ((ret < 1) || (ret >= (int) sizeof(buf))) upslogx(LOG_WARNING, "ser_send_pace: vsnprintf needed more " "than %d bytes", sizeof(buf)); int d_usec = UPSDELAY; for (p = buf; *p; p++) { if (write(upsfd, p, 1) != 1) return -1; if (d_usec) usleep(d_usec); sent++; } return sent; } static int upsrecv(char *buf,size_t bufsize,char ec,co...
2011 Oct 03
2
patch: Replace many usleep and some sleep calls with nanosleep
...+854,8 @@ static int sdcmd_ATn(int cnt) upsdebugx(1, "Issuing hard hibernate with %d minutes additional wakeup delay", n*6); ser_send_char(upsfd, APC_CMD_GRACEDOWN); - usleep(CMDLONGDELAY); + delay.tv_sec = CMDLONGDELS; delay.tv_nsec = CMDLONGDELNS; + nanosleep(&delay, NULL); ser_send_pace(upsfd, UPSDELAY, "%s", timer); ret = sdok(); @@ -867,7 +869,8 @@ static int sdcmd_ATn(int cnt) * silent (YMMV); */ ser_send_char(upsfd, APC_CMD_GRACEDOWN); - usleep(UPSDELAY); + delay.tv_sec = 0; delay.tv_nsec = UPSDELAY; + nanosleep(&delay, NULL); ser_flush_in(upsfd, IG...