Date: Sun, 18 Feb 1996 21:24:42 -0300 (EST) From: "Lenzi, Sergio" <lenzi@cwbone.bsi.com.br> To: "Brian J. McGovern" <mcgovern@spoon.beta.com> Cc: questions@freebsd.org Subject: Re: tc* questions... Message-ID: <Pine.BSF.3.91.960218211006.315D-100000@lenzi> In-Reply-To: <199602181553.KAA11380@spoon.beta.com>
next in thread | previous in thread | raw e-mail | index | archive | help
On Sun, 18 Feb 1996, Brian J. McGovern wrote: > > I have been playing with tcgetattr and tcsetattr with some reasonable > success. However, I'm now curious how to do it the "right" way. > > What flags should I set to put a terminal in such a mode so that > characters aren't echo'ed, and characters typed are returned > immediately? I've played with ECHO, CLOCAL, and ICANON to some success. use the c_lflags &= (~ECHO | ~ICANON) c_cc[VMIN]=1; c_cc[V_TIME]=1; after... tcsetattr(file_handler,TCSANOW,&termios) I prefer: if (fork() == 0) { execlp("stty","stty","-echo", "-icanon", "time","1", "min","1", "clocal",NULL); } wait(NULL); ... ... > > What flags should I set for a modem for a "normal dialout"? > ie - port doesn't echo (the device will echo the characters) > - characters should be read() immediately (again, no waiting for CR) > -echo, -icanon,min 1, time 1. > Any changes for inbound calls? I use the ttydx device with a direct rs232 cable and a modem initialized with: at&c1&d2s0=1&w > > Lastly, is there any way to directly look at some of the line signals (CD,DTR, > etc)? > there is an ioctl in the termios.h....
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?Pine.BSF.3.91.960218211006.315D-100000>