Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 8 Apr 2005 19:44:57 +1200
From:      Jonathan Chen <jonc@chen.org.nz>
To:        Jani Luukkanen <jani@soundflows.com>
Cc:        freebsd-questions@freebsd.org
Subject:   Re: Serial console connection problem
Message-ID:  <20050408074457.GA5989@osiris.chen.org.nz>
In-Reply-To: <4256298D.7080704@soundflows.com>
References:  <4254EE05.8000302@soundflows.com> <20050407192714.GA3678@osiris.chen.org.nz> <4256298D.7080704@soundflows.com>

next in thread | previous in thread | raw e-mail | index | archive | help
On Fri, Apr 08, 2005 at 09:49:49AM +0300, Jani Luukkanen wrote:

[...]
> Weird, fstat shows nothing on the port;
> 
> root@mos root # fstat /dev/cuaa0
> USER     CMD          PID   FD MOUNT      INUM MODE         SZ|DV R/W NAME
> root@mos root #
> 
> And yes, this is problem is on the 4.10 machine which is connecting to 
> the 5.3 one.
> 
[...]
> Might be this is the problem, here is all gettys running on the 4.10 
> machine:

[...]
> root     238  0.0  0.1   956  516  d0  Is   16Mar05   0:00.00 
> /usr/libexec/getty std.9600 console
> 
> The last one (console) does not appear on the 5.3 machines processlist, 
> would it be safe to kill that one just like that with kill -9 238 (If 
> that is the process locking the port)?

You have to do a bit more than this. First you have to disable the
getty on the 4.10 machine by editing /etc/ttys, and then "kill -HUP 1"
and then kill the getty if it still exists.

You then have to enable the getty on the the 5.3 box by editing
/etc/ttys and then "kill -HUP 1".

The getty has to be running on the machine that you're going to
connect *to*.

> The connection is ordinary serial cable, do you mean that should specify 
> from BSD side what kind of connection is it?
> 
> >Make sure that you haven't got a getty running at the same time on
> >both sides, and that you've got a null-modem connection between the two
> >hosts instead of a straight thru'.
> >

Serial cables come in 2 basic flavours: straight thru' and null-modem.
A straight-thru is what you use if you want to connect the machine to
a modem. A null-modem connection is what you use if you want to
connect from host to host. If you use the wrong cable, no output will
show, and you may possibly get a device-busy message as well.

Cheers.
-- 
Jonathan Chen <jonc@chen.org.nz>
----------------------------------------------------------------------
                 When you don't know what you are doing, do it neatly.



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20050408074457.GA5989>