[net.unix-wizards] Autobaud Modems

pedz@smu.UUCP (12/07/84)

Some time ago there was a lot of debate about auto-baud modems
and different ways to do them.  The solutions were all done totally
in software.  This solution uses hardware to aid the software and
the only problems with it is that it can only be used at two
speeds.  Typically the speeds are 1200 and 300.

The concept is quite simple.  The ring detect line is not used for
anything usefull (at least in the DH driver on a 4.2 system).  Most
autobaud modems have a speed line availiable on the RS-232 connector.
So it is simply a matter of connecting the speed line of the modem
to the ring detect line of the DH.

The software that needs to be changed is the DH driver to add ioctl's
to get the status of the ring detect line and also the carrier detect
line (if you do one you might was well do the other).  These calls
were never implemented in the 4.2 DH driver.

Second is to setup a special entry in gettytab which getty will
treat special (I choose "m" for modem).  With this entry, getty
first opens the line (the soft carrier detect option must be off
for this to work).  The open will block until carrier is detected.
At this point, the speed line is set so it is simply a matter of
doing the ioctl call to get the status of the line.  Care must be
taken in this step since there seems to be a significant time
delay in the setting of this line.  I put in a sleep for 1 second
to solve the problem.  When the line is sampled, the speed of
the line is determined to be 1200 if the line is high and 300
if the line is low.  The baud rate is set and normal processing
resumes.

Obviously this system assumes some things about the hardware
being used.  It also is based upon a 4.2 system and I am not sure
what other system do with the ring detect line.  It does however
work very very nicely.  No more wacking on the break or the @ key
and then hitting four or five returns, then repeating until
something comes to life.

Diffs are offered to anyone interrested.  You need to tell me which
diffs (the DH driver, getty, or both) you need.

Perry
convex!smu!pedz
pedz@smu		(csnet)

henry@utzoo.UUCP (Henry Spencer) (12/11/84)

Actually, this scheme (use a spare modem-control line to sense the modem's
baud-rate indication, have the driver set the speed codes based on this,
and have getty do an ioctl to find out) is found in vanilla V7.  One
difference:  V7 uses the secondary-receive line rather than ring-indicator.
-- 
				Henry Spencer @ U of Toronto Zoology
				{allegra,ihnp4,linus,decvax}!utzoo!henry

guy@rlgvax.UUCP (Guy Harris) (12/12/84)

> Some time ago there was a lot of debate about auto-baud modems
> and different ways to do them.  The solutions were all done totally
> in software.  This solution uses hardware to aid the software and
> the only problems with it is that it can only be used at two
> speeds.  Typically the speeds are 1200 and 300.
> 
> The concept is quite simple.  The ring detect line is not used for
> anything usefull (at least in the DH driver on a 4.2 system).  Most
> autobaud modems have a speed line availiable on the RS-232 connector.
> So it is simply a matter of connecting the speed line of the modem
> to the ring detect line of the DH.

If I remember correctly, there was stuff in V7 to do exactly that on
a DH (there was also stuff in V7 to adaptively set the silo alarm level
on DHes, and that wasn't in 4.xBSD either).

	Guy Harris
	{seismo,ihnp4,allegra}!rlgvax!guy