May-13th-2019, 09:23 AM
Hey Armin,
this is what we do on a stock rasbian:
1) figure out the serial number of the attached device:
2) create a rule for static mapping in /etc/udev/rules.d/10-usb-serial.rules
3) load the new rule (only required before reboot)
4) verify
now, you can adress the device as ttyUSB_MyDevice1 instead of ttyUSB0 or whatever it might be mapped to.
this is what we do on a stock rasbian:
1) figure out the serial number of the attached device:
Code:
$ udevadm info --name=/dev/ttyUSB1 --attribute-walk
2) create a rule for static mapping in /etc/udev/rules.d/10-usb-serial.rules
Code:
SUBSYSTEM=="tty", ATTRS{idVendor}=="1234", ATTRS{idProduct}=="5678", ATTRS{serial}=="xxxxxxxxxx", SYMLINK+="ttyUSB_MyDevice1"
3) load the new rule (only required before reboot)
Code:
sudo udevadm trigger
4) verify
Code:
$ ls -l /dev/ttyUSB_MyDevice1
now, you can adress the device as ttyUSB_MyDevice1 instead of ttyUSB0 or whatever it might be mapped to.