How to view the DB9 to USB port??

More
06 May 2022 06:53 #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
Attachments:

Please Log in or Create an account to join the conversation.

More
06 May 2022 10:08 #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
The following user(s) said Thank You: EdisonBin

Please Log in or Create an account to join the conversation.

More
06 May 2022 10:19 #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?
The following user(s) said Thank You: EdisonBin

Please Log in or Create an account to join the conversation.

More
06 May 2022 12:10 #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:
The following user(s) said Thank You: EdisonBin

Please Log in or Create an account to join the conversation.

More
07 May 2022 00:40 #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?
Attachments:

Please Log in or Create an account to join the conversation.

More
07 May 2022 00:41 #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 or Create an account to join the conversation.

More
07 May 2022 00:48 #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 or Create an account to join the conversation.

More
07 May 2022 01:01 #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 or Create an account to join the conversation.

More
07 May 2022 01:03 #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
Attachments:

Please Log in or Create an account to join the conversation.

More
07 May 2022 01:48 #242196 by phillc54
try ls /dev/tty*
 

Please Log in or Create an account to join the conversation.

Time to create page: 0.120 seconds
Powered by Kunena Forum