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 22.214.171.124 IP by opening
/etc/network/interfaces and replacing
iface usb0 inet dhcp
iface usb0 inet static
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 .
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.