doc:appunti:hardware:eeepc_navit
Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revision | Last revisionBoth sides next revision | ||
doc:appunti:hardware:eeepc_navit [2011/04/22 09:32] – [Installing the GPS daemon] niccolo | doc:appunti:hardware:eeepc_navit [2011/04/22 10:59] – [Problems to be solved with gpsd] niccolo | ||
---|---|---|---|
Line 75: | Line 75: | ||
$GPGGA, | $GPGGA, | ||
</ | </ | ||
- | ==== Problems to be solved with gpsd ==== | + | ==== Problem #1: plug/ |
- | We want to be able to plug/unplug the GPS device | + | When a gps client opens a connection with gpsd, it starts receiving data. If GPS device |
- | - **Permissions**: | + | I hacked |
- | - **GPS unplug/ | + | |
- | + | ||
- | A workaround at the first problem | + | |
< | < | ||
- | mknod -m 0660 / | + | --- gpsd.hotplug.orig |
- | chown root:dialout | + | +++ gpsd.hotplug |
+ | @@ -114,6 +114,9 @@ | ||
+ | | ||
+ | | ||
+ | | ||
+ | + if sys.argv[1] == ' | ||
+ | + # Wake-up all the listening clients. | ||
+ | + os.system(" | ||
+ | | ||
+ | | ||
+ | | ||
</ | </ | ||
- | For the second problem I hacked **''/ | + | ==== Problem #2: permissions ==== |
- | <code python> | + | With Debian Lenny there is a **permission problem**: if gpsd starts with no GPS connected, it switches |
- | 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, stat.S_IMODE(os.stat(argument)[stat.ST_MODE])|0660) | + | |
- | connect.sendall(" | + | |
- | connect.recv(12) | + | |
- | os.system('/usr/local/bin/gps-reopen' | + | |
- | </code> | + | |
- | The script | + | A workaround |
- | < | + | It should be possibile to create such a static device into **''/ |
- | #!/bin/sh | + | |
- | /bin/echo /usr/bin/gpspipe -r -n1 | /usr/bin/at now | + | < |
+ | mknod -m 0660 /lib/udev/devices/ttyS0 c 4 64 | ||
+ | chown root: | ||
</ | </ | ||
- | |||
- | 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.txt · Last modified: 2011/04/22 11:00 by niccolo