Difference between revisions of "TomTom"

From Navit's Wiki
Jump to: navigation, search
(GPS and GPS week rollover)
 
(24 intermediate revisions by 6 users not shown)
Line 1: Line 1:
 
[[File:TomTom-Navi.png|240px|thumb|right|Screenshot from a TomTom GO 910 running Navit.]]
 
[[File:TomTom-Navi.png|240px|thumb|right|Screenshot from a TomTom GO 910 running Navit.]]
  
Navit has been successfully ported to TomTom devices. However, the TomTom port is still experimental and some features do not work properly yet. This page lists the things that have been done so far and contains some detailed instructions on cross-compiling Navit and some required libraries for TomTom Linux. It also contains some setup instructions for using pre-compiled binaries available at http://www.navit-project.org/~xenos1984/navitom.tar.gz.
+
Navit has been successfully ported to TomTom devices. However, the TomTom port is still experimental and some features do not work properly yet.  
 +
This page lists the things that have been done so far and contains some detailed instructions on cross-compiling Navit and some required libraries for TomTom Linux. It also contains some setup instructions for using pre-compiled binaries available at http://www.navit-project.org/~xenos1984/navitom.tar.gz.
  
 
==TomTom hardware==
 
==TomTom hardware==
Lots of information on the hardware of various TomTom models has been collected at http://www.opentom.org. These devices feature an ARM920T or ARM926EJ-S CPU.
+
Lots of information on the hardware of various TomTom models has been collected at [https://web.archive.org/web/*/www.opentom.org/Main_Page www.opentom.org (trough archive.org)]. These devices feature an ARM920T or ARM926EJ-S CPU.
  
==Using pre-compiled binaries==
 
There are some pre-compiled binaries available at http://www.navit-project.org/~xenos1984/navitom.tar.gz (current SVN version: '''4300'''). I have tested them successfully on a TomTom GO 910. For other TomTom models, it may be necessary to edit the navit.xml config file and adjust the screen size, the GPS data source...
 
 
In order to use the binaries above, unpack the file in the top directory of a TomTom device. Get some Navit map and place it in the navit/share/maps folder on your TomTom. Edit the config file navit/share/navit.xml as described below. Unplug your TomTom from the computer and let it reboot. If you touch the screen and enter the TomTom main menu, you should see a Navit icon (on the last page). Press this icon and a grey screen will appear. Be patient - it may take a few seconds. But finally you should see a map. Have fun!
 
 
==Prerequisities for building Navit==
 
Before we can start, we need to set up a compiler toolchain targetting TomTom devices. TomTom provides a a pre-compiled compiler toolchain for Linux and Windows (CygWin). It can be downloaded from TomTom's website: http://www.tomtom.com/page.php?Page=gpl. This file needs to be unpacked into /usr/local/cross.
 
 
In order to use the TomTom compiler and libraries, we need to set some environment variables:
 
 
export PATH=/usr/local/cross/gcc-3.3.4_glibc-2.3.2/bin:$PATH
 
export PREFIX=/usr/local/cross/gcc-3.3.4_glibc-2.3.2/arm-linux/sys-root
 
export CFLAGS="-O2 -I$PREFIX/include -I$PREFIX/usr/include"
 
export CPPFLAGS="-I$PREFIX/include -I$PREFIX/usr/include"
 
export LDFLAGS="-L$PREFIX/lib -L$PREFIX/usr/lib"
 
 
Finally, some standard build tools are necessary for building some of the libraries and the Navit binaries. The most important one is the autotools suite, including autoconf, automake, autoheader and aclocal. Install these if you don't already have them.
 
 
The toolchain is now ready for use.
 
 
==Porting libraries==
 
Several libraries need are needed by Navit and must be ported as well.
 
 
===zlib===
 
Get the zlib source from http://zlib.net/. zlib's configure script does not support selecting the host system via --host, so we need to set a few environment variables by hand before we can compile zlib:
 
 
export CC=arm-linux-gcc
 
export CXX=arm-linux-g++
 
export LD=arm-linux-ld
 
export NM="arm-linux-nm -B"
 
export AR=arm-linux-ar
 
export RANLIB=arm-linux-ranlib
 
export STRIP=arm-linux-strip
 
export OBJCOPY=arm-linux-objcopy
 
export LN_S="ln -s"
 
 
Now we can configure, make and install:
 
 
./configure --prefix=$PREFIX
 
make
 
make install
 
 
This has been tested with zlib 1.2.5. Older versions require AR to bet set to "arm-linux-ar -r" instead. Before proceeding, make sure to reset it to arm-linux-ar  because the "-r" switch is needed only by these old zlib versions and will cause conflicts compiling the other libraries.
 
 
===libxml2===
 
This one is rather straightforward. Simply download the source from ftp://xmlsoft.org/libxml2/, configure (disable Python as this may cause problems), make and install:
 
 
./configure --prefix=$PREFIX --host=arm-linux --without-python
 
make
 
make install
 
 
===libpng===
 
The libpng source can be downloaded from http://sourceforge.net/projects/libpng/files/. I recommend using libpng-1.2.xx - I have tried 1.4.xx before but that one didn't work. Configure, make and install:
 
 
./configure --prefix=$PREFIX --host=arm-linux
 
make
 
make install
 
 
===libjpeg===
 
Get the libjpeg source from http://sourceforge.net/projects/libjpeg/files/ - the current version (which worked for me) should be 6b. It seems to rely on the directory $PREFIX/man/man1 to be present, so we need to create this if it is not already present. Configure, make and install:
 
 
mkdir -p $PREFIX/man/man1
 
./configure --prefix=$PREFIX --host=arm-linux
 
make
 
make install
 
 
===libfontconfig===
 
fontconfig can be obtained from http://fontconfig.org/release/. This one is again very simple:
 
 
./configure --prefix=$PREFIX --host=arm-linux --with-arch=arm
 
make
 
make install
 
 
===glib===
 
Cross compiling glib is a bit tricky. First, we need the sources from http://ftp.gnome.org/pub/gnome/sources/glib/. The configure script tries to probe some characteristics of the host machine by compiling a few test programs and running them - which will fail when a cross compiler is used. We therefore need to set the results of these tests by hand. In the glib source directory, create a file named tomtom.cache with the following contents:
 
 
glib_cv_long_long_format=ll
 
glib_cv_stack_grows=no
 
glib_cv_uscore=no
 
ac_cv_func_posix_getgrgid_r=yes
 
ac_cv_func_posix_getpwuid_r=yes
 
 
Make this file read-only to keep configure from overwriting it, configure, make and install.
 
 
chmod a-w tomtom.cache
 
./configure --prefix=$PREFIX --host=arm-linux --cache-file=tomtom.cache
 
make
 
make install
 
 
===tslib===
 
These instructions are based on http://www.opentom.org/Tslib. First, we need the tslib source from the SVN repository:
 
 
svn co svn://svn.berlios.de/tslib/trunk/tslib tslib
 
 
Before compiling, we need to patch the source a bit: Open the file plugins/input-raw.c in the tslib source directory and search for EVIOCGRAB. You will find several occurences of EVIOCGRAB, each of them within some if-statement. Enclose these if-statements with #ifdef EVIOCGRAB ... #endif, so that you get something like this:
 
  
#ifdef EVIOCGRAB
+
=== GPS and GPS week rollover ===
  if(...)
 
  { ... EVIOCGRAB .... }
 
#endif
 
  
We also need to edit the config file etc/ts.conf. For older TomToms, uncomment the line "module_raw h3600", so the file should look like this:
+
Devices with SiRFstarIII receiver like Tomtom go 730 work without any additional driver. They output NMEA messages which can be read directly by navit.
 +
Since GPS week rollover the firmware fail to get a fix after suspend. Clearing the old ephemeris data bring the firmware to work again.
 +
Use this script to clear the receiver before you start navit.
  
# Uncomment if you wish to use the linux input layer event interface
+
<pre>
# module_raw input
+
#! /bin/bash
 
# Uncomment if you're using a Sharp Zaurus SL-5500/SL-5000d
 
# module_raw collie
 
 
# Uncomment if you're using a Sharp Zaurus SL-C700/C750/C760/C860
 
# module_raw corgi
 
 
# Uncomment if you're using a device with a UCB1200/1300/1400 TS interface
 
# module_raw ucb1x00
 
 
# Uncomment if you're using an HP iPaq h3600 or similar
 
module_raw h3600
 
 
   
 
   
# Uncomment if you're using a Hitachi Webpad
+
if [ $# != 1 ]
# module_raw mk712
+
then
 +
        echo usage: `basename $0` path_to_nmea_device
 +
        exit
 +
fi
 
   
 
   
# Uncomment if you're using an IBM Arctic II
+
stty raw 4800 <$1 || exit
# module_raw arctic2
+
if grep -m 1 GPRMC $1 |grep -q ,,,,,
+
then                               
module pthres pmin=1
+
        echo '\r' >$1
module variance delta=30
+
        echo '$PSRF101,0,0,0,0,0,0,12,2*16\r' >$1
module dejitter delta=100
+
fi
module linear
+
</pre>
  
The new TomTom versions (ONE, XL) require a different driver. For these devices, uncomment "module_raw input" instead. Finally, use autogen.sh to create a configure script, configure, make and install.
 
  
./autogen.sh
+
On the other hand Devices with Global Hammerhead v1 like Tomtom one XL have a closed source driver named "gltt" which translates the gps messages into real NMEA messages.
./configure --prefix=$PREFIX --host=arm-linux
 
make
 
make install
 
  
===SDL===
+
Also this firmware has such a bug. To get a fix set the date with "date -s 201907040957" and then call gltt with the option -fix_start cold
The recipe for compiling libSDL is based mainly on http://www.opentom.org/LibSDL and http://www.opentom.org/Talk:LibSDL. First, get the source from http://www.libsdl.org/download-1.2.php. Unfortunalety we can't compile it out of the box, because the "fbcon" driver which we will use on TomTom relies on the presence of a virtual console, which is not present on TomTom Linux. Therefore, we have to patch the SDL source, using the patch from http://tracks.yaina.de/source/sdl-fbcon-notty.patch. After applying the patch, configure (disabling most of the unneeded drivers), make and install:
 
  
./configure --prefix=$PREFIX --host=arm-linux \
+
=== Memory ===
  --disable-esd --disable-joystick --disable-cdrom --disable-video-x11 \
 
  --disable-x11-vm --disable-dga --disable-video-x11-dgamouse \
 
  --disable-video-x11-xv --disable-video-x11-xinerama --disable-video-directfb \
 
  --enable-video-fbcon --disable-audio CFLAGS="$CFLAGS -DFBCON_NOTTY"
 
make
 
make install
 
  
The "-DFBCON_NOTTY" invokes the patch mentioned above and removes fbcon's dependence on a virtual console. If you like, you can also compile the test applications, as these are quite useful for testing whether libSDL works:
+
Nearly all Tomtom Devices feature 32MB of Memory so it is the most limited resource we have on the device.
  
cd test
+
=== Rest of hardware ===
./configure --prefix=$PREFIX --host=arm-linux
+
As shown in the [https://web.archive.org/web/20130330142227/http://www.opentom.org:80/Hardware_Variants Hardware Variants table from opentom.org] there are more features that a Tomtom contain which are not relevant for now.
make
 
make install
 
  
===SDL_Image===
+
== Tomtom Software options==
This one is rather easy again. Get the source from http://www.libsdl.org/projects/SDL_image/, configure, make and install:
 
  
./configure --prefix=$PREFIX --host=arm-linux
+
To use navit on a TomTom device you have the following options. As always in live there are advantages and disadvantages which you can find below.
make
+
The table should help you to decide which option is most suitable for you.
make install
+
{| class="wikitable"
 +
!
 +
! Original
 +
! Plugin
 +
! NavitTom (custom embedded System)
 +
|-
 +
| Advantages
 +
|
 +
* Works as intended (it's the original, so it's our truth)
 +
|
 +
* Should be easy to install and use
 +
|
 +
* Can use all device resources
 +
* we can add things then we need them
 +
|-
 +
| Disadvantages
 +
|
 +
* Really really old
 +
* No map updates
 +
|
 +
* Can not use all device resources
 +
* weird screen issues when two softwares are trying to write to the frame buffer (navit and tomtom navigation at the same time)
 +
|
 +
* Not ready for prime time
 +
* We need to take care of updates
 +
* can't use up to date Linux kernels due to display support (for now)
 +
|-
 +
| Install
 +
| WIP
 +
| WIP
 +
| WIP
 +
|}
  
==Porting Navit==
+
= OLD/WIP =
Having all libraries needed by Navit in the right places, we can now proceed compiling Navit itself. First, get the Navit source either from http://sourceforge.net/projects/navit/files/ or via SVN from http://sourceforge.net/scm/?type=svn&group_id=153410 (the latter is recommended). We can simply run autogen.sh, configure, make and install:
 
  
./autogen.sh
+
==TomTom GPS settings==
./configure --prefix=$PREFIX --host=arm-linux --disable-graphics-gtk-drawing-area --disable-gui-gtk \
 
  --disable-graphics-qt-qpainter --disable-binding-dbus --disable-fribidi --enable-cache-size=16777216
 
make
 
make install
 
  
Since we have not ported gtk, as we will use libSDL and the internal GUI only, we have to disable the gtk drivers in the configure command.
+
Devices with SiRFstarIII receiver like Tomtom go 730 work with this setting:
  
==Installing Navit==
+
<vehicle name="Local GPS" profilename="car" enabled="yes" active="1" lag="14" source="file:/dev/gpsdata" follow="1" >
===Creating directories===
 
We can now put the compiled libraries and the Navit executable, as well as some config files and, of course, some maps, to a TomTom device. Connect the TomTom device to your computer. You should see a new hard drive. In the following, let's assume this hard drive can be found in /media/TOMTOM. We then need two directories on the TomTom disk, navit and SDKRegistry. If they don't exist yet, create them:
 
  
cd /media/TOMTOM
 
mkdir -p navit SDKRegistry
 
  
Within the navit directory, create the following directories: bin, lib, share, sdl and ts.
+
Devices with Global Hammerhead v1 like Tomtom one XL work with this setting:
  
  cd navit
+
  <vehicle name="Local GPS" profilename="car" enabled="yes" active="1" lag="14" source="file://var/run/gpspipe" follow="1" >
mkdir -p bin lib share sdl ts
 
  
Now these directories have to be filled with content.
+
In a standalone setup without Tomtom environment Global Hammerhead v1 need a closed source driver named "gltt". It can be extracted from a original ttsystem file. gltt write to the named pipe /var/run/gpspipe
  
===Installing libraries===
+
gltt is called like this sample: 
Put all the libraries you just compiled into the lib directory. Be aware that TomTom uses a FAT file system which isn't aware of symlinks, so you will have to copy / rename libraries instead of symlinking them. You should end up with something similar to these files:
+
gltt -baud 115200 -periodic 1000 -fix_start cold -rftype HH_4L
  
* libSDL-1.2.so
+
You can get some informations about used device names in /proc/barcelona or the built in flash drive.
* libSDL.so
 
* libSDL_image-1.2.so
 
* libSDL_image.so
 
* libfontconfig.so
 
* libgio-2.0.so
 
* libglib-2.0.so
 
* libgmodule-2.0.so
 
* libgobject-2.0.so
 
* libgthread-2.0.so
 
* libpng.so
 
* libpng12.so
 
* libts-1.0.so
 
* libts.so
 
* libxml2.so
 
  
It seems that TomTom's compiler toolchain contains some libraries which are not present on the TomTom devices, so you may need to copy the following libraries as well:
+
==RAM memory issues==
  
* librt.so
+
Most Tomtom devices like TomTom one XL have only 32MB RAM. Navigation in cities is almost unusable.
* libthread_db.so
+
Devices with 64MB like Tomtom 730 work with reduced routing depth like route_depth="4:15%,6:1%,8:10000,18:2000"
  
===Installing tslib===
+
It is possible to build a full custom setup with the toolchain from https://github.com/george-hopkins/opentom
We already copied the tslib library into the navit/lib folder in the previous step. But in order to use tslib, we still need the config file telling tslib which driver to use. Copy it into navit/ts:
+
With it its possible to activate swap to SD card. The toolchain is outdated and need several manual changes to compile.
  
cp $PREFIX/etc/ts.conf /media/TOMTOM/navit/ts/
+
==Using pre-compiled binaries==
 +
There are some pre-compiled binaries available at http://www.navit-project.org/~xenos1984/navitom.tar.gz (this link always points to the most recently compiled version). See http://www.navit-project.org/~xenos1984/release/ for other / older versions. I have tested them successfully on a TomTom GO 910. For other TomTom models, it may be necessary to edit the navit.xml config file and adjust the screen size, the GPS data source...
  
tslib comes with some utilities for touchscreen devices, such as calibration and testing tools. When you followed the procedure described above for compiling and installing tslib, you can find them in $PREFIX/bin - easily recognizable, because their names start with "ts_". If you wish to use them on your TomTom, simply copy them into the navit/ts folder:
+
In order to use the binaries above, unpack the file in the top directory of a TomTom device. Get some Navit map and place it in the navit/share/maps folder on your TomTom. Edit the config file navit/share/navit.xml as described below. Unplug your TomTom from the computer and let it reboot. If you touch the screen and enter the TomTom main menu, you should see a Navit icon (on the last page). Press this icon and a grey screen will appear. Be patient - it may take a few seconds. But finally you should see a map. Have fun!
 
 
cp $PREFIX/bin/ts_* /media/TOMTOM/navit/ts/
 
 
 
In order to run them, you will need a small wrapper script which sets some environment variables before executing the actual utility. For example, the following script will run the calibration utility and then start a simple test program:
 
 
 
#!/bin/sh
 
 
cd /mnt/sdcard
 
 
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/mnt/sdcard/navit/lib
 
 
export TSLIB_CONSOLEDEVICE=none
 
export TSLIB_FBDEVICE=/dev/fb
 
export TSLIB_TSDEVICE=/dev/ts
 
export TSLIB_CALIBFILE=/mnt/sdcard/navit/ts/pointercal
 
export TSLIB_CONFFILE=/mnt/sdcard/navit/ts/ts.conf
 
export TSLIB_PLUGINDIR=/mnt/sdcard/navit/lib/ts
 
 
/mnt/sdcard/navit/ts/ts_calibrate
 
/mnt/sdcard/navit/ts/ts_test
 
 
 
Here, /dev/fb is the frame buffer device, and /dev/ts is the touchscreen. Newer TomTom versions (ONE, XL) have the touchscreen at /dev/input/event0 instead. In this case you need to change the corresponding line to:
 
 
 
export TSLIB_TSDEVICE=/dev/input/event0
 
 
 
To run this script, create a file named ts.cap in the SDKRegistry directory with the following contents:
 
 
 
Version|100|
 
AppName|ts-wrapper|
 
AppPath|/mnt/sdcard/navit/ts/|
 
AppIconFile||
 
AppMainTitle|Touchscreen|
 
AppPort||
 
COMMAND|CMD|hallo||Touchscreen|
 
 
 
This will create an entry named "Touchscreen" in TomTom's main menu.
 
 
 
===Installing SDL utilities===
 
If you have compiled the SDL test applications along with libSDL, place them in the navit/sdl folder on your TomTom device, as well as the *.bmp, *.wav , *.xbm, *.dat and *.txt files from the folder named test in the libSDL source directory. Before running any of these utilities, we need to set some environment variables. The overall procedure is very similar to the tslib utilities mentioned above. You need to create a wrapper script which with the following lines in it:
 
 
 
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/mnt/sdcard/navit/lib
 
 
export SDL_NOMOUSE=1
 
export SDL_FBDEV=/dev/fb
 
export SDL_VIDEODRIVER=fbcon
 
 
 
Add a line with the command that should be executed by the script. Put this file into the navit/sdl folder on your TomTom device. Finally, you need to create an entry in Navit's main menu. Place a file named sdl.cap in the SDKRegistry with the following contents:
 
 
 
Version|100|
 
AppName|sdl-wrapper|
 
AppPath|/mnt/sdcard/navit/sdl/|
 
AppIconFile||
 
AppMainTitle|SDL-Utility|
 
AppPort||
 
COMMAND|CMD|hallo||SDL-Utility|
 
 
 
Replace "sdl-wrapper" with the name of your wrapper script, if necessary.
 
 
 
===Installing Navit binaries, plugins and icons===
 
Put the Navit executable into the bin folder:
 
 
 
cp $PREFIX/bin/navit /media/TOMTOM/navit/bin/
 
 
 
In order to run Navit, we need to create a short wrapper script, which will set a few environment variables before running the actual Navit executable. Create a file named navit-wrapper in the bin directory with the following contents:
 
 
 
#!/bin/sh
 
 
cd /mnt/sdcard
 
 
# Set some paths.
 
export PATH=$PATH:/mnt/sdcard/navit/bin
 
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/mnt/sdcard/navit/lib
 
export HOME=/mnt/sdcard/
 
export NAVIT_LIBDIR=/mnt/sdcard/navit/lib/navit
 
export NAVIT_SHAREDIR=/mnt/sdcard/navit/share
 
 
# tslib requirements.
 
export TSLIB_CONSOLEDEVICE=none
 
export TSLIB_FBDEVICE=/dev/fb
 
export TSLIB_TSDEVICE=/dev/ts
 
export TSLIB_CALIBFILE=/mnt/sdcard/navit/ts/pointercal
 
export TSLIB_CONFFILE=/mnt/sdcard/navit/ts/ts.conf
 
export TSLIB_PLUGINDIR=/mnt/sdcard/navit/lib/ts
 
 
# SDL requirements.
 
export SDL_MOUSEDRV=TSLIB
 
export SDL_MOUSEDEV=$TSLIB_TSDEVICE
 
export SDL_NOMOUSE=1
 
export SDL_FBDEV=/dev/fb
 
export SDL_VIDEODRIVER=fbcon
 
export SDL_AUDIODRIVER=dsp
 
 
# fontconfig requirements
 
export FC_CONFIG_DIR=/mnt/sdcard/navit/fonts
 
export FONTCONFIG_DIR=/mnt/sdcard/navit/fonts
 
export FC_CONFIG_FILE=/mnt/sdcard/navit/fonts/fonts.conf
 
export FONTCONFIG_FILE=/mnt/sdcard/navit/fonts/fonts.conf
 
export FC_DEBUG=0
 
 
# Set language.
 
export LANG=en_US.utf8
 
 
# Run Navit.
 
/mnt/sdcard/navit/bin/navit /mnt/sdcard/navit/share/navit.xml 2>/mnt/sdcard/navit/navit.log
 
 
 
The first few lines tell Navit where it can find binaries, libraries, plugins and map icons. The middle part tells tslib which touchscreen device to use, and where to place calibration data. For newer TomToms, the touchscreen device is at /dev/input/event0, so the corresponding line needs to be changed to:
 
 
 
export TSLIB_TSDEVICE=/dev/input/event0
 
 
 
The following lines tell libSDL to use the touchscreen as mouse input, to hide the mouse pointer and to use the framebuffer. The last lines set Navit's language and run the Navit executable. stderr is redirected into a log file, since there is usually no console available to view debugger output.
 
 
 
You may have noticed the presence of a "NAVIT_LIBDIR" in the wrapper script. This is where Navit will look for plugins, so we put the plugins right there:
 
 
 
cp -r $PREFIX/lib/navit /media/TOMTOM/navit/lib/
 
 
 
Next, copy the images used by Navit to display POIs, as well as the navit config file into the share folder, and create a folder for installing maps:
 
 
 
cd /media/TOMTOM/navit/share
 
cp -r $PREFIX/share/navit/xpm ./
 
cp $PREFIX/share/navit/navit.xml ./
 
mkdir -p maps
 
 
 
[[File:TomTom-Menu.png|240px|thumb|right|TomTom menu with Navit icon.]]
 
 
 
In order to start Navit from TomTom's graphical menu, we finally have to add a menu button. Create a file named navit.cap with the following contents in /media/TOMTOM/SDKRegistry:
 
 
 
Version|100|
 
AppName|navit-wrapper|
 
AppPath|/mnt/sdcard/navit/bin/|
 
AppIconFile|navit.bmp|
 
AppMainTitle|Navit|
 
AppPort||
 
COMMAND|CMD|hallo|navit.bmp|Navit|
 
 
 
In the same directory, place a simple 48 * 48 pixel, 24 bit bitmap file named navit.bmp with a fancy Navit icon or whatever you like. If you are happy without such an icon, you can omit this step and delete the two "navit.bmp" entries from the file above:
 
 
 
Version|100|
 
AppName|navit-wrapper|
 
AppPath|/mnt/sdcard/navit/bin/|
 
AppIconFile||
 
AppMainTitle|Navit|
 
AppPort||
 
COMMAND|CMD|hallo||Navit|
 
 
 
===Installing maps===
 
Any navigation software would be useless without maps. See the [[Main_Page#Maps|Maps]] section for maps you can use with Navit. Put them into the directory /media/TOMTOM/navit/share/maps which you have just created.
 
 
 
==Configuring Navit==
 
Before running Navit, we need to change some settings in the Navit config file, navit.xml, which we have placed in navit/share on the TomTom disk. Here are some settings which are rather useful:
 
  
* As long as you don't have gdb on your TomTom, set the segfault debugging level to 0, i.e. let Navit crash without printing a stack trace via gdb. Otherwise Navit will complain that gdb can't be found.<pre><debug name="segv" level="0"/></pre>
+
A more recent version (R7045) can be found here https://1390-30791823-gh.circle-artifacts.com/2/tmp/circle-artifacts.xgv65b2/navitom.zip
* Use libSDL for graphics output. Set the screen witdh and height as well as the bits per pixel fitting to your TomTom device. (Have a look at http://www.opentom.org/Hardware_TFT_LCD for a list of screen sizes.) Disable the window frame and set SDL flags such that "software surfaces" are enabled.<pre><graphics type="sdl" w="480" h="272" bpp="16" frame="0" flags="1"/></pre>
+
It does not provide a config for 320x240 screens but it has translations and multilingual speech.
* Use the internal GUI. This is most suitable for touchscreen devices.<pre><gui type="internal" enabled="yes"></pre>
 
* GPS data can be fetched from a file named /var/run/gpsfeed. If you have gpsd running on your TomTom device, you can simply use gpsd instead.<pre><vehicle name="Local GPS" profilename="car" enabled="yes" active="1" source="file:/var/run/gpsfeed"></pre>
 
 
 
Finally, enable the mapsets you wish to use. Remember that TomTom's disk will be mounted at /mnt/sdcard at runtime, so any maps you place in the navit/share/maps folder will appear in /mnt/sdcard/navit/share/maps (which is the same as $NAVIT_SHAREDIR/maps, if you have set $NAVIT_SHAREDIR as shown above).
 
 
 
==Running Navit==
 
Running Navit is as simple as a touch of a button. Disconnect your device properly from the computer and let it reboot. Touch the screen to enter the main manu. On the last page of the main menu, a new menu entry named "Navit" should be visible. Simply press the Navit button and wait for the Navit screen to appear. Have fun!
 
 
 
==Debugging Navit==
 
Sometimes it is useful to obtain debugging output from Navit, for example to include it in a bug report. Add the following lines to your navit.xml (if they are not already present):
 
 
 
<debug name="navit" level="0"/>
 
<debug name="graphics_sdl" level="0"/>
 
<debug name="gui_internal" level="0"/>
 
<debug name="map_binfile" level="0"/>
 
<debug name="map_textfile" level="0"/>
 
<debug name="vehicle_file" level="0"/>
 
<debug name="vehicle_demo" level="0"/>
 
<debug name="font_freetype" level="0"/>
 
<debug name="osd_core" level="0"/>
 
 
 
You can now switch on debugging output for different parts of Navit by increasing the corresponding debug level. For example, to obtain standard debug messages from the Navit core application, increase the debug level in the "navit" entry to 1. For more debug output, you can use higher numbers, i.e. setting the debug level in the "osd_core" entry to 5 will give you plenty of debug output from the on screen display plugin.
 
 
 
Make sure that the debug output is redirected into some file which you can transfer to your computer after running Navit, so you need an entry similar to this one in your navit-wrapper script:
 
 
 
# Run Navit.
 
/mnt/sdcard/navit/bin/navit /mnt/sdcard/navit/share/navit.xml 2>/mnt/sdcard/navit/navit.log
 
 
 
The debugger output will then be placed in a file named "navit.log" in the navit folder on your TomTom.
 
 
 
==Additional helpful tools==
 
It is often useful to run programs from a console. For a simple console running on TomTom devices, have a look at [http://www.opentom.org/TomTom_Console TomTom Console]. It seems not to run an all TomTom devices and software versions, so you may try using [http://www.opentom.org/Btconsole Btconsole] instead, which allows you to login to your TomTom device via bluetooth.
 
 
 
==Things to be done==
 
There are quite a few things that still need to be done:
 
 
 
* porting gpsd
 
  
 +
==See also==
 +
* [[TomTom development]]
  
 
[[Category:Ports]]
 
[[Category:Ports]]
 
[http://www.prlog.org/11289974-phone-number-lookup-verizon-phone-number-reverse-lookup-to-get-information-you-need-quickly.html reverse lookup]
 
 
[http://thetvtopc.com/Reverse_Cell_Phone_Lookup_Number reverse phone lookup cell]
 

Latest revision as of 04:07, 18 September 2019

Screenshot from a TomTom GO 910 running Navit.

Navit has been successfully ported to TomTom devices. However, the TomTom port is still experimental and some features do not work properly yet. This page lists the things that have been done so far and contains some detailed instructions on cross-compiling Navit and some required libraries for TomTom Linux. It also contains some setup instructions for using pre-compiled binaries available at http://www.navit-project.org/~xenos1984/navitom.tar.gz.

TomTom hardware[edit]

Lots of information on the hardware of various TomTom models has been collected at www.opentom.org (trough archive.org). These devices feature an ARM920T or ARM926EJ-S CPU.


GPS and GPS week rollover[edit]

Devices with SiRFstarIII receiver like Tomtom go 730 work without any additional driver. They output NMEA messages which can be read directly by navit. Since GPS week rollover the firmware fail to get a fix after suspend. Clearing the old ephemeris data bring the firmware to work again. Use this script to clear the receiver before you start navit.

#! /bin/bash
 
if [ $# != 1 ]
then
        echo usage: `basename $0` path_to_nmea_device
        exit
fi
 
stty raw 4800 <$1 || exit
if grep -m 1 GPRMC $1 |grep -q ,,,,,
then                                
        echo '\r' >$1
        echo '$PSRF101,0,0,0,0,0,0,12,2*16\r' >$1
fi


On the other hand Devices with Global Hammerhead v1 like Tomtom one XL have a closed source driver named "gltt" which translates the gps messages into real NMEA messages.

Also this firmware has such a bug. To get a fix set the date with "date -s 201907040957" and then call gltt with the option -fix_start cold

Memory[edit]

Nearly all Tomtom Devices feature 32MB of Memory so it is the most limited resource we have on the device.

Rest of hardware[edit]

As shown in the Hardware Variants table from opentom.org there are more features that a Tomtom contain which are not relevant for now.

Tomtom Software options[edit]

To use navit on a TomTom device you have the following options. As always in live there are advantages and disadvantages which you can find below. The table should help you to decide which option is most suitable for you.

Original Plugin NavitTom (custom embedded System)
Advantages
  • Works as intended (it's the original, so it's our truth)
  • Should be easy to install and use
  • Can use all device resources
  • we can add things then we need them
Disadvantages
  • Really really old
  • No map updates
  • Can not use all device resources
  • weird screen issues when two softwares are trying to write to the frame buffer (navit and tomtom navigation at the same time)
  • Not ready for prime time
  • We need to take care of updates
  • can't use up to date Linux kernels due to display support (for now)
Install WIP WIP WIP

OLD/WIP[edit]

TomTom GPS settings[edit]

Devices with SiRFstarIII receiver like Tomtom go 730 work with this setting:

<vehicle name="Local GPS" profilename="car" enabled="yes" active="1" lag="14" source="file:/dev/gpsdata" follow="1" >


Devices with Global Hammerhead v1 like Tomtom one XL work with this setting:

<vehicle name="Local GPS" profilename="car" enabled="yes" active="1" lag="14" source="file://var/run/gpspipe" follow="1" >

In a standalone setup without Tomtom environment Global Hammerhead v1 need a closed source driver named "gltt". It can be extracted from a original ttsystem file. gltt write to the named pipe /var/run/gpspipe

gltt is called like this sample: gltt -baud 115200 -periodic 1000 -fix_start cold -rftype HH_4L

You can get some informations about used device names in /proc/barcelona or the built in flash drive.

RAM memory issues[edit]

Most Tomtom devices like TomTom one XL have only 32MB RAM. Navigation in cities is almost unusable. Devices with 64MB like Tomtom 730 work with reduced routing depth like route_depth="4:15%,6:1%,8:10000,18:2000"

It is possible to build a full custom setup with the toolchain from https://github.com/george-hopkins/opentom With it its possible to activate swap to SD card. The toolchain is outdated and need several manual changes to compile.

Using pre-compiled binaries[edit]

There are some pre-compiled binaries available at http://www.navit-project.org/~xenos1984/navitom.tar.gz (this link always points to the most recently compiled version). See http://www.navit-project.org/~xenos1984/release/ for other / older versions. I have tested them successfully on a TomTom GO 910. For other TomTom models, it may be necessary to edit the navit.xml config file and adjust the screen size, the GPS data source...

In order to use the binaries above, unpack the file in the top directory of a TomTom device. Get some Navit map and place it in the navit/share/maps folder on your TomTom. Edit the config file navit/share/navit.xml as described below. Unplug your TomTom from the computer and let it reboot. If you touch the screen and enter the TomTom main menu, you should see a Navit icon (on the last page). Press this icon and a grey screen will appear. Be patient - it may take a few seconds. But finally you should see a map. Have fun!

A more recent version (R7045) can be found here https://1390-30791823-gh.circle-artifacts.com/2/tmp/circle-artifacts.xgv65b2/navitom.zip It does not provide a config for 320x240 screens but it has translations and multilingual speech.

See also[edit]