This is a short note on using the Gumstix Overo’s USB OTG port with a client device that has an FTDI chip for serial-over-USB communications. One example would be an Arduino, but I wrote this while testing out this USB Geiger tube.
First, if you don’t already have at least these packages installed, download and save them to your bootable MMC card’s /home/root directory:
www.gumstix.net/feeds/unstable/ipk/glibc/armv7a/machine/overo/kernel-module-ftdi-sio_2.6.31-r50.5_overo.ipk
www.gumstix.net/feeds/unstable/ipk/glibc/armv7a/base/libpython2.6-1.0_2.6.2-ml8.0.5_armv7a.ipk
www.gumstix.net/feeds/unstable/ipk/glibc/armv7a/python/python-core_2.6.2-ml8.0.5_armv7a.ipk
www.gumstix.net/feeds/unstable/ipk/glibc/armv7a/python/python-pyserial_2.4-ml1.5_armv7a.ipk
The first package (FTDI serial I/O) must match the card’s kernel version, 2.6.31 in this case. Reboot the Gumstix and install all packages:
root@overo:~# opkg install kernel-module-ftdi-sio_2.6.31-r50.5_overo.ipk root@overo:~# opkg install libpython2.6-1.0_2.6.2-ml8.0.5_armv7a.ipk root@overo:~# opkg install python-core_2.6.2-ml8.0.5_armv7a.ipk root@overo:~# opkg install python-pyserial_2.4-ml1.5_armv7a.ipk
(Depending on what you have installed, additional dependencies may be required. The http://www.gumstix.net/feeds/unstable/ipk/glibc/ packages site has everything you need. And ignore errors about “hicolor-icon-theme.postinst,” which seem to occur whenever a package is installed.)
Post install, you will be able to do this without error:
root@overo:~# python Python 2.6.2 (r262:71600, Jan 8 2010, 17:02:00) [GCC 4.3.3] on linux2 Type "help", "copyright", "credits" or "license" for more information. >>> import serial >>>
Once everything is installed, reboot and load the FTDI module into the kernel:
root@overo:~# cd /lib/modules/2.6.31-omap1/kernel/drivers/usb/serial/ root@overo:~# depmod -a ftdi_sio.ko root@overo:~# insmod ftdi_sio root@overo:~# modprobe ftdi_sio
At this point I had to reboot again with my USB device plugged into the USB OTG port. (Otherwise, that port seems not to be enabled, and you can’t even use it to power a device.) On reboot, you should see something like this:
usb 1-1: Manufacturer: FTDI USB Serial support registered for FTDI USB Serial Device ftdi_sio 1-1:1.0: usb_probe_interface ftdi_sio 1-1:1.0: usb_probe_interface - got id ftdi_sio 1-1:1.0: FTDI USB Serial Device converter detected usb 1-1: FTDI USB Serial Device converter now attached to ttyUSB0 usbcore: registered new interface driver ftdi_sio ftdi_sio: v1.5.0:USB FTDI Serial Converters Driver
And you should have a device entry along the lines of /dev/ttyUSB0. Once that’s confirmed, create a serial-listener.py script like this:
#!/usr/bin/python
import serial
s = serial.Serial('/dev/ttyUSB0',9600)
c = s.read(1)
print c
(Change /dev/ttyUSB0 to the exact name appearing in the /dev directory upon device insertion.)
Run your serial-listener.py:
root@overo:~# ./serial-listener.py
Voila — serial-over-USB communications with the FTDI-based Geiger counter or peripheral of your choice.



.