Puppy Linux Discussion Forum Forum Index Puppy Linux Discussion Forum
Puppy HOME page : puppylinux.com
"THE" alternative forum : puppylinux.info
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

The time now is Sat 25 Oct 2014, 13:38
All times are UTC - 4
 Forum index » Advanced Topics » Additional Software (PETs, n' stuff) » Unsorted
gpsd - connect to gps devices
Moderators: deshlab, Flash, GuestToo, Ian, JohnMurga, Lobster
Post_new_topic   Reply_to_topic View_previous_topic :: View_next_topic
Page 1 of 1 Posts_count_1  
Author Message

Joined: 20 May 2006
Posts: 6449
Location: Auckland, New Zealand

PostPosted: Sat 30 Jan 2010, 09:05    Post_subject:  gpsd - connect to gps devices  

gpsd is for communicating with gps devices, and provides several tools.
I compiled this to go with tangogps , but I don't have a gps and I don't know anything about it, so I can't tell you what else you need to do to set it up properly.

Here's the INSTALL file though:
Here are the steps for installing gpsd and verifying its performance:

0. gpsd has a core set of prerequisites that are required for any
configuration of the package, and then additional features and tests
have additional prerequisites.

Necessary components for any build:

C compiler      -> gpsd and client library are written in C

The code depends on one non-C99 feature: anonymous unions.  We could
eliminate these, but the cost would be source-level interface breakage
if we have to move structure members in and out of unions.

Having the following optional components on your system will enable
various additional capabilities and extensions:

C++ compiler          -> libgpsmm C++ wrapper for the library
pthreads library       -> support for PPS timekeeping on serial GPSes
DBUS                   -> gpsd will issue DBUS notifications
X windows + lesstif    -> two test clients depend on this
ncurses                -> two more test clients depend on this

Python 2.6 or 2.4+ & simplejson.  The Python code in GPSD is 2.4-compatible
except that you need either the json library module from 2.6 or the
functionally equivalent simplejson backport.

For building from SVN, the following are necessary:
autoconf 2.61 or later
automake 1.10 or later
libtool 2.26 or later
Python         -> code is generated from python scripts

For working with DBUS, you'll need the DBUS development
headers and libraries installed.  Under Debian/Ubuntu these
are the packages ibdbus-1-dev and libdbus-glib-1-dev.

For building from SVN, or if you change the man page source, xslt and
docbook xsl style files are used to generate nroff -man source from
docbook xml.  The following packages are used in this process:

libxslt                -> xsltproc is used to build man pages from xml
docbook-xsl            -> style file for xml to man translation

The build degrades gracefully in the absence of any of these. You should
be able to tell from configure messages which extensions you will get.

Under Ubuntu and most other Debian-derived, an easy way to pick up
the prerequisites is: "apt-get build-dep gpsd"

Once you have fetched the software prerequisites:

1. Start by making sure you can get data from your GPS, otherwise the later
steps will be very frustrating.  In this command

      stty -F /dev/ttyXXX ispeed 4800 && cat </dev/ttyXXX

replace ttyXXX with the filename of the port.  This will probably be
either /dev/ttyUSB0 or /dev/ttyS0.  When you run this command, you
should see text lines beginning with $ come to stdout (possibly after
a short initial burst of binary garbage).  If you don't see this, you
may have OS-level problems with your serial support, but more likely
have the wrong device.  Look again.

2. Ensure that device permissions will enable gpsd to read from and
write to GPS devices even after it drops root privileges.  If you are
running Fedora Core or Ubuntu you can skip this step, as the stock
configuration has the right properties.

gpsd requires two things: (1) that GPS devices have group read and
write enabled, and (2) all of them are have the same group ID as a
prototypical device, typically /dev/ttyS0 under Linux or /dev/tty00
under *BSD. It does not actually matter what the owning group is,
as gpsd will look this up on startup.  Alternatively, (3), you can
set a fallback group with the enable-gpsd-group in case the prototype
is not found: this should be the "dialout" group (or functional equivalent)
that has write access to serial devices.

Before dropping privileges, gpsd will ensure that it has access to
devices given to it on the command line by forcing their group read
and write permissions on.

On a Linux with udev, check the files in /etc/udev/permissions.d to
ensure that /dev/tty* devices are all created with the same group
and with 0660 permissions.

When gpsd drops privileges, its default is to set uid to 'nobody' and
group to the owning group of the prototype device (the configure
option --enable-gpsd-user=foo will cause gpsd to change to 'foo'

If your system has the Linux hotplug facility installed you can skip
the permission-setting part; the hotplug scripts will force the
permissions for you.  You still have to make sure all the tty devices
are in the same group.

3. Build gpsd from source (skip this step if you have installed a gpsd
binary package).

You will need to have either Motif or LessTif installed in order for
xgps and xgpsspeed to build; if you don't, you'll get some error
resembling "Xm/Xm.h: No such file or directory".  If you're on a Linux
system, you may already have LessTif.  Source code is available
from <http://www.lesstif.org/>.

Under Ubuntu, you will require libmotif-dev, libxp-dev and libxaw7-dev
in addition to the standard build-support packages.  You can get
all the build prerequisites intalled with "apt-get build-dep gpsd".

To build from source, run ./autogen.sh (or sh autogen.sh if the
script does not have execute permission).  Mac OS X users may
need to do "./autogen.sh --x-includes=/usr/X11R6/include"

Note: if you are going to use the RTCM-104 support, you should compile
with gcc4; if you don't have it installed as your default
compiler, do this by specifying CC=gcc4 before the autogen.sh
command.  The rtcm2.c file confuses the gcc-3.4.[23] optimizer
at -O2 level, making it generate incorrect code.

Then run make: libgps.so, gpsd, xgps, and xgpsspeed will be
built. Copy the app-defaults files xgps.ad and xgpsspeed.ad to your
home directory or to the system-wide X app-defaults directory.

4. Start gpsd.  You'll need to give it as an argument a path to
a serial or USB port with a GPS attached to it.

5. Once gpsd is running, telnet to port 2947. You should see a
greeting line that's a JSON object describing GPSD's version.
Now plug in your GPS (or AIS receiver, or RTCM2 receiver).

6. Type '?WATCH={"raw:1"};' to start raw and watcher modes.  You
should see NMEA data (text lines beginning with $) spewing out.  You
will also see lines beginning with '{' that are JSON objects
representing reports from your GPS; these are packet translations in
GPSD protocol.

7. Start the xgps client.  Calling it with no arguments should do the right
thing.  You should see a GUI panel with position/velocity-time information,
and a satellite display.  The displays won't look very interesting until
the GPS acquires satellite lock.

8. Now that you've verified that the code is working, "make install"
will install it it in the system directories.  "make uninstall" will
undo this.

(You won't need to "make install" if you installed from a binary package.)

9. To enable hotplugging of USB GPSes under Linux, do a 'make udev-install' or
equivalent to put the appropriate udev rules and wrapper files in plases.

10. Check out the list of supported hardware at


If your GPS isn't on the list, please send us information to add a new
line to the table.  Directions are included on that page.

We can also use updates of the latest version number known to work with
hardware already supported.

11. Note for small embedded systems and those without threading.  It is
possible to build gpsd without thread support if you configure with
--disable-pps.  You'll lose support for updating the clock from PPS pulses.
It's also possible to build without Python via --disable-python, in which
case you'd build won't make Python libraries and "make install" won't
try to install Python tools.

12. Note for systems using DBUS: gpsd includes support for shipping fixes
as DBUS notifications, but it is not compiled in by default.  Configure
with the option "--enable-dbus" to get it working.

13. The distribution includes a PHP script that you can use to
generate a PHP status page for your GPS.  You will need php and php-gd
installed.  To install it, copy the file 'gpsd.php' to your HTTP
document directory.  The first time it's invoked, it will generate a
file called 'gpsd_config.inc' containing configuration information;
edit to taste.  Note that for the Google Maps feature work you need
to set a valid Google API key in your config file.

14. There are regression tests to verify proper operation of gpsd, and
it can be useful to run these to verify that all is well.  To run the
regression tests, first build gpsd from sources, and then run "make
testregress".  It is not necessary to install first.  Python is
required for regression tests.

N.B. I upxed all the binaries, so you may want to un-upx them if you put them in a liveCD or .sfs.
N.B. I compiled with DBUS support... let me know if you really want a version without DBUS support.
Description  the developer files for if you need to compile something against it.

Filename  gpsd_DEV-2.90.pet 
Filesize  621.19 KB 
Downloaded  344 Time(s) 

Filename  gpsd-2.90.pet 
Filesize  239.25 KB 
Downloaded  578 Time(s) 

- - -
Classic Puppy quotes
- - -
Beware the demented serfers!
Back to top
View user's profile Send_private_message 
Display_posts:   Sort by:   
Page 1 of 1 Posts_count_1  
Post_new_topic   Reply_to_topic View_previous_topic :: View_next_topic
 Forum index » Advanced Topics » Additional Software (PETs, n' stuff) » Unsorted
Jump to:  

You cannot attach files in this forum
You can download files in this forum

Powered by phpBB © 2001, 2005 phpBB Group
[ Time: 0.0679s ][ Queries: 13 (0.0039s) ][ GZIP on ]