doc:appunti:hardware:eeepc_navit
Differences
This shows you the differences between two versions of the page.
| Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
| doc:appunti:hardware:eeepc_navit [2009/11/06 12:27] – niccolo | doc:appunti:hardware:eeepc_navit [2011/04/22 13:00] (current) – [Installing the GPS daemon] niccolo | ||
|---|---|---|---|
| Line 35: | 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 46: | Line 48: | ||
| </ | </ | ||
| - | It is convenient | + | This will start **'' |
| + | |||
| + | **'' | ||
| + | |||
| + | For previous Debian releases just add the following line to the file **''/ | ||
| < | < | ||
| Line 53: | 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 69: | 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.1257506875.txt.gz · Last modified: by niccolo
