Displaying 14 results from an estimated 14 matches for "ser_set_speed".
2009 Jul 06
3
Smart-UPS RT 3000 Baud Rate
...9;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
2009 Jul 27
3
Liebert Power Sure PSPXT 450 (SERIAL)
Hi!
My Liebert Power Sure PSPXT 450 with standard driver doesn't works, so I've
done this modification and now it's works.
# diff liebert_MY.c liebert.c
178
< ser_set_speed(upsfd, device_path, B9600);
---
That is, I've only setup the port's speed.
Can you update SVN code?
Thanks
Bye
Beppe Ursino
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.alioth.debian.org/pipermail/nut-upsdev/attachments/20090727/a908b...
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 Apr 02
0
mge-shut driver fails almost after every reboot
...e 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/nut/commit/75b0ce8b952d7c55880f7a...
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(upsfd, device_path);
}
This should be...
2015 Apr 02
2
mge-shut driver fails almost after every reboot
...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/n...
2011 Oct 03
2
patch: Replace many usleep and some sleep calls with nanosleep
...,7 @@ void pw_comm_setup(const char *port)
unsigned char id_command = PW_ID_BLOCK_REQ;
unsigned char answer[256];
int i = 0, baud, mybaud = 0, ret = -1;
+ struct timespec delay;
if (getval("baud_rate") != NULL)
{
@@ -273,12 +274,14 @@ void pw_comm_setup(const char *port)
ser_set_speed(upsfd, device_path, mybaud);
ser_send_char(upsfd, 0x1d); /* send ESC to take it out of menu */
- usleep(90000);
+ delay.tv_sec = 0; delay.tv_nsec = 90e6;
+ nanosleep(&delay, NULL);
send_write_command(AUT, 4);
- usleep(500000);
+ delay.tv_sec = 0; delay.tv_nsec = 500e6;
+ nanosleep(&...
2006 Dec 05
3
megatec over USB - new driver patch
...ver %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.000000000 +0300
+++ drivers/megate...
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
2009 Aug 14
2
Bestfortress driver, network serial patch for nut-2.0
...t;);
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/serial.c.net 2006-11-07 21:08...
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
2007 Feb 01
2
Re: [Nut-upsuser] Ablerex 625L USB version
...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("Network UPS Tools - Megatec protocol drive...
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.
...l 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...");
sec_send(fd, SEC_POLLCMD, SEC_CMD_MFR, tmp, 0);
upsdebugx(SEC_LOG_LOWLEVEL, " reading reply...");
ret = sec_recv(fd, tmp, SEC_SIZE...