[comp.sys.pyramid] Setting up a modem for dialin/dialout use

duncan@vuwcomp.UUCP (07/08/87)

This is a question that I have seen discussed several times, but (I
don't think) directly relating to pyramids.  I would like to set up a
modem for both dialin/dialout use.

As any of you that have tried this will know, you end up with a
catch-22 situation regarding the modem control wires between the tty
port and the modem.  If you disable the modem control, and strap the
cable so the open system call succeeds, you lose the ability to detect
the remote host dropping carrier.  If you don't strap the cable, the
open will hang until dtr is seen (on bsd systems at least).

I know of several ways around this problem.

Chris Torek's (?) device driver package (which I think provides for
two special files - one for dialout, one for dialin) seems the nicest
solution, but I think you would need the source to the tty driver to
use it.  Being for standard 4.[23] it may not be all that applicable
to pyramids tty driver anyway.

A more likely alternative is to modify a program I have written by
Bill Sebok called "acucntrl".  I have looked at the code, and am
fairly certain I could modify it if I knew more about the pyramids tty
driver.  Acucntrl has specific code to handle dz's, dh's and other vax
type things, but I am not sure what has to be done to get it do work
for itp's.  If anyone has done this, or knows what has to be done,
could they please tell me.

Two other possibilities have occured to me.

One is to use the att universe tty driver somehow (system V has the
CLOCAL bit in the tty flags that would seem to do what I want).  I am
not too happy about this since the uucp runs in the ucb universe, and
I am not sure how the two would interact. 

Finally, I noticed that the itp driver has an ioctl call SETITPCARR,
which would also seem to do what I want.  But when I wrote a short
test program to try out this, the ioctl returned the "not owner" error.
This was in spite of running the program as root.

If anyone has any comments on any of these alternatives, or any info on
options I haven't considered could they let me know by email.

Thanks.

Duncan McEwan

ACSnet : duncan@vuwcomp.nz
UUCP   : "...!{alberta, ubc-vision, utai}!calgary!vuwcomp!duncan"

romain@pyrnj.UUCP (Romain Kang) (07/16/87)

[I've tried sending this to info-pyramid several times.  Either
 it's getting swallowed in a black hole somewhere or Chris Torek
 is on vacation...]

Long ago, in another life, I hacked acucntrl to work with ITPs.  I
use it here on pyrnj since we have exactly one USR Courier and one
Telebit Trailblazer.  Here's the down-and-dirty:

The VAX BSD TIOCM*/TIOCMOD* ioctls aren't actually implemented even
though they appear in ucb ioctl.h (well, no one's ever asked for them,
and besides, a lot of the VAX drivers didn't support them in 4.2) so
you wind up using the ITP*CARRIER calls anyway.  I don't know why
they didn't work for Duncan; they work fine here.

The problem with acucntrl is that it can be nondeterministic or
otherwise prone to error.  To illustrate, suppose a truck runs into the
power main and you crash while a line is disabled.  When you come back
up, acucntrl won't realize that the line is already disabled (yes, a
quick hack could fix this), so uucico's or tip's that attempt to use
that line will hang forever until the sys admin (hey, that's me)
notices and takes appropriate action.  Not cool on a 64-plus-user
system.

I never got around to make acucntrl fix both ucb and att utmp files.
It won't work at all if you run att init/getty/login.  (Of course, all
you need then is uugetty.)  In any case, acucntrl is not solid enough
for Pyramid as a corporation to support.  The proper solution seems to
be implementing something like the 4.3 modem driver or Ultrix
TIOCSINUSE/TIOCNCAR/...  However, the demand for such a kernel hook
simply isn't there.

Anyone who wants acucntrl badly enough can drop me a line, as long as
he knows he's on his own once he runs it.  Note that somewhere in old
net.sources archives, there is a program that uses similar stuff to
implement functionality similar to System V ct (courtesy of
vu-vlsi!elh).  And if you're really eager to get yourself in trouble,
uucico on OSx 3.1 and later already knows about acucntrl (it's the 4.3
uucp).
--
Romain Kang	{allegra,cmcl2,pyramid,rutgers}!pyrnj!romain

''!!!x89 dimaryP a fo edisni deppart m'I  !pleH``
``oNhwre eenraa  sab dsab iegnt arppdei  n aAV X117/05!!''