Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Multiple serial consoles via null modem cable

47 views
Skip to first unread message

Marin Atanasov

unread,
Jan 12, 2010, 10:14:44 AM1/12/10
to freebsd-...@freebsd.org, freebsd...@freebsd.org
Hello there,

I'd like to ask you about the following - is it possible to have multiple
serial consoles coming from a single host?

What I am talking about is connecting multiple machines using a null modem
cable - I know it is possible only to connect two machines and they need to
be connected on sio0 (COM1).

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.

This would make the first machine something like a cheaper kind of a
terminal concentrator :)

What do you think, have someone tried this and is it possible at all?

Thanks and regards,
DNAeon

Jeremy Chadwick

unread,
Jan 12, 2010, 11:08:16 AM1/12/10
to freebsd...@freebsd.org

What you're describing is basically the concept of a serial console
server, where a FreeBSD box contains a multi-port serial card that's
connected to multiple other servers. An individual would get on the
FreeBSD box with a multiport serial card (see below) and attach to the
serial port associated (wired to) whatever other box they want to log on
to.

Yes this is possible with FreeBSD -- but you'll need to purchase a
multiport serial card that's supported natively by FreeBSD. The two I'm
familiar with are Cyclades and DigiBoard, but this would've been back in
the day of FreeBSD 2.2.x and I've no idea what people use present-day.
I'm certain others here can recommend stuff that works.

But my personal/professional opinion is that you consider purchasing an
actual serial console server rather than "hack up" a FreeBSD box.

Most serial console servers these days (and even old Portmasters) can do
serial-to-TCP association, which allows you to literally do "telnet
consoleserver NNNN" where NNNN is a TCP port which is bound to a serial
port connected to each individual server. E.g. port 2000 = box#1, port
2100 = box#2, etc..

As far as present-day devices go, the ones I can recommend are the
LX-series devices[1] from MRV Communications. They're Linux-based, and
although may seem expensive (16-port w/out modem = ~US$1400), are a
one-time purchase. Cyclades also makes identical devices, but they cost
something like US$3000-4000, and they wouldn't provide me with a
test/demo unit so I blew 'em off.

You can also consider looking for used hardware -- either Xyplex devices
(MRV bought Xyplex), or Portmaster[2] products. I believe Cisco made
some devices as well. WRT Portmasters, be aware that some of the
firmware images are spotty in quality (HELP commands missing,
undocumented commands, etc.).

There's two ports which can make interfacing/using these devices, or a
multiport serial card, much easier -- Conserver[3]. I work with the guy
who wrote it, so I'm biased. :-)

ports/comms/conserver
ports/comms/conserver-com

I'm not sure what the first port is to be honest, but the 2nd port is
what I'm used to using with an MRV LX-4016S device.

If you'd like a bit more detail about "how it all works" (the software,
the hardware, configuration details, wiring, etc.), I can describe it in
greater detail. Just ask.

[1]: http://www.mrv.com/oobn/
[2]: http://portmasters.com/
[3]: http://www.conserver.com/

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

Michal

unread,
Jan 12, 2010, 11:29:03 AM1/12/10
to freebsd...@freebsd.org

<snip>

You've actually mentioned one here, Digi. They make console devices and
I've used, with great success. Ours had modems as well so we had a
normal TCP and a phone line for DR. There is a range of sizes, SSH2 and
some have 2 psu's. They have American as well as European providers,
though I can't remember where we purchased ours from. We didn't use ours
on servers however, they where just for switches, routers, load
balancers et al so I can't comment on how well they worked with those,
but I can't see it being any different.

http://www.digi.com/products/consoleservers/digicm.jsp

Torfinn Ingolfsen

unread,
Jan 12, 2010, 11:42:59 AM1/12/10
to freebsd...@freebsd.org
On Tue, 12 Jan 2010 08:08:16 -0800
Jeremy Chadwick <fre...@jdc.parodius.com> wrote:

> Yes this is possible with FreeBSD -- but you'll need to purchase a

And easy enough with conserver[1] and conserver-com[2] in ports.
No reason to exclude FreeBSD from this task. :)

