How to run older gpsd-2.95-8
As of April 2012, Ubuntu-12.04 and Debian Wheezy are providing gpsd-3.4-2, which has a different API than 2.95-8 against which nobdy's gpsdprovider was written. On the other hand, obdgpslogger as of version 0.16-1.1ubuntu is now compatible with the newer gpsd. The good news is, with a little hacking, it's possible to reinstall the older gpsd alongside the new one.
Needed packages
shellprompt ;-) dpkg -l "*gps*" Desired=Unknown/Install/Remove/Purge/Hold | Status=Not/Inst/Conf-files/Unpacked/halF-conf/Half-inst/trig-aWait/Trig-pend |/ Err?=(none)/Reinst-required (Status,Err: uppercase=bad) ||/ Name Version Description +++-=========================-=========================-================================================================== un fso-gpsd <none> (no description available) un gps <none> (no description available) ii gpsd 2.95-8 Global Positioning System - daemon ii gpsd-clients 2.95-8 Global Positioning System - clients ii libgps-dev 2.95-8 Global Positioning System - development files ii libgps19 2.95-8 Global Positioning System - library ri libgps20:amd64 3.4-2 Global Positioning System - library ii obdgpslogger 0.16-1.1ubuntu1 suite of tools to log OBDII and GPS data ii python-gps 2.95-8 Global Positioning System - Python libraries un python2.5-gps <none> (no description available) un python2.6-gps <none> (no description available)
This combination required a bit of trickery, as Ubuntu and Wheezy provide python-2.7 but the older python-gps_2.95-8 wants python2.6:
alison@she-devel ;-) dpkg-query -s python-gps Package: python-gps Status: install ok installed Version: 2.95-8 Provides: python2.5-gps, python2.6-gps Depends: libc6 (>= 2.3), *****python (<< 2.7)*******, python (>= 2.5), python-support (>= 0.90.0), python (>= 2.6) | python-simplejson
Reverting the python version would be foolhardy indeed since so much depends on it in a modern Linux installation, so instead download the package for python-gps_2.95-8 and force its installation.
dpkg -i --force-depends-version python-gps_2.95-8_amd64.de
Running gpsd-2.95-8 when 3.4-2 is also installed
Make sure that the newer 3.4-2 version of gpsd is not currently running:
shellprompt ;-) ps axl | grep gps 0 1000 30222 2463 20 0 7792 884 - S+ pts/2 0:00 grep gps
Use "kill -9" to dispatch gpsd-3.4-2 if it is. Then start 2.95-8 by hand:
shellprompt ;-) /usr/local/sbin/gpsd-2.95-8 /dev/gps0
Note that the path name for your GPS device may be different; read "man gpsd" for more information, or try "lsusb" (USB) or "hcitool" (Bluetooth) or whatever method is appropriate for your device.
Testing gpsd-2.95-8
xpgs is a lightweight GPS real-time display that comes as part of gpsd-clients. Modify the 2.95-8 version to use python2.6 rather than default python2.7 by changing the first line of xgps to
#!/usr/bin/python2.6
from the original
#!/usr/bin/python
and save to another name, such as $HOME/bin/xgps-local. Now invoke xgps-local with
PYTHONPATH=/usr/lib/python2.6 $HOME/bin/xgps-local&
so that the correct Python libraries are selected. The result is a working instance of xgps with a live satellite view.