doc:appunti:hardware:eeepc_navit
Differences
This shows you the differences between two versions of the page.
Next revision | Previous revision | ||
doc:appunti:hardware:eeepc_navit [2008/04/21 18:32] – external edit 127.0.0.1 | doc:appunti:hardware:eeepc_navit [2011/04/22 13:00] (current) – [Installing the GPS daemon] niccolo | ||
---|---|---|---|
Line 6: | Line 6: | ||
===== Compiling and installing Navit with Debian ===== | ===== Compiling and installing Navit with Debian ===== | ||
- | |||
{{ .: | {{ .: | ||
- | The program is not yet packaged for Debian, so I had to compile the source code. First of all, install the following development packages: | + | The package entered |
- | + | ||
- | * libspeechd-dev | + | |
- | * libgps-dev | + | |
- | * libsdl1.2-dev | + | |
- | * libglut3-dev | + | |
- | * libcegui-mk2-dev | + | |
- | * libglc-dev | + | |
- | * libdevil-dev | + | |
- | * libfribidi-dev | + | |
- | + | ||
- | then execute the standard **'' | + | |
+ | At present (2009-11) you can easily backport it to Debian Lenny, just download the three file **.dsc**, **.orig.tar.gz** and **.diff.gz** from the [[http:// | ||
+ | < | ||
+ | dpkg-source -x navit_0.2.0~svn2663+dfsg.1-1.dsc | ||
+ | cd navit-0.2.0~svn2663+dfsg.1 | ||
+ | dpkg-buildpackage -rfakeroot | ||
+ | </ | ||
+ | ... obviusly all the build dependencies must be installed before. The results are seven .deb packages that you can install with **'' | ||
===== Getting the map from OpenStreetMap ===== | ===== Getting the map from OpenStreetMap ===== | ||
Line 40: | Line 35: | ||
</ | </ | ||
- | ===== Installing the GPS daemon ===== | + | ===== Installing |
+ | |||
+ | This was tested on Debian Squeeze 6.0. | ||
Before starting Navit the **gpsd** should be up and running. Install the gpsd package and configure it, this is the relevant part of **''/ | Before starting Navit the **gpsd** should be up and running. Install the gpsd package and configure it, this is the relevant part of **''/ | ||
Line 51: | Line 48: | ||
</ | </ | ||
- | It is convenient | + | This will start **'' |
+ | |||
+ | **'' | ||
+ | |||
+ | For previous Debian releases just add the following line to the file **''/ | ||
< | < | ||
Line 58: | Line 59: | ||
</ | </ | ||
- | When the GPS is plugged into the USB port, udev creates the **''/ | + | When the GPS is plugged into the USB port, '' |
A simple test to check that gpsd is working, is to run **'' | A simple test to check that gpsd is working, is to run **'' | ||
Line 74: | Line 75: | ||
$GPGGA, | $GPGGA, | ||
</ | </ | ||
+ | ==== Problem #1: plug/unplug ==== | ||
+ | When a gps client opens a connection with gpsd, it starts receiving data. If GPS device is unplugged and plugged again, the connection does not restart automatically. A workaround is to execute **'' | ||
+ | I hacked **''/ | ||
+ | < | ||
+ | --- gpsd.hotplug.orig | ||
+ | +++ gpsd.hotplug | ||
+ | @@ -114,6 +114,9 @@ | ||
+ | | ||
+ | | ||
+ | | ||
+ | + if sys.argv[1] == ' | ||
+ | + # Wake-up all the listening clients. | ||
+ | + os.system("/ | ||
+ | | ||
+ | | ||
+ | | ||
+ | </ | ||
+ | ==== Problem #2: permissions ==== | ||
+ | With Debian Lenny there is a **permission problem**: if gpsd starts with no GPS connected, it switches to group **nobody**. When a GPS is connected, udev add the ''/ | ||
+ | A workaround is to create a node for ''/ | ||
- | ==== Problems to be solved with gpsd ==== | + | It should |
- | + | ||
- | We want to be able to plug/unplug the GPS device in the USB port and gpsd should work seamless, but there are two problems: | + | |
- | + | ||
- | - **Permissions**: | + | |
- | - **GPS unplug/plug**: when a gps client opens a connection with gpsd, it starts receiving data. If GPS device is unplugged and plugged again, the connection does not restart automatically. A workaround is to execute **'' | + | |
- | + | ||
- | A workaround at the first problem is to let / | + | |
< | < | ||
- | mknod -m 0660 / | + | mknod -m 0660 / |
- | chown root: | + | chown root: |
</ | </ | ||
- | |||
- | For the second problem I hacked **''/ | ||
- | |||
- | <code python> | ||
- | if action == ' | ||
- | # Force the group-read & group-write bits on, so gpsd will still be | ||
- | # able to use this device after dropping root privileges. | ||
- | os.chmod(argument, | ||
- | connect.sendall(" | ||
- | connect.recv(12) | ||
- | os.system('/ | ||
- | </ | ||
- | |||
- | The script is simple this: | ||
- | |||
- | <code bash> | ||
- | #!/bin/sh | ||
- | /bin/echo / | ||
- | </ | ||
- | |||
- | Don't ask me why I need running gpspipe it via **at**, I suspect there is the need of a controlling terminal, etc... | ||
===== Navigation ===== | ===== Navigation ===== |
doc/appunti/hardware/eeepc_navit.1208795542.txt.gz · Last modified: 2009/11/06 12:27 (external edit)