gpsctl129 Oct 2006gpsctlcontrol the modes of a GPSgpsctl-h -b-n-c control-e -f -l -s speed-t devicetype-D debuglevel-V serial-portDESCRIPTIONgpsctl can switch a dual-mode GPS
between NMEA and vendor-binary modes. It can also be used to set the
device baudrate. Note: Not all devices have these capabilities.If you have only one GPS attached to your machine, and gpsd is
running, it is not necessary to specify the device;
gpsctl does its work through
gpsd, which will locate it for you.When gpsd is not running, the device
specification is required, and you will almost certainly need to be
running as root in order to have write access to the device.The program accepts the following options:-bPut the GPS into binary mode. After the GPS resets itself, autobaud to
the new speed.-cSend a specified control string to the GPS;
gpsctl will provide packet headers and
trailers and checksum as appropriate for binary packet types, and
whatever checksum and trailer is required for text packet types. (You
must include the leading $ for NMEA packets.) C-style backslash
escapes in the string, notably \xNN for hex, will be interpreted;
additionally, \e will be replaced with ESC. This switch implies
.-eGenerate the packet from any other arguments specified and ship
it to standard output instead of the device. This switch can be used
with the option without specifying a device. Note:
the packet data for a binary prototype will be raw, not ASCII-ized in
any way.-fForce low-level access (not through the daemon).-lList the known device types and exit.-nPut GPS into NMEA mode. After the GPS resets itself autobaud to
its new speed.-sSet the baud rate at which the GPS emits packets.-tForce the device type.-hDisplay program usage and exit.-DSet level of debug messages.-VDisplay program version and exit.The argument of the forcing option. , should be a
string which should be contained in exactly one of the known driver
names; for a list, do gpsctl -l.Forcing the device type behaves somewhat differently depending
on whether this tool is going through the daemon or not. In high-level
mode, if the device that daemon selects for you doesn't match the
driver you specified, gpsctl exits with
a warning. (This may be useful in scripts.)In low-level mode, if the device identifies as a Generic NMEA,
use the selected driver instead. This will be useful if you have a
GPS device of known type that is in NMEA mode and not responding to
probes. (This option was originally implemented for talking to
SiRFStar I chips, which don't respond to the normal SiRF ID
probe.)If no options are given, the program will display a message
identifying the GPS type of the selected device and exit.SEE ALSOgpsd8,
gps1,
libgps3,
libgpsd3,
gpsprof1,
gpsfake1.
AUTHOREric S. Raymond esr@thyrsus.com. There is a
project page for gpsdhere.