Download your favorite Linux distribution at LQ ISO.
Go Back > Forums > Linux Forums > Linux - Newbie
User Name
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!


  Search this Thread
Old 01-04-2009, 01:13 PM   #1
Registered: Nov 2007
Posts: 61

Rep: Reputation: 15
How can i identify tty device

I am working on an embedded board which have linux. The /dev directory shows the following...
# ls
console mmc mtdr1 ptyp9 sde ttyACM1 ttyp3
cua0 mmc0 mtdr2 ram0 spi0 ttyS0 ttyp4
cua1 mmc1 mtdr3 ram1 spi1 ttyS1 ttyp5
flash mmc2 mtdr4 ram2 tty ttyS2 ttyp6
gpio mtd0 null ram3 tty0 ttyS3 ttyp7
hda mtd1 ppp random tty1 ttyS4 ttyp8
hda1 mtd2 ptyp0 rtc tty2 ttyS5 ttyp9
hda2 mtd3 ptyp1 sda tty3 ttyS6 urandom
hda3 mtd4 ptyp2 sda1 tty4 ttyS7 watchdog
hda4 mtdblock0 ptyp3 sda2 tty5 ttyS8 zero
ipsec mtdblock1 ptyp4 sda3 tty6 ttyUSB0
kmem mtdblock2 ptyp5 sda4 tty7 ttyUSB1
ledman mtdblock3 ptyp6 sdb tty8 ttyp0
log mtdblock4 ptyp7 sdc tty9 ttyp1
mem mtdr0 ptyp8 sdd ttyACM0 ttyp2

I have ttyS0 - ttyS8 which represent the terminal devices, ttyS0 represents the serial terminal, How can i know that ttyS0 is serial console terminal. And if i have 9 serial devices, how can i know which device represents which ttyS_. Please tell me how can i identify the device. My doubt is not only ttyS devices but all the devices.
Old 01-04-2009, 06:37 PM   #2
Simon Bridge
LQ Guru
Registered: Oct 2003
Location: Waiheke NZ
Distribution: Ubuntu
Posts: 9,211

Rep: Reputation: 198Reputation: 198
The OS keeps track of which dev belongs to which device.

Users normally figure out which dev got which device by examining the syslogs (dmesg).
You sound like you want to write a driver, or write software using a particular IO channel?

Basically, you have a lot of reading to do.
Start with the udev man page.

Then a book...

... or a tutorial, depending on your level...

Last edited by Simon Bridge; 01-04-2009 at 06:40 PM.


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
Can not identify device name for USB device cgtaylor Linux - Hardware 2 12-24-2006 04:19 PM
How to use the Win device id to identify it on Linux? OLEGHA Linux - Laptop and Netbook 1 02-25-2006 03:09 PM
How to identify a card with wrong device id? gnu_1 Linux - Laptop and Netbook 2 09-23-2004 05:54 PM
Closing serial tty device cgobbe Linux - Newbie 2 09-03-2004 04:19 PM
Is there a utility to identify on which device the CD-ROM exists during installation luts Linux - Software 2 02-21-2002 09:14 PM > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 11:26 PM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration