LinuxQuestions.org
Review your favorite Linux distribution.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
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.

Notices


Reply
  Search this Thread
Old 09-24-2007, 03:20 AM   #1
areftaidi
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

A.T.
 
Old 09-24-2007, 06:54 AM   #2
michaelk
Moderator
 
Registered: Aug 2002
Posts: 25,700

Rep: Reputation: 5895Reputation: 5895Reputation: 5895Reputation: 5895Reputation: 5895Reputation: 5895Reputation: 5895Reputation: 5895Reputation: 5895Reputation: 5895Reputation: 5895
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:
/dev/usb/ttyUSB0
 
Old 09-25-2007, 01:05 AM   #3
pcardout
Member
 
Registered: Jun 2003
Location: Socorro, New Mexico
Distribution: Debian ("jessie", "squeeze"), Linux Mint (Serena), XUbuntu
Posts: 221

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

Code:
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.)
 
  


Reply



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

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 04:01 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