GPSD

From ElectroDragon Wiki
Revision as of 11:54, 29 June 2020 by Chao (talk | contribs) (Created page with " ===== Mus-do Preparation ===== * backup and change line in /boot/cmdline.txt to -> dwc_otg.lpm_enable=0 console=tty1 root=/dev/mmcblk0p2 rootfstype=ext4 elevator=deadline fsc...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Mus-do Preparation
  • backup and change line in /boot/cmdline.txt to -> dwc_otg.lpm_enable=0 console=tty1 root=/dev/mmcblk0p2 rootfstype=ext4 elevator=deadline fsck.repair=yes rootwait
Use GPSD
  • sudo apt-get install gpsd-clients gpsd -y
  • to run at boot, sudo killall gpsd, and sudo nano /etc/default/gpsd
change line DEVICES=””to DEVICES=”/dev/serial0″
  • if kill automatically stop, then try to run line sudo gpsd /dev/serial0 -F /var/run/gpsd.sock in case
  • reboot and try gpsmon or cgps
Not yet sort
  • And you can stop/start service by commands, in case the interface is conlict or you don't want to use it:
sudo systemctl stop gpsd.socket
sudo systemctl disable gpsd.socket
sudo systemctl enable gpsd.socket
sudo systemctl start gpsd.socket
  • Run the following command to start up - sudo gpsd /dev/ttyS0 -F /var/run/gpsd.sock, or manually store on foreground by: gpsd -b -N -D 3 -n -F /var/run/gpsd.sock /dev/ttyAMA0
  • Then output dumb data by cgps -s, or gpsmon

Cgps-s.png

  • If no data update or com through, double check config:
  • run command sudo nano /etc/default/gpsd, and change it to look like this
# Default settings for gpsd.
# Please do not edit this file directly - use `dpkg-reconfigure gpsd' to
# change the options.
START_DAEMON="true"
GPSD_OPTIONS="-n"
DEVICES="/dev/ttyS0"
USBAUTO="false"
GPSD_SOCKET="/var/run/gpsd.sock"