How to view the DB9 to USB port??

More
4 years 5 months ago #242104 by EdisonBin
Guys, I have a little problem.
I'm a newcomer to Linux CNC.
I bought a DB9 to USB cable. Plug in the Linux host at the end of DB9. Plug USB into windows PC. Windows PC has the driver installed, but Linux has not.
After plugging in the cable, I observed that the display of Windows PC was "com9".
I use Python script 'pyserial' for serial communication, but I write a simple program and run it, and the terminal reports an error.
① I now wonder if I have chosen the wrong Linux port?
Because I saw that the windows PC displayed "com9", I also filled in "com9" in Linux
How can I see the port number I want?
② Or do I not have a DB9 driver installed in Linux?
I don't know if Linux needs a driver to access this USB to DB9 cable

Please Log in to join the conversation.

More
4 years 5 months ago #242114 by robertspark
I'm confused what you are trying to do from the above, it seems / reads like you are trying to connect a windows PC to a linux PC via a USB <-> Serial cable

If the serial port is plugged into the linux PC, then you probably want to have a look through this link:
www.cyberciti.biz/faq/find-out-linux-ser...orts-with-setserial/

probably running this will show you the linux serial port info:
dmesg | grep tty

Please Log in to join the conversation.

More
4 years 5 months ago #242116 by tommylight

I'm confused what you are trying to do from the above, it seems / reads like you are trying to connect a windows PC to a linux PC via a USB <-> Serial cable
Same here, so the question becomes: why?

Please Log in to join the conversation.

More
4 years 5 months ago #242128 by andypugh
The serial port will appear as an entry in /dev/tty

So, at the command line

ls /dev/tty

Then plug in the device

ls /dev/tty

and see what new item has appeared. Probably ttyUSB0

Then LinuxCNC will expect to address the port as /dev/ttyUSB0

"com9" is purely a Windows thing. And it will probably be com10 next time you plug it in. And then some time in the future you will run out of ports:

Please Log in to join the conversation.

More
4 years 5 months ago #242190 by EdisonBin
Thank you, Andy
I tried your method, whether inserting or pulling out the conversion line, and the terminal input "ls /dev/tty".
I can't see the port number I want to see. Why?

Please Log in to join the conversation.

More
4 years 5 months ago #242191 by EdisonBin
Thank you, Andy
I tried your method, whether inserting or pulling out the conversion line, and the terminal input "LS / dev / TTY".
I can't see the port number I want to see. Why?
I put the picture below. Thank you

Please Log in to join the conversation.

More
4 years 5 months ago #242192 by EdisonBin
hi tommy
My question: I use a USB to RS232 connection between windows PC and Linux PC. Now what command should I use to find the port of this line?
I'm a stranger to the Linux operating system. Some commands will produce a pile of things.

Please Log in to join the conversation.

More
4 years 5 months ago #242194 by EdisonBin
hi robert!
My question: I use a USB to RS232 connection between windows PC and Linux PC. Now what command should I use to find the port of this line?
I tried the method in the link you sent. I put the picture below.
No matter unplugging or inserting the conversion line, the ports in the terminal are not added or reduced. Why? I can't find the port I want now

Please Log in to join the conversation.

More
4 years 5 months ago #242195 by EdisonBin
No matter unplugging or inserting the conversion line, the ports in the terminal are not added or reduced. Why? I can't find the port I want now

Please Log in to join the conversation.

More
4 years 5 months ago #242196 by phillc54
try ls /dev/tty*
 

Please Log in to join the conversation.

Time to create page: 1.282 seconds
Powered by Kunena Forum