References:
1) http://www.freshports.org/comms/conserver/
2) http://www.freshports.org/comms/conserver-com/
--
Regards,
Torfinn Ingolfsen

Olivier Gautherot

unread,
Jan 12, 2010, 11:04:37 AM1/12/10
to Marin Atanasov, freebsd...@freebsd.org, freebsd-...@freebsd.org
Hi Marin,

I'd like to ask you about the following - is it possible to have multiple
> serial consoles coming from a single host?
>

In theory, no :-) RS232 is a point-to-point connection. If you want to feed
several consoles through the same serial port, you will need some kind of
switch to route the traffic to the corresponding port (whether the cable
needs to be null modem or not wil depend on the switch itself).


What I am talking about is connecting multiple machines using a null modem
> cable - I know it is possible only to connect two machines and they need to
> be connected on sio0 (COM1).
>
> 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.
>
> This would make the first machine something like a cheaper kind of a
> terminal concentrator :)
>

The options that come up to my mind are:
- a mechanical switch but it would not allow seamless routing (requires
operator action to change channel)
- a software switch using ESCAPE codes to change channel through an ad-hoc
device driver - but there, make sure you don't miss bytes or the traffic may
end up on the wrong terminal
- if you fancy a home design, you could use the parallel port to send an
address word but you will have to design your own seial port emulation on
top of the standard sio0 to synchronize the signals... I would not bet too
much on this one ;-)

Also, evaluate if you need priority management: you may get to a situation
where you need to send urgently characters to a terminal while another one
has a long queue pending. In this case, you may be better off with
Ethernet-to-Serial or USB-to-Serial converters.


Hope it helps
Cheers
--
Olivier Gautherot
oli...@gautherot.net
Cel:+56 98 730 9361
www.gautherot.net
http://www.linkedin.com/in/ogautherot

Boris Samorodov

unread,
Jan 12, 2010, 12:04:52 PM1/12/10
to Marin Atanasov, freebsd...@freebsd.org, freebsd-...@freebsd.org
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

--
WBR, Boris Samorodov (bsam)
Research Engineer, http://www.ipt.ru Telephone & Internet SP
FreeBSD Committer, http://www.FreeBSD.org The Power To Serve

Charles Sprickman

unread,
Jan 12, 2010, 12:23:51 PM1/12/10
to Boris Samorodov, freebsd...@freebsd.org, Marin Atanasov, freebsd-...@freebsd.org

On Jan 12, 2010, at 12:04 PM, Boris Samorodov <bs...@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
>

I need to look it up when I'm in front of a real computer, but there
are a number of reasonably priced multport USB to serial converters
out there. We have a 16 port model that's rack mounted and cost
around $400. It works better many of the more expensive multiport
serial cards. Paired with conserver, it's a really nice solution.
Conserver's logging is great...

I've used old dedicated terminal servers in the past and they can be a
pain to deal with. The newer ones are probably nicer, but are also
lots of money.

C

> --
> WBR, Boris Samorodov (bsam)
> Research Engineer, http://www.ipt.ru Telephone & Internet SP
> FreeBSD Committer, http://www.FreeBSD.org The Power To Serve

> _______________________________________________
> freebsd...@freebsd.org mailing list
> http://lists.freebsd.org/mailman/listinfo/freebsd-stable
> To unsubscribe, send any mail to "freebsd-stabl...@freebsd.org
> "

Charles Sprickman

unread,
Jan 12, 2010, 2:50:29 PM1/12/10
to Boris Samorodov, Marin Atanasov, freebsd...@freebsd.org, freebsd-...@freebsd.org
On Tue, 12 Jan 2010, Charles Sprickman wrote:

>
> On Jan 12, 2010, at 12:04 PM, Boris Samorodov <bs...@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
>>
>
> I need to look it up when I'm in front of a real computer, but there are a
> number of reasonably priced multport USB to serial converters out there.

Here we go:

http://www.usbgear.com/USB-Serial.html

Some very cool stuff there. They also list the chipset used in some of
those so you have some idea if it will work with FreeBSD. I think Vixie
originally pointed me to this model:

