LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Hardware
User Name
Password
Linux - Hardware This forum is for Hardware issues.
Having trouble installing a piece of hardware? Want to know if that peripheral is compatible with Linux?

Notices


Reply
  Search this Thread
Old 09-09-2009, 04:42 PM   #1
michael.barnes
Member
 
Registered: Jan 2007
Location: Dallas, Oregon
Distribution: Ubuntu; Knoppix; DSL; Raspbian
Posts: 30

Rep: Reputation: 0
Kernel support for more serial ports


I built a new machine and decided to try Kubuntu on it. Downloaded 9.04 today (9/9/09) and installed normally.

The motherboard has one serial port. I added a four port PCI serial card. It appears that only four serial ports are supported. I discovered another machine running Ubuntu has the same issue.

~$ ll /dev/ttyS*
crw-rw---- 1 root dialout 4, 64 2009-09-09 08:47 /dev/ttyS0
crw-rw---- 1 root dialout 4, 65 2009-09-09 08:47 /dev/ttyS1
crw-rw---- 1 root dialout 4, 66 2009-09-09 08:47 /dev/ttyS2
crw-rw---- 1 root dialout 4, 67 2009-09-09 08:47 /dev/ttyS3


On my SuSE machines I get:

~> ll /dev/ttyS*
crw-rw---- 1 root uucp 4, 64 2009-09-09 13:14 /dev/ttyS0
crw-rw---- 1 root uucp 4, 65 2009-06-25 14:30 /dev/ttyS1
crw-rw---- 1 root uucp 4, 66 2009-06-25 14:30 /dev/ttyS2
crw-rw---- 1 root uucp 4, 67 2009-06-25 14:30 /dev/ttyS3
crw-rw---- 1 root uucp 4, 68 2009-06-25 14:30 /dev/ttyS4
crw-rw---- 1 root uucp 4, 69 2009-06-25 14:30 /dev/ttyS5
crw-rw---- 1 root uucp 4, 70 2009-06-25 14:30 /dev/ttyS6
crw-rw---- 1 root uucp 4, 71 2009-06-25 14:30 /dev/ttyS7


The Kubuntu machine assigns ttyS0 to the on-board port and ttyS1-3 to the expansion card. That leaves me unable to use the fourth port on the card.
If I go into BIOS and disable the on-board serial port, then all four ports of the expansion card are active, so I know it works.

Someplace, I believe I read where someone had to get the sources and build a custom kernel to support 8 serial ports. I'd really rather not go that route.
~$ uname -a
Linux xxx-xxx 2.6.28-15-generic #49-Ubuntu SMP Tue Aug 18 18:40:08 UTC 2009 i686 GNU/Linux



Is there a config file or something somewhere I can set the max number or otherwise increase support so I can use all five com ports?

Thanks,

Michael
 
Old 09-09-2009, 05:36 PM   #2
anomie
Senior Member
 
Registered: Nov 2004
Location: Texas
Distribution: RHEL, Scientific Linux, Debian, Fedora
Posts: 3,935
Blog Entries: 5

Rep: Reputation: Disabled
I'm out of my element here, but I would recommend reading through the setserial(8) manpages. It looks like you should be able to accomplish what you want using that program.
 
Old 09-09-2009, 06:22 PM   #3
GrapefruiTgirl
LQ Guru
 
Registered: Dec 2006
Location: underground
Distribution: Slackware64
Posts: 7,594

Rep: Reputation: 556Reputation: 556Reputation: 556Reputation: 556Reputation: 556Reputation: 556
Have a look at post#2 here: http://www.linuxquestions.org/questi...38#post3651838 for the basics of the file /etc/serial.conf where you can configure the serial ports on the machine, like which one is ttyS0, which is ttyS1, etc., as well as telling the machine the location(s) of the registers used for each port.

Basically I gave an example based on my Slackware system, but yours should be similar, providing you have the serial.conf file or a Kubuntu equivalent file.

Now, by default, I believe that the kernel, and thus, most common distros, are configured to provide for a max of 4 serial ports. Usually, you would need to rebuild the kernel to add support for more. You *might* need to do this anyway, depending on the nature/make/model/chipset of the card you're using. If it's a typical dumb serial board, maybe you can get around rebuilding the kernel. Try the following:

On the kernel boot-line you use to boot your OS (or with an APPEND to/on the boot line in LILO or GRUB) add the following parameter:

Code:
nr_uarts=5
To try to tell the OS you want a max of 5 uarts (serial IC's) configured. I got that parameter from the file "kernel-parameters.txt" which is included in the linux kernel /Documentation folder, or which you can quickly locate by Googling it.

Using these two options (the serial.conf file, plus the boot parameter) you should be able to enable 5 (or however many) serial ports, as well as define which tty is which, if you need specific ports to be specific ttys.

Good luck, and do tell us if this works for you.
Sasha

Last edited by GrapefruiTgirl; 09-09-2009 at 06:24 PM.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
How to use serial ports in kernel? jamespayne Programming 24 06-24-2014 12:20 PM
Disabled serial ports on kernel 2.6.27-7-generic davidmb Linux - Hardware 0 12-01-2008 11:13 AM
Slackware kernel with Serial port support as module maartenvdbent Slackware 16 06-11-2006 10:54 AM
Can't get serial ports after upgraded Kernel longnam Slackware 2 06-11-2005 04:51 AM
Kernel config/compilation (serial ports, lirc, apm) Hex29A Debian 2 02-07-2004 05:55 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Hardware

All times are GMT -5. The time now is 11:19 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration