summaryrefslogtreecommitdiff
path: root/INSTALL
blob: 81e1e9af9fba57ba98e5442add4ff2ceeac7c0ec (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
Here are the steps for installing gpsd and verifying its performance:

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 GPS devices
even after it drops root privileges.  If you are running Fedora you
can skip this step, as the stock configuration has the right properties.

gpsd requires two things: (1) that GPS devices have group write
enabled, and (2) all of them are owned by the same group.
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.

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 probably already have LessTif.  Source code is available
from <http://www.lesstif.org/>.

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 rtcm.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.  It should not need any options.

5. Once gpsd is running, telnet to port 2947.  Type 'f' to see what
device it will query.  If you need to change the device, use 'f='
to do so (see the manual page for details). Now plug in your GPS.

6. Type "wr" to start raw and watcher modes.  You should see NMEA data
(text lines beginning with $) spewing out.  You will also see lines
with a GPSD prefix; these are sentence translations in GPSD protocol.

Note that until your GPS has acquired a fix, typing "p" to get position
will only return this:

GPSD,P=?

This response does not mean that gpsd is broken or that the GPS is not
sending data, merely that gpsd has not yet seen any *valid* position data.
You will have to wait for the GPS to acquire satellite lock.  If you have 
raw or watcher mode on, it should be obvious when you get a lock.

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. Check out the list of supported hardware at 

   http://gpsd.berlios.de/hardware.html

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.

9. 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.

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