Subject: Re: Null modem snafu?
To: Todd Vierling <tv@pobox.com>
From: Phil Knaack <flipk@idea.exnet.iastate.edu>
List: port-i386
Date: 08/13/1996 00:18:57
Todd Vierling <tv@pobox.com> writes:

>In attempting to attach a 9600bps serial terminal with null modem to a
>serial port (16550 based com1), I get what appears to be a bunch of $FF
>chars.  I can't find my serial analyzer, but that looks like the getty is
>constantly sending a BREAK to the line.  I've fiddled with various null
>modem setups with no luck (in fact, a 1-1 7-7 2-3 3-2 cable causes getty to
>exit, restart, exit, restart so fast that init puts it on hold). 

	I'm confused; is this a 25-pin or 9-pin serial cable you're 
referring to? pin 7 is ground on 25-pin, put pin 1 is unassigned. If you're
talking 9-pin, RTS does not connect to RTS.

(Serial port pins, DB9 or DB25 male)
9-pin   25-pin  assignment
1       8       DCD (Data Carrier Detect)	(input)
2       3       RX  (Receive Data)		(input)
3       2       TX  (Transmit Data)		(output)
4       20      DTR (Data Terminal Ready)	(output)
5       7       GND (Signal Ground)
6       6       DSR (Data Set Ready)		(input)
7       4       RTS (Request To Send)		(output)
8       5       CTS (Clear To Send)		(intput)
9       22      RI  (Ring Indicator)		(input)

You no doubt need to set some flags in /etc/ttys. For my PPP router
with serial console it looks like this:

tty00	"/usr/libexec/getty std.19200"	vt100 on secure local softcar

(my bootblocks run over serial port at 19.2k instead of the 9600 baud
 default, and CONSPEED=19200 in my kernel config, etc etc)

To make the BIOS and the BIOS-using-bootblocks happy, the computer's 
DTR is connected to its own DCD, and its own RTS to its own CTS. Then
only pins 2,3,5 (9-pin connector) need to go to the terminal. Normally
you would want a (assuming both ends 9-pin) 2-3 3-2 5-5 1-4 4-1 7-8 8-7
cable. (RX <--> TX, GND <--> GND, DTR <--> DCD, RTS <--> CTS).

If you don't connect DCD, you need the "softcar" flag above. If you 
don't care about DTR, add "local". If you want to use hardware flow
control, and have connected RTS <--> CTS, add "rtscts" above. ("rtscts"
is off by default.)

Hope this answers your question.

Cheers,
Phil
--
Phillip F Knaack
Database Programmer, Information Development for Extension Audiences (IDEA)
Iowa State University Extension