NTP Raspberry pi3+GPSmodule

  Navisys

GPS Navisys MT3333 GM5153 -148dBm/-165dBm、NMEA0183V4.1  9600bps DC2.8-4.3V TTL ViH2.1-3.1V iL0-0.7   size:15x15x6.5mm

GM515x

GM515x

 

Raspberry pi3

raspi3

 

OS: Raspbian Stretch Lite   https://downloads.raspberrypi.org/raspbian_lite_latest

GPIO:https://www.raspberrypi.org/documentation/usage/gpio/

初期設定 SSH enable, Wifi, Filesystem,VSFTP( Root ログイン書込み許可 最終的にaccess denie)

 

 

GPSD: http://www.catb.org/gpsd/

apt-get install gpsd gpsd-clients python-gps

gpsd

DEVICES=”/dev/ttyAMA0 /dev/pps0″

GPSD_OPTIONS=”-F /var/run/gpsd.sock -b -n”

#############################

config.txt
dtoverlay=pps-gpio,gpiopin=18
#############################

apt-get install pps-tools
ppstest /dev/pps0

apt-get install ntp

ntp.conf

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

driftfile /var/lib/ntp/ntp.drift
restrict default kod nomodify notrap nopeer noquery
restrict -6 default kod nomodify notrap nopeer noquery
restrict 127.0.0.1 mask 255.255.255.0
restrict 192.168.11.0 mask 255.255.255.0
restrict -6 ::1
server ntp.nict.jp iburst prefer
server 127.127.22.0 minpoll 4 maxpoll 4
fudge 127.127.22.0 flag3 1 refid PPS
EOS

ntpq -p

 

watch -n 16 ntpq -crv -ccv -pn