Reference :
https://blog.networkprofile.org/gps-backed-local-ntp-server/
https://austinsnerdythings.com/2021/04/19/microsecond-accurate-ntp-with-a-raspberry-pi-and-pps-gps/
Commande :
sudo apt update
sudo apt upgrade -y
sudo raspi-config ( serial port enabled )
sudo apt install gpsd
sudo apt install gpsd-clients
sudo apt install pps-tools
sudo apt install chrony
sudo bash -c « echo ‘# the next 3 lines are for GPS PPS signals’ >> /boot/config.txt »
sudo bash -c « echo ‘dtoverlay=pps-gpio,gpiopin=18’ >> /boot/config.txt »
sudo bash -c « echo ‘enable_uart=1’ >> /boot/config.txt »
sudo bash -c « echo ‘init_uart_baud=9600’ >> /boot/config.txt »
sudo bash -c « echo ‘pps-gpio’ >> /etc/modules »
lsmod | grep pps
sudo ppstest /dev/pps0
sudo nano /etc/default/gpsd
START_DAEMON= »true »
USBAUTO= »true »
DEVICES= »/dev/ttyAMA0 /dev/pps0″
GPSD_OPTIONS= »-n »
sudo ln -s /lib/systemd/system/gpsd.service /etc/systemd/system/multi-user.target.wants/
gpsmon
sudo nano /etc/chrony/chrony.conf
refclock SHM 0 refid NMEA offset 0.000 precision 1e-3 poll 3 noselect
refclock PPS /dev/pps0 refid PPS lock NMEA poll 3
sudo systemctl restart chrony
watch -n 1 chronyc sources
Surveillance : GPSMON

Client : NTP Check
