ISC 2.0.2, How to set baud rate on serial ports?
Ira Baxter
baxter at zola.ICS.UCI.EDU
Tue Aug 28 17:05:17 AEST 1990
I have 3 serial ports, /dev/tty00, tty01, tty02 under ISC 2.0.2. I
want to use /tty02 as a simple serial I/O device to move files to/from
an ancient Z80 CP(shudder)M system at 9600 baud. I assume that UNIX
on my 20Mhz 386 can catch any stream of characters I pitch at it
without losing anything [if it can't, I'll just lower the baud rate
some] and am hoping to do a simple "cat /dev/tty02 > FILENAME" to
capture a file from the Z80.
The tty manager under SYSADM thinks that tty02 is "disabled", i.e.,
not a user, but that its default baud rate is 9600.
Trying "stty -a < /dev/tty02" tells me the baud rate is 300 baud.
Why is that inconsistent with what SYSADM tells me?
Trying "stty 9600 < /dev/tty02 & stty -a /dev/tty02" also tells
me the baud rate is 300, but "stty 9600 < /dev/tty02 & cat FILENAME /dev/tty02"
moves FILENAME to the Z80 at 9600 baud.
Par for the course is that "stty 9600 < /dev/tty02 & cat /dev/tty02"
seems to pick up garbage when the Z80 transmits at 9600;
I'm guessing, but I highly suspect the "cat" is reading at 300 baud.
TFM says that stty sets the line characteristics, but it doesn't say
how long they stay set; it implies that after *every* open, the baud rate
is set to 300 baud. This is confusing, to say the least.
How should I go about this task?
IDB
(714) 856-6693 ICS Dept/ UC Irvine, Irvine CA 92717
More information about the Comp.unix.i386
mailing list