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. |
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 |
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 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.) |
All times are GMT -5. The time now is 07:07 PM. |