Newsgroups: comp.sys.att
Subject: Re: No Controlling Terminal???
From: rthomas@hakatac.almanac.bc.ca (Robert N Thomas)
Date: Sun, 08 Nov 92 11:12:50 GMT
Distribution: na
Organization: Sir HackAlot's Castle BBS, Port Alberni, B.C., Canada

In article <Bx5wqK.507@chinet.chi.il.us> les@chinet.chi.il.us (Leslie Mikesell) writes:
>In article <1992Nov2.223617.21724@sactoh0.sac.ca.us> ccpoabt!dan@sactoh0.SAC.CA.US writes:
>
>>Is there a way to get the uucp functions working without setting up the
>>modem this way???  I have my modem hold carrier detect until disconnect, it
>>then resets (including forcing CD high).


   Since I don't see any mention of /M or ,M anywhere, and have a successfully
running heap of modems here, maybe I can help out (I suspect my system doesn't
know about /M, but I will be giving it a TRY!)

    The below describes the manner in which I deal with modems on my 3B2.
It also assumes you have the following:

EPORTS CARDS:
~~~~~~~~~~~~~
   The modem must be connected up to an EPORTS card.  The EPORTS card is
a card that has 8 terminal lines on it.  A PORTS card has 4 terminal ports
and a CENTRONICS printer connector on it.  The PORTS card is useless for
running a MODEM in the manner described below..   Use an EPORTS card!!

MNP CLASS MODEM:
~~~~~~~~~~~~~~~~
    Most non-mnp modems just plain and simply do no have enough programmability
to work in the perscribed manner.  Even some of the lower end MNP modems may
not work as well..  The below will define the features you want in a modem
at least, and will show you how to effectively use them.

    I discuss HST and PEP type modems in the below, but you will still need
your modem manual to find out "exactly" how you use the commands.  I also
assume the reader can say NON-VOLITILE ram, and think AT&W at the same time.



CARRIER DROPPED BY USER & SENSING DISCONNECT:
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   In order to for this all work, you need a modem that has a bit of 
"intelligence".  Here, I am running both a Trailblazer and HST...  Both of
these modems can be programmed to leave "some" line high (on the HST it's
the DSR {see S24 register}, and on my TrailBlazer it's DCD {see S131=3}
or DSR {see S130=3}).   In the case of a modem that uses DSR, you will have
to connect your modems DSR to the 3B2's DCD, and hence you will be running
a "nonstandard" connector..

   Here, I have the TB2000 running with DCD dropping on disconnect, and the
HST is running with DSR dropping and a hacked up connector.  Carrier is dropped
the 3B2 will know because it's DCD will drop, and handle the carrier drop 
correctly.


PIN OUTS:
~~~~~~~~~
     Here is how I "think" I have it pinned..  It is "possible" that I may
have made a mistake here, but in all probability, this should work, given
that I have just went through all the relevent documentation..

   EPORTS CARD                         MODEM DB25
  ~~~~~~~~~~~~~                        ~~~~~~~~~~~
PIN 1  Protective Ground <------------> Pin 1 Protective Ground
PIN 2  CTS Clear to Send -------------> PIN 4 Request to Send
PIN 3  TxD Transmit Data -------------> PIN 2 Transmit Data
PIN 4  DTR Data Terminal Ready--------> PIN 20 Data Terminal Ready
PIN 5  RxD Recieved Data -------------> PIN 3 Recieved Data
PIN 6  DCD Data Carrier Detect <------  PIN 8 for PEP using S131
                                                 or
                                        PIN 6 Data Set Ready for
                                              HST using S24
                                              PEP using S130
PIN 7  Signal Ground <----------------> PIN 7 Signal Ground
PIN 8  RTS Request to send <----------  PIN 5 Clear to send

     3B2 EPORTS & PORTS                   25 pin female modem connector
  +-----------+                     +---------------------------------------+ 
  |  87654321 |                      \ 13 12 11 10 09 08 07 05 04 03 02 01 /
  |           |                       \25 24 23 22 21 20 19 18 17 16 15 14/ 
  +----\__/---+                        +---------------------------------+


   The PORTS card is the same as the EPORTS card, except the CTR and RTS
