Hanging up + resetting the modem from a script file?

Bob Willey bob at consult.UUCP
Fri Nov 23 04:08:07 AEST 1990


In art<27497784.5174 at marob.masa.com> daveh at marob.masa.com (Dave Hammond) writes:
>In article <6292 at minyos.xx.rmit.oz.au> Richard A. Muirden writes:
>>I need to write a routine that checks to see if anyone is logged on via
>>the modem (on tty1A) and if not, reset it and hang it up. This is for
>>a cron job that would run every hour or so. Does anyone have any ideas
>>on how to tell the modem to hangup and reset (ie: sending ATH0/ATZ to it)?
>Try running `disable tty1A;enable tty1A' from cron (or some script).
>Disable and enable will refuse to do anything if there is someone logged
>in; they will reset the modem (drop DTR, raise DTR, run uuchat to setup
>for dialin/login/etc) if no one is currently logged in.

The only problem with this is that uuchat is a routine which periodically
is hung up on the port.  Like this morning, we looked in and we had
not logged into uunet last night.  Sure enough, uuchat was active on
the port, and I did a manual kill, and everything went like fine.

Is there something generic here that many of us are doing wrong?
We have a T18PC (Telebit) internal modem and use a couple of
simple scripts to write info to the modem.


#	@(#) Dialers 1.1 88/11/16 

#  Telebit dialers
#  tb1200, tb2400, tbfast for 1200, 2400 and 19200 baud.
tb1200	=W-,	""	A\pA\pA\pT OK ATS50=2DT\T CONNECT\s1200
tb2400	=W-,	""	A\pA\pA\pT OK ATS50=3DT\T CONNECT\s2400
tbfast	=W-,	""	A\pA\pA\pT OK ATS51=5S111=30S50=255DT\T CONNECT\sFAST

&tb1200	=,-,	""	A\pA\pA\pT OK ATHQ6S50=0S0=1 OK
&tb2400	=,-,	""	A\pA\pA\pT OK ATHQ6S50=0S0=1 OK
&tbfast	=,-,	""	A\pA\pA\pT OK ATHQ6S50=0S0=1 OK

#  This entry will reset the Telebit modem to desired modes
tbreset	=,-,	""	A\pA\pA\pT OK ATHQ6S45=255S50=0S51=255S52=2S53=3S54=3 OK ATS

--------------------------------------------------------------------------------
We connect to systems at 2400 and at 19200.
Thanks for any input.

-- 
>.. CCS Enterprises, Inc.           ..    Bob Willey, CDP     ..<
>.. P.O. Drawer 1690                ..    uunet!consult!bob   ..<
>.. Easton, Maryland  21601         ..    (301) 820-4670      ..<
>.......................BBS: (301) 476-5098.....................<



More information about the Comp.unix.xenix.sco mailing list