http://www.usbgear.com/computer_cable_details.cfm?sku=USB-16COM-RM&cats=199&catid=493%2C494%2C474%2C199%2C461%2C106%2C1009%2C601

If anyone has the lowdown on which chipsets generally work with FreeBSD
(especially with all the changes in 8.0), that would be great.

The above model works great on an old 4.11 box. It's an FTDI chipset - at
the very bottom of the page they even claim FreeBSD and OpenBSD support.

dmesg:

uhub2: Genesys Logic USB Hub, class 9/0, rev 1.01/0.11, addr 2
uhub2: 7 ports with 7 removable, self powered
ucom0: FTDI USB FAST SERIAL ADAPTER, rev 2.00/5.00, addr 3
[...]
ucom11: FTDI USB FAST SERIAL ADAPTER, rev 2.00/5.00, addr 8
[...]
uhub3: Genesys Logic USB Hub, class 9/0, rev 1.01/0.12, addr 9
uhub3: 4 ports with 4 removable, self powered
ucom12: FTDI USB FAST SERIAL ADAPTER, rev 2.00/5.00, addr 10
[...]
ucom15: FTDI USB FAST SERIAL ADAPTER, rev 2.00/5.00, addr 11

Charles

Jeremy Chadwick

unread,
Jan 12, 2010, 3:56:52 PM1/12/10
to freebsd...@freebsd.org
On Tue, Jan 12, 2010 at 02:50:29PM -0500, Charles Sprickman wrote:
> On Tue, 12 Jan 2010, Charles Sprickman wrote:
>
> >On Jan 12, 2010, at 12:04 PM, Boris Samorodov <bs...@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
> >>
> >
> >I need to look it up when I'm in front of a real computer, but
> >there are a number of reasonably priced multport USB to serial
> >converters out there.
>
> Here we go:
>
> http://www.usbgear.com/USB-Serial.html
>
> Some very cool stuff there. They also list the chipset used in some
> of those so you have some idea if it will work with FreeBSD. I
> think Vixie originally pointed me to this model:
>
> http://www.usbgear.com/computer_cable_details.cfm?sku=USB-16COM-RM&cats=199&catid=493%2C494%2C474%2C199%2C461%2C106%2C1009%2C601
>
> If anyone has the lowdown on which chipsets generally work with
> FreeBSD (especially with all the changes in 8.0), that would be
> great.

The same device appears here:

http://www.serialgear.com/USB-16COM-RM.html
http://www.allserial.com/usb_16com-rm.html

Quite inexpensive compared to an actual serial console server! I had no
idea such a device existed (well, USB-to-serial adapters, sure, just not
ones which housed 16 adapters or was rack-mountable. :-) ). Decently
sized FIFO buffers as well (128/384 byte Tx/Rx), at least compared to a
classic 16650A (14/16 byte Tx/Rx). Usually larger FIFO == can handle
higher bps without character loss.

I've 5 questions about this device:

* Does it work with/use hardware flow control (CTS/RTS)?
* Have you tested it for character loss at 115200bps rates?
* How do you configure each port (speed, flow, etc.)?
* Does it work under FreeBSD 8.x (given that the entire USB stack
was re-written)?
* Do you have any idea what the power usage is on this device (in amps)?
(Our MRV claims 1A max, but drives about 0.25A or so).

> The above model works great on an old 4.11 box. It's an FTDI
> chipset - at the very bottom of the page they even claim FreeBSD and
> OpenBSD support.
>
> dmesg:
>
> uhub2: Genesys Logic USB Hub, class 9/0, rev 1.01/0.11, addr 2
> uhub2: 7 ports with 7 removable, self powered
> ucom0: FTDI USB FAST SERIAL ADAPTER, rev 2.00/5.00, addr 3
> [...]
> ucom11: FTDI USB FAST SERIAL ADAPTER, rev 2.00/5.00, addr 8
> [...]
> uhub3: Genesys Logic USB Hub, class 9/0, rev 1.01/0.12, addr 9
> uhub3: 4 ports with 4 removable, self powered
> ucom12: FTDI USB FAST SERIAL ADAPTER, rev 2.00/5.00, addr 10
> [...]
> ucom15: FTDI USB FAST SERIAL ADAPTER, rev 2.00/5.00, addr 11

