gpsmon 1 17 Feb 2009 gpsmon monitor and control a SiRF GPS in binary mode gpsmon -h -v -F control-socket server :port :device device DESCRIPTION gpsmon is a monitor that watches packets coming from a GPS and displays them along with diagnostic information. It supports commands trhat can be used to tweak GPS settings in various ways; some are device-independent, some vary with the GPS chipset type. 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. 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. At SiRF firmware level 231, the "UTC" time displayed is not real UTC, as it is not leap-second-corrected. This is due to an inadequacy in the SiRF firmware. To interpret what you see, you will need a copy of the SiRF Binary Protocol Reference Manual. COMMANDS The following device-independent comands are available while gpsmon is running: i Enable/disable subtype probing and reinitialize the driver. In normal operation, gpsmon does not send configuration strings to the device (except for wakeup strings needed to get it to send data, if any). The command 'i1' causes it to send the same sequence of subtype probes that gpsd would. The command 'i0' turns off probing; 'i' alone toggles the bit. In either case, the current driver is re-selected; if the probe bit is enabled, probes will begin to be issued immediately. 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. n With an argument of 0, switch device to NMEA mode at current speed; with an argument of 1, change to binary (native) mode. With no argument, toggle the setting. Will show an error if the device doesn't have such modes. b Change baud rate. l Toggle packet logging. If packet logging is on, it will be turned off and the log closed. If it is off, logging to the filename following the l will be enabled. Differs from simply capturing the data from the GPS device in that only whole packets are logged. The logfile is opened for append, so you can log more than one portion of the packet stream and they will be stitched together correctly. s Send hex bytes to device. Following the 's' you may type hex digit pairs; end with a newline. These will become the payload of a control packet shipped to the device. Ctrl-S Freeze display, suspend scrolling in debug window. Ctrl-Q Unfreeze display, resume normal operation. The following commands are supported for SiRF GPSes only: c Set (c1) or clear (c0) static navigation. The SiRF documentation says Static navigation is a position filter designed to be used with motor vehicles. When the vehicle's velocity falls below a threshold, the position and heading are frozen, and velocity is set to zero. This condition will continue until the computed velocity rises above 1.2 times the threshold or until the computed position is at least a set distance from the frozen place. The threshold velocity and set distance may vary with software versions. 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. t Toggle navigation-parameter display mode. Toggles between normal display and one that shows selected navigation parameters from MID 19, including the Static Navigation bit toggled by the 'c' command. FILES /var/run/gpsd.sock The default location of the control socket. BUGS AND LIMITATIONS This tool used to be called 'sirfmon', and worked only on SiRF devices. It now has support for generic NMEA devices; support for other device types is a work in progress. It will behave sanely, just dumping packets, when connected to a GPS type it knows nothing about. SEE ALSO gpsd8, gps1, libgps3, libgpsd3, gpsprof1, gpsfake1, gpsctl1, gpscat1. AUTHOR Eric S. Raymond esr@thyrsus.com, based on code originally by Rob Janssen, PE1CHL. This code is part of the gpsd toolset; there is a project page for gpsd here.