Quantcast
Channel: Raspberry Pi Forums
Viewing all articles
Browse latest Browse all 7503

Troubleshooting • 2 Symlink rules point on the same ttyUSB

$
0
0
Hello
In my project I need 2 modbus RTU interfaces, so I took care to buy 2 USB-485 adapters with a different chip inside, i.e. CH340 and PL2302
In order to have these 2 modbus accessible to fixed port, I have created a udev rule, nothing new.
My problem is sometimes, the two symlink point to the same ttyUSB0. What did I miss ?
Thanks for your support
Titof

$ sudo nano /etc/udev/rules.d/10-usb-serial.rules
SUBSYSTEM=="tty", ATTRS{idProduct}=="7523", ATTRS{idVendor}=="1a86", SYMLINK+="ttyUSB_METERS"
SUBSYSTEM=="tty", ATTRS{idProduct}=="9514", ATTRS{idVendor}=="0424", SYMLINK+="ttyUSB_TRINA"

after reboot:
$ ls -l /dev/tty*
....
crw-rw---- 1 root dialout 188, 0 Dec 17 19:17 /dev/ttyUSB0
crw-rw---- 1 root dialout 188, 1 Dec 17 19:17 /dev/ttyUSB1
lrwxrwxrwx 1 root root 7 Dec 17 19:17 /dev/ttyUSB_METERS -> ttyUSB0
lrwxrwxrwx 1 root root 7 Dec 17 19:17 /dev/ttyUSB_TRINA -> ttyUSB0

Statistics: Posted by Titoflebof — Thu Dec 18, 2025 7:35 am — Replies 0 — Views 6



Viewing all articles
Browse latest Browse all 7503

Trending Articles