view history edit print login register

:: Using udev ::

User thomas describes how he uses udev

Here's my /etc/udev/rules.d/09-local.rules file, based on an article I found about udev:

SUBSYSTEMS=="usb", ATTRS{product}=="FT232R USB UART", ATTRS{idProduct}=="6001", ATTRS{idVendor}=="0403", SYMLINK+="arduino arduino_$attr{serial}"
SUBSYSTEMS=="usb", ATTRS{product}=="ARDUINO NANO",    ATTRS{idProduct}=="6001", ATTRS{idVendor}=="0403", SYMLINK+="arduino arduino_nano_$attr{serial}"

This rule creates two softlinks, one called arduino and one called arduino_$SERIAL where $SERIAL is the serial number of the FT232R.

Having plugged in 2 arduinos (one Decimalia, one Nano) I have the following softlinks:

$ ls -l /dev/ard*
lrwxrwxrwx 1 root root      7 2008-12-08 11:03 /dev/arduino -> ttyUSB1
lrwxrwxrwx 1 root root      7 2008-12-08 11:03 /dev/arduino_A70063Yc -> ttyUSB0
lrwxrwxrwx 1 root root      7 2008-12-08 11:03 /dev/arduino_nano_08HB1106 -> ttyUSB1