From owner-freebsd-stable@FreeBSD.ORG Thu Jan 21 09:37:10 2010 Return-Path: Delivered-To: freebsd-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 0FB44106566B; Thu, 21 Jan 2010 09:37:10 +0000 (UTC) (envelope-from dnaeon@gmail.com) Received: from mail-ew0-f218.google.com (mail-ew0-f218.google.com [209.85.219.218]) by mx1.freebsd.org (Postfix) with ESMTP id 3C1838FC16; Thu, 21 Jan 2010 09:37:08 +0000 (UTC) Received: by ewy10 with SMTP id 10so672560ewy.34 for ; Thu, 21 Jan 2010 01:37:08 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:in-reply-to:references :date:message-id:subject:from:to:cc:content-type; bh=sqMIkumRMq9TlsPfLK2qQWp4vTtYohm6CdcFeeT/1X0=; b=pc/VYTpqAbnqSNzfQsOYiDz5G6VjIbdV2B9nPENmDqhxyK11T8VsKpmIiQ2Wu14bVs 58YsrvRnuXfCuJVNsKmCfq9LNdPGSdFYZy7k6o+f/mdcJgSZNgl6QnLfF+VXtsHAEVpI blqw7dnsskHj4jRV0EDgGgh1aZqVzqvOjKG4g= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; b=l58jsdOKKqiVmKnsO5/lC9Pv5CkJtyFVtiZB0ZDdVX3qUOkpQ4WdQsHUGnDotEV9sS NcrPZldIgc0/OCsllsCM9NgSoSJ7f59rjGJYLz8hydzSqNPmrIxU9PLK3g9iZ1OCFcI4 TjamWMmzEmJk4cobopRSNjusITCNOnKDAMUBc= MIME-Version: 1.0 Received: by 10.216.87.79 with SMTP id x57mr439612wee.83.1264066626626; Thu, 21 Jan 2010 01:37:06 -0800 (PST) In-Reply-To: <20100120074611.GA405@icarus.home.lan> References: <717f7a3e1001120714m37aada69gfaa35f0f9b17f435@mail.gmail.com> <44678539@bb.ipt.ru> <717f7a3e1001142234y1de7ae15x6853e3ddcab4add9@mail.gmail.com> <717f7a3e1001192246o4dce4a82q57c05ff3f41b5feb@mail.gmail.com> <20100120074611.GA405@icarus.home.lan> Date: Thu, 21 Jan 2010 11:37:06 +0200 Message-ID: <717f7a3e1001210137p7884adcbxc66a4f7fff928821@mail.gmail.com> From: Marin Atanasov To: Jeremy Chadwick Content-Type: text/plain; charset=ISO-8859-1 X-Content-Filtered-By: Mailman/MimeDel 2.1.5 Cc: freebsd-hardware@freebsd.org, freebsd-stable@freebsd.org, Ronald Klop Subject: Re: Multiple serial consoles via null modem cable X-BeenThere: freebsd-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Production branch of FreeBSD source code List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 21 Jan 2010 09:37:10 -0000 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 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] > 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. > > Yes, probably I didn't explain myself better, but you did it good - what I was trying to say is that I can use only one COM port for serial console, which of course defaults to COM1. Also is conserver/conserver-com able to handle more than one serial consoles on a machine? I haven't tried conserver yet. Thanks for the good explanation again :) Marin > HTH... > Now > > > 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 > > > 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 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 | > > -- Marin Atanasov Nikolov dnaeon AT gmail DOT com daemon AT unix-heaven DOT org