Skip to content

Instantly share code, notes, and snippets.

@LebedevRI
Last active March 21, 2016 17:10
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save LebedevRI/a8637699141f16d1e1b8 to your computer and use it in GitHub Desktop.
Save LebedevRI/a8637699141f16d1e1b8 to your computer and use it in GitHub Desktop.
http://www.satsignal.eu/ntp/Raspberry-Pi-quickstart.html
http://www.satsignal.eu/ntp/Raspberry-Pi-NTP.html
https://bart.motd.be/node/79
http://ava.upuaut.net/?p=726
!!! https://gist.github.com/LebedevRI/20019255686c7cb1b578
sudo raspi-config
1. Expand Filesystem
2. Advanced Options -> Disable Serial Shell (optional)
Reboot
-------------- /boot/config.txt --------------
dtoverlay=pps-gpio,gpiopin=18
--------- /etc/modules ---------
pps-gpio
--------- /etc/udev/rules.d/09-pps.rules ---------
KERNEL=="ttyAMA0", SYMLINK+="gps0"
KERNEL=="pps0", OWNER="root", GROUP="dialout", MODE="0777", SYMLINK+="gpspps0"
----------------- /etc/ntp.conf -----------------
# NMEA /dev/gps0, /dev/gpspps0. Mode 17: 9600 baud (16) and process $GPMRC
server 127.127.20.0 mode 17 minpoll 0 maxpoll 0 iburst prefer
fudge 127.127.20.0 flag1 1 # enable PPS signals processing
fudge 127.127.20.0 flag2 0 # capture PPS pulse on rising edge
fudge 127.127.20.0 flag3 1 # use kernel clock dicipline
fudge 127.127.20.0 refid GPS
fudge 127.127.20.0 stratum 15
# Kernel-mode PPS reference-clock for the precise seconds
server 127.127.22.0 minpoll 0 maxpoll 0 prefer
fudge 127.127.22.0 flag2 0 # capture PPS pulse on rising edge
fudge 127.127.22.0 flag3 1 # enable kernel PPS discipline
fudge 127.127.22.0 refid kPPS
fudge 127.127.22.0 stratum 0
# add prefer to pool's/server's !
-------- recompile ntp with pps-tools added to build-depends -----------
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment