Rana/Install guide

From OpenStreetMap Wiki
Jump to: navigation, search
Rana on OpenMoko


Using subversion:

svn co http://svn.openstreetmap.org/applications/mobile/rana

On Windows, you can do the same thing by installing rapidSVN and using that to checkout the URL above

If you don't have SVN available, there is a batch file that will download all the rana files and its prerequisites (pyroutelib2 and pyrender)


on Windows, you can get a copy of wget here, then rename that script to getrana.bat, change "wget" to wherever you downloaded wget.exe to, and run it


  • pyGTK required by GUI
  • Cairo required for all drawing functions
  • urllib required for downloading map tiles, map data, and for position-sharing functionality
  • threads are used by default in mod_mapTiles, this is configurable with threadedDownload option
  • sockets are used to connect to GPSD if available

Installing dependencies on OpenMoko

opkg install python python-pygtk python-math python-netclient python-xml python-threading


In the rana/modules/ directory, there is a file called example_config.py. Rename this to mod_config.py, and it will become a place where you can set various options about how the program will work

Setting options

There are loads of options that you can control (options and data are treated the same in rana, so you can even set data this way too)

In mod_config.py, add a line like:

self.set("option_name", "option_value")

Using a GPS

If you have a GPS installed, then check gpsd is running on your machine. Rana will try to connect to localhost:2947 on startup and will use gpsd automatically if it's available

Using without a GPS

Add a line to mod_config:

self.set("centreOn", "51.3,-0.5")

and that will be used as your starting position. You may also like to set

self.set("centred", False)  # don't keep the map centred on the start position

Replaying a GPS log file

The example config file already contains an outline of how to do this - you find the replayGpx module, and tell it to load your tracklog:

m = self.m.get('replayGpx', None)
if(m != None):

If you're confident that the module exists, you could shorten that to


As soon as the GPX is loaded, it starts replaying the file and controlling your apparent position on the map.


If any particular module has problems, you can prevent it loading by renaming the relevant mod_something.py file so that it doesn't begin with mod_.

Next steps

See Rana/User guide for running the program once it's installed or Rana/Maps for how to get maps onto the device