:: 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}"

#Arduino UNO
SUBSYSTEMS=="usb", ATTRS{idProduct}=="0043", ATTRS{idVendor}=="2341", SYMLINK+="arduino arduino_uno_$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

Configuring the FTDI eeprom.

These rules only work once you have made the Arduino identify as such; by default it appears as a "FT232R USB UART". Here is how to change it.

1. Look at the current settings:
sudo lsusb -vvv -d0x403:0x6001

2. Use ftdi_eeprom to change them. The man-page is quite helpful.

2a. First create a configuration file, eg ftdi_eeprom_write.conf:

#Identify the device to write.
vendor_id=0x0403	# Vendor ID
product_id=0x6001 	# Product ID
max_power=250		# Max. power consumption: value * 2 mA. Use 0 if self_powered = true.

# Strings
manufacturer="FTDI"			# Manufacturer
product="ARDUINO NANO"			# Product
serial="A700fmiq"			# Serial

# Options 
self_powered=false	# Turn this off for bus powered
remote_wakeup=false	# Turn this on for remote wakeup feature
use_serial=true		# Use the serial number string

# Normally out don't have to change one of these flags
BM_type_chip=true 		# Newer chips are all BM type
in_is_isochronous=false		# In Endpoint is Isochronous
out_is_isochronous=false	# Out Endpoint is Isochronous
suspend_pull_downs=false	# Enable suspend pull downs for lower power
change_usb_version=false	# Change USB Version
usb_version=0x0200		# Only used when change_usb_version is enabled

2b. Flash the eeprom. (It may be necessary to Ctrl-C after 10 seconds if the program doesn't exit):
sudo ftdi_eeprom --flash-eeprom ftdi_eeprom_write.conf

3. Now unplug and replug the USB cable, and re-run lsusb. The device should now identify as an Arduino nano, and the Udev rule above will work.