Very nice -- the fact they're using FTDI chips is good (from what I
understand of USB-to-serial adapters).

> > We have a 16 port model that's rack mounted and cost around $400.
> >It works better many of the more expensive multiport serial cards.
> >Paired with conserver, it's a really nice solution. Conserver's
> >logging is great...
> >
> >I've used old dedicated terminal servers in the past and they can
> >be a pain to deal with. The newer ones are probably nicer, but
> >are also lots of money.

Classic devices (like the Portmaster) are indeed a pain in the butt to
deal with. I've no experience with Ciscos, but in the case of the PM,
documentation vs. implementation mismatch galore. The MRV devices are
thoroughly documented (it borders on overwhelming -- I'd say half of the
configuration parameters are foreign to me), and I think the Cyclades TS
devices are as well; it's the cost of the Cyclades which blows my mind
(zero justification for it too, other than "enterprise cost mentality",
e.g. charge as much as possible because large businesses will pay it).

I think for folks who want a multiport serial console device that sits
on Ethernet, the MRV or Cyclades device would be a good choice, since
it's a standalone unit which doesn't need to be physically cabled to a
"host" box (and often a good choice for those who want modem-based OOB
access to devices, since it can house a v.90 modem). For those with
less requirements and want to spend less, the above USB-to-serial device
looks fantastic -- and at almost 1/4th the cost of our MRV. :-)

As usual, thanks for the insights, Charles!

Marten Vijn

unread,
Jan 12, 2010, 5:30:16 PM1/12/10
to Marin Atanasov, freebsd...@freebsd.org, freebsd-...@freebsd.org


I have a dozen UBS2serial (uplcom) up 24/7 over more than 6 months, on
8.0 (NanoBSD on ITX-board) in our serverrooms. They work pretty stable
and are dead cheap. Max 20 Euro per line, including a null-modem
adapter.

like:
http://www.gridconnect.com/numomatomadb.html
or
http://www.buyextras.com/numoaddb9fef.html


I payed about ~3 dollars per adapter. (shipping to Europe was most
expensive)

Kind regards,
Marten

>
> Thanks and regards,
> DNAeon


> _______________________________________________
> freebsd...@freebsd.org mailing list
> http://lists.freebsd.org/mailman/listinfo/freebsd-stable
> To unsubscribe, send any mail to "freebsd-stabl...@freebsd.org"


--
http://www.voedselbankleiden.nl needs your help!
http://martenvijn.nl
http://bsd.wifisoft.org/nek/
http://opencommunitycamp.org OCC 2010


Charles Sprickman

unread,
Jan 13, 2010, 1:11:39 AM1/13/10
to Jeremy Chadwick, freebsd...@freebsd.org

Damn, $130 more than usbgear.com...

> Quite inexpensive compared to an actual serial console server!

Very much so! And if you already have a sort of "utility box" in a rack,
this makes a nice add-on. There are some very cheap 4 and 8 port models
as well.

> I had no idea such a device existed (well, USB-to-serial adapters, sure,
> just not ones which housed 16 adapters or was rack-mountable. :-) ).

Who knows what's inside, there are two USB hubs in there... But yeah,
rack-mount and AC power are nice.

> Decently sized FIFO buffers as well (128/384 byte Tx/Rx), at least
> compared to a classic 16650A (14/16 byte Tx/Rx). Usually larger FIFO ==
> can handle higher bps without character loss.
>
> I've 5 questions about this device:
>
> * Does it work with/use hardware flow control (CTS/RTS)?

Yes. There were a few machines that were giving me issues with the old
3-wire RocketPort card we had (which only had 8 ports, cost more *used*
than this USB thing cost new, had buggy drivers, and only had a 3-wire
interface) and they worked fine when moved to this device.

> * Have you tested it for character loss at 115200bps rates?

Nope, never had much luck getting everything (BIOS, loader, getty) all
talking at the same speed, so I just leave it at 9600. Zero issues
though...

