Raspberry Pi GPS Stratum 1 NTP Server
Re: Raspberry Pi GPS Stratum 1 NTP Server
Re: Raspberry Pi GPS Stratum 1 NTP Server
Re: Raspberry Pi GPS Stratum 1 NTP Server
Re: Raspberry Pi GPS Stratum 1 NTP Server
Re: Raspberry Pi GPS Stratum 1 NTP Server
pi@raspberrypi ~ $ ntpq -pn
remote refid st t when poll reach delay offset jitter
==============================================================================
-148.251.84.200 161.62.157.173 3 u 60 64 37 162.894 -849.17 28.747
+129.70.132.37 129.70.130.71 2 u 59 64 37 192.526 -829.17 53.682
+129.250.35.250 130.149.17.21 2 u 58 64 37 74.272 -775.89 102.457
+141.82.25.203 131.188.3.222 2 u 125 64 36 59.574 -766.10 116.720
127.127.22.0 .PPS. 0 l 6 16 377 0.000 203.864 0.660
x127.127.28.0 .GPS. 0 l 5 16 377 0.000 48.271 92.572
*192.53.103.108 .PTB. 1 u 55 64 37 62.350 -767.58 104.679
Re: Raspberry Pi GPS Stratum 1 NTP Server
Tobi2707 wrote:Now i tried it again and i get these numbers:
- Code: Select all | TOGGLE FULL SIZE
pi@raspberrypi ~ $ ntpq -pn
remote refid st t when poll reach delay offset jitter
==============================================================================
-148.251.84.200 161.62.157.173 3 u 60 64 37 162.894 -849.17 28.747
+129.70.132.37 129.70.130.71 2 u 59 64 37 192.526 -829.17 53.682
+129.250.35.250 130.149.17.21 2 u 58 64 37 74.272 -775.89 102.457
+141.82.25.203 131.188.3.222 2 u 125 64 36 59.574 -766.10 116.720
127.127.22.0 .PPS. 0 l 6 16 377 0.000 203.864 0.660
x127.127.28.0 .GPS. 0 l 5 16 377 0.000 48.271 92.572
*192.53.103.108 .PTB. 1 u 55 64 37 62.350 -767.58 104.679
What does this mean to me?
# 127.127.20.1: Use the NMEA driver on /dev/gps1 and /dev/gpspps1
# mode 88: speed 115200 and process the $GPZDA or $GPZDG sentences for time
# set the speed for your installation.
# prefer: use this server is at all possible.
server 127.127.20.1 mode 88 minpoll 3 iburst prefer
# flag 1: enable pps
# flag3: use the kernel discipline
# time2: The time sentence is delayed by approximately 105ms from the pps (not critical).
fudge 127.127.20.1 stratum 1 flag1 1 flag2 0 flag3 1 flag4 0 time1 0.0 time2 0.105 refid GPS1
remote refid st t when poll reach delay offset jitter
==============================================================================
127.127.1.1 .LCL1. 4 l 259m 16 0 0.000 0.000 0.000
o127.127.20.1 .GPS1. 1 l 5 8 377 0.000 0.000 0.004
192.168.147.250 PPS(1) 2 u 4 8 377 0.219 -0.029 0.031
Re: Raspberry Pi GPS Stratum 1 NTP Server
GNU nano 2.2.6 File: /etc/ntp.conf
# /etc/ntp.conf, configuration for ntpd; see ntp.conf(5) for help
driftfile /var/lib/ntp/ntp.drift
statistics loopstats peerstats clockstats
filegen loopstats file loopstats type day enable
filegen peerstats file peerstats type day enable
filegen clockstats file clockstats type day enable
server 0.debian.pool.ntp.org iburst noselect
server 1.debian.pool.ntp.org iburst noselect
server 2.debian.pool.ntp.org iburst noselect
server 3.debian.pool.ntp.org iburst
# By default, exchange time with everybody, but don't allow configuration.
restrict -4 default kod notrap nomodify nopeer noquery
restrict -6 default kod notrap nomodify nopeer noquery
# Local users may interrogate the ntp server more closely.
restrict 127.0.0.1
restrict ::1
# If you want to provide time to your local subnet, change the next line.
# (Again, the address is an example only.)
#broadcast 192.168.123.255
# GPS NMEA
server 127.127.20.1 mode 88 minpoll 3 iburst prefer
fudge 127.127.20.1 stratum 1 flag1 1 flag2 0 flag3 1 flag4 0 time1 0.0 time2 0.105 refid GPS
pi@raspberrypi ~ $ ntpq -pn
remote refid st t when poll reach delay offset jitter
==============================================================================
178.63.14.131 178.63.61.67 3 u 52 64 3 54.209 8.425 13.511
148.251.6.51 131.188.3.221 2 u 54 64 3 54.084 10.086 0.697
148.251.84.200 91.189.94.4 3 u 53 64 3 51.715 7.024 1.653
*130.0.73.18 130.133.1.10 2 u 53 64 3 54.689 4.581 1.391
Re: Raspberry Pi GPS Stratum 1 NTP Server
pi@raspberrypi ~ $ ntpq -pn
remote refid st t when poll reach delay offset jitter
==============================================================================
*127.127.28.0 .GPS. 0 l 16 16 377 0.000 -21.230 42.534
o127.127.22.0 .PPS. 0 l 15 16 377 0.000 -108.86 3.722
Re: Raspberry Pi GPS Stratum 1 NTP Server
# ppstest /dev/pps0
trying PPS source "/dev/pps0"
found PPS source "/dev/pps0"
ok, found 1 source(s), now start fetching data...
source 0 - assert 1426696560.000000516, sequence: 75193 - clear 0.000000000, sequence: 0
source 0 - assert 1426696560.999999083, sequence: 75194 - clear 0.000000000, sequence: 0
source 0 - assert 1426696561.999997981, sequence: 75195 - clear 0.000000000, sequence: 0
source 0 - assert 1426696563.000001880, sequence: 75196 - clear 0.000000000, sequence: 0
source 0 - assert 1426696564.000001155, sequence: 75197 - clear 0.000000000, sequence: 0
source 0 - assert 1426696564.999999761, sequence: 75198 - clear 0.000000000, sequence: 0
source 0 - assert 1426696566.000000365, sequence: 75199 - clear 0.000000000, sequence: 0
...
# 127.127.20.0: Use the NMEA driver on /dev/gps0 and /dev/gpspps0
# mode 88: speed 115200 and process the $GPZDA or $GPZDG sentences for time
# set the speed for your installation.
# prefer: use this server is at all possible.
server 127.127.20.0 mode 88 minpoll 3 iburst prefer
# flag 1: enable pps
# flag3: use the kernel discipline
# time2: The time sentence is delayed by approximately 105ms from the pps (not critical).
fudge 127.127.20.1 stratum 1 flag1 1 flag2 0 flag3 1 flag4 0 time1 0.0 time2 0.105 refid GPS1
Re: Raspberry Pi GPS Stratum 1 NTP Server
The best way to do this is to set the GPS to 115200 baud, set the update rate to 4Hz, and only enable the few sentences you need. Grab the tools I wrote (Python: https://github.com/f5eng/mt3339-utils) and use the gpsinit_time.conf file.
Now in /dev create links as follows...
ln -s /dev/ttyXXX /dev/gps0 (where ttyXXX is the serial port)
ln -s /dev/pps0 /dev/gpspps0
You can use udev to automatically create these for you on bootup.
Re: Raspberry Pi GPS Stratum 1 NTP Server
Re: Raspberry Pi GPS Stratum 1 NTP Server
Re: Raspberry Pi GPS Stratum 1 NTP Server
Tobi2707 wrote:Yes, the ppstest works and adds a new line every second:)
Tobi2707 wrote:I worked through the whole tutorial, also including standalone. So I have to shutdown the gaps service, right?
Tobi2707 wrote:I will try the comand cat /dev/ttyAMA0 at first tomorrow morning, but I think when i started with the GPS HAT i worked through the setting up tutorial on Adafruits website and there I used this command and get these lines. I used this page: https://learn.adafruit.com/adafruit-ultimate-gps-hat-for-raspberry-pi/basic-test
Tobi2707 wrote:
So I will run : stty -F /dev/ttyAMA0 , right?
Tobi2707 wrote:Tomorrow I will post the results and we go on:)
But I have two additional questions:
1. When i reboot the pi, the PPS doesn't get the 'o' until I restart the ntp service, is there any workaround?
Tobi2707 wrote:2. I can't use the command 'ntpq -pn' when the LAN cable is ejected, the error 'service or name not known'
Tobi2707 wrote:
Thank you for your patience und your help, I'm very happy about that:)
Re: Raspberry Pi GPS Stratum 1 NTP Server
pi@raspberrypi ~ $ sudo service gpsd stop
pi@raspberrypi ~ $ stty -F /dev/ttyAMA0
speed 9600 baud; line = 0;
-brkint -imaxbel