Sysadmin > SerVices > NtP > BeagleBoneGpsNtpServer

BeagleBoneBlack with Adafruit Ultimate GPS Breakout

Startupconfig

# cat HOWTO_ENABLE_PPS 
# enable UART1
echo BB-UART1 >> /sys/devices/bone_capemgr.*/slots

Enable PPS und UART4

echo DD-GPS >>/sys/devices/bone_capemgr.*/slots
cd /dev
ln -s pps0 gpspps0
ln -s ttyO4 gps0

Disable unnecessary services

systemctl disable cloud9.service
systemctl disable gateone.service
systemctl disable bonescript.service
systemctl disable bonescript.socket
systemctl disable bonescript-autorun.service
systemctl disable avahi-daemon.service
systemctl disable gdm.service
systemctl disable mpd.service

ntp.conf

# /etc/ntp.conf, configuration for ntpd; see ntp.conf(5) for help

driftfile /var/lib/ntp/ntp.drift


# Enable this if you want statistics to be logged.
statsdir /var/log/ntpstats/

statistics loopstats peerstats clockstats rawstats
filegen loopstats file loopstats type day enable
filegen peerstats file peerstats type day enable
filegen clockstats file clockstats type day enable
filegen rawstats file rawstats type day enable

#enable calibrate

# You do need to talk to an NTP server or two (or three).
#server ntp.your-provider.example

# pool.ntp.org maps to about 1000 low-stratum NTP servers.  Your server will
# pick a different set every time it starts up.  Please consider joining the
# pool: <http://www.pool.ntp.org/join.html>

server 127.127.20.0 mode 17 minpoll 3
fudge 127.127.20.0 flag1 1 flag2 0 flag3 0 time1 0.0000798 time2 0.5 refid PPS
#fudge 127.127.20.0 flag1 1 flag2 0 flag3 0 time1 0.00008 time2 0.5 refid PPS
#fudge 127.127.20.0 flag1 1 flag2 0 flag3 0 time1 0.00 time2 0.5 refid PPS
#fudge 127.127.20.0 flag1 1 flag2 0 flag3 1 time1 0.00 time2 0.279013 refid PPS
#fudge 127.127.20.0 flag1 1 time2 0.496

#server 127.127.20.0 mode 17 minpoll 4 maxpoll 4 noselect
#fudge 127.127.20.0 flag1 0 flag2 0 flag3 0 flag4 0 time1 0.00000 time2 0.916829

#server 127.127.22.0 minpoll 4 maxpoll 4 noselect
#fudge 127.127.22.0 refid PPS time1 0.00

server 192.168.1.102
server 192.168.1.213
server 134.34.3.18 noselect
server 134.34.3.19 noselect
server 85.214.240.100 noselect
server myoreflex.de noselect
#server ptbtime1.ptb.de noselect
server ptbtime2.ptb.de noselect
#server ptbtime3.ptb.de noselect
#server ntp0.rrze.uni-erlangen.de noselect
#server ntp1.rrze.uni-erlangen.de noselect
server ntp2.rrze.uni-erlangen.de noselect
server ntp3.rrze.uni-erlangen.de noselect

leapfile "/opt/ntp/etc/leap-seconds"

# Access control configuration; see /usr/share/doc/ntp-doc/html/accopt.html for
# details.  The web page <http://support.ntp.org/bin/view/Support/AccessRestrictions>
# might also be helpful.
#
# Note that "restrict" applies to both servers and clients, so a configuration
# that might be intended to block requests from certain clients could also end
# up blocking replies from your own upstream servers.

# By default, exchange time with everybody, but don't allow configuration.
restrict default notrap nomodify nopeer noquery
restrict -6 default notrap nomodify nopeer noquery

# Local users may interrogate the ntp server more closely.
restrict 127.0.0.1
#restrict 192.168.1.0 255.255.255.0
restrict -6 ::1

# Clients from this (example!) subnet have unlimited access, but only if
# cryptographically authenticated.
#restrict 192.168.123.0 mask 255.255.255.0 notrust


# If you want to provide time to your local subnet, change the next line.
# (Again, the address is an example only.)
broadcast 192.168.1.255

# If you want to listen to time broadcasts on your local subnet, de-comment the
# next lines.  Please do this only if you trust everybody on the network!
#disable auth
#broadcastclient