I have a laptop which has only one serial port.

I went into:

/dev 

directory, and I found:

ttyS0
ttyS1
ttyS2
ttyS3

How do I know which of those "ttyS" refers to my serial port?

link|improve this question

56% accept rate
feedback

2 Answers

ttyS0 through 3 correspond to COM1 through 4, respectively. They usually have the same hardware resources and are not always detectable, so they always exist.

link|improve this answer
thanks for the answer. So say I want to tell Linux that I want ttyS0 to map to my serial port hardware, what do I need to do? – ShaChris23 Apr 14 '10 at 21:18
You would use setserial to map the resources ttyS0 uses to that of your serial port. linux.die.net/man/8/setserial This isn't normally required though, since anything beyond COM4 usually has enough auxiliary hardware to allow Linux to detect it and add a serial device as appropriate. – Ignacio Vazquez-Abrams Apr 14 '10 at 21:26
feedback
up vote 1 down vote accepted

I think it's this command:

dmesg | grep tty

Running that on my own Linux box (which only has 1 Serial port) produces a single ttyS0 output line. Try it on your own, you will see what I mean.

link|improve this answer
feedback

Your Answer

 
or
required, but never shown

Not the answer you're looking for? Browse other questions tagged or ask your own question.