Wierd problem with incoming CXY08 tty lines

Guy Harris guy at auspex.auspex.com
Sun Apr 2 10:57:14 AEST 1989


>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.



More information about the Comp.unix.ultrix mailing list