MDAR
July 22, 2024, 8:18am
21
@PrzemoF & @jvelbus
While looking for a link for another post, I stumbled across some Linux Magic that @Stef_Coene created a few years ago, to address the issue of some Linux versions not playing nicely with USB devices (as in, not assigning the same tty
link in boot up.)
His udev
rule creates a new ttyVelbus
symlink.
For the correct /dev/ entry, you can also create a udev rule:
cat /etc/udev/rules.d/99-usb-serial.rules :
SUBSYSTEM==“tty”, ATTRS{idVendor}==“10cf”, ATTRS{idProduct}==“0b1b”, SYMLINK+=“ttyVelbus”
This will create a /dev/ttyVelbus based on the vendor and producti ID.
This was needed when I used an older PI.
It didn’t created a symlink in /dev/servial
Stef
@jvelbus & @PrzemoF
Thanks to your input, I revisited the use rules solution that @Stef_Coene created and expanded it to include the new Velbus USB options.
After using the by-id path for years, because there was only one Velbus idProduct, I’ve had to come back to your solution.
I’ve expanded it a little, to include the three varieties of Velbus IDs.
Creating this file
/etc/udev/rules.d/V99-usb-serial-velbus.rules
With this content
SUBSYSTEM=="tty", ACTION=="add|change", ATTRS{idVendor}=="10cf", ATTRS{idProduct}=="0b1b", SYMLINK+="ttyVelbus-VMBRSUSB"
SUBSYSTEM=="tty", ACTION=="add|change", ATTRS{idVendor}=="10cf", ATTRS{idProduct}=="0b1c", SY…