> * How do you configure each port (speed, flow, etc.)?

I let conserver deal with that - I set the baud, parity and "options" in
the default stanza for all ports. It apparently does the "right thing"
when opening the port. Again, zero issues.

> * Does it work under FreeBSD 8.x (given that the entire USB stack
> was re-written)?

No idea, don't even have an 8.x machine at that site. If you have any
contacts over at ISC, you might ask there, I got the impression from Vixie
that this device became part of their standard co-lo build.

> * Do you have any idea what the power usage is on this device (in amps)?
> (Our MRV claims 1A max, but drives about 0.25A or so).

No clue, but I imagine it's negligible. The device generates almost no
heat, and all of that is in the area around the power supply.

>> The above model works great on an old 4.11 box. It's an FTDI
>> chipset - at the very bottom of the page they even claim FreeBSD and
>> OpenBSD support.
>>
>> dmesg:
>>
>> uhub2: Genesys Logic USB Hub, class 9/0, rev 1.01/0.11, addr 2
>> uhub2: 7 ports with 7 removable, self powered
>> ucom0: FTDI USB FAST SERIAL ADAPTER, rev 2.00/5.00, addr 3
>> [...]
>> ucom11: FTDI USB FAST SERIAL ADAPTER, rev 2.00/5.00, addr 8
>> [...]
>> uhub3: Genesys Logic USB Hub, class 9/0, rev 1.01/0.12, addr 9
>> uhub3: 4 ports with 4 removable, self powered
>> ucom12: FTDI USB FAST SERIAL ADAPTER, rev 2.00/5.00, addr 10
>> [...]
>> ucom15: FTDI USB FAST SERIAL ADAPTER, rev 2.00/5.00, addr 11
>
> Very nice -- the fact they're using FTDI chips is good (from what I
> understand of USB-to-serial adapters).

Yep, this was all plug-and-play. I also found a source for db9-db9 null
modem cables at about $3 a pop - much simpler than building rj-xx to db9
adapters (xyplex, rocketport) or dealing with giant harnesses (cisco,
xylogics).

>>> We have a 16 port model that's rack mounted and cost around $400.
>>> It works better many of the more expensive multiport serial cards.
>>> Paired with conserver, it's a really nice solution. Conserver's
>>> logging is great...
>>>
>>> I've used old dedicated terminal servers in the past and they can
>>> be a pain to deal with. The newer ones are probably nicer, but
>>> are also lots of money.
>
> Classic devices (like the Portmaster) are indeed a pain in the butt to
> deal with. I've no experience with Ciscos, but in the case of the PM,
> documentation vs. implementation mismatch galore. The MRV devices are
> thoroughly documented (it borders on overwhelming -- I'd say half of the
> configuration parameters are foreign to me), and I think the Cyclades TS
> devices are as well; it's the cost of the Cyclades which blows my mind
> (zero justification for it too, other than "enterprise cost mentality",
> e.g. charge as much as possible because large businesses will pay it).

I had surplus junk from the dialup days - Xylogics Annex boxes and Xyplex
boxes. Both suck in so many ways that they aren't even worth using. The
Annex stuff is still stuck in my brain, wasting valuable space.

> I think for folks who want a multiport serial console device that sits
> on Ethernet, the MRV or Cyclades device would be a good choice, since
> it's a standalone unit which doesn't need to be physically cabled to a
> "host" box (and often a good choice for those who want modem-based OOB
> access to devices, since it can house a v.90 modem). For those with
> less requirements and want to spend less, the above USB-to-serial device
> looks fantastic -- and at almost 1/4th the cost of our MRV. :-)

Hey, get an Alix board, slap it in a case with a CF card and put FreeBSD
and conserver on there. Plug an old Courier into one of those serial
ports and setup ppp for dial access. You'd still beat the cost of any
"appliance" and have something that's just as reliable. Conserver is what
really makes this a plug-and-play setup - it's very easy to get going and
it "just works".

> As usual, thanks for the insights, Charles!

Thank Vixie and ISC, they're the ones that found this device and the
usbgear.com guys...

