Devuan fork of gpsd
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

ubxtool.1 11 KiB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421
  1. '\" t
  2. .\" Title: ubxtool
  3. .\" Author: [see the "AUTHOR" section]
  4. .\" Generator: DocBook XSL Stylesheets v1.79.1 <http://docbook.sf.net/>
  5. .\" Date: 26 Jun 2019
  6. .\" Manual: GPSD Documentation
  7. .\" Source: The GPSD Project
  8. .\" Language: English
  9. .\"
  10. .TH "UBXTOOL" "1" "26 Jun 2019" "The GPSD Project" "GPSD Documentation"
  11. .\" -----------------------------------------------------------------
  12. .\" * Define some portability stuff
  13. .\" -----------------------------------------------------------------
  14. .\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  15. .\" http://bugs.debian.org/507673
  16. .\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html
  17. .\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  18. .ie \n(.g .ds Aq \(aq
  19. .el .ds Aq '
  20. .\" -----------------------------------------------------------------
  21. .\" * set default formatting
  22. .\" -----------------------------------------------------------------
  23. .\" disable hyphenation
  24. .nh
  25. .\" disable justification (adjust text to left margin only)
  26. .ad l
  27. .\" -----------------------------------------------------------------
  28. .\" * MAIN CONTENT STARTS HERE *
  29. .\" -----------------------------------------------------------------
  30. .SH "NAME"
  31. ubxtool \- u\-blox tool
  32. .SH "SYNOPSIS"
  33. .HP \w'\fBubxtool\fR\ 'u
  34. \fBubxtool\fR [\-?] [\-c\ \fIcommand\fR] [\-d\ \fIdisable\fR] [\-e\ \fIenable\fR] [\-f\ \fIfile/device\fR] [\-g\ \fIitem\fR] [\-h] [\-i\ \fIport\fR] [\-m\ \fImode\fR] [\-P\ \fIprotver\fR] [\-p\ \fIpreset\fR] [\-R\ \fIrawfile\fR] [\-r] [\-S\ \fIsetspeed\fR] [\-s\ \fIspeed\fR] [\-V] [\-v\ \fIverbosity\fR] [\-w\ \fIwait\fR] [\-x\ \fIitem\fR] [\-z\ \fIitem,val\fR] [[server[:port[:device]]]]
  35. .SH "DESCRIPTION"
  36. .PP
  37. ubxtool
  38. is a tool for u\-blox GPS\&. If you do not have a u\-blox GPS then can stop reading now\&.
  39. .PP
  40. This tool operates with your u\-blox GPS at a very low level\&. To understand
  41. ubxtool
  42. 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\&.
  43. .PP
  44. ubxtool
  45. 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\&.
  46. .SH "OPTIONS"
  47. .PP
  48. The program accepts the following options:
  49. .PP
  50. \-?
  51. .RS 4
  52. Makes
  53. ubxtool
  54. print a usage message and exit\&.
  55. .RE
  56. .PP
  57. \-c COMMAND
  58. .RS 4
  59. Send a command to the GPS\&. Accepts one parameter, COMMAND, a comma\-separated list of hexadecimal bytes specifying the class, the ID, and any needed payload\&. The header, length, and checksum are added automatically\&.
  60. .RE
  61. .PP
  62. \-d OPTION
  63. .RS 4
  64. Disable an option in the GPS\&. Accepts one parameter, OPTION, the option to disable\&.
  65. .PP
  66. BEIDOU
  67. .RS 4
  68. Disable use of the BeiDou (COMPASS) constellation\&.
  69. .RE
  70. .PP
  71. BINARY
  72. .RS 4
  73. Disable sending of the basic binary messages\&.
  74. .RE
  75. .PP
  76. ECEF
  77. .RS 4
  78. Disable sending of ECEF binary messages\&.
  79. .RE
  80. .PP
  81. GALILEO
  82. .RS 4
  83. Disable use of the GALILEO constellation\&.
  84. .RE
  85. .PP
  86. GLONASS
  87. .RS 4
  88. Disable use of the GLONASS constellation\&.
  89. .RE
  90. .PP
  91. GPS
  92. .RS 4
  93. Disable use of the GPS and QZSS constellations\&.
  94. .RE
  95. .PP
  96. NED
  97. .RS 4
  98. Disable sending of NED binary messages\&. UBX\-NAV\-VELNED and UBX\-NAV\-RELPOSNED\&.
  99. .RE
  100. .PP
  101. NMEA
  102. .RS 4
  103. Disable sending basic NMEA messages\&. The messages are GBS, GGA, GSA, GGL, GST, GSV, RMC, VTG, and ZDA\&.
  104. .RE
  105. .PP
  106. PPS
  107. .RS 4
  108. Disable TIMEPULSE 0\&.
  109. .RE
  110. .PP
  111. RAWX
  112. .RS 4
  113. Disable sending of the UBX\-RXM\-RAWX messages\&.
  114. .RE
  115. .PP
  116. SBAS
  117. .RS 4
  118. Disable use of the SBAS constellation\&.
  119. .RE
  120. .PP
  121. SFRBX
  122. .RS 4
  123. Disable use of the SFRBX messages\&.
  124. .RE
  125. .PP
  126. SURVEYIN
  127. .RS 4
  128. Disable survey\-in mode with TMODE2\&.
  129. .RE
  130. .PP
  131. TP
  132. .RS 4
  133. Disable sending UBX\-TIM\-TP\&.
  134. .RE
  135. .RE
  136. .PP
  137. \-e OPTION
  138. .RS 4
  139. Enable an option in the GPS\&. Accepts one parameter, OPTION, the option to enable\&. \-e accepts the same OPTIONs as \-d, except the action is to enable the option\&.
  140. .RE
  141. .PP
  142. \-f FILE
  143. .RS 4
  144. Connect to a file or device\&. Accepts one parameter, FILE, the file or device to open\&. Files are opened read\-only\&. Character devices are opened read/write, unless the \-r parameter is given\&. Requires the pyserial module\&.
  145. .RE
  146. .PP
  147. \-g ITEM
  148. .RS 4
  149. Get the value of ITEM name from the GPS (UBX\-CFG\-VALGET)\&. See the section on CONFIGURATION ITEMS
  150. .RE
  151. .PP
  152. \-h
  153. .RS 4
  154. Makes
  155. ubxtool
  156. print a usage message and exit\&.
  157. .RE
  158. .PP
  159. \-i port
  160. .RS 4
  161. Specifies port (interface) for port\-related commands\&.
  162. .RE
  163. .PP
  164. \-m mode
  165. .RS 4
  166. Sets optional mode parameter to a \-p PRESET command\&.
  167. .RE
  168. .PP
  169. \-P protver
  170. .RS 4
  171. Sets the protocol version to use for sending commands\&. Minimum 10 (ublox 5)\&. Maximum 29 (u\-blox 9)\&. Use "ubxtool \-p MON\-VER" to see the version your GPS supports\&.
  172. .RE
  173. .PP
  174. \-p PRESET
  175. .RS 4
  176. Send a preset command the GPS\&. Accepts one parameter, PRESET, the name of the command to send\&. Only the common PRESETS are shown here\&. To see the full list run "ubxtool \-h \-v 2"\&.
  177. .PP
  178. COLDBOOT
  179. .RS 4
  180. Coldboot the GPS (UBX\-CFG\-RST)\&.
  181. .RE
  182. .PP
  183. HOTBOOT
  184. .RS 4
  185. Hotboot the GPS (UBX\-CFG\-RST)\&.
  186. .RE
  187. .PP
  188. MODEL
  189. .RS 4
  190. Configure the Dynamic Platform Model\&. (UBX\-CFG\-NAV5)\&.
  191. .RE
  192. .PP
  193. PMS
  194. .RS 4
  195. Set power management settings (UBX\-CFG\-PMS)\&.
  196. .RE
  197. .PP
  198. RESET
  199. .RS 4
  200. Reset configuration to defaults (UBX\-CFG\-CFG)\&.
  201. .RE
  202. .PP
  203. SAVE
  204. .RS 4
  205. Save current configuration (UBX\-CFG\-CFG)\&.
  206. .RE
  207. .PP
  208. MON\-RESETODO
  209. .RS 4
  210. Reset the odometer (UBX\-MON\-RESETODO)\&.
  211. .RE
  212. .PP
  213. MON\-VER
  214. .RS 4
  215. Poll GPS version (UBX\-MON\-VER)\&.
  216. .RE
  217. .PP
  218. WARMBOOT
  219. .RS 4
  220. Warmboot the GPS (UBX\-CFG\-RST)\&.
  221. .RE
  222. .sp
  223. 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\&.
  224. .RE
  225. .PP
  226. \-R RAW
  227. .RS 4
  228. Save all raw serial data received from the GPS into the file RAW\&.
  229. .RE
  230. .PP
  231. \-r
  232. .RS 4
  233. Read only\&. Do not send anything to the GPS\&.
  234. .RE
  235. .PP
  236. \-S SPEED
  237. .RS 4
  238. Set the GPS serial port speed to SPEED bps\&.
  239. .RE
  240. .PP
  241. \-s SPEED
  242. .RS 4
  243. Set local serial port speed to SPEED bps\&. Default 9,600 bps\&.
  244. .RE
  245. .PP
  246. \-V
  247. .RS 4
  248. Print
  249. ubxtool
  250. version and exit\&.
  251. .RE
  252. .PP
  253. \-v VERBOSITY
  254. .RS 4
  255. Set verbosity level to VERBOSITY\&. Verbosity can be from 0 (very quiet), 2 (decode messages), to 4 (very noisy)\&. Default 1\&.
  256. .RE
  257. .PP
  258. \-w WAIT
  259. .RS 4
  260. Wait for WAIT seconds before exiting\&. Default 2 seconds\&.
  261. .RE
  262. .PP
  263. \-x ITEM
  264. .RS 4
  265. Delete the value of ITEM name from the GPS (UBX_CFG\-VALDEL)\&. Returning to the GPS default for that item\&. See the section on CONFIGURATION ITEMS
  266. .RE
  267. .PP
  268. \-z ITEM,VAL
  269. .RS 4
  270. Set the value of ITEM name to VAL in the GPS (UBX\-CFG\-VALSET)\&. See the section on CONFIGURATION ITEMS
  271. .RE
  272. .PP
  273. [server[:port[:device]]]
  274. .RS 4
  275. By default,
  276. ubxtool
  277. collects data from all compatible devices on localhost, using the default GPSD port 2947\&. An optional argument may specify a server to get data from\&. A colon\-separated suffix is taken as a port number\&. If there is a second colon\-separated suffix, that is taken as a specific device name to be watched\&. Further details on the
  278. \fBgps\fR(1)
  279. man page\&.
  280. .RE
  281. .SH "CONFIGURATION ITEMS"
  282. .PP
  283. 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\&.
  284. .PP
  285. 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\&.
  286. .PP
  287. 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\&.
  288. .PP
  289. To get the value related to an item, use "\-g ITEM"\&.
  290. .PP
  291. To reset the value related to an item to it default value, use "\-x ITEM"\&.
  292. .PP
  293. To set an ITEM name to a value, use "\-z ITEM,VAL"\&.
  294. .PP
  295. See the EXAMPLES section for concrete examples\&.
  296. .SH "EXAMPLES"
  297. .PP
  298. Decode raw log file:
  299. .sp
  300. .if n \{\
  301. .RS 4
  302. .\}
  303. .nf
  304. ubxtool \-r \-f ublox\-neo\-m8n\&.log
  305. .fi
  306. .if n \{\
  307. .RE
  308. .\}
  309. .PP
  310. Change GPS port speed of device on /dev/ttyAMA0 to 230,400 bps:
  311. .sp
  312. .if n \{\
  313. .RS 4
  314. .\}
  315. .nf
  316. ubxtool \-S 230400 \-f /dev/ttyAMA0
  317. .fi
  318. .if n \{\
  319. .RE
  320. .\}
  321. .PP
  322. Watch entire GPS reset cycle, include $GPTXT messages:
  323. .sp
  324. .if n \{\
  325. .RS 4
  326. .\}
  327. .nf
  328. ubxtool \-p COLDBOOT \-w 20 \-v 2
  329. .fi
  330. .if n \{\
  331. .RE
  332. .\}
  333. .PP
  334. Poll Enabled Constellations:
  335. .sp
  336. .if n \{\
  337. .RS 4
  338. .\}
  339. .nf
  340. ubxtool \-p CFG\-GNSS
  341. .fi
  342. .if n \{\
  343. .RE
  344. .\}
  345. .sp
  346. Dump gpsd data from a remote server named x\&.example\&.com:
  347. .sp
  348. .if n \{\
  349. .RS 4
  350. .\}
  351. .nf
  352. ubxtool \-w 5 x\&.example\&.com
  353. .fi
  354. .if n \{\
  355. .RE
  356. .\}
  357. .sp
  358. .SS "Version 27+ examples"
  359. .PP
  360. The following examples require a GPS supporting protocol 27 or greater\&.
  361. .PP
  362. 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\&.
  363. .sp
  364. .if n \{\
  365. .RS 4
  366. .\}
  367. .nf
  368. $ ubxtool \-g CFG\-NAVSPG\-DYNMODEL
  369. [\&.\&.\&.]
  370. UBX\-CFG\-VALGET:
  371. version 1 layer 0 reserved 0,0
  372. layers (ram)
  373. item CFG\-NAVSPG\-DYNMODEL/0x20110021 val 2
  374. [\&.\&.\&.]
  375. $ ubxtool \-z CFG\-NAVSPG\-DYNMODEL,6
  376. [\&.\&.\&.]
  377. UBX\-ACK\-ACK:
  378. ACK to Class x6 (CFG) ID x8a (VALSET)
  379. [\&.\&.\&.]
  380. $ ubxtool \-g CFG\-NAVSPG\-DYNMODEL
  381. [\&.\&.\&.]
  382. UBX\-CFG\-VALGET:
  383. version 1 layer 0 reserved 0,0
  384. layers (ram)
  385. item CFG\-NAVSPG\-DYNMODEL/0x20110021 val 6
  386. [\&.\&.\&.]
  387. $ ubxtool \-x CFG\-NAVSPG\-DYNMODEL
  388. [\&.\&.\&.]
  389. UBX\-ACK\-ACK:
  390. ACK to Class x6 (CFG) ID x8c (VALDEL)
  391. [\&.\&.\&.]
  392. $ ubxtool \-g CFG\-NAVSPG\-DYNMODEL
  393. [\&.\&.\&.]
  394. UBX\-CFG\-VALGET:
  395. version 1 layer 0 reserved 0,0
  396. layers (ram)
  397. item CFG\-NAVSPG\-DYNMODEL/0x20110021 val 6
  398. .fi
  399. .if n \{\
  400. .RE
  401. .\}
  402. .PP
  403. 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"\&.
  404. .SH "ENVIRONMENT"
  405. .PP
  406. Options can be placed in the UBXOPTS environment variable\&. UBXOPTS is processed before the CLI options\&.
  407. .SH "SEE ALSO"
  408. .PP
  409. ubxtool
  410. is written to conform to the official u\-blox documentation for the u\-blox binary protocol\&.
  411. \m[blue]\fB\%https://www.u-blox.com/en/product-resources\fR\m[]
  412. .PP
  413. \fBcgps\fR(1),
  414. \fBgpscat\fR(1),
  415. \fBgpsctl\fR(1),
  416. \fBgpsfake\fR(1),
  417. \fBxgps\fR(1),
  418. \fBgpsd\fR(8),
  419. .SH "AUTHOR"
  420. .PP
  421. Gary E\&. Miller<gem@rellim\&.com>