Answer the question
In order to leave comments, you need to log in
How to bind physical USB ports to Linux ports in Raspberry Pi?
Good afternoon!
Can you please tell me if it is possible to bind certain physical ports ( Picture with the port numbers on the board ) on the Raspberry Pi 3 board to ports inside the operating system.
For example, so that the internal ttyUSB0 is always associated with the device included in USB #1, ttyUSB1 <-> USB #2, etc.
Answer the question
In order to leave comments, you need to log in
For this, udev is used. This is just an example of how you can implement it, udev has a lot of options to solve your problem.
cat /etc/udev/rules.d/92-dongle.rules
KERNEL=="ttyUSB* - device filter
KERNELS=="3-1:1.0 USB port number
can be viewed in dmesg after connecting the device
# dmesg | grep stor
[42004.660118] usb-storage 3-1:1.0: USB Mass Storage device detected
[42004.660853] scsi7 : usb-storage 3-1:1.0
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question