From: clau@acs.ucalgary.ca (Christopher Lau)
Subject: Re: Coherent modem control and getty wedge
Date: Sun, 10 Jan 93 20:49:21 GMT
Organization: The University of Calgary, Alberta, Canada

root@rwsys.wimsey.bc.ca (Superuser) writes:
> clau@acs.ucalgary.ca (Christopher Lau) writes:
> > My "dream" version of modem control would be:
> > 
> > 		o  open would NOT block if CD signal is not present BUT,
> > 		   (can this be disabled in Coh 4.0?)
> > 		o  can use sgtty/termio to determine status of CD line
> > 		o  SIGHUP generated to all processes in process group on
> > 		   TRANSITION of CD line from high to low
> > 
> > This isn't too different than what MWC is doing right now, but would be
> > much more flexible than the current arrangement.
> 
> > Yes- I CAN write a daemon which would monitor the CD line using the
> > TIOCRMSR function, but it would be MUCH easier (and less CPU intensive)
> > to modify the driver since it's already doing most of what I'd like it to.
> > 
> > c4
> > -- 
> > Christopher Lau                      |    Dammit Jim, I'm a doctor,
> > The University of Calgary            |    not an engineer!
> > Dept. of Electrical & Computer Engg. |    Well, you're an engineer now..
> > lau@enel.ucalgary.ca -OR- clau@acs.ucalgary.ca -OR- root@fusion.cuc.ab.ca
> > 
> 
> I have written a Version 2 of gettyw. I think I was a bit premature in
> releasing version 1.  The new version *does* watch CD and generates a
> sighup on *loss* of cd. I'm not sure how to interpret 'not block' as mentioned
> above.
> 

Hmm..  I still had to remove the \n on the fprintf used to send the init
string to my modem- but then, it's probably just my modem (its a ZyXEL 1496E)

I also increased the wait between carrier checks to 15 seconds instead of
every one, and added a nice(40) to the carrier checking process (I don't know
if the nice() actually has any effect, but if it does, then the carrier
checking process won't take up much CPU)

> Anyway, the NEW wedge also offers a much improved logging. It will log
> PROTOCOL, COMPRESSION and CARRIER messages if you use MNP or V42, This
> allows it to be used with locked rate modems, and still return the
> telco line baud rate for information. It also allows the system admin
> to determine what kind of modems are most popular among the callers,
> what protocols are being used etc... You can specify 3 levels of
> logging -none, regular (as above) or debug. debug will log just
> about everything that comes over the line up to the point of
> a login.

You wrote these for Hayes/USR modems didn't you?   My modem generates codes
like:

CONNECT 14400/ARQ/V.42bis
or 
CONNECT 19200/V.32bis 14400/V.42bis

so I had to change the files a bit to accomodate this.

> 
> I have also incorporated a suggestion that allows the wedge to log
> caller id messages that are returned by certain modems. I don't have
> caller id myself, so I'm waiting to hear how this works out. The wedge
> scans for NAME, NUMBER, TIME and DATE strings and collects them into
> the log file.

I didn't look at the caller id stuff, but I'm pretty sure that my modem
also returns these in a different format than others.

> 
> I also want to add recognition for fax connections, but I'm too busy
> to write fax software. Never-the-less, a getty wedge is the appropriate
> hook point for calling fax a fax receiver.
> 

I think I'll be trying to add an "answering machine" to mine using the 
voice digitization capabilities of the ZyXEL.

> The new program is named wedge2.zip (surprise surprise). I'll
> upload it to raven tonight.
> 
> I also am including pperm, which verifies lock files and port
> permission via the output of ps. It was included in the previous
> package. If you ever have uucico leave your port with permissions
> screwed up, or lock files for processes that have passed into oblivion,
> you'll appreciate pperm.
> 
> Also included is rmdh, another log file tool. rmhd removes lines from 
> the beginning of a log file. By default it'll take off the first 100 
> lines ( unless there are less than 100). But you can supply a commandline 
> argument to trim off as many as you like. It is an alternative to
> a method such as uumvlog.
> 
> I have also written and included man pages in this package.
> 
> IF you have caller id on your modem, and you decide to log 'em via
> the wedge, please let me know how it works out.
> 
I'll hack around with it and let you know!

> Randy
> 
> ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> root@rwsys.wimsey.bc.ca (Randy Wright)                     Exporter BBS
> (604) 581-0518  8N1  (Bell 103/212A, V22.bis)  interactive login: guest
> Anon uucp:  ogin: uguest     MACHINE=uguest LOGNAME=uguest MYNAME=rwsys
> ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~


c4
-- 
Christopher Lau                      |    Dammit Jim, I'm a doctor,
The University of Calgary            |    not an engineer!
Dept. of Electrical & Computer Engg. |    Well, you're an engineer now..
lau@enel.ucalgary.ca -OR- clau@acs.ucalgary.ca -OR- root@fusion.cuc.ab.ca
Newsgroups: comp.os.coherent