# udev rules for FTDI chips. # # Create persistent device names for FTDI-based USB devices (FAX modem, # Arduinos, etc.). # # Copy this file to /etc/udev/rules.d/97-avr-ftdi.rules # # To be able to distinguish all the FTDI-based USB devices it is essential to # find some identifying characteristics in the USB device that distinguishes it # from all the others. It's a little easier with FT232L-based or newer chips. # There's also a program that can be used to change identifying information in # the FTDI's EEPROM or add to it. # # Most useful command: # udevadm info -a -p `udevadm info -q path -n /dev/ttyUSB0` # # Show device properties: # udevadm info -q property -p `udevadm info -q path -n /dev/ttyUSB0` # # ATTRS{} can be matched from any parent, but have to be all from the same # parent!!! # # After any rule changes, reload: /etc/init.d/boot.udev reload # Doesn't seem to work reliably, use restart instead. # Don't use stop and then start - risk of kernel oops. # Always works, esp with systemd: udevadm control --reload-rules # May also have to # rmmod ftdi_sio usbserial # before replugging devices. # # There is some suggestion these additions should be after any system-supplied # rule for /dev/ttyUSB*, which are # in /lib/udev/rules.d/60-persistent-serial.rules # # Things to remember: # *) There have been some changes. Some websites with descriptions and howtos # are out-of-date and should be ignored. # *) You can't change the kernel-assigned device name (other than by changing # the kernel driver). You can only put a symlink, with the symlink name # remaining constant and its target adjusted to the same hardware piece. # *) The device information is in a tree structure. Use udevadm. You can match # to any node, but only to one(!) node. Messing that up results in a non-match. # *) I'm unsure whether long lines can be broken. Some sources say yes, but it # doesn't work. # # The environment variable ID_USB_INTERFACE_NUM is set from attr # bInterfaceNumber. This is a way to copy attributes from one node to another. # openSUSE 11.4: variable is called ID_IFACE # openSUSE 12.1: variable is called ID_USB_INTERFACE_NUM # and it's set in /lib/udev/rules.d/60-persistent-serial.rules # # http://volker.top.geek.nz/linux/tech/ # # Volker Kuhlmann # 9, 24 Oct 2011 # 13 Mar 2012 openSUSE 12.1 # ## FAX modem: # # FT2232C Dual USB-UART/FIFO # Fax modem is on its first port. # This chip has no serial number! # # Note: hylafax always transforms underscores in device names to slashes, so # it can't handle SYMLINK+="ttyUSB_ftdi_fax_$env{ID_IFACE}" # ENV{ID_IFACE}=="", GOTO="ftdi_serial_fax_end" SUBSYSTEMS=="usb", ATTRS{idVendor}=="0403", ATTRS{idProduct}=="6010", ATTRS{bNumInterfaces}==" 2", SYMLINK+="ttyUSB-ftdi-fax-$env{ID_IFACE}" LABEL="ftdi_serial_fax_end" ENV{ID_USB_INTERFACE_NUM}=="", GOTO="ftdi_serial_fax_end2" SUBSYSTEMS=="usb", ATTRS{idVendor}=="0403", ATTRS{idProduct}=="6010", ATTRS{bNumInterfaces}==" 2", SYMLINK+="ttyUSB-ftdi-fax-$env{ID_USB_INTERFACE_NUM}" LABEL="ftdi_serial_fax_end2" # #SYMLINK+="ttyUSB_ftdi_%s{serial}" #NAME="ttyUSB4" # These are from the wrong parent: # ATTRS{interface}=="Dual RS232" # ATTRS{bNumEndpoints}=="02" # ATTRS{bInterfaceNumber}=="00" # ATTRS{bInterfaceNumber}=="01" ## Arduino: Seeed Studio UartSB, Aug 2010 SUBSYSTEMS=="usb", ATTRS{idVendor}=="0403", ATTRS{idProduct}=="6001", ATTRS{manufacturer}=="FTDI", ATTRS{product}=="FT232R USB UART", ATTRS{serial}=="A900cb3J", SYMLINK+="ttyUSB_seeed_uartSB" ## Arduino: Seeed Studio Seeeduino Mega v1.21, Dec 2010 SUBSYSTEMS=="usb", ATTRS{idVendor}=="0403", ATTRS{idProduct}=="6001", ATTRS{manufacturer}=="FTDI", ATTRS{product}=="FT232R USB UART", ATTRS{serial}=="A700ejio", SYMLINK+="ttyUSB_seeed_mega" ## Arduino: Seeed Studio Seeeduino 2.2, Jun 2011 SUBSYSTEMS=="usb", ATTRS{idVendor}=="0403", ATTRS{idProduct}=="6001", ATTRS{manufacturer}=="FTDI", ATTRS{product}=="FT232R USB UART", ATTRS{serial}=="A900fznb", SYMLINK+="ttyUSB_seeed2.2" SUBSYSTEMS=="usb", ATTRS{idVendor}=="0403", ATTRS{idProduct}=="6001", ATTRS{manufacturer}=="FTDI", ATTRS{product}=="FT232R USB UART", ATTRS{serial}=="A900fznb", SYMLINK+="ttyUSB_seismo" ## FTDI USB to TTL Serial Cable(3.3V) 1.8m, order no TTL-232R-3V3, Apr 2012 SUBSYSTEMS=="usb", ATTRS{idVendor}=="0403", ATTRS{idProduct}=="6001", ATTRS{manufacturer}=="FTDI", ATTRS{product}=="TTL232R-3V3", ATTRS{serial}=="FTF5YIVP", SYMLINK+="ttyUSB_ftdi_ttl_3V3" # Can't set the device name with NAME= any more, only add a symlink. # The NAME= name is in addition, and gets the same major:minor as the one it # "replaces". #Oct 9 22:40:09 tui udevd-work[17965]: kernel-provided name 'ttyUSB0' and NAME= 'ttyUSB4' disagree, please use SYMLINK+= or change the kernel to provide the proper name #Oct 9 22:40:09 tui udevd-work[17908]: kernel-provided name 'ttyUSB2' and NAME= 'ttyUSB8' disagree, please use SYMLINK+= or change the kernel to provide the proper name #Oct 9 22:40:09 tui udevd-work[17907]: kernel-provided name 'ttyUSB1' and NAME= 'ttyUSB8' disagree, please use SYMLINK+= or change the kernel to provide the proper name # http://answers.ros.org/question/65/how-can-i-get-a-unique-device-path-for-my # # Create /etc/udev/rules.d/52-ftdi.rules containing # # SUBSYSTEMS=="usb", KERNEL=="ttyUSB[0-9]*", ATTRS{idVendor}=="0403", ATTRS{idProduct}=="6001", SYMLINK+="sensors/ftdi_%s{serial}" # # for creating sysmlinks in /dev/sensors based on the unique serial numbers # burned into the FTDI chip's EEPROM. You'll have to restart udev (or your # entire PC) in order for this rule to take effect. # For example, if your Arduino's FTDI chip had a serial number of abc123, if # you are using this udev rule after you plug the Arduino in, you will have a # symlink of /dev/sensors/ftdi_abc123 that links to /dev/ttyUSB0 (or whichever # /dev/ttyUSB device is appropriate if you have more than one). This way, # you can use the path /dev/sensors/ftdi_abc123 in your launch files when # configuring a node such as the xv_11_laser_driver. # # http://wirespeed.xs4all.nl/mediawiki/index.php/Figuring_out_udev_rules # # Informative. # http://aeturnalus.com/robotics/mapping-ftdi-to-files-with-udev/ # # Useless (no longer works), it's for an obsolete udev version.