gpsd - BYO-NTP/recipes GitHub Wiki

INSTALL

AUTO

curl -sS https://byo-ntp.github.io/tools/gpsd/install.sh | sh

source code, and discussion.

MANUAL

FreeBSD

sysrc gpsd_enable=YES
sysrc gpsd_devices="/dev/gps0 /dev/pps0"
sysrc gpsd_flags="--passive --speed 115200 --badtime --nowait"
pkg install -y gpsd-nox11
pw groupmod dialer -m nobody
service gpsd start

ipcs -m # shows the shared memory segments

Build from source:

cd /usr/ports/astro/gpsd
pkg install -y pkgconf portconfig scons-py311
make install clean

Pi OS

apt install -y gpsd
sed -i \
	-e '/^DEVICES/ s|""|"/dev/gps0 /dev/pps0"|' \
	-e '/^USBAUTO/ s/true/false/' \
	-e '/^GPSD_OPTIONS/ s/=""/="--passive --badtime --nowait --speed 115200"/' \
	/etc/default/gpsd
systemctl enable gpsd
service gpsd start

test that GPS is working

cgps    # q to quit

References