This tool used to be called 'sirfmon', and worked only on SiRF devices (and the command set has changed to resemble the command switches of gpsctl). It now has support for a range of NMEA devices as well; support for other (binary-protocol) device types is planned. It will behave sanely, just dumping packets, when connected to a GPS type it knows nothing about.
gpsmon differs from a navigation client in that it mostly dumps raw data from the GPS, with only enough data-massaging to allow checks against expected output. In particular, this tool does not do any interpolation or modeling to derive climb/sink or error estimates. Nor does it discard altitude reports when the fix quality is too low.
gpsmon is a designed to run in a terminal emulator with a minimum 25x80 size; the non-GUI interface is a design choice made to accommodate users operating in constrained environments and over telnet or ssh connections. If run in a larger window, the size of the packet-log window will be increased to fit.
gpsmon accepts an -h option that displays a usage message, or a -V option to dump the package version and exit.
This program may be run in either of two modes, as a client for the gpsd daemon (and its associated control socket) or directly connected to a specified serial device. When run with no argument, it attempts to connect to the daemon. If the argument looks like a server:port specification it will also attempt to connect to the daemon. If the argument looks like a bare server name it will attempt to connect to a daemon running on the default gpsd port on that server. Only if the device argument contains slashes but no colons will it be treated as a serial device for direct connection. In direct-connect mode gpsmon will hunt for a correct baud rate and lock on to it automatically.
The -F option is only valid in client mode; it specifies a control socket to which the program should send device control strings. You must specify a valid pathname of a Unix-domain socket on your local filesystem.
The -D option enables packet-getter debugging output and is probably only useful to developers of the GPSD code. Consult the packet-getter source code for relevant values.
The -L option lists a table showing which GPS device types gpsmon has built-in support for, and which generic commands can be applied to which GPS types, and then exits. Note that this does not list type-specific commands associated with individual GPS types.
The -l option sets up logging to a specified file to start immediately on device open. This may be useful is, for example, you want to capture the startup message from a device that displays firmware version information there.
After startup, the top part of the screen reports the contents of several especially interesting packet types. The bottom half of the screen is a scrolling hex dump of all packets the GPS is issuing. Dump lines beginning >>> represent control packets sent to the GPS.
The following device-independent comands are available while gpsmon is running:
Note that enabling probing might flip the device into another mode; in particular, it will flip a SiRF chip into binary mode as if you had used the "n" command. This is due to a limitation in the SiRF firmware that we can't fix.
Use this command with caution. On USB and Bluetooth GPSes it is also possible for serial mode setting to fail either because the serial adaptor chip does not support non-8N1 modes or because the device firmware does not properly synchronize the serrial adaptor chip with the UART on the GPS chipset whjen the speed changes. These failures can hang your device, possibly requiring a GPS power cycle or (in extreme cases) physically disconnecting the NVRAM backup battery.
(These remarks apply to not just generic NMEA devices but all extended NMEA devices for which gpsmon presently has support.)
All fields are raw data from the GPS except the "Cooked PVT" window near top of screen, provided as a sheck.
There are no device-specific commands. Which generic commands are available may vary by type: examine the output of gpsmon -l to learn more.
Most information is raw from the GPS. Underlined fields are derived by translation from ECEF coordinates or application of leap-second and local time-zone offsets.
The following commands are supported for SiRF GPSes only:
Non-static mode is designed for use with road navigation software, which often snaps the reported position to the nearest road within some uncertainty radius. You probably want to turn static navigation off for pedestrian use, as it is likely to report speed zero and position changing in large jumps.
To interpret what you see, you will need a copy of the SiRF Binary Protocol Reference Manual.
If you run gpsmon in client mode, and kill the daemon while gpsmon is still running, gpsmon will hang. Don't do that...
gpsd(8), gps(1), libgps(3), libgpsd(3), gpsprof(1), gpsfake(1), gpsctl(1), gpscat(1). gpspipe(1).
Eric S. Raymond email@example.com. This code is part of the gpsd toolset; there is a project page for gpsd m[blue]herem.