Как связать gpsd и pps в файле ntp.conf?

#yocto #ntp #gpsd #ntpd #pps

#йокто #нтп #gpsd #ntpd #pps

Вопрос:

Я работаю над пользовательской платой AM335x с yocto, где в качестве gps-модуля используется «u-blox LEA-M8F». В основном я хотел использовать «ntpd deamon», поэтому, просматривая Интернет, я обнаружил, что, как я полагаю, для этого я должен связать gpsd и pps, я настроил файл ntp.conf следующим образом

 #/etc/ntp.conf, configuration for ntpd  driftfile /var/lib/ntp/ntp.driftlogfile /var/log/ntp.log logfile /var/log/ntp.log  #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  # You do need to talk to an NTP server or two (or three). #server ntp.your-provider.example  # pool.ntp.org maps to more than 300 low-stratum NTP servers. # Your server will pick a different set every time it starts up. # *** Please consider joining the pool! *** # *** *** #server 0.rhel.pool.ntp.org iburst  #server 1.rhel.pool.ntp.org iburst #server 2.rhel.pool.ntp.org iburst #server 3.rhel.pool.ntp.org iburst #server ntp0.pipex.net #server ntp1.pipex.net  #server 127.127.1.0 #fudge 127.127.1.0 stratum 10  # By default, exchange time with everybody, but don't allow configuration. # See /usr/share/doc/ntp-doc/html/accopt.html for details. #restrict default kod notrap nomodify nopeer noquery #restrict -6 default kod notrap nomodify nopeer noquery #restrict otherntp.server.org mask 255.255.255.255 nomodify notrap noquery #restrict ntp.research.gov mask 255.255.255.255 nomodify notrap noquery  # Local users may interrogate the ntp server more closely. restrict 127.0.0.1 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 restrict 200.1.2.0 mask 255.255.255.0 nomodify notrap  # If you want to provide time to your local subnet, change the next line. # (Again, the address is an example only.) #broadcast 200.1.255.255 minpoll 1 #server 127.127.1.0 # local clock #fudge 127.127.1.0 stratum 10  # 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 restrict default kod nomodify notrap nopeer noquery restrict -4 default kod nomodify notrap nopeer noquery restrict -6 default kod nomodify notrap nopeer noquery  #tinker step 0.4 stepback 0.4 stepfwd 0.4  server 127.127.28.0 minpoll 4 maxpoll 4 fudge 127.127.28.0 flag1 1 time1 -0.875 refid GPS stratum 1  server 127.127.22.0 minpoll 4 maxpoll 4  fudge 127.127.22.0 refid PPS  driftfile /var/lib/ntp/drift  pidfile /var/run/ntpd.pid  

после перезагрузки платы, когда я использовал следующую команду

 ntpq -p  remote refid st t when poll reach delay offset jitter ============================================================================== SHM(0) .GPS. 0 l - 16 0 0.000 0.000 0.000 PPS(1) .PPS. 0 l - 16 0 0.000 0.000 0.000  

Как показано выше, значения смещения всегда равны нулю. Кто-нибудь может, пожалуйста, помочь мне понять, что именно я делаю не так в файле ntp.conf?

Комментарии:

1. gpsd выполняется ли и сообщается ли о действительном исправлении и pps? у вас есть pps-tools установленный? у вас есть /dev/pps0 ?