Operating System - Linux
1823082 Members
3518 Online
109646 Solutions
New Discussion юеВ

unable to use serial port ttyS1: why?

 
Claudio Cilloni
Honored Contributor

unable to use serial port ttyS1: why?

Hi all.

my home pc has some troubles with the second serial port.
First serial port /dev/ttyS0 works great. If I connect my 56k modem to the second port, (/dev/ttyS1) and I click on 'Query Modem' on the configuration window of KPPP, modem lights flash a little and then a window appears saying 'modem busy'.

I tried to direct connect to another linux box though pppd with this command (that works well with /dev/ttyS0):

# pppd -detach crtscts persist 10.0.0.1:10.0.0.2 /dev/ttyS1 115200
Couldn't get channel number: Input/output error
Couldn't get channel number: Input/output error
Couldn't get channel number: Input/output error
Couldn't get channel number: Input/output error
Couldn't get channel number: Input/output error
Couldn't get channel number: Input/output error
Couldn't get channel number: Input/output error
Couldn't get channel number: Input/output error
Couldn't get channel number: Input/output error
Couldn't get channel number: Input/output error

lsof says this:
# lsof | grep ttyS1
# (no output)

Now... I'm not so expert about serial ports... what can I do?

I'm running RH9.

Thanks!

Ciao
Claudio
7 REPLIES 7
Steven E. Protter
Exalted Contributor

Re: unable to use serial port ttyS1: why?

The only thing I can suggest is a possible port conflict.

Reboot your machine and check the bios information on the serial ports. This situation reminds of of the time I set up a conflict making one of the serial ports on a Dell Poweredge Server effectively useless.

SEP
Steven E Protter
Owner of ISN Corporation
http://isnamerica.com
http://hpuxconsulting.com
Sponsor: http://hpux.ws
Twitter: http://twitter.com/hpuxlinux
Founder http://newdatacloud.com
Huc_1
Honored Contributor

Re: unable to use serial port ttyS1: why?

I am not to sure about this but, I would try it from minicom log in as root

like :

# minicom -s

from the menu serial port setup
A
/dev/ttyS1

EXIT
atd #! to check and/or A Z for more
#! x #! to exit

Normaly atd should return status message

The above is how I usualy debug com ports on my setup

Also you could check the protection on your devices ... here are the one i have here
# ls -l /dev/modem
lrwxrwxrwx 1 root root 5 May 14 2003 /dev/modem -> ttyS0


# ls -l /dev/ttyS0
crw-rw---- 1 root uucp 4, 64 Mar 7 17:03 /dev/ttyS0

crw-rw---- 1 root uucp 4, 65 Jan 30 2003 /dev/ttyS1

Hope this help

J-P





Smile I will feel the difference
Mark Grant
Honored Contributor

Re: unable to use serial port ttyS1: why?

The fact that your modem lights do something when kppp tries to get the modem information sort of suggests that the serial port itself is OK. I assume "dmesg" show you it working. Huc's suggestions or checking the permissions of ttyS1 make sense to me.

I don't know if the 115200 argument to your pppd command is the baud rate but if it is, I'd start of slower than that, say 9600 to be sure. You also need to make sure that data bits, stop bits and parity are correct (i.e tha same as ttyS0). stty < /dev/ttyS1 will show you. (cs7 is stop bits, parenb is even parity). You also want some form of handshaking (xon-xoff from the stty output). If the handshaing is "dts" then I think that's hardware handshaking and your modem cable needs to be made up correctly for that.

Other than that, you can just "cat" characters to the device and see if the modem lights flash properly. "cat AT > /dev/ttyS1" should do something.
Never preceed any demonstration with anything more predictive than "watch this"
Claudio Cilloni
Honored Contributor

Re: unable to use serial port ttyS1: why?

SEP suggestion seems to be on the right way. I gave a look into
BIOS configuration, and it should be an IRQ conflict.

actual configuration:
IRQ 4 -> COM1 /dev/ttyS0 (working)
IRQ 3 -> COM2 /dev/ttyS1 (not working)
IRQ 7 -> parallel port (working)

The sound card (PnP) dynamically choose IRQ 10.
I have also an old ISA network card (non PnP) that works well under
IRQ 3/ioaddr 0x300 (according to the manual configuration of the
eepro module).
So... there's a conflict between COM2 and the ISA network card.

I tried changing (in BIOS settings) the IRQ of COM2 from 3 to 10. Happens that the
sound card automatically goes on IRQ 3, conflicting with the
network card. COM2 is still not working. The only other choice of
IRQ number for COM2 is 4, yet assigned to COM1.

Now... Maybe a can force an IRQ to the sound card. It is possible?
How?
Another thing I can try is change the IRQ of the network card.
But again... how?

Other ideas?

Thanks,
Claudio
Mark Grant
Honored Contributor

Re: unable to use serial port ttyS1: why?

You can usually change IRQ's by giving the new irq as an argument in /etc/modules.conf.

something like "irq=3" is what you want.

Never preceed any demonstration with anything more predictive than "watch this"
Claudio Cilloni
Honored Contributor

Re: unable to use serial port ttyS1: why?

Are you sure, Mark? it seems to me that the arguments irq= and ioaddr= are used
to tell the module where it can found the network card. If I give other
values than irq=3 and ioaddr=0x300 my network card won't work. I founded these
values with a lot of insmod commands with random values (I had no documentation
about this card).
I think I need to tell the network card to use a different IRQ, and then tell to
the module to use that value.

Ciao
Claudio
Mark Grant
Honored Contributor

Re: unable to use serial port ttyS1: why?

You are absolutely right Claudio :) Must be the haircut I had over the weekend softened my brain.

I remember I had an old souncard that you could only get working in Windows by disabling the second serial port. There was no way of changing the IRQ on the sound card itself. You could just check you are on the right track by taking the sound card out.
Never preceed any demonstration with anything more predictive than "watch this"