[ntp:questions] ntp.conf file setup in netbsd

Danny Mayer mayer at ntp.org
Mon Jul 13 12:16:27 UTC 2009


Runa Dahal wrote:
> I am using NetBSD 5.0 operating system in a low powered embedded computer
> used solely for the purpose of NTP. I have enabled options PPS_SYNC option
> in the kernel and rebuilt it. My ntp.conf file has the following set up:
> 
> server 127.127.20.1
> 
> fudge 127.127.20.1 flag3 1 refid NMEA
> 
> server 127.127.22.1
> 
> fudge 127.127.22.1 refid PPS
> 
> 
>  I am using com2 to receive data throught the serial sevice. I have also
> created symbolic links as follow to point to the serial device.
> 
> 
>  ln -s /dev/tty01 /dev/gps1
> 
> ln -s /dev/tty01 /dev/pps1
> 
> 
>  I have also tried using flag1 1 to enable the PPSAPI as fudge 127.127.20.1
> flag1 1 flag3 1 refid NMEA
> 
> 
>  But still my ntp machine is not synchronizing , the delay, offset , jitter
> values are still zero. When I run the minicom i am still able to receive
> GPZDA string . I know the NMEA/PPS signals are working, because I already
> have the GPS connected to a machine running fedora core 4, using gpsd to
> populate NMEA and PPS values to shared memory. I have this new low power
> system, and would like to move away from gpsd to maximize accuracy. So, I
> know the hardware is working, and that the problem is all
> software/configuration issues.I have read about using ntpd with PPS signal,
> and that NetBSD does not require any patching, just recompiling kernel with
> PPS_SYNC to enable kernel PPS discipline. I have see several examples
> online, and I do not seem to be missing anything, and yet my system still
> refuses to work. I am looking for guidance on this issue.
> 
> When i ran the ntpd in debug mode my output was as follows
> 
> addto_syslog: Listening on interface #0 wildcard, 0.0.0.0#123 Disabled
> 
> addto_syslog: Listening on interface #1 wildcard, ::#123 Disabled
> 
> addto_syslog: Listening on interface #2 re0, 192.168.0.15#123 Enabled
> 
> addto_syslog: Listening on interface #3 re0, fe80::260:e0ff:fe46:c1f1#123
> Enabled
> 
> addto_syslog: Listening on interface #4 lo0, 127.0.0.1#123 Enabled
> 
> addto_syslog: Listening on interface #5 lo0, ::1#123 Enabled
> 
> addto_syslog: Listening on interface #6 lo0, fe80::1#123 Enabled
> 
> addto_syslog: Listening on routing socket on fd #27 for interface updates
> 
> local_clock: time 0 offset 0.000000 freq 0.000 state 0
> 
> addto_syslog: kernel time sync status
> 0x2140<UNSYNC,PPSSIGNAL,NANO,MODE=0x0=PLL,CLK=0x0=A>
> 
> peer_crypto_clear: at 0 next 0 assoc ID 49312
> 
> key_expire: at 0
> 
> peer_clear: at 0 next 1 assoc ID 49312 refid INIT
> 
> refclock_setup fd 5 modem status: 0x7
> 
> refclock_ioctl: fd 5 flags 0x1
> 
> refclock_ppsapi: capability 0x1033 version 1 mode 0x1001 kern 0
> 
> newpeer: 127.0.0.1->127.127.20.1 mode 3 vers 4 poll 6 10 flags 0x1021 0x1
> ttl 0 key 00000000
> 
> refclock_ppsapi: capability 0x1033 version 1 mode 0x1001 kern 4
> 
> peer_crypto_clear: at 0 next 0 assoc ID 49313
> 
> key_expire: at 0
> 
> peer_clear: at 0 next 2 assoc ID 49313 refid INIT
> 
> refclock_ppsapi: fd 6 capability 0x1033 version 1 mode 0x1001
> 
> newpeer: 127.0.0.1->127.127.22.0 mode 3 vers 4 poll 6 10 flags 0x1021 0x1
> ttl 0 key 00000000
> 
> refclock_ppsapi: fd 6 capability 0x1033 version 1 mode 0x1001
> 
> addto_syslog: frequency initialized 20.291 PPM from /var/db/ntpd.drift
> 
> local_clock: time 0 offset 0.000000 freq 20.291 state 1
> 
> report_event: system event 'event_restart' (0x01) status 'sync_alarm,
> sync_unspec, 1 event, event_unspec' (0xc010)
> 
> nmea: gpsread 33 $GPZDA,211347.000,09,07,2009,,*51
> 
> refclock_transmit: at 1 127.127.20.1
> 
> auth_agekeys: at 1 keys 1 expired 0
> 
> timer: refresh ts 0
> 
> timer: interface update
> 
> nmea: gpsread 33 $GPZDA,211348.000,09,07,2009,,*5E
> 
> refclock_transmit: at 2 127.127.22.0
> 
> peer PPS(0) event 'event_peer_clock' (0x85) status 'unreach, conf, 1 event,
> event_peer_clock' (0x8015)
> 
> nmea: gpsread 33 $GPZDA,211349.000,09,07,2009,,*5F
> 
> nmea: gpsread 33 $GPZDA,211350.000,09,07,2009,,*57
> 
> nmea: gpsread 33 $GPZDA,211351.000,09,07,2009,,*56
> 
> 
> I have a couple questions regarding NMEA PPS. If I am using kernel PPS
> discipline, then do I not need to specify ntpd atom pps(22) driver? I know I
> need to have flag3 1 flag. Can I use ntpd PPS driver instead of kernel PPS
> even with NetBSD being compiled PPS_SYNC, so, that I could easily switch
> being either for testing. Do I always need to specify flag1 1 since I need
> PPS ?
> 
> It would be very helpful if anyone could suggest possible reasons for this.
> Thank you.
> 

What version of ntpd are you running? That will help people who may be
able to answer your questions.

Danny

-- 
This message has been scanned for viruses and
dangerous content by MailScanner, and is
believed to be clean.




More information about the questions mailing list