Will the Serial Console Ever Die? 460
simpz writes "Will the serial port as a console connection ever be displaced — especially for devices such as switches, routers, SAN boxes, etc.? In one sense it's a simple connection. But it is the only current port that, in order to use, you need to know about wiring / baud rates / parity, etc. It has non-standard pinouts. And it is becoming too slow to upload firmware to dead devices, as the firmware updates get larger. Also, the serial port is rapidly disappearing from new laptops — which is where you often really need it, in data centers. Centronics, PS/2, and current loop are mostly defunct. Is there any sign on the horizon of a USB console connection?"
The serial connection (Score:1, Interesting)
First there are plenty of USB-serial converters, so the lack of old-school DB9 serial ports on laptops is entirely a non-issue.
Also, some devices I see are already offering serial console access over USB, basically simulating I imagine what a USB-serial converter looks like, so if you plug into the device, you get USB-serial console access without the need of converting to serial and then having a serial cable. Also, USB carried serial consoles can operate at higher speeds than traditional rs232 cabling allowed, which should address firmware updates, as well as offering other means, such as USB access to real or simulated filesystems over the same USB port as a multi-device hub.
So the short answer, I see, is that the serial console is not "going away", but rather is slowly migrating to USB.
As long as (Score:5, Interesting)
Separate Good Functionality from old Hardware (Score:5, Interesting)
I actually posted an Ask-Slashdot [slashdot.org] about running a headless Linux Box that didn't have any serial ports... my question was about what happened in the 5% of cases where I couldn't SSH to the box (like if a kernel upgrade goes south). The basic answer was that I still needed a serial terminal. Oh, I know that USB can be used as a substitute, but the problem was that USB required a booted & functional kernel with a working USB stack to emulate the serial line. I recently saw a similar discussion in comments about how bad the old-school serial terminal code that is still in the Linux kernel is. Many people incorrectly thought the poster was saying that Linux shouldn't have a command line interface, which was completely wrong. The poster instead raised the (excellent) point that complicated and buggy software emulating long-obsolete device interfaces may not be good for the Kernel (CLI is NOT the same as a terminal interface).
Are there damn good reasons why RS-232 serial ports should be dropped from modern hardware? Hell yes, not the least of which is a 3-15 volt swing signalling protocol is an invitation to fry the low-voltage electronics on modern systems. However, the CONCEPT of having a box that does not require any type of graphics, or even a working network interface, is still very useful. So... what are the better technologies to accomplish the same goal without having to rely on antiquated hardware implementations?
Re:You can buy a serial-to-usb converter for $15 (Score:4, Interesting)
Re:It just works (Score:2, Interesting)
Re:It should have been phased out... (Score:5, Interesting)
Screw that. I do programming for embedded systems and serial is absolutely essential. Even the simplest bootloader supports standard serial. Hell, you can write an implementation of rs232 in an fpga in about 20 minutes. Its ubiquitous because requires no real software to make it work...and when you have barely any software working on a system, that uart can be the difference between hours and weeks of debugging.
Offshore Survey Industry (Score:5, Interesting)
Current project im working on we are using Moxa multiport serial boards w/ 32 serial ports on this pc with around 25 currently inuse for IO. (Historically used Digi boards but they were awful for timing (relatively!), 30ms delay compared to the near 0ms on the Moxa units.)
Simple to use, easily available, and cheap. Almost all the devices I work with use standard parity/stop bits etc, just varying baud rates, which is easy enough to remember.
USB is a poor choice - Ethernet works pretty well (Score:5, Interesting)
I understand what you are saying: RS232 ports suck for any number of reasons.
But there are a few why it is still often used.
First, it has been ubiquitous for 20 to 30 years. When I started my first development job in 1982 - everything talked to everything else via RS-232. Back then 9600 baud was considered fast. At 8 bits per character with no parity and one stop bit, 9600 baud could paint a screen with characters in one second. Yes, we thought that was fast. Things got better as baud rates improved - but RS-232 remained everywhere - it was the one constant universal interface. Even though it is incredible antiqued, it is still in many PCs.
Second, RS-232 (and its many cousins like RS-422) are very, very easy to use in software. The simplest I/O can be done in a few lines of code. Its easy to put RS-232 code right in firmware. This makes it easy to write bootstrapers, boot consoles, debug consoles etc.
USB would be a poor choice for a replacement. The reason is that it isnt peer to peer - it is a master/slave architecture. There is always one master -usually a PC, and one or more slaves (keyboards, mice, printers, scanners, cable modems, disk drives, storage keys, cameras etc).
It requires a special cable to make to client USB devices talk to each other. This cable has a small do-dad that looks like a master to both ends. This works ok, but it requires special knowledge of this USB end point to work correctly. Note, Windows began to support this in Vista for migration. Its called Windows Easy Transfer/a>.. There is a version for XP too ( [microsoft.com]downloadable/a>). It actually works very well, but the cables were not cheap. Note that the cables really are not cables - but a dual-headed master USB controller with two ports - it just looks like a cable with a lump in the middle - [microsoft.com] Belkin sells one for $40 [belkin.com].
LLike a few other posters have said - USB is much more complex to use in software than simple RS-232. Ive written code for it and I find it more complex than Ethernet at the MAC level.
I think Ethernet is the real replacement. A little TFT or Telnet server / client is really trivial to write. This can (and often has been done) in firmware. For example, most (all?) home Ethernet and wireless routers dont have a serial port. Their management is over Ethernet - works great.
-Foredecker
Re:Only one use left (Score:2, Interesting)
Well, I disagree about that being the only place. Serial ports are absolutely huge in the embedded world. A large number of consumer devices also use serial internally, and maybe convert to USB right at the edge of the box.
Networking brings up an interesting point. I actually prefer to add Ethernet to an embedded design over USB. It's actually easier, if you can believe that bull****. It's also massively more flexible and quite a bit faster.
Many TCP/IP stacks can be ported to a new platform by simply implementing a read, a write, and a status function to talk to your specific MAC.
USB is usually a horrible kludge taking some vendor's usb-to-serial or mass-storage example code and hacking the crap out of it until it works. The USB module registers are so different from vendor to vendor, etc.
At the PC level, it's different. There are some standards there. Even there, it usually takes custom device driver work to get a new device working... something that Microsoft should be totally ashamed about. They really should have provided something like libusb on Linux.
To summarize, USB is a horrible horrible bus for the thousands of smaller embeddded shops out there. It requires dealing with incredibly poor quality vendor example code, and worst of all you have to find someone who can write you a Windows device driver. Well... unless you're lucky enough to know how to do that yourself. I can, but it's such a pain in the ass that I'd much rather use Ethernet... which doesn't require a stupid driver on every OS you want to use it with.
Re:You can buy a serial-to-usb converter for $15 (Score:3, Interesting)
Yarg, I've got some industrial machinery that uses serial and I've yet to find a converter that has timing exactly like a real serial port. Know any with very exact timing(not bloody likely with USB)?
Fortunately, most of our newer machinery runs on straight cat5.
Re:It should have been phased out... (Score:3, Interesting)
My phone (Palm Pre) can even pull bootloader code over USB, so even if the boot flash gets hosed, it can recover via USB.
Serial shouldn't be needed outside of microprocessor development these days... that it is is sad.
Sure, a board may cost $0.50 more to manufacture... yea, stop penny-fraction-pinching you bastards!
Re:You can buy a serial-to-usb converter for $15 (Score:3, Interesting)
Yarg, I've got some industrial machinery that uses serial and I've yet to find a converter that has timing exactly like a real serial port. Know any with very exact timing(not bloody likely with USB)?
Fortunately, most of our newer machinery runs on straight cat5.
I'd guess you're running Modbus, or something similar.
What will we do with all the US Robotics Couriers? (Score:5, Interesting)
Guess what every SAC box has strapped to the back of the equipment rack - a US Robotics full-size (about 12"x7"x1") Courier modem!
Damned if I know where they're getting them from - but there they are...
Re:Serial Ports.. (Score:4, Interesting)
An awesome point that can't be overstated. Well, probably not anyway. There are modems, converters, terminal servers and several other ways to use a serial port on important hardware. Out of band management is one of the best reasons for ever using it. The dial up modem as fall back to access servers has not been replaced yet. I imagine that there are a few reading these posts that know serial backup saved their bacon more than once.
Re:RS232 port utility (Score:3, Interesting)
It enforces a management design constraint (Score:4, Interesting)
With the increasing complexity of network devices - switches, routers, load-balancers, firewalls, the expectancy of a functional terminal console puts a good design constraint on system developers. If they have to provide the ability within a 80x24 terminal funtionality to configure, operate and maintain a such a device it is a good thing. A good management is useful in providing an overview of the configuration and helps provide linkage to the management of components.
A serial terminal console is good because:-
* It enforces the designer to limit the presentation of management information to the 80x24 screen (possibly using pages), and often with a 9600bps data rate. My view is if they can't do it properly in a console they have not though well enough about management. Too often GUIs for management tend to hide important configuration parameters away.
* A terminal console allows easy copy-and-paste and script munging of configurations to ensure consistent deployment. GUIs don't allow such duplication of configurations very well.
* It allows simple out of band management through the use of a terminal server connecting multiple consoles. Such a simple management connection provides am always available management window in a network down situation. (Assuming this is deployed properly). You can also manage the risk well if management can ONLY be done by serial (preventing the management network inadvertently being connected to a production network.
* While standarardisation of the physical port (male or female DB9 or RJ45) and host type (DTE or DCE) and even hardware handshaking is right royal pain. At least it is usual possible to determine it after a minimum number of tries. But essential it is pretty straightforward to implement.
* While a USB connection sounds good, I would only prefer it if it was guaranteed to be a zero driver installation.
Re:Serial Ports.. (Score:2, Interesting)
Just because you can't type http://accessmyshit does not mean it isn't still very useful in the real world, particularly at large scale enterprise-grade data centers.
Re:You can buy a serial-to-usb converter for $15 (Score:4, Interesting)
Re:You can buy a serial-to-usb converter for $15 (Score:4, Interesting)
The main issue is delay. USB is a complex standard, it requires more processing power on both sides to run, and it's not truly great for realtime applications.
Certain simple electronic devices are just meant to be serial. Most PICs have built-in RS232/RS485 support while only few have USB support (and the very few are way more expensive.
I was wondering the same thing the other day. Actually, the only thing that is dying is parallel output.
Think about it:
LPT got replaced by USB
PCI (Which is parallel) got replaced by PCI express (serial)
IDE/PATA got replaced by SATA
Parallel SCSI got replaced by Serial SCSI
But regarding serial devices, wether it's USB or the simpler and slower RS232, they are here to stay. They are cheaper, simpler to implement, and more effective. Computers will have UART chips as long as 3D routers, PIC recorders, home-made electronics, and other similar devices have RS232 ports.
I believe we'll see RS232 for at least another decade.
RS232 is fee-free (Score:5, Interesting)
From a device manufacturer's point of view, RS232 is free to implement. No special drivers are required on the host.
Now, for USB, you have to either pony up $2000 PER YEAR to the USB implementers forum to get your own VID/PID and distribute a driver to your customers (and deal with the resulting customer service issues) or add a chip from FTDI (or similar) and piggyback on their VID/PID but then ask your customers to download and install a generic driver that does not specifically identify your hardware.
Gimme RS232 any day.
Re:It should have been phased out... (Score:2, Interesting)
Also to note, you can do cool things with serial. e.g. A BlueSMiRF device can sit on the outside of your serial device (just connect TX/RX and give it power), and it instantly transforms it to a Bluetooth signal. You can then read and write to serial via any computer with Bluetooth (pretty neat). Should mention this does break poorly-written timing sensitive serial applications like some bootloaders. But there you have it.
Re:It should have been phased out... (Score:1, Interesting)
I don't know about that. To 2015 EE graduates, this Serial to IDC Header Slot Plate Adapter [buy.com] might look like something dug out from an iron age excavation site, or at least like something that one might attach to dad's ancient computer box from 2003 in order to give it even more ancient functionality.
In short: we need better USB adapters. And any software that doesn't work with a really good USB adapter will have to be rewritten. I wonder what we will do when USB finally gets phased out...
Re:It should have been phased out... (Score:1, Interesting)
Are you sure the Palm Pre is running true USB in bootloader mode? Often in bootloader mode, phones will enumerate a USB-to-serial connection (similar to FTDI). Next time you're in bootloader mode check to see what driver is loaded for your phone, and I bet you $100 it's a serial to usb driver.
Re:It should have been phased out... (Score:3, Interesting)
Probably SPI, ISP or JTAG, of which only ISP is a RS-232 Serial Port and provides the fewest options.
(no PC stepping, no memory access , no register access, no offline programming)
Re:Would be nice to change the physical port spec (Score:3, Interesting)
That's nothing.
I used to have an 8-port BocaBoard (on a 486 PC which I stubbornly configured to have 14 working serial ports, just because).
It used 10-pin connectors (RJ-48?). At the time, Ebay didn't exist, and the tooling to put the connectors on was rather expensive, and 10-conductor flat lead was hard to find. You'd think, though, with 8 pin cabling being common, and RS-232 only ever really needing three, five, or seven pins (8 with RING), that they'd have included the most useful lines toward the middle of the connector, and the least useful lines toward the outside.
So that, you know, you could just plug in a 4, 6, or 8-wire cable and things would work.
They did not do this.
I forget if it was DSR, DTR, CTS, RTS, or what, but one of those fucking useful lines was on one of the outer-most pins of that 10-position connector -- the pin that was impossible to crimp properly. And one of the more useless lines was in toward the middle.
I honestly think that it's the fault of some marketer at Boca Research, who possessed enough clue to believe that in doing it this way he'd sell more cables. Instead, it just pissed me off enough that I never considered buying anything from Boca, at all.
I ended up clamping the connectors down in a vice, and with a small screwdriver and a hammer, gently tapping that one outside contact down into place.
That all said, I like the DB-9 connector. I can fasten it in place in bad environments, and it stays put. But they're such a pain to terminate that I usually end up using RJ-45 to DB-9 (or DB-25) adapters, anyway. So: if a standard is to be had, then Cisco's is probably as useful as any other.