C

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

Peter Jeremy

unread,
Jan 13, 2010, 2:49:52 AM1/13/10
to Jeremy Chadwick, freebsd...@freebsd.org
On 2010-Jan-12 08:08:16 -0800, Jeremy Chadwick <fre...@jdc.parodius.com> wrote:
[serial to TCP/IP adapters]

>As far as present-day devices go, the ones I can recommend are the
...

>
>You can also consider looking for used hardware -- either Xyplex devices

DECservers are good for this sort of thing as well. AFAIK we're still
using them at work.

I've also used the Digiboard Xem adapters quite successfully on both
FreeBSD and Solaris. Unfortunately, they are a bit tempramental on
FreeBSD: They can't share interrupts (you get interrupt storms if
you attempt it), digi(4) is limited to 16 ports (no expansion boxes)
and digi(4) hasn't been adapted to the new TTY subsystem and so won't
work on FreeBSD 8.

>There's two ports which can make interfacing/using these devices, or a
>multiport serial card, much easier -- Conserver[3]. I work with the guy
>who wrote it, so I'm biased. :-)

I can also thoroughly recommend conserver-com - as well as handling
local serial devices, it can talk to serial-over-TCP ports, handles
logging, distributed master/client hosts and allowed multiple people
to connect to a single serial port (though only one person has write
access at a time). Note that it's embedded in the LOM processor on
(eg) Sun v20Z.

--
Peter Jeremy

Jeremy Chadwick

unread,
Jan 15, 2010, 1:45:10 AM1/15/10
to freebsd...@freebsd.org
On Fri, Jan 15, 2010 at 08:34:17AM +0200, 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.

I'm referencing the product Charles showed, but the topology would look
like this:

+------------------------+
| USB to serial hub |
| U1---- FreeBSD box running conserver
| |
| |
+-P1---P2---P3---P4---..-+
| | | |
| | | |
| | | `-- box #4
| | `------- box #3
| `------------ box #2
`----------------- box #1

"U1" is the uplink port, which has to connect to something -- in this
case the FreeBSD box where conserver would run. The uplink port would
connect to a single USB port on the FreeBSD box.

The cabling between a port (Px) and a box would be serial (probably
DB9).

What you end up with on the FreeBSD box is a series of /dev entries
which are associated with all of the ports on the USB to serial hub,
using ucom(4). For example:

/dev/ttyU0 = P1 = box #1
/dev/ttyU1 = P2 = box #2
...

You'd then tell conserver using its configuration file that "box name
foo is attached to /dev/ttyU0, box name bar is attached to /dev/ttyU1"
and so on.

Then to get access to the serial console of either foo or bar, you'd SSH
to the FreeBSD machine and type "console foo" or "console bar". Voila.

Make sense?

Marin Atanasov

unread,
Jan 15, 2010, 1:34:17 AM1/15/10
to freebsd-...@freebsd.org, freebsd...@freebsd.org
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.

Thank you and regards,
Marin

--
Marin Atanasov Nikolov
dnaeon AT gmail DOT com
daemon AT unix-heaven DOT org

Marin Atanasov

unread,
Jan 15, 2010, 2:07:21 AM1/15/10
to freebsd-...@freebsd.org, freebsd...@freebsd.org
Yeap, that makes sense :)

Thank you, I'm gonna try it as soon as I get that device :)

Thanks again,
Marin

On Fri, Jan 15, 2010 at 8:45 AM, Jeremy Chadwick
<fre...@jdc.parodius.com>wrote:

> _______________________________________________
> freebsd...@freebsd.org mailing list
> http://lists.freebsd.org/mailman/listinfo/freebsd-stable
> To unsubscribe, send any mail to "freebsd-stabl...@freebsd.org"
>

--

Ronald Klop

unread,
Jan 17, 2010, 8:32:21 AM1/17/10
to Marin Atanasov, freebsd-...@freebsd.org, freebsd...@freebsd.org
On Fri, 15 Jan 2010 07:34:17 +0100, Marin Atanasov <dna...@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.

Marin Atanasov

