Path: utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!bbn!mit-eddie!uw-beaver!rice!sun-spots-request From: dik@uva.UUCP (Casper H.S. Dik) Newsgroups: comp.sys.sun Subject: Re: Sun serial port communication problem Message-ID: <639@uva.UUCP> Date: 28 Feb 89 07:04:24 GMT References: <13782@bellcore.bellcore.com> Sender: usenet@rice.edu Organization: Faculteit Wiskunde & Informatica, Universiteit van Amsterdam Lines: 37 Approved: Sun-Spots@rice.edu Original-Date: 14 Feb 89 18:46:25 GMT X-Sun-Spots-Digest: Volume 7, Issue 170, message 10 of 12 X-Issue-Reference: v7n151 quasar@ctt.bellcore.com (Laurence R. Brothers) writes: >I'm writing a little application to read stuff coming in over my sun's >serial port (Sun-4/260, though it shouldn't make much difference). > >Since I don't yet have the OGM (Obsolete Garbagey Machine) that will be >supplying the RS232 chatter, I'm faking it by connecting a null modem from >ttya to ttyb, writing to a, and reading from b. This is what I think happens: You write a character to a It travels to b It gets echoed by the tty driver at b. (and read by your program) It travels back to a It gets echoed by the tty driver listening to port a It gets back to b. (read again by your program) ... ad infinitum So switching of echoing on port a and b should do the trick. This also accounts for doubled line-terminators. If you output a newline on port a it gets converted to nl-cr on output. Port b then finds two line terminators. Your best bet is raw & noecho. Hope this helps, --cd Casper H.S. Dik University of Amsterdam | dik@uva.uucp The Netherlands | ...!uunet!mcvax!uva!dik