LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
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 11-22-2005, 11:43 AM   #1
steaktc
LQ Newbie
 
Registered: Oct 2005
Location: UK
Posts: 7

Rep: Reputation: 0
Can only use one of my serial ports


I am trying to use an external modem and I have four serial ports. I can connect the modem to ttyS0 and query it using kermit fine, but then when I connect it to ttyS1 it doesn't respond and I experience the same behaviour for the other ports.

The ports seem to be detected normally and they exist. If I cat /proc/tty/driver/serial while ttyS0 is working correctly with my modem, it says this:

serinfo:1.0 driver revision:
0: uart:16550A port:000003F8 irq:4 tx:238 rx:351 RTS|CTS|DTR
1: uart:16550A port:000002F8 irq:3 tx:0 rx:0 DSR|CD|RI
2: uart:16550A port:000003E8 irq:4 tx:0 rx:0 DSR|CD|RI
3: uart:16550A port:000002E8 irq:3 tx:0 rx:0 CTS|DSR|CD|RI


However, if I then connect the modem to ttyS1 and connect kermit to the port and repeat the command, I get this:

serinfo:1.0 driver revision:
0: uart:16550A port:000003F8 irq:4 tx:238 rx:351
1: uart:16550A port:000002F8 irq:3 tx:0 rx:0 RTS|CTS|DTR|DSR|CD|RI
2: uart:16550A port:000003E8 irq:4 tx:0 rx:0 DSR|CD|RI
3: uart:16550A port:000002E8 irq:3 tx:0 rx:0 CTS|DSR|CD|RI


I notice that RTS|CTS|DTR has disappeared from line 0 and moved to line 1 but also, DSR|CD|RI is present on line 1. I am guessing this is why it's not working. I am assuming that if DSR|CD|RI was not present on line 1 then it would work.

Is there a way to get lines 1, 2 and 3 to behave like line 0 so that they work?

Thanks,
Tom
 
Old 11-23-2005, 06:07 AM   #2
steaktc
LQ Newbie
 
Registered: Oct 2005
Location: UK
Posts: 7

Original Poster
Rep: Reputation: 0
I have fixed this now. The problem was with the IRQs. It turned out that ttyS2 and ttyS3 shouldn't have been IRQ 4 and 3 respectively. Instead, they were IRQs 10 and 11.
I used setserial to change the IRQ of ttyS2 and then it worked..... sort of.

/proc/tty/driver/serial still shows the same signals for the ports, so it still shows RTS|CTS|DTR|DSR|CD|RI for ttyS1 when it's in use, but this time it works. I was therefore wrong about the presnce of DSR|CD|RI causing a problem.

However, when I try and change the IRQ of ttyS3, it actually changes the one for ttyS2!

I use this command:
setserial /dev/ttyS3 irq 11 port 0x2e8

and then I get this:
cat /proc/tty/driver/serial

serinfo:1.0 driver revision:
0: uart:16550A port:000003F8 irq:4 tx:238 rx:351
1: uart:16550A port:000002F8 irq:3 tx:0 rx:0 DSR|CD|RI
2: uart:16550A port:000003E8 irq:11 tx:0 rx:0 DSR|CD|RI
3: uart:16550A port:000002E8 irq:3 tx:0 rx:0 CTS|DSR|CD|RI

ttyS2 has changed from irq10 to irq11 and I can't work out why!
Why doesn't setserial /dev/ttyS3 ...... etc actually change ttyS2 instead?

In my kernel config file, all the entries to do with SERIAL have 8250 appended.
E.g.
CONFIG_SERIAL_8250=y
CONFIG_SERIAL_8250_CS=y
CONFIG_SERIAL_8250_SHARE_IRQ=y
etc etc

Could that have anything to do with it?
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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
Serial ports KenHorse Programming 2 12-27-2004 08:49 AM
Cannot get PCI Serial ports up paul.nel Linux - Hardware 2 11-10-2003 01:04 PM
accessing serial ports w/ c++ iggy_mon Programming 3 08-31-2003 07:05 PM
Serial Ports (tty´s) aqoliveira Linux - Hardware 4 06-21-2002 10:06 AM


All times are GMT -5. The time now is 03:15 AM.

Main Menu
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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration