Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 25 Sep 2008 21:00:22 +0200
From:      Bernd Walter <ticso@cicely7.cicely.de>
To:        Dieter <freebsd@sopwith.solgatos.com>
Cc:        freebsd-usb@freebsd.org, freebsd-alpha@freebsd.org, freebsd-hardware@freebsd.org
Subject:   Re: alpha/127248: System crashes when many (7) serial port terminals (vt320-vt510) connected to the server via com to usb adapter and 2-usb hubs.
Message-ID:  <20080925190022.GB93308@cicely7.cicely.de>
In-Reply-To: <200809251701.RAA18993@sopwith.solgatos.com>
References:  <20080925125417.GQ93308@cicely7.cicely.de> <200809251701.RAA18993@sopwith.solgatos.com>

next in thread | previous in thread | raw e-mail | index | archive | help
On Thu, Sep 25, 2008 at 10:01:51AM +0100, Dieter wrote:
> [ -usb@ added to existing thread ]
> 
> > > > This is because USB is absolutely crap for this purpose.
> > > > RS232 terminals, especially with long cables, can produce several kind
> > > > of spikes and ground loops, which USB is very very sensitive about.
> > > 
> > > Many things about USB are crap (thanks, inthell), but if a USB to RS-232
> > > bridge cannot handle normal spikes and ground loops, I'd blame the
> > > bridge, not USB itself.  If the problem is spikes and ground loops
> > > there is probably some RS-232 filter/isolator available to clean them
> > > up.  There could be a bug in the bridge which needs a software workaround.
> > > In any case the system shouldn't crash.
> > > 
> > > Are there specific make&model USB to RS-232 bridges that people
> > > have had good luck with?
> > 
> > USB can't handle spikes and ground loops.
> > As said: use isolated devices, so you don't have the loops and spikes.
> > You can blame the device for not being isolated, but you expect every
> > device to provide expensive workaround for a design failure.
> > USB is designed for cheap stuff - that's all about it.
> 
> Surely a "good" USB to RS-232 bridge (if one exists?) or a RS-232
> filter/isolator (assuming they exist?) would be *far* less expensive
> than the server class alpha you suggest below.

It depend on how much RS232 you need and how many slots the OP has free.
Nevertheless a "good" RS232 bridge if needed in number are not cheap
either - ntoe that you can get affordable PCI extenders as well.

> And IIRC it is just speculation that the original poster's problem is
> caused by spikes or ground loops.

No it is not speculation - I know USB very well and the device disconnected,
which is very typical for electrical problems caused by ground loops.

> > Yes - the system shouldn't crash, but don't expect it ever being fixed
> > for FreeBSD-alpha.
> 
> There is a 6.4 coming out, yes?  It is unlikely that the problem is alpha specific.
> If an alpha crashes, other archs will likely crash.

This is a design problem with our USB stack, which is likely to be handled
by the HPS stack which is going into current.
The problems are way too old that there is a real chance that anyone will
ever fix it in the old stack and the new one will not be backported to 6.x,
since the changes for a stable branch are too invasive.

> > > > My advise is to use a completely other technology to connect the terminals.
> > > > A galvanic isolated USB device might work, but there are lot of PCI and
> > > > Ethernet devices on the market which are more solid by design than USB.
> > > 
> > > The problem with PCI is the limited number of slots.  :-(
> > 
> > Well - not realy with server class alphas...
> 
> In my world, a "server" means 1-4 full height 19" racks with quite large
> price tags and power&cooling requirements.  Some people think a server
> is a pee-cee.  So I'm not sure what you mean by "server class alphas".

Server doesn't mean rack, but beside from a few OEM boards and small
19" system all alphas have lots of free slots available.

> I have what I would call a "workstation" class alpha, which cost an
> obscene amount to get 6 PCI slots instead of 4, and at times they are
> all full.  So I can't use up a slot just to get a couple more RS-232
> ports.  How many PCI slots does a server class alpha have?

Well the AS4100 I have already has 8 slots which is not that uncommon
for alpha servers.
The real big ones can even have a few hundred slots.

> RS-232 doesn't require PCI levels of bandwidth.  Something like a

It doesn't need high bandwidth, but it doesn't hurt either.
For terminals it needs the ability to accept ground loops.
For other purposes it needs low latency - USB has a latency of 1-2ms,
which is a few thousand times higher than ISA.
You can get better results with any kind of cheap ISA RS232 card.

> USB to RS-232 bridge could be a good solution, if I knew which
> make&model of bridge worked well with *BSD.  Poking around on the web
> I can't even find what chip they have inside.

Really forget about USB to RS232.
It is not the chip which is the problem it is the principal.
You really need galvanic isolation, because USB can't handle ground
loops, which no cheap device has.
You can use any kind of chip with propper isolation, but then it
is likely more expensive than any other kind of solution.

> Do these bridges actually work properly, or do they have gotchas
> like the USB to SATA/PATA bridges?

The prolific bridges work well enough if you don't have a ground
loop and FTDI chips are better IMHO.

> > > Ethernet could be a good solution for some applications, if you
> > > can get the software to deal with it.  NFS is crap, *real* distributed
> > > file systems handled devices transparently.  (thanks, Sun)
> > 
> > This is a different topic.
> > For RS232 Ethernet is quite reasonable.
> 
> For some applications yes.  But some apps want to open /dev/ttyXX
> and do ioctls on it.  How does one use such an app on Free/Net/OpenBSD
> with the RS-232 device on some Ethernet connected RS-232 port?

It depend on the way you use it.
In most cases you just use raw connection and configure it out of band.
In some cases you use telnet encapsulation to allow break handling.
But you are free to use other protocoll.
Anyway: this doesn't apply to terminal use, since you don't need to
change the communication parameters after initial setup.

> > > Does anyone make firewire to RS-232 bridges?
> > 
> > Or stay with the old DEC devices - they are rock solid even after all
> > those years.
> 
> It is not obvious what "old DEC devices" you are referring to.

Reread the original post - it was about replacing a solid DEC ethernet
terminal concentrator with a bunch of crappy USB-RS232 adapters.

-- 
B.Walter <bernd@bwct.de> http://www.bwct.de
Modbus/TCP Ethernet I/O Baugruppen, ARM basierte FreeBSD Rechner uvm.



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