LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Hardware (https://www.linuxquestions.org/questions/linux-hardware-18/)
-   -   Can only use one of my serial ports (https://www.linuxquestions.org/questions/linux-hardware-18/can-only-use-one-of-my-serial-ports-385537/)

steaktc 11-22-2005 11:43 AM

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

steaktc 11-23-2005 06:07 AM

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?


All times are GMT -5. The time now is 12:10 AM.