• Increase font size
  • Default font size
  • Decrease font size

Getting started with Openmoko Freerunner

Print PDF

So a few days ago I have received a brand new Openmoko Freerunner GTA02. This is basically a modern mobile device that supports GSM technology as well as all other functions (wireless, GPS, ...) which are commonly found on upper range mobile phones nowadays. What is interesting about it (at least from my point of view) is that its hardware and software development is completely open. It allows, and in fact encourages, participation in developing it towards a mature product (which still is not, at least in the common meaning of the word).

If you found this page chances are that you also got a Freerunner, therefore I'll go straight to the point and try to put down a few experiences that could be useful to someone.

The first time I switched the Freerunner on I was welcomed by a nice Openmoko logo, followed by a series of white-text-on-black-screen messages, like you would see on a desktop PC. This is definitely no ordinary phone! After a minute or so the home menu of the phone shows up with a few icons, iPhone style you could say. It's really only a few of them, including settings, dialer (to make phone calls), messages (for SMS), locations (basic GPS functionality) and little more.

Took me a while to realize I was running a version of the Om2008 distribution (not the Om2009 as advised by the reseller), *probably* the Om2008.12. With Wi-Fi not present in the settings page I immediately looked for a way to connect the FR to the rest of the world. It turns out it is relatively easy to do so using only a USB cable connecting to a Linux computer (OpenSUSE in my case).

Using a feature of the Linux kernel that easily allows to access network resources through a USB connection I followed the instructions in the manual and it was relatively easy to ssh into the Freerunner (that is, connecting to it through a terminal running in your Linux computer).

(the following commands are to be typed into a terminal in your Linux computer after connecting the USB cable to the FR)

(it is here assumed that the device is recognized as usb0 by the host computer, you can find messages to confirm it appearing in /var/log/messages or similar file after connecting the USB cable)

# to set the ip address of usb0 interface (openmoko)
ip address add dev usb0

# to start openmoko connection
ip link set dev usb0 up

# to login into openmoko with ssh (this is the default ip address on openmoko)
ssh This e-mail address is being protected from spambots. You need JavaScript enabled to view it

# at the password prompt just press enter unless a password is set in the FR

(you can put the above into a script)

At this point you should be presented with a prompt which is something like the following:


That means we have successfully entered into the device and can now explore it through the terminal. We can for example type:


and verify that interface usb0 in the FR is set to the IP address (default on most FR devices), this is the reason why we previously set the IP address on our computer to (the last 200 could be anything from 0 to 255, but not 202!), so that the two can communicate.

You can verify that the connection is there by typing:


in the ssh session.

A problem with the default setting of is that it can easily happen that your computer's main network card (ethernet or wireless) is already set to that address range (it is the default if you are connecting to the internet through a router). As this can cause problems it is advised to change the address range in your router, which should be much easier at this point than changing things in the Openmoko device... as I didn't have this problem I went straight to the next part which is making sure that the device can reach the internet.

We have to make sure that a request coming from the FR is properly forwarded through the router on to the internet and back. To do this:

  • IP forwarding must be enabled
  • proper rules needs to be set in the firewall (if any)

If your Linux system has a graphical interface for the firewall that might be the easiest way to proceed. Basically all you need to do (at least in my experience) is enabling masquerading, which should be somewhere in the firewall options. You can also set a specific rule that will forward traffic coming from usb0 to eth0 or from subnet onto your router subnet.

If you don't have such graphical aids or you want to write a script to do it you can try some of the following commands:

(warning: altering firewall setting should be done cautiously, those suggested here are only quick fixes to communicate with the openmoko)

# in case we want to flush the content of the POSTROUTING table beforehand (may not be necessary)
iptables -t nat -F POSTROUTING

# this should let through all packages coming from openmoko subnet and directed to eth0 (internet bound interface)
# by sending them over to MASQUERADE
iptables -t nat -A POSTROUTING -s -o eth0 -j MASQUERADE

# the filter table needs to be checked as well, especially the FORWARD chain
# this will only list the filters currently active
iptables -t filter L

# this flushes the FORWARD chain so as to clear previous rules
iptables -t filter -F FORWARD

# this tells the firewall to accept and forward all packages FROM openmoko subnet
# the /24 specifies the subnet mask, in this case
iptables -t filter -A FORWARD -s -j ACCEPT

# this tells the firewall to accept and forward all packages TO openmoko subnet
iptables -t filter -A FORWARD -d -j ACCEPT

At this point I was able to:

ping google.com

and get a response!

I could then go on and run the installer on the Freerunner (the link is at the bottom of the page). Although it did complain that repositories were not found I was still able to install a few programs (I guess some repositories were found after all). As I plan to switch to another distribution soon (Om2008 is no longer developed) I did not put much effort into getting everything to work, I just wanted to become familiar with the FR.

Something I would like to get working is the Wi-Fi which is apparently on by default but lacks a graphical interface in the Settings page. Following some googled advice I installed Mofi and verified that it can in fact find wireless networks. I was not successful in connecting to one though.

By playing around in the terminal (even installed one in the FR itself, not the most convenient situation for typing a lot of stuff, but very cool) I found out that the SD micro card you can insert in the Openmoko is automatically mounted at /media/card while the root filesystem is mounted from a much more obscure string (nothing like /dev/sda1), which you can easily find by typing:

cat /etc/fstab

in the Openmoko (either through ssh or directly in the terminal application in the phone) and checking the entry corresponding to /

Switching off the Openmoko Freerunner requires pressing the power button for at least 3 or 4 seconds, while switching it on requires a much longer time (7 or 8 possibly). As mentioned in the manual there is some problem when the battery is empty. Basically the phone can run without a battery if it is connected to USB or power outlet, but it cannot boot. If the battery happens to drain completely I found that attaching it to the power outlet and waiting for a while (around 30 minutes) will allow the device to start again.

Last Updated on Tuesday, 10 August 2010 10:07  

Add your comment

Your name:
  The word for verification. Lowercase letters only with no spaces.
Word verification: