LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Hardware (https://www.linuxquestions.org/questions/linux-hardware-18/)
-   -   From lsusb to /dev/tty in commandline (https://www.linuxquestions.org/questions/linux-hardware-18/from-lsusb-to-dev-tty-in-commandline-4175729056/)

pascalbythree 09-18-2023 05:03 AM

From lsusb to /dev/tty in commandline
 
lsusb:

Code:

Bus 002 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub
Bus 001 Device 007: ID 046d:c31c Logitech, Inc. Keyboard K120
Bus 001 Device 004: ID 0557:8021 ATEN International Co., Ltd Hub
Bus 001 Device 012: ID 16c0:05dc Van Ooijen Technische Informatica shared ID for use with libusb
Bus 001 Device 011: ID 1a86:7523 QinHeng Electronics CH340 serial converter
Bus 001 Device 010: ID 0bda:5411 Realtek Semiconductor Corp. RTS5411 Hub
Bus 001 Device 009: ID 2357:010c TP-Link TL-WN722N v2/v3 [Realtek RTL8188EUS]
Bus 001 Device 008: ID 0bda:5411 Realtek Semiconductor Corp. RTS5411 Hub
Bus 001 Device 006: ID 0bda:5411 Realtek Semiconductor Corp. RTS5411 Hub
Bus 001 Device 005: ID 1a86:7523 QinHeng Electronics CH340 serial converter
Bus 001 Device 003: ID 0bda:5411 Realtek Semiconductor Corp. RTS5411 Hub
Bus 001 Device 002: ID 2109:3431 VIA Labs, Inc. Hub
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub


/dev/tty:

Code:

pascalbythree@raspberrypi:~ $ ls /dev/tty*
/dev/tty    /dev/tty12  /dev/tty17  /dev/tty21  /dev/tty26  /dev/tty30  /dev/tty35  /dev/tty4  /dev/tty44  /dev/tty49  /dev/tty53  /dev/tty58  /dev/tty62  /dev/ttyAMA0
/dev/tty0  /dev/tty13  /dev/tty18  /dev/tty22  /dev/tty27  /dev/tty31  /dev/tty36  /dev/tty40  /dev/tty45  /dev/tty5  /dev/tty54  /dev/tty59  /dev/tty63  /dev/ttyprintk
/dev/tty1  /dev/tty14  /dev/tty19  /dev/tty23  /dev/tty28  /dev/tty32  /dev/tty37  /dev/tty41  /dev/tty46  /dev/tty50  /dev/tty55  /dev/tty6  /dev/tty7  /dev/ttyUSB0
/dev/tty10  /dev/tty15  /dev/tty2  /dev/tty24  /dev/tty29  /dev/tty33  /dev/tty38  /dev/tty42  /dev/tty47  /dev/tty51  /dev/tty56  /dev/tty60  /dev/tty8  /dev/ttyUSB1
/dev/tty11  /dev/tty16  /dev/tty20  /dev/tty25  /dev/tty3  /dev/tty34  /dev/tty39  /dev/tty43  /dev/tty48  /dev/tty52  /dev/tty57  /dev/tty61  /dev/tty9

Everybody at linuxquestions.org...

Does anybody know a tool to apt-get or commandline action to see what title of lsusb belongs to witch similar devicename in /dev/tty

Because i am working on my system with multiple USB decives to discover...

Thank you, Greets Wouter van Wegen

PS: It is to use on my Raspberry 4 RPIMOD, with total of 6 USB AVR programmers on 2 hubs attached to it.

If you want to see a picture of my project just ask.

fatmac 09-18-2023 06:48 AM

Use the device ID(?).

michaelk 09-18-2023 08:23 AM

Quote:

Bus 001 Device 011: ID 1a86:7523 QinHeng Electronics CH340 serial converter
The first device discovered should be /dev/ttyUSB0. If the devices have different serial numbers you could create a udev rule to always use the same device ID. Otherwise, you just have to determine manually which is which as far as I know. I do not see anything else with a device ID. Look at the output of the dmesg command to see how the programmers are recognized.

Quote:

Bus 001 Device 008: ID 0bda:5411 Realtek Semiconductor Corp. RTS5411 Hub
Is this an AVR programmer.


All times are GMT -5. The time now is 09:05 AM.