From Bobs Projects
Jump to: navigation, search

The Future Technologies Devices International (FTDI) FT232R Universal Serial Bus (USB) Universal Asynchronous Receiver/Transmitter (UART) chip is a USB-to-asynchronous serial convertor chip widely seen in many hobbyist and other electronics products.

It can be found on:

The FT232R USB UART has a driver included standard in the Linux kernel for many years.


Use with Linux

The FT232R generally has a USB Vendor code (idVendor) of 0x0403 (Future Technologies Devices International, Ltd) and Product code (idProduct) of 0x6001 (FT232 USB-Serial (UART) IC). The iManufacturer is normally "FTDI" and iProduct is "FT232R USB UART".

The value of iSerial (should be unique...) is the main issue with many recent (approx 2008 onwards) Debian and Ubuntu distributions. The "Watts Up UPS" monitoring daemon seems to reserve all FT232R USB devices with ATTRS{serial}=="A80?????" (ie. values of iSerial starting with "A80").

Disabling WUP from stealing FT232R devices

As root, comment out the line in /lib/udev/rules.d/95-upower-wup.rules . Should not have to restart anything and these files are read each the the udev system gets a USB device attached event.

Disabling Modem-Manager from stealing FT232R devices

On newer Debian and other Linux's, the Modem-Manager daemon can steal the tty in much the same way as the WUP power management daemon used to. There are various suggestions around setting an environment variable in /etc/udev/rules/usb-serial (or similar). Actually, it is easier simply to remove/de-install the Modem-Manager package, if it is not otherwise required.

Giving devices a better name

According to The Bus Pirate on Linux: From /dev/ttyUSB? to /dev/bus_pirate, you can get udev to symlink in a new name for an attached USB device.

First, find the FT232R's serial number:

udevadm info -a -p $(udevadm info -q path -n /dev/ttyUSB0) | grep "ATTRS{serial}"

(change /dev/ttyUSB0 to some other device, if the FT232R has enumerated as, say, ttyUSB2 etc.) (alternatively, run lsusb -v and look through the output for iSerial).

Then, edit /etc/udev/rules.d/91-usb-serial.rules, and add a line like:

SUBSYSTEM=="tty" ATTRS{idVendor}=="0403" ATTRS{idProduct}=="6001" ATTRS{serial}=="A800crFP" SYMLINK+="my_ft232r"

The next time the FT232R device is plugged in, it will still get a /dev/ttyUSBx name (where x depends upon the order of enumeration), but there will also be a symlinked /dev/my_ft232r (or whatever).

Fixing Permissions

By default, Debian and Ubuntu will place all serial devices in /dev into group "dialout" with R/W permission for user and group, but no permission for other. To change the group to something we can use, add:

GROUP="mygroup", MODE="0660"

to the end of the line starting with "SUBSYSTEM" added to the udev rules file as above.

External links