0

我正在使用yocto 开发AM335x定制板,其中“u-blox LEA-M8F”用作 gps 模块。基本上我想使用“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 文件中到底做错了什么?

4

0 回答 0