How to use your linux pc/laptop to connect a TomTom GO to the internet ... or how to make your pc pretend that it is a GPRS capable telephone.

The problem
After I received the TomTom GO 300 I bought, I started to wonder if I could use my Dell Latitude D505 (which runs the Fedora Core 4 linux distribution) to allow the TomTom to connect to the internet and get traffic information (as well as maps etc etc). My laptop has built-in bluetooth, and when at home it's connected wireless to the internet, so I figured it had to be possible, especially since the TomTom itself is running linux.
The Quest...
the source code of several programs that run on the TTGO, these have been very helpful during my attempts to get this working. David Woodhouse has also been very helpful in introducing me to the finer details of how bluetooth works in linux.
Status (15/1/2006)
It works for me! My driveway is on the other side of a wall from my desk, and within bluetooth range. When I start my car, my TomTom connects and gets the latest traffic data automatically, and then (re)routes as needed.

I've also bought a map of a city I'm going to visit soon, and downloaded it onto my TTGO via this bluetooth connection. Although the TomTom website suggests not doing that via gprs (due to costs).. this worked great since... well it's free right ? ;)

Note: you need a TomTom PLUS subscription to get traffic information, usually when you buy a TomTom a subscription for several months is included with that.

Things to do on the linux side -- using the Fedora Core rpm
I've made RPMs to do this more or less automatically, the Fedora Core 4 binary rpm is here for i386, here for ppc, and the src.rpm is here

These rpms create a service tomtom that you can start and stop as you like, and that does everything needed automatically.

Note: these rpms are quite new and need testers; please share your experiences with me on these.

Things to do on the linux side -- the manual way
As an alternative to using the rpms, this section describes how to do things manually.

A warning

The manual process is currently not for the faint of heart and it sure isn't as user friendly as I want it to be. It involves patching a few programs in your distribution (I'm working to get those patches integrated into the upstream bluez bluetooth packages so that this will go away in the future).

Set up bluetooth, and find your tomtom with it

There are several HOWTOs on how to set up bluetooth; the simple version is: install the various bluez rpms and make sure the bluetooth service is started ("chkconfig --level 345 bluetooth on" in fedora, followed by a "service bluetooth start"). With that done, a
hcitool scan
should find your TTGO like this (the actual address will be different and unique for each device):
# hcitool scan
Scanning ...
        00:13:AB:CD:EF:12       TomTom GO 300
(for this to work you may have to go to the options screen on your TTGO and tell it to connect to a phone)

On my laptop this didn't actually work, and I had to do some "magic" first to enable the bluetooth chip in a special way. This I stole directly from one of the TomTom GPL applications; the source code for the simplified app to do this can be found here: bluetooth_csr.c / Makefile. Run "make bluetooth_csr" and then "./bluetooth_csr ON" to execute this. After this, try the scan again.

Set your bluetooth type to be that of a phone

Edit your /etc/bluetooth/hcid.conf file and change the line that says "class" into the following:
	class 0x520204;

Telling linux to listen for incomming bluetooth connections

The TomTom wants to use a so called "DUN" connection. In linux, these are provided by the "dund" daemon program. Unfortunately, the standard dund program in many distributions advertizes itself as a PC offering DUN services, while the TomTom is looking specifically for a phone offering DUN services. I've created a patch for the dund program that makes it pretend to be a phone.

As of version 2.25 (released on 18/1/2006) of the bluez package, this patch is integrated and if your bluez version is 2.25 or higher, no extra patching is required.

I start the dund program like this:

dund --dialup --listen call tomtom connect /etc/ppp/tomtom.sh   
which is all that is needed, once ppp is configured correctly (see next section)

Configuring ppp

Configuring ppp consists basically of 3 files you need to put in place: Remember to make the /etc/ppp/tomtom.sh file executable with
chmod u+x /etc/ppp/tomtom.sh"
You will need to edit the /etc/ppp/peers/tomtom file to put in your own DNS server instead of mine! (if you would have used the rpms this would have been done automatically for you)

Port forwarding and NAT

You want your tomtom to be able to go out on the internet, for this you need to do the following two things: (this assumes eth0 is the network interface to your internet connection, if it's another ethernet device you need to use that instead)
echo 1 > /proc/sys/net/ipv4/ip_forward
iptables -t nat -A POSTROUTING -o eth0 -j MASQUERADE
Note: This turns your laptop/PC into a router, so you need to be aware of this!

Debugging hints

Add a "-n" option as first argument to dund, as well as the word "debug" to the end of the dund line above to get improved output to the screen about what is going on
Setting up the TomTom GO
If you got this far.. this is the easy part. Go into the menu (tap on the map) and click on the "Connect to your phone" ("Maak verbinding met uw telefoon" in dutch) icon. If you followed the steps above it should find your PC as a possible device to connect to. (Just being of the right class is enough for this)

Tap on the entry that represents your PC (the hostname will be in it), it'll then start trying to find out what kind of phone you have. This part isn't quite automated yet in the scripts above, so this will time out after about one minute. The TomTom will then offer you to select your own phone from a list of known phones, with an "other" option in the left-bottom corner. Pick this "other" option.

The TTGO will then ask you a lot of detail questions; don't worry, just leave everything at the defaults (eg emtpy mostly). You do need to pick the "automatic IP" and "automatic DNS" options when they are asked.

And that's it.. after this the TTGO can just connect to the TomTom.com servers for updates, traffic information etc etc.

Questions

Questions

If you have any questions or feedback about these pages, please contact me at arjan@infradead.org.
Other TomTom pages
I have two other TomTom related pages: