What can I do with my Gumstix?

Gumstix is a very versatile platform as long as you can efficiently make use of the its modest hardware capabilities. The Connex 200xm board that I will be working with has a 200Mhz Intel XScale processor, 64MB of SDRAM and 16MB of strataflash for storage. The operating system that comes installed on the strataflash memory chip is a lightweight but full-fledged Linux distribution, which can be easily modified and rebuilt using the OpenEmbedded development environment. The small storage size means that any large applications will require an additional storage component in the form of a micro SD, Compact Flash or MMC card. But the 64MB of SDRAM should be more than sufficient for most embedded applications that you want a Gumstix to handle.
Now that I have a stable connection open to the Gumstix via both serial and USBnet, it’s time to move and start exploring what it can do. One of the possible uses for the Gumstix would be as smart controller board for simpler electronic systems such as simple robots. Since the OpenEmbedded system supports running programs written in high-level interpreted languages such as Python and Perl, it opens up the possibility of writing programs in those languages to control these simple robots. This is something that I intend to investigate in the relatively near future. One of the goals for my Gumstix project is to make the Gumstix control the Hemisson robots which have a much simpler 8-bit, 20MHz microcontroller. Though it is certainly possible to program the Hemisson microprocessor directly in C, this would not be particularly easy, and the programs would be limited by the processor’s capabilities. More on the Hemisson robots later.
The various extension boards available (especially those incorporating wifi and Bluetooth)make it possible to use the Gumstix as lightweight servers, possibly communicating with various other mobile devices (and other Gumstix). It would be interesting to study what network architectures would make the most efficient usage of a the lightweight, mobile nature of the Gumstix. Once again there is an obvious application in robotics: creating intelligent, decentralized swarms capable of solving a wide variety of problems.
Although the swarm networking is something that I am very interested in eventually exploring, my first goal will be to figure how to create a good interface between a host computer, a Gumstix and a Hemisson robot. Among the things I have considered is creating a simple BASIC-like language which the Gumstix would then interpret to drive the robot. I’m also going to look at the other expansion boards available to see if any of them would help make my job easier.

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 .

New Gumstix project blog

My past record with blogging hasn’t been too good. I’ve never been able to sustaing contiued posting for more than a few weeks at a time, often less. One reason has been that I’ve never really had something focused to blog about, meaning that it has been rather easy to lose interest or to simply not know what to write about.

But now I have something more to write about. I’ve recently come into possession of a Gumstix single board computer for a college project. It’s something I’m very interested in as it represents a huge learning opportunity for me and it will be the first time that I will be able to put my programming and technology into a real tangible application. Along witht he project I have also started a blog which will be part record of my experiments and part scratchpad for any ideas I might have of what to do with Gumstix and systems programming in general. I’m calling it Gumstix Adventures. Yes it will be rather technical so if you’re not that interested in hard computer technology, you might not find it very interesting.

Since I will be devoting a lot of my free time to that project. I will no longer be updating this blog. It’s been fun and it actually gets a fair amount of traffic but I just don’t have the time or the inclination or continue it. Of course, it will still be online for anyone who is interested.

Goodbye and thanks for all the fish.