I have two different USB devices based on the same USB-RS232 chips. When I plug those in the USB they are mounted to /dev/ttyUSB0...3
My problem is how, inside a script,
This one-liner udev rule will give a fixed name (e.g. /dev/ttyUSB_A9YL5BJJ) based on serial number for any device with vendor/product ids as given.
Put this into a udev rules file e.g. /etc/udev/rules.d/60-ftdi-serial-names.rules
SUBSYSTEM=="tty", ATTRS{idVendor}=="0403", ATTRS{idProduct}=="6001", ENV{ID_SERIAL_SHORT}=="?*", SYMLINK+="ttyUSB_%E{ID_SERIAL_SHORT}"