Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 19 Jan 2010 23:46:11 -0800
From:      Jeremy Chadwick <freebsd@jdc.parodius.com>
To:        Marin Atanasov <dnaeon@gmail.com>
Cc:        freebsd-hardware@freebsd.org, freebsd-stable@freebsd.org, Ronald Klop <ronald-freebsd8@klop.yi.org>
Subject:   Re: Multiple serial consoles via null modem cable
Message-ID:  <20100120074611.GA405@icarus.home.lan>
In-Reply-To: <717f7a3e1001192246o4dce4a82q57c05ff3f41b5feb@mail.gmail.com>
References:  <717f7a3e1001120714m37aada69gfaa35f0f9b17f435@mail.gmail.com> <44678539@bb.ipt.ru> <717f7a3e1001142234y1de7ae15x6853e3ddcab4add9@mail.gmail.com> <op.u6oij7dz8527sy@212-123-145-58.ip.telfort.nl> <717f7a3e1001192246o4dce4a82q57c05ff3f41b5feb@mail.gmail.com>

next in thread | previous in thread | raw e-mail | index | archive | help
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

This means that login prompts for box1 will be spawned/available on both
serial ports (ttyu0 and ttyu1).

If you get on box2 and do "cu -l ttyu2", this will connect you to box2's
COM3 port, which is physically connected to box1's COM1 port.  Hit enter
and you should see a login: prompt for box1.

The same applies if you get on box2 and do "cu -l ttyu3" (but for box2's
COM4 port, which is wired to box1's COM2 port).

With the above configuration in mind, you SHOULD NOT:

- Mess with /etc/ttys on box2
- Execute "cu -l ttyu0" or "cu -l ttyu1" on box1 -- this probably won't
  work (likely will return some message about the device being locked or
  in use already).

You cannot do something like where box1 COM1 is wired to box2 COM1, and
depending on what box you're on doing the "cu -l ttyu0" from, get a
login prompt on the other.  It doesn't work like that.  :-)

Now, about actual *serial console* itself -- that is to say, kernel
output during boot, etc... on a serial port.  AFAIK, on FreeBSD you can
only set serial console to a single serial port, and that defaults to
COM1/ttyu0.  You can change what port/device, but there can only be one.

HTH...

> On Sun, Jan 17, 2010 at 3:32 PM, Ronald Klop <ronald-freebsd8@klop.yi.org>wrote:
> 
> > On Fri, 15 Jan 2010 07:34:17 +0100, Marin Atanasov <dnaeon@gmail.com>
> > wrote:
> >
> >  Thank you a lot for your feedback!
> >>
> >> Now to the real question again, because I'm a little confused now - can I
> >> still get a usb-to-serial port converter having let's say 8 serial ports
> >> and
> >> then connect each machine to the usb-to-serial hub and manage them
> >> remotely
> >> from a single location (the host having the usb-to-serial hub)? That way I
> >> just specify a serial port number and I get to a specific machine?
> >>
> >> The model provided by Boris looks nice, and that was my initial idea, but
> >> I'm not sure if I could get it working under FreeBSD. Is conserver or
> >> conserver-com able to handle this? I know that cu uses COM1 only, but will
> >> conserver able to handle serial consoles on different ports, since the
> >> usb-to-serial port would appear as multiple serial ports.
> >>
> >
> > You can provide cu with the port to connect to on the command line.
> >
> > cu -l cuaU0 -s 115200
> > cu -l cuaU1 -s 115200
> > etc.
> >
> > You can not connect several servers on 1 serial port, but you can connect
> > several servers on several serial ports. With serial-over-usb it scales to
> > many serial ports.
> >
> > Ronald.
> >
> >
> >> Thank you and regards,
> >> Marin
> >>
> >>
> >> On Tue, Jan 12, 2010 at 7:04 PM, Boris Samorodov <bsam@ipt.ru> wrote:
> >>
> >>  On Tue, 12 Jan 2010 17:14:44 +0200 Marin Atanasov wrote:
> >>>
> >>> > I'm thinking about the following situation - 1 system acting like a
> >>> host
> >>> > with a serial port hub, each port of the hub is connected to a
> >>> different
> >>> > machine on sio0, using null modem cables.
> >>>
> >>> Along with milti-io serial cards we use multi-usb serial
> >>> converters, such as SUNIX UTS7009P (7 USB to serial adapter):
> >>> http://www.sunix.com.tw/it/en/LinkCraft/UTS4009P_UTS7009P.htm

-- 
| Jeremy Chadwick                                   jdc@parodius.com |
| Parodius Networking                       http://www.parodius.com/ |
| UNIX Systems Administrator                  Mountain View, CA, USA |
| Making life hard for others since 1977.              PGP: 4BD6C0CB |




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