Subject: Re: Serial connection - getty
To: Manuel Bouyer <bouyer@antioche.eu.org>
From: Jay Nelson <jnelson@newsstand.com>
List: netbsd-users
Date: 04/02/2003 17:40:55
On Thu, Apr 03, 2003 at 12:14:02AM +0200, Manuel Bouyer wrote:
> On Tue, Apr 01, 2003 at 08:26:39PM -0500, phil wrote:
> > Hi all. This might be a newbie question and the answer is probably simple. I
> > need to setup a serial connection to remote control a pc using a serial
> > cable.

Sorry to jump in on this late. If your NetBSD box is to control the
remote pc, you don't need and normally don't want a getty running on
the NetBSD side. Assuming the remote pc is running a flavor of unix,
you want the getty running on the remote end.

The line conditioning and flow control on both ends have to match. In
addition, the remote end generally must see DTR active before it
will spawn a getty, so your cable also plays a part. Not all serial
ports are created equal; the cable has to provide the ports on both
ends what they need.

If you can't talk at all, look first at the cable. If you can talk,
but get garbage, look at the port speeds on both ends. There are
hundreds of variations on this theme. Read the man pages on stty and
gettytab specifically for references to "clocal." Also, there's a good
serial tutorial at www.stokely.com.

-- jay
> > # here is my /etc/ttys file
> > console "/usr/libexec/getty Pc"         vt100   on secure
> > ttyE0   "/usr/libexec/getty Pc"         vt220   off secure
> > ttyE1   "/usr/libexec/getty Pc"         vt220   on secure
> > ttyE2   "/usr/libexec/getty Pc"         vt220   on secure
> > ttyE3   "/usr/libexec/getty Pc"         vt220   on secure
> > tty00   "/usr/libexec/getty std.9600"   vt100   on secure
> > 
> > # I have this line in /etc/gettytab
> > std.9600|9600-baud:\
> >         :sp#9600:
> > 
> > I use a terminal client with the following settings
> > return : CR
> > baud : 9600
> > parity : N
> > word : 8
> > StopBits : 1
> > Xon/Xoff : is on
> 
> You probably want that to off
> 
> > RTS/CTS : is on
> 
> Maybe try to set this to off too.
> 
> -- 
> Manuel Bouyer <bouyer@antioche.eu.org>
>      NetBSD: 24 ans d'experience feront toujours la difference
> --