Path: utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!ncar!ames!lll-winken!uunet!auspex!guy From: guy@auspex.auspex.com (Guy Harris) Newsgroups: comp.unix.ultrix Subject: Re: Wierd problem with incoming CXY08 tty lines Message-ID: <1365@auspex.auspex.com> Date: 2 Apr 89 00:57:14 GMT References: <89Mar30.164842est.30755@snow.white.toronto.edu> <555@ultb.UUCP> Reply-To: guy@auspex.auspex.com (Guy Harris) Organization: Auspex Systems, Santa Clara Lines: 31 >What is really needed is "true" carrage-return autobauding. This needs to >be done at a low level in the device driver because of the timing constraints >involved. Huh? 4.3BSD's "getty" has carriage-return autobauding, and it's done in "getty", not the tty driver. It seemed to work just fine when I tried it on some Suns (comments in the code and "gettytab" indicate that it was done for the Micom 600, but it worked just fine with a hardwired terminal). Basically, "getty" sets the baud rate to 2400 baud (actually, it uses whatever rate you specify in the "gettytab" entry, but the auto-baud entry specifies 2400 baud), flushes pending input, waits 5 seconds, reads a character from the serial port, waits "20 microseconds" (both waits use "select"; I think a "20 microsecond wait" rounds up to one clock tick in most systems), flushes pending input again, and looks at the character. Based on what it got, it chooses a baud rate: '\200' 300 baud '\346' 1200 baud '\r' or '\r'|0200 2400 baud '\377' 9600 baud anything else 4800 baud I don't know if Ultrix has this yet, but I don't see any intrinsic reason why it couldn't be added.