Subject: Re: Can't access serial ports.
To: None <bc774@scn.org>
From: Dr. Bill Studenmund <wrstuden@loki.stanford.edu>
List: port-mac68k
Date: 09/25/1998 09:36:36
On Fri, 25 Sep 1998 bc774@scn.org wrote:

> I just installed NetBSD 1.3.2 onto an LCII which has had the processor
> upgraded in some way.  My problem is that I can't write to the serial
> ports.  If I type `echo TEST > /dev/tty00` it will freeze until I
> interrupt it with ^C.  Tip and cu give errors as well.  The FAQ
> mentions something about cu not working with recent kernels.  Does
> anyone know how to fix this?

The problem is that the serial ports are expecting there to be a modem on
the other side, and will wait for the modem to have received a call.

You need to do one of two things:

If there's no modem, edit /etc/ttys and on the line for that port, add
"local" to the flags on the end. man 5 ttys should tell you more about the
file format. Then either reboot or run "ttyflags ttyXX" where ttyXX is the
tty you're using.

Or, type these commands

cat < /dev/ttyXX &
stty -f /dev/ttyXX clocal
cat BOO > /dev/ttyXX


The first cat, which runs in the background, keeps the tty device open for
the next commands (the settings get reset when the device goes inactive).
The second command tells the tty to not wait for DCD before accessing the
device. The third talks to the tty. This latter approach is appropriate
for talking to a modem. You can get to it easily this way, and other users
get standard modem behavior.

Take care,

Bill