home *** CD-ROM | disk | FTP | other *** search
- Newsgroups: comp.sys.next.programmer
- Path: sparky!uunet!charon.amdahl.com!pacbell.com!sgiblab!zaphod.mps.ohio-state.edu!sol.ctr.columbia.edu!ira.uka.de!math.fu-berlin.de!mailgzrz.TU-Berlin.DE!cs.tu-berlin.de!marcel
- From: marcel@opal.cs.tu-berlin.de (Marcel Weiher)
- Subject: Re: Serial port communication difficulties
- Message-ID: <1992Nov11.224715.12841@cs.tu-berlin.de>
- Sender: news@cs.tu-berlin.de
- Organization: Techn. University of Berlin, Germany
- References: <1992Nov10.115012.29368@doug.cae.wisc.edu> <1992Nov11.091546.5251@urz.unibas.ch>
- Date: Wed, 11 Nov 1992 22:47:15 GMT
- Lines: 23
-
-
- >In article <1992Nov10.115012.29368@doug.cae.wisc.edu> writes:
- >
- > Friends,
- > This may be more UNIX than NeXT, but here goes.
- [...]
- > But on the Next, it seems much harder. I simply thought by opening
- > a file being /dev/cua, I could check the ports status via feof().
- ^^^^^^
- > But alas, it always says theres more data there, and so it continially
- > gets hung on reading after the lasst charachter is read. I tried all
- > sorts of variations with the cable, conecting various permutaions of
- > RTS/CTS and so on, but to no avail.
-
- If you want exact control over the serial lines, don't use buffered
- I/O ( fopen,fclose,getchar,feof) but UNIX system calls like open,
- write,read and: ioctl(). This last call will let you set raw/cooked/
- cbreak mode, change baud rates, tell write() to treat some parameters
- as timers etc. For more information: man 4 tty.
-
- (BTW: Your e-mail bounced)
-
- Marcel
-