Multiple serial consoles via null modem cable

N.J. Mann njm at njm.me.uk
Fri Jan 22 08:02:32 UTC 2010


In message <717f7a3e1001210137p7884adcbxc66a4f7fff928821 at mail.gmail.com>,
	Marin Atanasov (dnaeon at gmail.com) wrote:
> Hello Jeremy,
> 
> Now I'm a little confused :)
> 
> I've made some tests with my machines and a couple of null modem cables, and
> here's what I've got.
> 
> On Wed, Jan 20, 2010 at 9:46 AM, Jeremy Chadwick
> <freebsd at jdc.parodius.com>wrote:
> 
> > On Wed, Jan 20, 2010 at 08:46:48AM +0200, Marin Atanasov wrote:
> > > Hello,
> > >
> > > Using `cu' only works with COM1 for me.
> > >
> > > Currently I have two serial ports on the system, and only the first is
> > able
> > > to make the connection - the serial consoles are enabled in /etc/tty, but
> > as
> > > I said only COM1 is able to make the connection.
> >
> > I'm a little confused by this statement, so I'll add some clarify:
> >
> > /etc/ttys is for configuring a machine to tie getty (think login prompt)
> > to a device (in this case, a serial port).  Meaning: the device on the
> > other end of the serial cable will start seeing "login:" and so on
> > assuming you attach to the serial port there.
> >
> > For example:
> >
> > box1 COM1/ttyu0 is wired to box2 COM3/ttyu2 using a null modem cable.
> > box1 COM2/ttyu1 is wired to box2 COM4/ttyu3 using a null modem cable.
> >
> > On box1, you'd have something like this in /etc/ttys:
> >
> > ttyu0   "/usr/libexec/getty std.9600"   vt100  on secure
> > ttyu1   "/usr/libexec/getty std.9600"   vt100  on secure
> >
> 
> Here's what I did:
> 
> box1 COM1/ttyd0 -> box2 COM1/ttyd0 -> using null modem cable
> box1 COM2/ttyd1 -> box3 COM1/ttyd0 -> using null modem cable
> 
> On box1 I have this in /etc/ttys:
> 
> ttyd0   "/usr/libexec/getty std.9600"   vt100   on secure
> ttyd1   "/usr/libexec/getty std.9600"   vt100   on secure
> 
> Now if I want to connect to box1 from box2 or box3 through the serial
> connection it should work, right?
> But I only can connect to box1 from box2, because box2's COM port is
> connected to box1's COM1 port.
> 
> >From box2 I can get a login prompt
> box2# cu -l /dev/cuad0 -s 9600
> Connected
> 
> login:
> )
> (host.domain) (ttyd0)
> 
> login: ~
> [EOT]
> 
> But if I try to connect to box1 from box3 - no success there.
> box3# cu -l /dev/cuad0 -s 9600
> Connected
> ~
> [EOT]

You need to reduce the number of unknowns, e.g. where is the problem:
box1, box3 or in between.  So, swap the cables on box1 so that you now
have box1:COM1 -> box3:COM1 and box1:COM2 -> box2:COM1.  Now repeat the
tests above and post your results.


Cheers,
       Nick.
-- 



More information about the freebsd-stable mailing list