search for: lpswitch

Displaying 2 results from an estimated 2 matches for "lpswitch".

Did you mean: ipswitch
2005 Feb 20
0
Re: Asterisk-Users Digest, Vol 7, Issue 260
...following will do the trick. Just add a 5vdc solid state relay ('cause you can't sink too much current out of the RS232C port). Substitute "2", "4" or "6" in the code below to turn on either DTR, RTS or both signals. "0" for off. Change SWDEV in the lpswitch.h file to be the serial port you intend to use for the relay. I'm using some optically isolated relays I found in town for $5.00 Cdn. The box to put it in cost more than the relay. There is a bunch of extra defines in the .h file that were needed for the larger project this was part of. Just...
2011 Apr 13
1
Fwd: Re: Asterisk as a Condo door opener/intercom
...oth DRT& RTS */ #include<sys/types.h> #include<sys/ioctl.h> #include<termios.h> #include<fcntl.h> #include<errno.h> #include<stdlib.h> #include<unistd.h> #include<stdio.h> #include<signal.h> #include "lpswitch.h" /* Main program. */ int main(int argc, char **argv) { struct termios port_config; int fd; int set_bits = 2; /* Open monitor device. */ if ((fd = open(SWDEV, O_RDWR | O_NDELAY))< 0) { fprintf(stderr, "lpswtich: %s: %d\n", SWDEV, strerr...