From: terry@cs.weber.edu (A Wizard of Earth C)
Subject: Re: SCO ODT 1.0 (1.0.0y):  UUCP hangup bugs; uugetty fix?
Keywords: uucp, uugetty, stty, hupcl, clocal
Organization: Weber State University  (Ogden, UT)
Date: Fri, 4 Sep 92 06:37:04 GMT

In article <1992Sep03.222723.14461@tcsrtp.uucp> uunet!duke.cs.duke.edu!wolves!tcsrtp!royc writes:
>
>1)  If I use the modem control device (sat tty1A) so that DCD
>  is listened to and causes hang up
>	a)  stty clocal fails to alter behavior of uugetty
>	b) uugetty fns inbound AOK but always talks even with '-r'
>	c)  which in turn creates a lock file and stops outbound usage
>	d)  I can't 'cu -l tty1A' until DCD is high ...
>	   (using DSR for DCD fixes)

The modem control device is definitely the correct one.  The problem appears
to be that you have not set your modem so:

o	Respond to DTR
o	Verbose replies
o	Send Result codes
o	No character echo	<---
o	Autoanswer
o	Respond to DCD		<---
o	RJ11 single line
o	The modem should listen to commands

(Items marked with "<---" are probably incorrect).

The switch settings for a Hayes Smartmodem 300 or 1200 are:

	1	up
	2	up
	3	down
	4	down
	5	up
	6	up
	7	up
	8	down

An Avatek modem should have switched 6 and 7 down.  An additional switch
	(can't remember which one) needs to be down for autoanswer.
An NCR 1200 should have all switches but 1,2,6, and 9 up.
A MicroCom 2400 should have switches 1, 5, and 6 up (on the front) and
	switched 5 and 7 down (on the back)..
A Peachtree 1200 modem should all switches but 3, 4, and 6 down.
A US Robotics Courier or Microlink should have switches 3,4,8, and 9 down.
A US Robotics Password should have all switches up.
A "soft-programmed" modem should have the following commands typed at it:
	AT&C0
	AT&D1
	AT&W
You should reset to factory defaults before doing this.

>
>... all on a 9pin connector.
>

Also, for a 9 pin connector, the cable should force RTS high on the computer
side by tying it to DTR (since 9 pin connectors are 1 pin short of full
modem control, which requires 10 if chassis ground takes a pin).  Pins 4 and 5
should be tied together (in the connector hood!  No connection to the cable!)
on the modem side.

The PC's serial port is DTE.  A 9 pin DCE port (such as on an Altos) needs
the following cable:

	2 --- 3
	3 --- 2
	5 --- 7
	6 --- 8
	4 -+- 20
	8 -+

This indicates that 4 and 8 on the 9 pin computer side should be tied to pin
20 on the 25 pin modem side.

On 25 pin to 25 pin, 6 does not connect through -- instead, it connects to
pin 8 on the same side.  Pin 8 will connect to pin 20 on the other side
if 2&3 have to be crossed, or pin 8 on the other side if this is not the
case.  4&5 should be tied together on the computer and modem ends with no
connection in between (unless you have the device driver writer tell you
different, in which case, he's probably ignoring a lockup-on-line-loss
window or is unfamiliar with your modem).  Chassis ground should be connected
on one end only (the one with the best ground) it's purpose is to act as
a Faraday cage for wire noise (all loose wires in a cable should hook to
chassis ground on one end only) and connecting both ends may result in a
ground loop (ie: pin 1-1 is connected and pin 7-7 is connected and the
power supplies have different ideas of a 0 voltage reference).

If you are using a Bell 103-C DataSet, feel free to connect pins 4 & 5, as
this is one of the few modems that understands CTS/RTS and how to handle it
as UNIX perceives it with regards to DTR/DCD transitions.  (Built in
monopoly).

>	Basically, uugetty ought to keep its mouth shut
>	until a character whatever happens to the cvontrol
>	lines on a modem control port and 'clocal'/'-clocal'
>
>	should WORK RIGHT on tty lines ...

Basically, using tty1A instead of tty1a will make getty or uugetty keep
quiet until the modem asserts DCD.

Your *modem* should ignore data from the computer until DTR is asserted
and your *modem* should reset as if powered off-then-on-again on an
on-to-off transition of DTR by the computer.

Your *computer* should use a modem control port (requires a kernel or boot
monitor patch on Sun -- call Telebit) and have -CLOCAL and HUPCL set in the
/etc/gettydefs file.  Your *computer* should ignore RTS and assert CTS at
all times if DCD is not high to work with Hayes style modems, but doesn't
(hence the cable mods).


Oh, and *never* use an internal modem and expect it to work; there's no
way you can modify the cable, and the cheap ones won't have appropriate
pullup and pulldown resistors to assert/deassert the proper signals prior
to a connection being made (at which time the line is held active low or
active high, as appropriate.  If you are good at card surgery (like cutting
the IRQ 2/IRQ 9 vertical retrace interrupt line so your VGA card lets you
jumper your ethernet card to IRQ 2/IRQ 9), you may want to buy an internal
modem and solder your own pullup/pulldown resistors.

If you need any more help, buy a comm product (like TERM from Century
Software, 801-268-3088) and make the vendor support you.



					Terry Lambert
					terry_lambert@gateway.novell.com
					terry@icarus.weber.edu
---
Any opinions in this posting are my own and not those of my present
or previous employers.
-- 
-------------------------------------------------------------------------------
                                                       terry@icarus.weber.edu
 "I have an 8 user poetic license" - me
-------------------------------------------------------------------------------
Newsgroups: comp.unix.wizards,bnr.sys.sun