Path: utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!nrl-cmf!ames!oliveb!apple!rutgers!bellcore!faline!thumper!ulysses!att!lzaz!hcj From: hcj@lzaz.ATT.COM (HC Johnson) Newsgroups: comp.os.minix Subject: Re: problems with rs232 on minix ST 1.0 Summary: Heres what going on Keywords: ST minix rs232 help Message-ID: <459@lzaz.ATT.COM> Date: 8 Mar 89 16:17:01 GMT Organization: AT&T ISL Lincroft NJ USA Lines: 37 In article <122@dftsrv.gsfc.nasa.gov>, stailey@iris613.gsfc.nasa.gov (Ken Stailey) writes: > > I have run into some snags with rs232. When the system boots it works fine. > I can type "cat -u terminal program (which I'm using now) it can get very messed up and won't > let me read from /dev/tty1 (writes always work fine). I think that it had > to do with not closing /dev/tty1 after the program terminated. > > Is there an ioctl (or something) that will reset this? > > Concerned, > Ken Two undocumented ioctls affect the rs232; TIOCSTART, and TIOCSTOP. This is what happened. Minix lacks the concept of how many times a device is opened, so there is no way to due a 'final' close. For example, cat -u < /dev/tty1 will do 4 opens and 3 closes before reading a single byte. I added TIOCSTART and TIOCSTOP when i would run a separate program to send these. This seemed awkward, so I attempted to get rs232 to start up better on open. Also, cu has problems, especially if you do not terminate it with ~. . If all else fails, and you need to run cat -u < /dev/tty1 after cu, I would think that ~%local /bin/cat -u executed from within cu will do the job. As the shell executes this line I would also expect ~%local /bin/cat -u > myfile to work. But don't hold me to it. Howard C. Johnson ATT Bell Labs att!lzaz!hcj hcj@lzaz.att.com