Configuring FTDI Blue boxes

This page explains how you can configure FTDI blue boxes for use with Linux.

These blue boxes are used to convert a USB port on a PC to a 232 or 485 serial comms port.

The first thing to do is install the ftdi drivers onto the PC.  If you're running Ubuntu you can download them via synaptic (just search for ftdi).  We also use a compulab arm X270 board, and in order to get the drivers installed on this machine we needed to cross compile them.  The drivers are usbserial and ftdi_sio, which can be downloaded from the ftdi website.

Once downloaded, we need to create a node in the /dev directory that can be used for talking to the devices.  This is done in the following manner:

 mknod -m 0655 /dev/ttyUSB0 c 188 0

If you have 2 ports on the blue box then a second node is added with the command:

 mknod -m 0655 /dev/ttyUSB1 c 188 1

Note that the value of 188 was gathered by querying /proc/devices.  If you list the contents of this file you should see an item for ttyUSB.  I believe that they always have the value of 188 but you can check to make sure.

When you plug the blue box into your pc you can confirm that the drivers have attached them to the newly created nodes in /dev by viewing the output from dmesg:

dmesg | tail

The output should include text that looks something like this:

[ 33.354308] usb 2-1.1: FTDI USB Serial Device converter now
attached to ttyUSB0
[ 33.354329] ftdi_sio 2-1.2:1.0: FTDI USB Serial Device
converter detected
[ 33.354370] /build/buildd/linux-source-2.6.22-2.6.22/drivers/usb/
serial/ftdi_sio.c: Detected FT232BM
[ 33.354484] usb 2-1.2: FTDI USB Serial Device converter now
attached to ttyUSB1
[ 33.354510] usbcore: registered new interface driver ftdi_sio
[ 33.354516] /build/buildd/linux-source-2.6.22-2.6.22/drivers/usb/
serial/ftdi_sio.c: v1.4.3:USB FTDI Serial Converters Driver

 

To test that the comms actually works, execute the following:

echo "some text" > /dev/ttyUSB0

You should see the light inside the blue box flash to indicate data transfer.

The equivalent to the Windows hyperterminal is Gtkterm.  This can be downloaded via synaptic in Ubuntu.  There are other terminal programs available for Linux, I'm sure, but this works very well for me so I'd recommend it for people looking for a simple terminal emulator.