Starting with Gumstix

The Gumstix are a set of small single board computers designed for embedded, low power systems. Because they have a motherboard-and-expansion architecture, they can be fit into a large variety of uses. They run a custom Linux distribution which is small and lightweight, but supports a wide range of functionality. Though Gumstix have been used to power things ranging from robotic fish to UAVs, my own goal is much simpler. This is primarily a learning experience for me to understand how the Linux kernel works as well as a hands on introduction to systems programming.

Even though the Gumstix is a full featured computer, it is quite lightweight, meaning that it makes sense to develop software on a more powerful machine and then to transfer it to the Gumstix. The most direct way to do that is to set up a serial connection from a host machine to the Gumstix using on I/O extension board. I’m currently using a Connex 200xm board along with an I/O expansion that gives me 2 serial ports, a mini-USB port and of course a power input. My host machine is my trusty Linux laptop running Arch Linux. Since Arch is not exactly a mainstream distribution, many of the guides and instructions that I find on the internet might be have to be modified slightly to work with my setup.

My first task was to get a serial connection up and running. Since my laptop is very recent it doesn’t come with any serial ports, so I needed a USB-serial adapter. That created some problems initially because I couldn’t find the device that the serial port mapped to. I was looking at the normal USB devices listed under /dev but the actual device was under /dev/tts as USB0 (though it was accessible as /dev/ttyUSB0. That problem being solved it was time to plug things in and get started. I’m using minicom to talk to the Gumstix over serial, because minicom is in the Arch package repositories, but much of the documentation seems to be geared towards kermit. I’m willing to change if I find that necessary. There is some setup required to set minicom to the right device and baud rate and to turn off modem dialing. But Minicom’s built in configuration utility makes that a snap.

Once I connect via serial and power on the Gumstix, I can see the entire boot sequence. It starts by mounting the U-boot bootloader which then loads the rest of the system. The entire system is stored on Flash memory on the board itself, though it is possible to extend the storage via MMC and CF cards. Via serial it is possible to login as root and make serious changes to the system. My only gripe is that point is that there is no power switch on the Gumstix which means that I have to physically pull out the power adapter every time I want to power it down. It might be worth considering some sort of external switch so that I don’t have to keep doing that.

Though the serial port is certainly good enough for the time being, it might turn out to be slow in case I need to start transferring larger files. Luckily the Gumstix can use the miniUSB port as a network interface and so can any Linux distribution with a recent kernel. It simply involves loading the appropriate kernel module (it’s called usbnet on Arch), detecting the network interface by running a ifconfig -a and then setting the usb0 port again using ifconfig. Running

ifconfig usb0 192.168.0.2

on the Gumstix followed by (as root):

ifconfig usb0 192.168.0.1

on the host will set up a network connection, which can then be used to log on to the Gumstix via SSH. This configuration needs to be redone every time the Gumstix is restarted. But the Gumstix can be set up to retain the static 102.168.0.2 IP by opening /etc/network/interfaces and replacing

iface usb0 inet dhcp

with

iface usb0 inet static
address 192.168.0.2
netmask 255.255.255.0

The usb0 interface can be activated at boot on the host machine as well, but I find it easier to alias it to a shorter command so that I can have it only when I need it.

Now that I have two separate fully-functional interfaces setup to my Gumstix, I’m in a position to begin thinking about serious development. There are a number of options available which require some thought as well as a careful analysis of what I want to achieve with the Gumstix .

Advertisements

Published by

Shrutarshi Basu

Programmer, writer and engineer, currently working out of Cornell University in Ithaca, New York.

2 thoughts on “Starting with Gumstix”

  1. gumstix surely has a very easy installation, setup in 10 minutes and booted to linux, compiling the build environment now 🙂 happy hacking

  2. can you help me please…
    this path: home/root/scripts
    or /etc/network/interfaces
    I will great them? or they are exist?
    how can i find them and download … from which site if they exist on internet?
    I am trying to turn on the Wifi but that’s not work do you have any idea about this thing?

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s