*BSD News Article 25465


Return to BSD News archive

Path: sserve!newshost.anu.edu.au!munnari.oz.au!yoyo.aarnet.edu.au!news.adelaide.edu.au!gateway.dircsa.org.au!apanix!cleese!cleese!not-for-mail
From: newton@cleese.apana.org.au (Mark Newton)
Newsgroups: comp.os.386bsd.bugs
Subject: Re: PROBLEMS WITH FreeBSD
Date: 31 Dec 1993 17:59:43 +1030
Organization: cleese.apana.org.au public access UNIX +61-8-3736006
Lines: 57
Message-ID: <2g0kdl$2d9@cleese.apana.org.au>
References: <CIq8w7.7rM@csi.compuserve.com>
NNTP-Posting-Host: cleese.apana.org.au

In article <CIq8w7.7rM@csi.compuserve.com> mfoley@csi.compuserve.com (M Foley) writes:
>4. I cannot use the sio devices. I tried, but could not log in to my tty01.  
>   I reran 'MAKEDEV sio0 sio1 sio2 sio3' - didn't help.  The ttys and 
>   gettytab files are vanilla - I haven't touched them since the system 
>   install (except that I commented out tty00 - the mouse).  When I tried 
>   to cat something to tty01 logged in as root - I was dead.  It never came 
>   back.  I couldn't ^C out.  I had to reset the system.
>
>   Same problem with tty02 (modem). When I used kermit to access, after I
>   did "set line /dev/tty02", kermit didn't respond back. When I ^C'd, I
>   got the kermit prompt and was then able to "connect" and talk to the modem.
>
>   I worked around the problem by removing /dev/tty0* and doing
>   "MAKEDEV com0 com1 com2 com3" and rebuilt my kernel using the com
>   devices instead of the sio devices. Works fine. What's the problem???

Someone asks questions like this in these newsgroups every other week.
This stuff really should be in the FAQ.

The reason why you couldn't login on tty00 is probably because you
didn't add it to /etc/ttys.  Yes?

If you did, and you still couldn't login, then the most likely reason is
that you have dumb 3-wire serial cable.  The sio drivers behave like
"real" UNIX tty drivers -- they don't complete their open() until DCD is
asserted unless you disable that feature with ioctl() or tcsetaddr()
(or, from the shell, use "stty clocal").

The sio drivers also know about flow control, so if you have 3-wire
null modems which don't have a clue about flow control, you'll have to
use stty -crtscts too.  Note that getty will try to turn crtscts back
on (so disabling flow control then starting up getty is a pointless
exercise).

The reason the com drivers worked is because they're too damned stupid
to have the faintest idea about what to do with RTS, CTS and DCD.  They
just ignore them outright.  Unless you have 16550s, they'll also drop
characters like crazy at any baud rate greater than 2400.

The solution?  Re-config your kernel to use sio, and make yourself some
*REAL* terminal cables.  For modems, you just need a straight-through
25pin cable (or, at least, a cable which has TD, RD, CTS, RTS, DCD and
DTR connected).  For terminals, you should tie DTR at the terminal's 
end to DCD at the computer's end, and perhaps bridge CTS and RTS at
the computer's end (assuming that your terminal is fast enough to not need
any hardware flow control when it's displaying data.  You'll need to wire
the flow-control properly if that isn't the case.  Most modern terminals
can cope happily with 9600bps with no flow control, though).

   - mark


-- 
--------------------------------------------------------------------
I tried an internal modem,                newton@cleese.apana.org.au
     but it hurt when I walked.                          Mark Newton
----- Voice: +61-8-3735575 --------------- Data: +61-8-3736006 -----