Langue: en

Version: 111720 (mandriva - 01/05/08)

Section: 1 (Commandes utilisateur)


gpspipe - tool to connect to gpsd and retrieve sentences


gpspipe [-h] [-n count] [-r] [-R] [-s serial-device] [-t] [-w] [-v] [server [:port]]


gpspipe is a tool to connect to gpsd and output the received sentences to stdout. This makes the program useful as a pipe from gpsd to another program or file.

gpspipe does not require root privileges, and can be run concurrently with other tools connecting to the local gpsd without causing problems.

The output will consist of one or both of the raw NMEA or native gpsd sentences. Each line can be optionally time stamped. There is also an option to exit gracefully after a given count of packets.

An optional argument may specify a server to get data from; a colon-separated suffix is taken as a port number. If omitted, it connects to localhost on the default port (2947).


-h makes gpspipe print a usage message and exit.

-r causes raw NMEA sentences to be output.

-R causes super-raw (gps binary) data to be output. This overrides NMEA and gpsd output modes.

-s option causes the collected data to be written to the specified serial device with setttings 4800 8N1. Thus gpspipe can be used with -s and -r options to emulate a serial port hardwired to a GPS that gpsd is managing.

-w causes native gpsdsentences to be output.

-t adds a timestamp to each sentence output.

-n [count] causes [count] sentences to be output. gpspipe will then exit gracefully.

-j makes the program send J=1 to the daemon, requesting fix hold across cycles.

-v causes gpspipe to show a spinning activity indicator on stderr. This is useful if stdout is redirected into a file or a pipe. By default the spinner is advanced with every messages written; specifying -v more than once will double the number of messages required to rotate the spinner.

-V prints the version, then exits.

At least one of -R -r or -w must be specified.


When gpsd is running gpspipe -r -n 100 will send one hundred raw NMEA sentences to standard output, then exit.


Gary E. Miller <>. There is a project page for gpsd here: