Relevant Music

Script: Use TomTom as GPS receiver for your Linux computer


Running GPSDrive with TomTom

TomTom runs Linux (BusyBox) on their devices. Users can access the system using a shell and even dump the data of the GPS receiver. Instead of manually set the dump every time, which is hard work, I have made a small script for you.

Dedicated to geeks that have a TomTom and want to use their geekness for non-geek stuff, e.g. yachting.

There is an extension for TomTom devices on, that allows the user to access the internal Linux shell of the device via Bluetooth. Install it at your own risk! This allows your TomTom to dump the received NMEA information via console thus it can be used as a GPS receiver e.g. for your laptop.

Here is a script that connects to your TomTom automatically and creates a GPS device, this can take away the hard configuration on each startup. However, you should have a little knowledge about what the script is doing, because there may be some configuration that is needed.


Install btconsole at like explained. Test the installation by logging in at the console.

You need a valid Python interpreter and serial device support for the script to run. For Ubuntu and Debian users: Install the packets python and python-serial.


Put the script files into a directory. You need super-user permissions to run the script.

Be sure to set the modes to 755 (chmod 755).

Then you need to modify some files for the script work properly.

Modify the file “init”, which looks like this:



sdptool browse $MAC_ADDR
sudo rfcomm bind /dev/rfcomm0 $MAC_ADDR
sudo rfcomm -a

sudo mknod /var/run/gpswrapper p
sudo chmod 644 /var/run/gpswrapper

sudo ./

This file starts up the bluetooth serial connection and creates a pipe /var/run/gpswrapper, where applications can retrieve the GPS data. The pipe acts as a “fake device”. Then the file starts the python script.

All you need to do: Set the MAC address field “MAC_ADDR=[x]” to the address of your TomTom device.

You can get this address via the command

“hcitool scan”

Be sure to power on your TomTom and the Bluetooth support. If your computer has found your TomTom the command will return the MAC address.

Second, modify the file


dumpCommand='cat /var/run/gpspipe' #for TomTom One XL
#dumpCommand='cat /dev/gpsdata' # for other/older TomToms

verbose = True
waitseconds = 6
loginAttempts = 20
commandAttempts = 150

You need to set the proper dump command. I only know that TomTom XL uses ‘cat /var/run/gpspipe’.

Try to keep verbose=true for your first try in order to detect any malfunction. If everything works, you can switch it off.

First run

Then start the file init:


If the program periodically notes that the command prompt does not show up, terminate the program using Strg+C and restart it with:


If everything worked successfully, the program says:

NMEA pipe /var/run/gpswrapper is now accessible by other devices, e.g. gpsd.

The program keeps running now. Do NOT close it, since it works as a service. Put it in background (e.g. with Strg+Z and then “bg”) or start a new shell window (recommended) for further commands.

Try if the GPS returns the appropriate data, type:

cat /var/run/gpswrapper

and look if it returns something like that:


Close cat with Strg+C. This is NMEA position information of your TomTom GPS receiver. Now everything works as it should.

If nothing or something quite different is dumped, log in manually as described on the btconsole website and try the dump command. Sometimes, if you use /dev/gpsdata as dump command on the tomtom, it will output SiRF binary data. Then you have to switch to dumpCommand=’cat /var/run/gpspipe’. The dump command depends on the TomTom type (One, XL) and the version number. Maybe there are other dump commands for other devices I don’t know. Please post a comment which works for your device, for building a complete list of working dump commands.



Then you can start gpsd which is a service for commom Linux GPS applications using the fake device as input:

gpsd -N -D 5 /var/run/gpswrapper

for verbose output, not daemonized, or

gpsd /var/run/gpswrapper

to run it as a service.

Now you can start

xgps, gpsdrive or other common Linux GPS clients and start navigating:

Relevant Music © 2003-2006 Leo Nobach. Blog proudly powered by WordPress