Visit Jeremy's Blog.
Go Back > Forums > Linux Forums > Linux - Software
User Name
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.


  Search this Thread
Old 09-24-2007, 03:20 AM   #1
LQ Newbie
Registered: Dec 2005
Posts: 11

Rep: Reputation: 0
USB to serail port adaptor COM port number

Hello everyone,

I have a laptop running Redhat 9 to which I have connected a USB to RS232 adaptor. Please tell me is there anyway that I could programmatically find out what COM port number the adaptor is connected to? Or should I launch a system call from my programme - what would that be?

Many thanks in advance

Old 09-24-2007, 06:54 AM   #2
Registered: Aug 2002
Posts: 14,671

Rep: Reputation: 1460Reputation: 1460Reputation: 1460Reputation: 1460Reputation: 1460Reputation: 1460Reputation: 1460Reputation: 1460Reputation: 1460Reputation: 1460
First, Redhat 9 is out of date and may not have the required driver unless you have already installed it. Look at the output of the dmesg command to see if the adapter is being recognized.

The device ID is typically:
Old 09-25-2007, 01:05 AM   #3
Registered: Jun 2003
Location: Socorro, New Mexico
Distribution: Debian ("lenny", "squeeze"), Linux Mint, XUbuntu
Posts: 218

Rep: Reputation: 24
A cute trick with USB hardware

Welcome to LQ!

Here is something I like, and you may too.

Open a terminal window and

tail -f /var/log/syslog
Leave the window open and insert your USB device.
As you insert it it will generate system messages and the tail -f
command will show them to you in real-time.

This is good for all hot-plug devices (USB, PCMCIA)
to see what messages they generate.
(And though linux sometimes refer to "COM1", "COM2" etc., those are really
DOS/Windows names for the serial ports. As linux devices, they are
usually called /dev/ttyS0, /dev/ttyS1 etc.)


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
forwarding ssl port to a different ssl port number on a different machine coal-fire-ice Linux - Networking 6 03-15-2007 12:30 PM
Compact Flash Serail Number with USB Reader tmsquid Linux - Hardware 3 07-26-2006 10:36 AM
How do I activate a USB Mini port? (B port) RonnyC Linux - Hardware 1 05-03-2006 03:39 PM
Using an USB port as a standard DB9 Serial Port Lsteele Linux - Newbie 1 10-22-2005 09:48 AM
Port Number? Dakkar Linux - Newbie 5 11-06-2004 05:50 PM

All times are GMT -5. The time now is 09:50 AM.

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