OBM <--> Telebit incompatibility: SUMMARY
Rick Kimball
rick at kimbal.lynn.ma.us
Sat Feb 9 12:51:04 AEST 1991
>From article <23207 at netcom.COM>, by gandrews at netcom.COM (Greg Andrews):
> In article <980 at gnosys.svle.ma.us> gst at gnosys.svle.ma.us (Gary S. Trujillo) writes:
>> [Gary's modem config that doesn't require sending breaks]
... modem configuration deleted
>>
>
> Pretty normal Unix settings... What did you change to eliminate the
> need for breaks?
I don't know for sure but I think Gary is running a different getty
than the one supplied with HDB. He mailed me a copy a few months ago
but I had problems getting it up and running with the stock UUCP.
I'm sure I could have got it running; I just didn't have any spare
time back then.
Since then I managed to delete the source, but all is not lost. Karl
Denninger posted a program called autouu.c in the 386 group that
does the same thing. Instead of running a getty on your modem you
use autouu.
I've included the comments from the begining of the program
below. The only real change I had to make was with the locking
scheme. I'm using this with great success with a TB2500.
Give it a try if you like 617 596 0052 ... any baud 8^)
Rick Kimball | INTERNET: rick at kimbal.lynn.ma.us
| UUCP: ...!spdcc!kimbal!rick, ...!spt!kimbal!rick
| POTS: (617) 599-8864
----
/*
* Copyright 1990 MCS & Karl Denninger. All rights reserved.
*
* Public use is permitted under the following conditions:
*
* 1) You do not remove my name from the package, or claim you wrote it.
* 2) You distribute ORIGINAL source code with all distributions made,
* modified or not, binary or source.
* 3) You do not attempt to sell the package, or use it to enhance the
* commercial value of any product or service.
* 4) This package is distributed with ABSOLUTELY NO WARRANTY OF ANY
* KIND. If it melts your system to slag YOU are responsible, not
* MCS or myself. The burden rests with you to perform adaquate
* testing before turning this loose on unsuspecting users.
*
* Commercial distribution rights reserved; contact MCS at (708) 808-7200
* for details on commercial distribution licensing.
*
* Compile with: cc -s -o autouu autouu.c -lc_s -lx
*
*/
/* Autobaud program
Run in place of 'getty', this will prompt for a name
and call login just like the old one used to do... Only
difference is that it is rather interesting in it's interpretation
of what a 'gettydefs' file is; that is, there isn't one.
We use modem return messages to determine the baud rate. Locks are
respected as well, allowing the uucp system to share the ports.
You invoke this with:
/etc/autonew ttyA2 [code] [file]
from /etc/inittab. "[code]" is the numeric code for the baud rate
to send the initialization string at -- most of the time you want
this to be the highest baud rate your modem will support.
Notes:
1) The device name does not have a prefix. It is prepended
automatically (/dev/ is added).
2) For ISC, use the MODEM CONTROL PORTS. This program can
interlock with UUCP; see their DEVICES file for the
proper flags to set in the DEVICES and DIALERS files.
Use the "new" definitions which have ",M" added (see your
documentation for details).
3) While a port is being used for dialout, it will show
up in a "who" command as "_Dialout" once data
transmission begins.
4) Modes and owners will be changed on ports to prevent
random users from using the ports for "cu"s and other
communications uses. This can be easily changed if
desired (look for the "chmod" call in the source).
5) The file /etc/autobaud.parm must be present if the "file"
argument is missing. If the "file" argument is present,
it points to the control file to be used. The format
is as follows:
First line -- initialization string for ports
Second line -- response to initialization string
Third line -- Generic "connected" message
Up to first "#" alone -- baud codes, rates (text), and
response strings expected.
Next line -- Login prompt
Remainder of file -- Issue file
Baud codes are the speed codes from termio.h;
11, for example, is 2400 baud.
An example /etc/autobaud.parm file:
AAATE0Q0V1
OK
CONNECTED
7 300 CONNECT
9 1200 CONNECT 1200
11 2400 CONNECT 2400
13 9600 CONNECT 9600
14 19200 CONNECT FAST
#
Login:
Welcome to the system
<EOF>
This is a typical file for a system containing both
Telebit and low-speed modems (300-2400 baud). Note
that the "AAA" is doubled to allow the Telebit to
autosync. If you have hardware flow control then
enable it -- otherwise, set the modem up for
Xon/Xoff flow control, BREAK is sent and flushes,
Telebit S66=0 and S58=254 (Autobaud and prefer
19200). This permits full functionality with the
exception of low-speed UUCP inbound calls through
Telebits; if you have hardware flow control then no
restrictions apply.
6) Your I/O board and/or drivers MUST correctly support the
notion of O_NDELAY. In addition, you have to be able to
turn on and off the NDELAY flag with fcntl. LOTS of
intelligent boards broke this; if it's broken this
program will NOT work. ONE HACK: If your NDELAY
interpretation returns non-blocking if CD is down (with
CLOCAL set and NDELAY cleared) this program will function
correctly, although it will eat a small portion of CPU
time to do so.
7) Autobaud will wait for a carriage return and use it
to determine the parity of the caller's terminal (either
8/N/1 or 7/E/1 only). If the user doesn't press anything
within a reasonable time frame, 8/N/1 is assumed. The
message "CONNECTED" is output to the user terminal
immediately after autobaud senses the user's baud rate.
8) All modems served by a configuration must use the same
response sequences, although subsets are permitted (ie: the
example file above would work for a USR Courier 2400 and
a Telebit Trailblazer Plus equally well).
CHECK THE FUNCTIONS "checklock()" and "makelock()" -- they may need
to be modified for your system! In particular, some systems use
binary PIDs and/or store the lock file in a different place. We
currently are set up for HDB UUCP on ISC 2.0.2/2.2.
Note that this program can share a port with a modem dialing out on
the same line! It will perform with uucp on the same port without
trouble, so long as the locking is done correctly by uucp and other
programs which expect lock files.
Autobaud removes any stale lock files it finds automatically.
*/
---
More information about the Comp.sys.3b1
mailing list