1GPSPIPE(1)                    GPSD Documentation                    GPSPIPE(1)
2
3
4

NAME

6       gpspipe - tool to connect to gpsd and retrieve sentences
7

SYNOPSIS

9       gpspipe [OPTIONS] [server[:port[:device]]]
10
11       gpspipe -h
12
13       gpspipe -V
14

DESCRIPTION

16       gpspipe is a tool to connect to gpsd and output the received sentences
17       to stdout. This makes the program useful as a pipe from gpsd to another
18       program or file.
19
20       gpspipe does not require root privileges, and can be run concurrently
21       with other tools connecting to the local gpsd without causing problems.
22
23       The output will consist of one or both of the raw NMEA or native gpsd
24       sentences. Each line can be optionally time stamped. There is also an
25       option to exit gracefully after a given count of packets.
26
27       gpspipe may be run as a daemon, but requires the -o, --output flag for
28       writing the output to a file.
29

OPTIONS

31       -?, -h, --help
32           Print a usage message and exit.
33
34       -2, --split24
35           -2 sets the split24 flag on AIS reports.
36
37       -d, --daemonize
38           Run as a daemon.
39
40       -D LVL, --debug LVL
41           Set debug level to LVL.
42
43       -l, --sleep
44           Sleep for ten seconds before attempting to connect to gpsd. This is
45           very useful when running as a daemon, giving gpsd time to start
46           before attempting a connection.
47
48       -n COUNT, --count COUNT
49           Exit after COUNT messages are output.
50
51       -o FILE, --output FILE
52           Cause the collected data to be written to the specified file. Use
53           of this option is mandatory if gpspipe is run as a daemon.
54
55       -p, --profile
56           Dump profiling information in JSON.
57
58       -P, --pps
59           Enables dumping of PPS drift JSON in NMEA and raw modes.
60
61       -r, --nmea
62           Cause NMEA sentences to be output. This may be NMEA, pseudo NMEA
63           built from binary data, or some combination of both.
64
65       -R, --raw
66           Causes super-raw (gps binary) data to be output. This will forward
67           exactly what the device sent.
68
69       -s DEV, --serial DEV
70           Cause the collected data to be written to the specified serial
71           device (DEV) with settings 4800 8N1. Thus gpspipe can be used with
72           -s, --serial and -r, --nmea options to emulate a serial port
73           hardwired to a GPS that gpsd is managing.
74
75       -S, --scaled
76           Set the scaled flag. This is for AIS and SUBFRAME data only. Scaled
77           data will be output in the JSON, instead of raw data in the JSON.
78
79       -t, --timestamp
80           Add a UTC timestamp to each sentence output.
81
82       -T FMT, --timefmt FMT
83           Set the format of the timestamp. See strftime(3) for the available
84           placeholders. Setting this option implies -t (--timestamp). Default
85           setting is "%F %T"
86
87       -u, --usec
88           Use usec resolution time stamp, implies -t (--timestamp). Use twice
89           (-uu) to output sec.usec.
90
91       -v, --spinner
92           Show a spinning activity indicator on stderr. This is useful if
93           stdout is redirected into a file or a pipe. By default the spinner
94           is advanced with every messages written; specifying -v, or
95           --spinner, more than once will double the number of messages
96           required to rotate the spinner.
97
98       -V, --version
99           Print the program version and exit.
100
101       -w, --json
102           Cause native gpsd JSON sentences to be output.
103
104       -x SEC, --seconds SEC
105           Exit after delay of SEC seconds.
106
107       -Z, --zulu
108           Set the timestamp format iso8601: implies -t.
109
110       At least one of -R, -r or -w must be specified.
111
112       You must use -o if you use -d.
113

ARGUMENTS

115       By default, clients collect data from the local gpsd daemon running on
116       localhost, using the default GPSD port 2947. The optional argument to
117       any client may override this behavior: [server[:port[:device]]]
118
119       For further explanation, and examples, see the ARGUMENTS section in the
120       gps(1) man page
121

EXAMPLES

123       When gpsd is running, this example will send one hundred raw NMEA
124       sentences to standard output, then exit:
125
126           gpspipe -r -n 100
127
128       When gpsd is running, this example will wait at most 5 seconds for a
129       TPV message, print it to stdout, then exit:
130
131           gpspipe -x 5 -w|sed -n '/TPV/{p;q}'
132

RETURN VALUES

134       0
135           on success.
136
137       1
138           on failure
139

SEE ALSO

141       gpsd(8), gps(1), gpsfake(1).
142

RESOURCES

144       Project web site: https://gpsd.io/
145

COPYING

147       This file is Copyright 2013 by the GPSD project
148       SPDX-License-Identifier: BSD-2-clause
149

AUTHOR

151       Gary E. Miller
152
153
154
155GPSD, Version 3.23.1              2021-09-03                        GPSPIPE(1)
Impressum