[svlug] serial ports
rick at linuxmafia.com
Wed Nov 18 21:41:01 PST 2015
Hi, Howard! Long time no see.
Quoting Howard Susman (howard at scsurplus.com):
> In old old Linux, I had no trouble using serial ports for communication.
> Then maybe ten years ago serial ports did not work for me. I never
> discovered why.
Not your imagination, by the way. I've heard this same thing from a lot
of other people over the years.
My working theory is that either the mainline kernel or distros keep
breaking one or more of the components required for RS-232C serial
devices (mice, modems, other stuff) to work -- accidentally -- and not
noticing the breakage before release for the simple reason that none of
the key QA people are using the affected devices.
It's damned annoying and frustrating for (say) your modem PPP connection
to suddenly not work because your distro shipped with broken serial
support, especially if that's the key way you connect to networks -- but
you realise, I'm sure, that few Linux users rely on PPP over serial, any
In that situation, I'd first try a simple test using an old serial mouse
from my old-parts cabinet and the gpm (general purpose mouse) daemon.
Why? Because that's about the simplest possible test harness for serial
functionality in Linux. The gpm daemon supports copy-paste operations
in Linux virtual consoles even if no X11 is running at all.
Link: The 3 Button Serial Mouse mini-HOWTO
Link: Serial HOWTO
If you cannot make that work, then it's some problem with the /dev node
(/dev/ttyS0 or whatever), or your init scripts not bothering to run the
setserial command to initialise the port (see the the Serial-HOWTO),
or kernel module generic_serial aka serial (depending on kernel version)
isn't being loaded.
The latter is very often the problem in modern distros: They provide a
serial driver, but just don't load it by default, because so many modern
PCs don't even include those ports any more. Check by doing:
$ lsmod | grep serial
The HOWTOs mentioned can give you further help, if you ever need it
> For some reason, I gave it a try under Ubuntu 15.10. My
> ports are back!
Somebody at Ubuntu remembered to check that, then.
More information about the svlug