search for: ser_open

Displaying 17 results from an estimated 17 matches for "ser_open".

Did you mean: seq_open
2009 Jul 06
3
Smart-UPS RT 3000 Baud Rate
...found so far. 1. It's a Smart-UPS RT 3000 XL 2. The 940-0095B cable now uses an RJ45 connector at the UPS end. 3. It now requires a baud rate of 9600 instead of the 2400 used previously. Can anyone tell me if modifying drivers/apcsmart.c void upsdrv_initups(void) { char *cable; upsfd = ser_open(device_path); ser_set_speed(upsfd, device_path, B2400); to void upsdrv_initups(void) { char *cable; upsfd = ser_open(device_path); ser_set_speed(upsfd, device_path, B9600); all that is required in order to get nut to talk to it, or will other things need changing? Regards, Richard
2007 Oct 03
2
[nut-commits] svn commit r1136 - in trunk: . drivers
...ta_agiler(). Hopping back-and-forth between various layers in the code is bad coding style as it makes the code difficult to understand. 2) So what is the benefit of this patch? It seem to try to optimize something away that complicates the subdrivers and really provides no runtime advantages (the ser_open() function is only run once). 3) Something you're probably not responsible for, but if flushing the input buffers is needed, this is something that should be done in main driver body (megatec.c). The driver doesn't flush I/O buffers, so the implementation of the Megatec protocol is apparen...
2015 Nov 16
2
Contact-closure UPS
Hi Charles, >----- Original Message ----- >From: "Charles Lepple" <clepple at gmail.com> >To: "R?bert SZAKSZ" <robert at szaksz.eu> >Cc: nut-upsuser at lists.alioth.debian.org >Sent: Monday, November 16, 2015 3:20:17 PM >Subject: Re: [Nut-upsuser] Contact-closure UPS > >[please use reply-all when responding - the list does not modify the
2009 Aug 14
2
Bestfortress driver, network serial patch for nut-2.0
...etval("baudrate"); char * max_load = getval("max_load"); if (max_load) maxload = atoi(max_load); if (speed_val) { int i; for (i=0; speed_table[i].val; i++) { if (strcmp (speed_val, speed_table[i].val) == 0) break; } speed = speed_table[i].speed; } upsfd = ser_open(device_path); ser_set_speed(upsfd, device_path, speed); /* TODO: probe ups type */ /* the upsh handlers can't be done here, as they get initialized * shortly after upsdrv_initups returns to main. */ } void upsdrv_cleanup(void) { } -------------- next part -------------- --- ./drivers/...
2015 Apr 01
2
mge-shut driver fails almost after every reboot
Hello all, OS name: FreeNAS 9.3 NUT version: 2.7.2 NUT installed method: Bundled with FreenNAS 9.3 Device: EATON 5SC 1000 (http://powerquality.eaton.com/Products-services/Backup-Power-UPS/5SC.aspx?cx=5&wtredirect=www.eaton.com/5SC&GUID=B81251A4-F34E-4373-94B3-B4FB3D0CBCA8) Problem description: This was originally reported as bug to FreeNAS
2015 Nov 17
0
Contact-closure UPS
...> Thank you for your answer, so I want to try make the "smart" cable, but should I use: > http://www.networkupstools.org/ups-protocols/megatec.html (cable mentioned by you - above 3 wire cable)? If I am reading the code correctly, it does not need anything other than Tx/Rx/Ground (ser_open() sets CLOCAL, which ignores modem control lines). So that cable should work. > or > http://web.archive.org/web/20100106160328/http://ups.miem.edu.ru/ups_faq5.html (cable 5.4.1)? The loopback connections would be for the modem control lines (hardware handshaking, which your UPS probably doe...
2015 Apr 02
0
mge-shut driver fails almost after every reboot
...ce! > The only diff I see between shut in 2.7.1 and 2.7.2 is the following: --- ../nut-2.7.1/drivers/libshut.c 2013-10-02 14:16:42.000000000 +0200 +++ drivers/libshut.c 2014-02-25 16:39:34.000000000 +0100 @@ -312,7 +312,7 @@ /* FIXME: add variable baudrate detection */ *upsfd = ser_open(device_path); ser_set_speed(*upsfd, device_path, B2400); - setline(*upsfd, 0); + setline(*upsfd, 1); /* initialise communication */ if (!shut_synchronise(*upsfd)) This is tied to the PnP feature, and was reverted with the following commit: https://github.com/networkupstools/...
2007 Jun 18
1
Megatec - modem control lines
...========================================================== --- trunk/drivers/megatec.c (revision 965) +++ trunk/drivers/megatec.c (working copy) @@ -853,13 +853,22 @@ void upsdrv_initups(void) { + int dtr_bit = TIOCM_DTR; + int rts_bit = TIOCM_RTS; + upsfd = ser_open(device_path); ser_set_speed(upsfd, device_path, B2400); + + ioctl(upsfd, TIOCMBIS, &dtr_bit); + ioctl(upsfd, TIOCMBIC, &rts_bit); } void upsdrv_cleanup(void) { + int dtr_bit = TIOCM_DTR; + + ioctl(upsfd, TIOCMBIC, &dtr_bit); ser_close(upsf...
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
2015 Apr 02
2
mge-shut driver fails almost after every reboot
...between shut in 2.7.1 and 2.7.2 is the following: > > --- ../nut-2.7.1/drivers/libshut.c 2013-10-02 14:16:42.000000000 +0200 > +++ drivers/libshut.c 2014-02-25 16:39:34.000000000 +0100 > @@ -312,7 +312,7 @@ > /* FIXME: add variable baudrate detection */ > *upsfd = ser_open(device_path); > ser_set_speed(*upsfd, device_path, B2400); > - setline(*upsfd, 0); > + setline(*upsfd, 1); > > /* initialise communication */ > if (!shut_synchronise(*upsfd)) > > > This is tied to the PnP feature, and was reverted with the following...
2008 Sep 24
2
[PATCH] disable nonblocking mode on serial port
...-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_NOCTTY | O_EXCL | O_NONBLOCK); if (fd < 0) ser_open_error(port); + if ((flags = fcntl(fd, F_GETFL, 0)) < 0) + ser_open_error(port); + + if (fcntl(fd, F_SETFL, flags & ~O_NONBLOCK) < 0) + ser_open_erro...
2006 Dec 05
3
megatec over USB - new driver patch
...ls - Megatec protocol driver %s (%s)\n", DRV_VERSION, UPS_VERSION); + printf("Network UPS Tools - Megatec protocol driver %s[%s] (%s)\n", DRV_VERSION, comm->name, UPS_VERSION); printf("Carlos Rodrigues (c) 2003-2006\n\n"); } - void upsdrv_initups(void) { - upsfd = ser_open(device_path); - ser_set_speed(upsfd, device_path, B2400); + comm->open(device_path); } void upsdrv_cleanup(void) { - ser_close(upsfd, device_path); + comm->close(device_path); } diff -Naur drivers_orig/megatec.h drivers/megatec.h --- drivers_orig/megatec.h 2006-12-04 13:08:58.0000...
2015 Nov 19
2
Contact-closure UPS
...> Thank you for your answer, so I want to try make the "smart" cable, but should I use: > http://www.networkupstools.org/ups-protocols/megatec.html (cable mentioned by you - above 3 wire cable)? If I am reading the code correctly, it does not need anything other than Tx/Rx/Ground (ser_open() sets CLOCAL, which ignores modem control lines). So that cable should work. > or > http://web.archive.org/web/20100106160328/http://ups.miem.edu.ru/ups_faq5.html (cable 5.4.1)? The loopback connections would be for the modem control lines (hardware handshaking, which your UPS probably doe...
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
2007 Feb 01
2
Re: [Nut-upsuser] Ablerex 625L USB version
...> { > ! printf("Network UPS Tools %s - Megatec protocol driver %s > [%s]\n", UPS_VERSION, DRV_VERSION, progname); > printf("Carlos Rodrigues (c) 2003-2007\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); > } > > > --- 766,785 ---- > > void upsdrv_banner(void) > { > ! printf("N...
2008 Dec 24
1
Driver removal notification: al175
Hi Kirill, just to notify you that your al175 driver is being removed from the NUT tree, as of 2.4.0-pre1. if you wish to see it entering the tree again, please contact the Development mailing list to talk about it. Merry Christmas and happy New Year. Arnaud -- Linux / Unix Expert R&D - Eaton - http://www.eaton.com/mgeops Network UPS Tools (NUT) Project Leader -
2005 Dec 19
0
new(er) SEC driver.
...set up the serial connection */ static int sec_setup_serial(const char *port) { char tmp[SEC_SIZE]; int i, ret, fd; /* The SEC protocol alows for different baud rates. My daddy told me "Never assume ...", so we try the different rates to see which works. */ fd = ser_open(port); for (i=0; i<SEC_NUMBAUDS; i++) { upsdebugx(SEC_LOG_LOWLEVEL, "Trying to connect at %d baud",baud_rates[i].name); ser_set_speed(fd, port, baud_rates[i].rate); ser_flush_in(fd, "", 0); /* drain input */ upsdebugx(SEC_LOG_LOWLEVEL, " sending probing command.....