search for: tiocmset

Displaying 5 results from an estimated 5 matches for "tiocmset".

2006 Oct 19
1
Belkin F6H650 on USB port
Hi, is there a way to use my Belkin F6H650 on the USB port? I already installed usbhid-support, but neither the hidups worked (reports "/dev/usb/hiddev0 is not a UPS") nor genericups with upstype=7 and the hiddev set as device ("ioctl TIOCMSET: Invalid argument") worked. I have installed the debian sarge package of nut 2.0.1 (2.0.1-4) Regards, Philipp
2006 Jan 27
0
[PATCH] fentonups patch to make it work with some powercom ups's
...ys/ioctl.h> +#include <sys/types.h> +#include <sys/termios.h> #include "main.h" #include "serial.h" @@ -176,11 +179,27 @@ static char *get_id(void) return NULL; } +static void set_powercom_lines (void) +{ +// straced from powercom's upsmon +//ioctl(4, TIOCMSET, [TIOCM_DTR|0x4000]) = 0 + + int dtr_bit = TIOCM_DTR|0x4000; + ioctl(upsfd, TIOCMSET, &dtr_bit); +} + void upsdrv_initinfo(void) { int modelnum, i, ret; char temp[256], model[32], *raw; + if (testvar("powercom")) { + set_powercom_lines(); +// straced from powercom's u...
2011 Apr 13
1
Fwd: Re: Asterisk as a Condo door opener/intercom
...rintf(stderr, "lpswtich: %s: %d\n", SWDEV, strerror(errno)); exit(1);} cfmakeraw(&port_config ); port_config.c_iflag=port_config.c_iflag|IXON; port_config.c_oflag=port_config.c_oflag|CLOCAL|~CRTSCTS; tcsetattr( fd, TCSANOW,&port_config ); ioctl(fd, TIOCMSET,&set_bits ); /* wait for printer to warm up */ sleep(45); /* not say "ready" and release the printer */ set_bits = 6; cfmakeraw(&port_config ); port_config.c_iflag=port_config.c_iflag|IXON; port_config.c_oflag=port_config.c_oflag|CLOCAL|~CRTSC...
2005 Feb 20
0
Re: Asterisk-Users Digest, Vol 7, Issue 260
...stderr, "lpswtich: %s: %s\n", SWDEV, sys_errlist[errno]); exit(1);} cfmakeraw( &port_config ); port_config.c_iflag=port_config.c_iflag|IXON; port_config.c_oflag=port_config.c_oflag|CLOCAL|~CRTSCTS; tcsetattr( fd, TCSANOW, &port_config ); ioctl(fd, TIOCMSET, &set_bits ); sleep(5); close(fd); } /* lpswitch.h * include file for lpswitchd configuration * (c) 1994, David Cook <davidc@advan.ca> */ #include<termios.h> #define FILTERDEUG 0 /* filter app debug */ #define DAEMONDEBUG 0 /* daemon app debug */ #define VE...
2006 Oct 20
0
AW: AW: Belkin F6H650 on USB port
...gt; > I already installed usbhid-support, but neither the hidups = > worked > > > > (reports > > > > > "/dev/usb/hiddev0 is not a UPS") nor genericups with upstype=3D7 = > and > > > the > > > > > hiddev set as device ("ioctl TIOCMSET: Invalid argument") = > worked. > > > > > I have installed the debian sarge package of nut 2.0.1 (2.0.1-4) > > > > > > > > > > Regards, > > > > > Philipp > > > > > > > > > > > > > > > &...