How to view the DB9 to USB port??
06 May 2022 06:53 #242104
by EdisonBin
How to view the DB9 to USB port?? was created 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
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 or Create an account to join the conversation.
- robertspark
- Offline
- Platinum Member
Less
More
- Posts: 915
- Thank you received: 216
06 May 2022 10:08 #242114
by robertspark
Replied by robertspark on topic How to view the DB9 to USB port??
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
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.
- tommylight
- Away
- Moderator
Less
More
- Posts: 19204
- Thank you received: 6437
06 May 2022 10:19 #242116
by tommylight
Replied by tommylight on topic How to view the DB9 to USB port??
Same here, so the question becomes: why?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
The following user(s) said Thank You: EdisonBin
Please Log in or Create an account to join the conversation.
06 May 2022 12:10 #242128
by andypugh
Replied by andypugh on topic How to view the DB9 to USB port??
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:
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.
07 May 2022 00:40 #242190
by EdisonBin
Replied by EdisonBin on topic How to view the DB9 to USB port??
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 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 or Create an account to join the conversation.
07 May 2022 00:41 #242191
by EdisonBin
Replied by EdisonBin on topic How to view the DB9 to USB port??
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
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.
07 May 2022 00:48 #242192
by EdisonBin
Replied by EdisonBin on topic How to view the DB9 to USB port??
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.
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.
07 May 2022 01:01 #242194
by EdisonBin
Replied by EdisonBin on topic How to view the DB9 to USB port??
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
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.
07 May 2022 01:03 #242195
by EdisonBin
Replied by EdisonBin on topic How to view the DB9 to USB port??
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.
07 May 2022 01:48 #242196
by phillc54
Replied by phillc54 on topic How to view the DB9 to USB port??
try ls /dev/tty*
Please Log in or Create an account to join the conversation.
Time to create page: 0.096 seconds