Serial port question.

Serial port question.

Post by Lee soon » Fri, 29 Dec 2000 08:33:58



My computer has two serial ports.
Are they always coressponed to ttyS0 and ttyS1 respectively?
and how can I check whether a ttySx works?
 
 
 

Serial port question.

Post by Joerg Morbitze » Fri, 29 Dec 2000 16:49:56



> My computer has two serial ports.
> Are they always coressponed to ttyS0 and ttyS1 respectively?
> and how can I check whether a ttySx works?

Check boot messages using "dmesg", if you have two
serial interfaces you should see something like this:

ttyS00 at 0x03f8 (irq = 4) is a 16550A
ttyS01 at 0x02f8 (irq = 3) is a 16550A

If only one, obviously you would see only ttyS00.

Joerg.

 
 
 

Serial port question.

Post by Michael Heimin » Sat, 30 Dec 2000 00:44:32



> My computer has two serial ports.
> Are they always coressponed to ttyS0 and ttyS1 respectively?
> and how can I check whether a ttySx works?

Hello,

to really test if it's working,if you have no device to attach,
take a second computer and connect serial1 (/dev/ttyS0) with a
"null-modem-cabel"
((Txd/Rxd) cable are changed) to serial (/dev/ttyS0) of the other
machine.

Now type (as root):

cat </dev/ttyS0 on the receiving machine

On the sending one type:

echo hello >/dev/ttyS0

Change sender/receiver to know if it's working the other way too...:-)

Good luck

Michael Heiming
Sysadmin

--
       __   __   __     Virtueller Bau-Markt AG
 \  / [__) [__] [ __    Meerbuscher Strasse 64
  \/  [__) |  | [_./    40670 Meerbusch

 
 
 

Serial port question.

Post by Lee soon » Sat, 30 Dec 2000 19:26:31




>> My computer has two serial ports.
>> Are they always coressponed to ttyS0 and ttyS1 respectively?
>> and how can I check whether a ttySx works?

>Hello,

>to really test if it's working,if you have no device to attach,
>take a second computer and connect serial1 (/dev/ttyS0) with a
>"null-modem-cabel"
>((Txd/Rxd) cable are changed) to serial (/dev/ttyS0) of the other
>machine.

>Now type (as root):

>cat </dev/ttyS0 on the receiving machine

>On the sending one type:

>echo hello >/dev/ttyS0

>Change sender/receiver to know if it's working the other way too...:-)

>Good luck

>Michael Heiming
>Sysadmin

>--
>       __   __   __     Virtueller Bau-Markt AG
> \  / [__) [__] [ __    Meerbuscher Strasse 64
>  \/  [__) |  | [_./    40670 Meerbusch


Thanks a lot.
I think that it's a great idea.
But I slightly modified your method like this.

I connected one terminal of a null-modem cable into the first serial
port and the other therminal into the second serial port.
And...typed follow.

cat </dev/ttyS0       # in the fisrt virtual console
echo hello >/dev/ttyS1      # in the second virtual console

But....it seems not to work.
Is it a wrong method?

 
 
 

Serial port question.

Post by Michael Heimin » Sun, 31 Dec 2000 03:05:53





> >> My computer has two serial ports.
> >> Are they always coressponed to ttyS0 and ttyS1 respectively?
> >> and how can I check whether a ttySx works?

> >Hello,

> >to really test if it's working,if you have no device to attach,
> >take a second computer and connect serial1 (/dev/ttyS0) with a
> >"null-modem-cabel"
> >((Txd/Rxd) cable are changed) to serial (/dev/ttyS0) of the other
> >machine.

> >Now type (as root):

> >cat </dev/ttyS0 on the receiving machine

> >On the sending one type:

> >echo hello >/dev/ttyS0

> >Change sender/receiver to know if it's working the other way too...:-)

> >Good luck

> >Michael Heiming
> >Sysadmin

<SNIP>

Quote:

> Thanks a lot.
> I think that it's a great idea.
> But I slightly modified your method like this.

> I connected one terminal of a null-modem cable into the first serial
> port and the other therminal into the second serial port.
> And...typed follow.

> cat </dev/ttyS0       # in the fisrt virtual console
> echo hello >/dev/ttyS1      # in the second virtual console

> But....it seems not to work.
> Is it a wrong method?

Hello,

it should work if your serial ports are detected by the kernel and work.

type:

setserial -a /dev/ttyS1

apropos serial

man setserial

You should have some scripts under /depends_on_distro/init.d/serial,
look what it's doing.

Is your serial support compiled in the kernel, or loadable modul?

 cat /usr/src/linux/.config | grep SERIAL

Ismod

If compiled as loadable module look if is loaded? If not load it with
modprobe.

What says statserial:

statserial  /dev/ttyS0
<end with CTRL-C>

Wow, many things are related to those dump serial ports?

What says dmesg, if it's not lost cause last reboot is long ago?

Try this...

Thank god it's friday today...:-)

Michael Heiming

 
 
 

1. nwebie serial port question

hi,
got a piece of code that its output talks to serial PORT A but not to
serial port B. why not?. how to make it?.
jim

--
Sent by   from yahoo included in com
This is a spam protected message. Please answer with reference header.
Posted via http://www.usenet-replayer.com/cgi/content/new

2. FreeBSD does not recognize all my RAM

3. Palm pilot and serial port question

4. Help CD-RW HP-8100

5. Serial port question - I really need help.

6. WINS and DHCPd

7. ip_masq and serial port questions

8. GCC/LINUX/X graphics libraries

9. Serial Port Question

10. Serial Port Question (Log File)

11. serial port question.

12. serial port question

13. Please help with serial port question