Sun serial port communication problem
Casper H.S. Dik
dik at uva.UUCP
Tue Feb 28 17:04:24 AEST 1989
quasar at 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 at uva.uucp
The Netherlands | ...!uunet!mcvax!uva!dik
More information about the Comp.sys.sun
mailing list