unread,
Jan 20, 2010, 1:46:48 AM1/20/10
to Ronald Klop, freebsd...@freebsd.org, freebsd-...@freebsd.org
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.

Regards,
Marin

Jeremy Chadwick

unread,
Jan 20, 2010, 2:46:11 AM1/20/10
to Marin Atanasov, freebsd-...@freebsd.org, freebsd...@freebsd.org, Ronald Klop
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...

--

Marin Atanasov

unread,
Jan 21, 2010, 4:37:06 AM1/21/10
to Jeremy Chadwick, freebsd-...@freebsd.org, freebsd...@freebsd.org, Ronald Klop
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
<fre...@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]

> 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

Ulrich Spörlein

unread,
Jan 21, 2010, 11:26:50 AM1/21/10
to Marin Atanasov, freebsd...@freebsd.org, freebsd-...@freebsd.org
On Thu, 21.01.2010 at 11:37:06 +0200, Marin Atanasov wrote:
> 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.

Are there actually two gettys running on the serial ports? Did you do
kill -1 1 after the changes to /etc/ttys?

On box1, what do the following commands produce

egrep "uart|sio" /var/run/dmesg.boot
pgrep -fl getty

Regards,
Uli

Marin Atanasov

unread,
Jan 22, 2010, 1:36:51 AM1/22/10
to Marin Atanasov, freebsd-...@freebsd.org, freebsd...@freebsd.org

Hi,

This is the output from the requested commands:

box1# egrep 'uart|sio' /var/run/dmesg.boot
usb0: USB revision 1.0
sio0: <16550A-compatible COM port> port 0x3f8-0x3ff irq 4 flags 0x10 on
acpi0
sio0: type 16550A
sio1: <16550A-compatible COM port> port 0x2f8-0x2ff irq 3 on acpi0
sio1: type 16550A

box1# pgrep -fl getty
3066 /usr/libexec/getty std.9600 ttyd1
3065 /usr/libexec/getty std.9600 ttyd0
534 /usr/libexec/getty Pc ttyv7
533 /usr/libexec/getty Pc ttyv6
532 /usr/libexec/getty Pc ttyv5
531 /usr/libexec/getty Pc ttyv4
530 /usr/libexec/getty Pc ttyv3
529 /usr/libexec/getty Pc ttyv2
528 /usr/libexec/getty Pc ttyv1
527 /usr/libexec/getty Pc ttyv0

Regards,
Marin

N.J. Mann

unread,
Jan 22, 2010, 3:02:23 AM1/22/10
to Marin Atanasov, Ronald Klop, freebsd...@freebsd.org, Jeremy Chadwick, freebsd-...@freebsd.org
In message <717f7a3e1001210137p788...@mail.gmail.com>,

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.
--

Jeremy Chadwick

unread,
Jan 22, 2010, 4:11:27 AM1/22/10
to freebsd...@freebsd.org

Can you run the same commands on box2 please?

Marin Atanasov

unread,
Jan 22, 2010, 11:10:23 AM1/22/10
to Marin Atanasov, Jeremy Chadwick, freebsd-...@freebsd.org, freebsd...@freebsd.org, Ronald Klop

Seems I've found the issue, that I'm having - a broken null modem cable :(

The last time I was using that cable it was working fine. And now that I
connected a second one to the machine, it seemed that only the one connected
to COM1 was actually working, and I was left with the impression from the
documentation that only COM1 is able to do a serial console connection.

I'm very sorry to bother you like that. I'll continue setting up the servers
once I get a new null modem cable.

Thanks and regards,
Marin

Nicolas Rachinsky

unread,
Jan 22, 2010, 4:05:49 PM1/22/10
to freebsd...@freebsd.org
* Jeremy Chadwick <fre...@jdc.parodius.com> [2010-01-19 23:46 -0800]:

> 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. :-)

Isn't the reason for different dial-in and dial-out devices that this
should work? Or does that only work with modem?

http://www.freebsd.org/doc/en_US.ISO8859-1/books/faq/serial.html#ACCESS-SERIAL-PORTS

Nicolas
--
http://www.rachinsky.de/nicolas

0 new messages