Changes between Version 26 and Version 27 of gps
- Timestamp:
- 06/30/2025 11:44:00 PM (4 hours ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
gps
v26 v27 408 408 root@focal-venice:~# apt-get install gpsd gpsd-clients 409 409 }}} 410 2. Configure gpsd via /etc/defaults/gpsd410 1. Configure gpsd via /etc/defaults/gpsd 411 411 {{{ 412 412 root@focal-venice:~# cat /etc/default/gpsd … … 427 427 root@focal-venice:~# cat /etc/default/gpsd 428 428 root@focal-venice:~# sed -i 's;DEVICES="";DEVICES="/dev/ttymxc0";' /etc/default/gpsd 429 }}} 430 * replace the above with the proper GPS device for your system - see [#uart] 431 3. Restart the gpsd service 429 root@focal-venice:~# sed -i 's;GPSD_OPTIONS="";GPSD_OPTIONS="-s 38400";' /etc/default/gpsd 430 }}} 431 * replace the above with the proper GPS device and baudrate for the GPS on your board - see [#uart] 432 1. Restart the gpsd service 432 433 {{{#!bash 433 434 root@focal-venice:~# systemctl restart gpsd.socket 434 435 }}} 435 4. Verify gpsd is listening:436 1. Verify gpsd is listening: 436 437 {{{#!bash 437 438 root@focal-venice:~# netstat -a | grep gpsd … … 440 441 unix 2 [ ACC ] STREAM LISTENING 23508 /run/gpsd.sock 441 442 }}} 442 4. Verify gpsd is working using one of its client apps, for example cgps which is a simple terminal client:443 1. Verify gpsd is working using one of its client apps, for example cgps which is a simple terminal client: 443 444 {{{#!bash 444 445 root@focal-venice:~# cgps … … 459 460 gpsd:INFO: startup at 2021-10-08T21:30:00.000Z (1633728600) 460 461 }}} 462 * gpsd will switch baudrates if it can't make sense of the data received however this can take several minutes for it to land on the proper baudrate depending upon how many times it has to change as the gpsd code will try the tty default baudrate first (which is usually 9600), then 4800, 9600, 19200, 38400, 57600, 115200, 230400, 460800, 921600 in that order. If for example the GPS default baudrate is 38400 that will be the 5th fallback which takes minutes. To address this you can either: 463 - add an 'stty -F /dev/ttymxc0 384000' (change for your GPS device and baudrate) to an ExecStartPre setting under the gpsd.service (ie 'sudo systemctl edit gpsd.service) 464 - add a '-s 384000' option to GPSD_OPTIONS as shown in he example above 461 465 462 466