table of contents
UBXTOOL(1) | GPSD Documentation | UBXTOOL(1) |
NAME¶
ubxtool - u-blox tool
SYNOPSIS¶
ubxtool [-?] [-c command] [-d disable] [-e enable] [-f file/device] [-g item] [-h] [-i port] [-m mode] [-P protver] [-p preset] [-R rawfile] [-r] [-S setspeed] [-s speed] [-V] [-v verbosity] [-w wait] [-x item] [-z item,val] [[server[:port[:device]]]]
DESCRIPTION¶
ubxtool is a tool for u-blox GPS. If you do not have a u-blox GPS then can stop reading now.
This tool operates with your u-blox GPS at a very low level. To understand ubxtool you must first be familiar with your u-blox GPS and the documentation for the u-blox binary protocol. The u-blox protocol varies greatly depending on GPS model and firmware revision. Use the u-blox documentation for your model and firmware.
ubxtool can decode common u-blox binary messages, poll the GPS status, enable and disable GPS features, and send user generated commands to the GPS. It can read binary messages from a file. It can read and write directly through a serial device, or through a running gpsd instance.
OPTIONS¶
The program accepts the following options:
-?
-c COMMAND
-d OPTION
BEIDOU
BINARY
ECEF
GALILEO
GLONASS
GPS
NED
NMEA
PPS
RAWX
SBAS
SFRBX
SURVEYIN
TP
-e OPTION
-f FILE
-g ITEM
-h
-i port
-m mode
-P protver
-p PRESET
COLDBOOT
HOTBOOT
MODEL
PMS
RESET
SAVE
MON-RESETODO
MON-VER
WARMBOOT
The PRESET parameters not shown above are all simple poll commands. They merely poll the GPS to respond with the associated message. For example "ubxtool -p CFG-GNSS" asks the GPS to respond with a UBX-CFG-GNSS message describing the current GNSS configuration. Increase the verbosity of the decode by adding the "-v 2" or "-v 3" options.
-R RAW
-r
-S SPEED
-s SPEED
-V
-v VERBOSITY
-w WAIT
-x ITEM
-z ITEM,VAL
[server[:port[:device]]]
CONFIGURATION ITEMS¶
Configuring u-blox GPS with the traditional configuration messages is fraught with problems. Many configuration messages interact in odd ways. Something as simple as changing the serial port speed requires you to read the curent configuration using UBX-CFG-PRT for the proper port, merging in the change, the writing back the changed UBX-CFG-PRT message. Or just guessing at the current configuration and overwriting it all.
The u-blox 9 series, protocol version 27+, tries, but does not completely succeed, to solve the problem with Configuration Items. If your GPS does not support protocol version 27+, then this section does not apply to you.
Most of the configuration variables in the GPS have been assigned a 32-bit Key ID. Each Key ID has been assigned a Key Name. Over 600 Key Names are supported by ubxtool. To see them all do: "ubxtool -h -v 3". Each Key references one specific value.
To get the value related to an item, use "-g ITEM".
To reset the value related to an item to it default value, use "-x ITEM".
To set an ITEM name to a value, use "-z ITEM,VAL".
See the EXAMPLES section for concrete examples.
EXAMPLES¶
Decode raw log file:
ubxtool -r -f ublox-neo-m8n.log
Change GPS port speed of device on /dev/ttyAMA0 to 230,400 bps:
ubxtool -S 230400 -f /dev/ttyAMA0
Watch entire GPS reset cycle, include $GPTXT messages:
ubxtool -p COLDBOOT -w 20 -v 2
Poll Enabled Constellations:
ubxtool -p CFG-GNSS
Dump gpsd data from a remote server named x.example.com:
ubxtool -w 5 x.example.com
Version 27+ examples¶
The following examples require a GPS supporting protocol 27 or greater.
To check the current dynamic model, change it to 6 (AIR1, Airborne with <1g acceleration), revert to the default setting, and verify the faults was restored.
$ ubxtool -g CFG-NAVSPG-DYNMODEL [...] UBX-CFG-VALGET:
version 1 layer 0 reserved 0,0
layers (ram)
item CFG-NAVSPG-DYNMODEL/0x20110021 val 2 [...] $ ubxtool -z CFG-NAVSPG-DYNMODEL,6 [...] UBX-ACK-ACK:
ACK to Class x6 (CFG) ID x8a (VALSET) [...] $ ubxtool -g CFG-NAVSPG-DYNMODEL [...] UBX-CFG-VALGET:
version 1 layer 0 reserved 0,0
layers (ram)
item CFG-NAVSPG-DYNMODEL/0x20110021 val 6 [...] $ ubxtool -x CFG-NAVSPG-DYNMODEL [...] UBX-ACK-ACK:
ACK to Class x6 (CFG) ID x8c (VALDEL) [...] $ ubxtool -g CFG-NAVSPG-DYNMODEL [...] UBX-CFG-VALGET:
version 1 layer 0 reserved 0,0
layers (ram)
item CFG-NAVSPG-DYNMODEL/0x20110021 val 6
Notice that the current DYNMODEL stayed at 6 (AIR1). The "-x" only affects the saved setting, not the current setting. To change the current setting you must set it with "-z".
ENVIRONMENT¶
Options can be placed in the UBXOPTS environment variable. UBXOPTS is processed before the CLI options.
SEE ALSO¶
ubxtool is written to conform to the official u-blox documentation for the u-blox binary protocol. https://www.u-blox.com/en/product-resources
cgps(1), gpscat(1), gpsctl(1), gpsfake(1), xgps(1), gpsd(8),
AUTHOR¶
Gary E. Miller<gem@rellim.com>
26 Jun 2019 | The GPSD Project |