have no function, and do not give you hardware flow control.



HOW THE 3B2 TELLS A MODEM TO RESET OR DROP CARRIER:
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 
   I have programed both modems to DROP CARRIER and do a reset if the 3B2
drops it's DTR line.  Whenever a user logs off the system, the 3B2 will
lower it's DTR line.  And the modems reset, dropping carrier..

HST = see S13 setting.
TB  = see S52 register setting.

CONNECTION without any LOGON:
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
If some caller has been trying to get online, and left his system in WAR DIAL
mode, and then walks away..  You will end up being connected forever..
Or until he gets back from coffee..

   Turns out that you can set a MODEM TIME OUT.  When there is X minutes of
silence, you can have your modem drop carrier..  

HST = see S19
TB  = see S41

   Here, I set this to about 15 to 30 minutes.

   I also have a job running on the system which every 15 minutes, terminates
all uugetty's, which forces my modems to reset.  It is possible for some poor
person to have just connected, and then get dropped..  I suspect this is
very rare..  I don't hear any complaints so far.



HARDWARE FLOW CONTROL:
~~~~~~~~~~~~~~~~~~~~~~
    All modems are set up to use hardware flow control.  This allows things 
like ZMODEM and others protocols to run, unhampered..  I wrote a program which
replaces /etc/login..  Basically this version of login runs a script file, and
then runs /etc/LOGIN.  This LOGIN file is the original version of login renamed.

    The script file basically looks at the TTY line the user is using, and 
does a epstty hfc, if the terminal port being used is one of my modem ports.
pretty simple stuff...  


MAKING A SYSTEM EASIER TO CONNECT WITH:
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
     I also LOCK my modem's communication speed (the baud rate at which the
modem talks to the 3B2) to 19200 baud.  This is not to say I can't accept 
2400-300 baud callers.  What happens, is the modem translates from 300 baud
at the phone line side, to 19200 baud at the 3B2 side.

HST = see AT&Bn
TB  = see S51

     The modems are programmed for 19200 baud MODEM to 3B2 communication speeds,
and my system doesn't force the caller to play HIT BREAK, and maybe the "dumb"
unix box will find the right baud rate..  Here, the modem deals with it, and
my gettydefs hunt sequences are non-existant.  I don't wish to switch
baud rates if a break hits me.  I stay at 19200, and the modems know that 19200
is all that my 3B2 understands.


HARDWARE FLOW CONTROL & UUCP:
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    Basically I haven't any solutions running here yet, although I have heard
of a few which are around and out there..  I am not in much rush here, since
the TB does 1300cps, and doesn't mess up anyway..  It works, so I am not going
to fix it..  ??


MODEM LOOPBACK PROBLEMS:
~~~~~~~~~~~~~~~~~~~~~~~~
    Here's an interesting scenario.. A cosmic ray hits the line, or a
bit of garbage somehow gets in the line.  The 3B2 thinking someone is
there, sends "login: "..

The modem, upon seeing this sends back "login: "..  The 3B2 now thinks
someone is trying to login via the "logon:" account...

    Being a good machine, it send login: back to the modem.  The modem
sees login: arrive, it then echo's login: back to the 3B2.  The 3b2
echos the login: back to the modem, modem echos login: back to the 
3B2..  Around & around it goes..  Forget about getting any calls on that
line..

    What I do is set the modem to default to ATE0Q1 in it's NV ram.  This
disables the modem's ECHOing back everything it recieves, and the Q1 stops
OK and CONNECT messages from arriving at the 3B2. 

    Unfortunatly, the CU and UUCP commands will no longer work, because the
modem does not say OK, or yield any responses back to the system for normal
dial out procedures.  Hence, in my DIALERS file, the first command in there
is a ATE1Q0.  Now when I uucp out, the modem will act like a standard modem, 
echoing characters, and responses back to the person on the other end..


Cheers...

					---- Robb ----

Newsgroups: comp.sys.att