Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!usc!orion.oac.uci.edu!ucivax!gateway From: baxter@zola.ICS.UCI.EDU (Ira Baxter) Newsgroups: comp.unix.i386 Subject: ISC 2.0.2, How to set baud rate on serial ports? Message-ID: <9008280005.aa24338@PARIS.ICS.UCI.EDU> Date: 28 Aug 90 07:05:17 GMT Lines: 28 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