gpsctl
control the modes of a GPS
- Provided by: gpsd-clients (Version: 3.9-3)
- Source: gpsd
- Report a bug
control the modes of a GPS
gpsctl [-h] [-b | -n] [-x control] [-e] [-f] [-l] [-s speed] [-t devicetype] [-D debuglevel] [-V] [serial-port]
gpsctl 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:
-b
-c
-e
-f
-l
-n
-s
Use this option 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 serial adaptor chip with the UART on the GPS chipset when 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.
-t
-x
-T
-h
-D
-V
The argument of the forcing option. -t, 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.
Reset (-r) operations must stand alone; others can be combined. Multiple options will be executed in tis order: mode changes (-b and -n) first, speed changes (-s) second, and control-string sends (-c) last.
gpsctl /dev/ttyUSB0
gpsctl -f -n -s 9600 /dev/ttyUSB0
SiRF GPSes can only be identified by the success of an attempt to flip them into SiRF binary mode. Thus, the process of probing one of these running in NMEA will change its behavior.
gpsd(8), gpsdctl(8), gps(1), libgps(3), libgpsd(3), gpsprof(1), gpsfake(1).
Eric S. Raymond <esr@thyrsus.com>.