Path: utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!ames!pasteur!ucbvax!tut.cis.ohio-state.edu!rutgers!att!alberta!ubc-cs!van-bc!norsat!dave From: dave@norsat.UUCP (Dave Binette) Newsgroups: comp.unix.questions Subject: /dev/tty1A won accept ioctl-ctsflow, but stty works ok, why? Keywords: SCO, ctsflow, stty, confused Message-ID: <64@norsat.UUCP> Date: 1 Apr 89 07:01:15 GMT Distribution: na Organization: Norsat International (Research) Inc. Surrey, BC, CANADA Lines: 99 I'm going to ask for some technical assistance here so if your not inclined to answer... My application requires the use of CTS/RTS flow control. SCO xenix 2.3.1 ctsflow patches arrived today and are installed I have a TB+ connected to a COMPAQ This code fragment doesnt seem to set the ctsflow or rtsflow flags. when i run stty from another terminal the other settings are OK but ctsflow and rtsflow aren't set. oddly enough there is a workaround for it. ------------------ #define FN_OUTDEV /dev/tty1A int fh_out; ... if((fh_out=open(FN_OUTDEV,O_RDWR|O_SYNCW))<0) { (void)sprintf(ns,"Cant open FN_OUTDEV %s\n",FN_OUTDEV); note(ns,0); exit(1); } ... void setraw() { if(ioctl(fh_out,TCGETA,&tbuf) == -1) note("ioctl 1",1); tbufsave=tbuf; /* this is our copy for later restoration */ tbuf.c_oflag = 0; tbuf.c_cflag = (CS8 | CREAD | EXTA | HUPCL); tbuf.c_lflag = 0; tbuf.c_iflag = (CTSFLOW | RTSFLOW | IXANY | IXON); tbuf.c_cc[VMIN] = 1; /* get 1 chrs before satisfying read */ tbuf.c_cc[VTIME] = 1; /* or 1 char and 1/10 sec. elapse */ if(ioctl(fh_out,TCSETA,&tbuf) == -1) note("ioctl 2",0); } ... ------------------------ When I run the program, the file opens ok and obeys the requirement of not succeeding until carrier goes true (the telebit is set to automatically dial a number when DTR goes on). but doing stty /dev/null here is a copy of the setmode script: x=$1 shift ( stty "$@" ; cat >/dev/null ) <$x & I run it like this: setmode /dev/tty1A exta ixon ixany -hupcl -clocal ctsflow ----------------------- Ok so I'm stumped :-( Any help on this would be appreciated, its not urgent, but i'll probably have to do it right eventually. Thanks for taking the time to read and possibly answer my question. --- usenet: {uunet,ubc-cs}!van-bc!norsat!dave (Dave Binette) bbs: (604) 597 4361 3/12/24/PEP voice: (604) 597 6298 -- --- usenet: {uunet,ubc-cs}!van-bc!norsat!dave (Dave Binette) bbs: (604) 597 4361 3/12/24/PEP voice: (604) 597 6298