20140803 a tale of ttys0 - plembo/onemoretech GitHub Wiki
title: A tale of ttyS0 link: https://onemoretech.wordpress.com/2014/08/03/a-tale-of-ttys0/ author: phil2nc description: post_id: 8092 created: 2014/08/03 02:12:19 created_gmt: 2014/08/03 06:12:19 comment_status: closed post_name: a-tale-of-ttys0 status: publish post_type: post
A tale of ttyS0
While waiting for my embedded PC Engines APU bundle from Mini-Box to arrive I decided to get re-acquainted with the ancient art of serial (as in RS-232) console connections. All I needed was two computers, each with their own serial port. Easier said. At first I assumed the easiest route would be to just buy a native RS-232 card for one of my home-built Linux boxes. The Lenovo Thinkcentre that acts as my personal workstation at home already had an RS-232 interface on its mainboard, and I'd tested to make sure ttyS0 was up and responding to probes ("setserial -g /dev/ttyS0"). The problem was, my other machine had a "no legacy" board and so my options for add-on cards were limited to PCI 1x cards. It turns out that my investigation would be simplified by the fact that it appeared that many of the available cards used the same chipset: PLX Technology's Oxford Semiconductor OXPCIe952 or variations thereon (another was the MOSChip 9865). Hardware manufacturers or re-packagers like Syba, Star Tech and Rosewill are famous for being vague about what chipsets they ship with their products. That's mostly because in the dynamic business of sourcing parts the components they use, and the design of the final product, are constantly changing. My task was made harder by the the morass of fragmented, confusing and outdated information about RS-232 on Linux. The last major update to the Serial HOWTO was in February, 2011 -- months before the release version 3.0 of the Linux kernel (my Fedora systems are now all at 3.15.6). Even the New Egg comment system failed me, providing such overwhelmingly unhelpful comments like "Works on Windows 7", "Doesn't work on Windows 8", "Use the Vista drivers for Windows 2003". In the end I wound up ordering a Syba SI-PEX15037 from Amazon. It's built around the Sipex 3243E. The Linux driver provided was for kernels 2.4 or 2.6, and would not compile on my kernel 3.15 systems. The few reviews given for this and other cards were mostly superficial, as were the forum and mailing list posts that discussed it. It was pretty easy to see, after spending some time researching the subject, that getting that card to work in my system was going to be a hit-or-miss affair. It was a miss. There was just no way the system was even going to recognize it. In the end I looked around to see if there were any alternatives, and it turned out there was: USB Serial. This solution, involving an adapter that could bridge RS-232 to motherboard usb, had a lot of fans and turned out to work right "out of the box". I initially tested using a generic external serial to usb adapter cable from my local computer shop. This was immediately recognized by the system, which assigned it to /dev/ttyUSB0 (see a bit of HOWTO here). After some additional research I confirmed my worst suspicions regarding the available native RS-232 cards for PCI 1x, and ordered a StarTech ICUSB232INT1 DB9 RS-232 to USB header adapter that can use one of the free usb connectors on my motherboard. Because the comments on New Egg had been more helpful than those on Amazon, I decided to order from the former (the price difference was only a couple of dollars for shipping). The reviews on New Egg are by and large superior to those on Amazon because of New Egg's substantially more technical audience.
Copyright 2004-2019 Phil Lembo