LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Hardware
User Name
Password
Linux - Hardware This forum is for Hardware issues.
Having trouble installing a piece of hardware? Want to know if that peripheral is compatible with Linux?

Notices


Reply
  Search this Thread
Old 12-17-2010, 11:47 AM   #1
dayvidvictor
LQ Newbie
 
Registered: Nov 2010
Posts: 8

Rep: Reputation: 1
Multiserial Ports Identification


Hello everybody.
I'm writting an app for desktop and embedded linux and I need to get information about the multiserial port, and I need to know which port is been used (by a printer, por example).

The multiserial I'm using is an Altera Corporation Device 0004, and I just need to tell how many ports are there and how many is been used.

any ideas?

PS: I know if the multiserial is there by lspci, and to know the information I need I'm thinking about using setserial, but I'm having some trouble to do that.
 
Old 12-18-2010, 07:31 AM   #2
michaelk
Moderator
 
Registered: Aug 2002
Posts: 25,715

Rep: Reputation: 5899Reputation: 5899Reputation: 5899Reputation: 5899Reputation: 5899Reputation: 5899Reputation: 5899Reputation: 5899Reputation: 5899Reputation: 5899Reputation: 5899
There is no standard protocol so trying to automatically identify devices attached to a serial port will be difficult.
 
Old 12-19-2010, 07:48 AM   #3
dayvidvictor
LQ Newbie
 
Registered: Nov 2010
Posts: 8

Original Poster
Rep: Reputation: 1
Tks for the post Michaelk, but I don't need to identify the devices, I just need to know
how many of those ports are conected to something ...
The output of the program would be something like:

You Have an an Altera Corporation Device 0004
Total Ports: 4
Ports Conected to any device: 3
Ports Avaliable: 1
--

ya see, I think it's pretty much easy than the know what is the device conected.
tks
 
Old 12-20-2010, 07:22 AM   #4
michaelk
Moderator
 
Registered: Aug 2002
Posts: 25,715

Rep: Reputation: 5899Reputation: 5899Reputation: 5899Reputation: 5899Reputation: 5899Reputation: 5899Reputation: 5899Reputation: 5899Reputation: 5899Reputation: 5899Reputation: 5899
Again it depends on the hardware. For devices that use hardware flow control you could check for the status of the CTS,DSR, DCD or RI signals. However, there are special serial cables that have hardware loopback for flow control on the PC side so this method not work. I do not know if you can check the status of the RX or TX signals if the device is not continuously sending data. So for devices that may only use the min number of wires i.e. TX,RX and GND not sure if there is any method to detect the device.
 
1 members found this post helpful.
  


Reply

Tags
printer, serial, serial port



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
computer identification tableyou Linux - Newbie 2 11-09-2005 09:53 PM
applications identification mili General 1 06-22-2005 05:55 AM
NIC Identification belkins Linux - Hardware 2 05-24-2005 02:31 PM
Devices Identification gsrikanth Linux - Hardware 0 12-06-2004 03:18 AM
RPM Identification shooter Linux - General 1 02-09-2002 04:40 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Hardware

All times are GMT -5. The time now is 01:05 AM.

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