Enabling Unrecognized Serial Ports

Printer-friendly versionPrinter-friendly version

Sometimes, you've got a serial card that isn't included in the kernel's list of known devices for some reason. It could be that it is just a very small manufacturer, or perhaps the card you've got is newer than the kernel you've got. In either case, as long as the card you have is a 16550 UART, you should be fine. This little gem will get your card recognized and working smoothly. First, you've got to see if your card is even seen by the kernel. You can do this with

lspci

If the kernel lists it as an 'Unknown' device, then it won't show up in

setserial -g /dev/ttyS* | grep -iv unknown

If this is the case, you can force the recognition by specifying the irq and io ports from the command line, and make it stick on reboot by putting the command you issue into /etc/rc.local (or /etc/rc.d/rc.local on some systems). To find out which settings to use, issue

lspci -v | more

and look for your card. The output of lspci in verbose mode should show you the irq of the card in question, plus a list of io ports available for it. To make use of these, take down the irq, plus the first io port ( or first and second if you have a two-port serial card ). Next, from the command line issue

setserial /dev/ttyS4 irq <irq> port <port num> autoconfig

then, to make sure it stuck, you can issue

setserial -g /dev/ttyS4

which should show you that your serial device is now recognized as a 16550.

To fix this so it works after a reboot, you'll need to put the above line somewhere in your startup environment. The obvious place would be

/etc/rc.d/rc.local

or

/etc/rc.local

Search Engine Optimization