home *** CD-ROM | disk | FTP | other *** search
- Newsgroups: comp.unix.xenix.sco
- Path: sparky!uunet!mcsun!ieunet!tcdcs!maths.tcd.ie!jaymin
- From: jaymin@maths.tcd.ie (Jo Jaquinta)
- Subject: Writing 8-bit data out tty ports
- Message-ID: <1992Sep2.154342.19442@maths.tcd.ie>
- Organization: Dept. of Maths, Trinity College, Dublin, Ireland.
- Date: Wed, 2 Sep 1992 15:43:42 GMT
- Lines: 24
-
- We have our own in-house communications protocol and I am porting
- it to work under SCO unix. The problem is I just can't seem to get it
- to send 8-bit data out the serial ports. The relevant code is:
- ...
- sprintf(fname, "/dev/tty1%c", com + '@');
- portfd = open(fname, O_RDWR);
- if (portfd < 0)
- return(-1);
- x = ioctl(portfd, TCGETA, &tty);
- tty.c_cflag = (B4800|CS8|CREAD|CLOCAL);
- tty.c_lflag = 0;
- tty.c_cc[VMIN] = 0;
- tty.c_cc[VTIME] = 0;
- x = ioctl(portfd, TCSETA, &tty);
- ...
- Am I missing some obvious ioctl flag?
- Cheers,
- Jo Grant
-
- _______________________________________________________________________________
- Jo Grant | "Love is blind, or so it seems, to make me
- jaymin@lanczos.maths.tcd.ie | offer you my dreams. But after all is said and
- 44 Bancroft Ave., Tallaght, | done, a blind man's dreams are not much fun."
- Dublin 24, IRELAND | -- Horslips, "The Blind Can't Lead the Blind"
-