Autobaud Modems

pedz at smu.UUCP pedz at smu.UUCP
Fri Dec 7 18:22:00 AEST 1984


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 at smu		(csnet)



More information about the Comp.unix.wizards mailing list