[LinuxPPS] Ntp doesn't work with PPS
christophe taffoureau
christophe.taffoureau at obs-nancay.fr
Thu Oct 1 14:53:31 CEST 2009
Enclosed, ntp.conf file and clockstats. All data in clockstats seem OK.
Christophe
Quoting "Hal V. Engel" <hvengel at astound.net>:
> How about posting your ntp,conf file so we can see how this is
> configured. Also
> you might want to capture your clock stats. For the Oncore this will
> give you
> a lot more info about what is happening during the initialization
process.
>
> Hal
>
> On Wednesday 30 September 2009 06:59:49 am christophe taffoureau wrote:
>> Hi,
>>
>> I've installed Linuxpps (patch ntp-pps-2.6.27-rc3-bis.diff) on OPENSUSE
>> 11.1 (kernel 2.6.27.7-9).
>> I use ppstest to control the effect of pps signal (Motorola ONCORE)
>> connected on serial port 0(ppstest /dev/pps0).
>> The result is :
>> / sudo ./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 1254228986.375717333, sequence: 40 - clear
>> 1254228987.370527631, sequence: 41
>> source 0 - assert 1254228987.375729944, sequence: 41 - clear
>> 1254228987.370527631, sequence: 41
>> source 0 - assert 1254228987.375729944, sequence: 41 - clear
>> 1254228988.370540747, sequence: 42
>> source 0 - assert 1254228988.375742319, sequence: 42 - clear
>> 1254228988.370540747, sequence: 42/
>
> This looks OK.
>
>>
>> Now, I install source of ntp and compile with option –enable-ONCORE
>> –enable-SHM and create a link with pps0 (oncore.pps.0) and ttyS0
>> (oncore.serial.0). The compilation is OK.
>
> Does ./ppstest /dev/oncore.pps.0 work?
result are the same as pps0
sudo ./ppstest /dev/oncore.pps.0
trying PPS source "/dev/oncore.pps.0"
found PPS source "/dev/oncore.pps.0"
ok, found 1 source(s), now start fetching data...
time_pps_fetch() error -1 (Connection timed out)
time_pps_fetch() error -1 (Connection timed out)
>
>>
>> But, when I start the ntp, I've an "error serial pps"
>> /linux-ulwj:/dev # /etc/init.d/ntp start
>> Starting network time protocol daemon (NTPD)ntpd 4.2.4p4 at 1.1520 Tue Sep
>> 29 12:14:13 UTC 2009 (1)
>> addto_syslog: precision = 1.000 usec
>> addto_syslog: ntp_io: estimated max descriptors: 1024, initial socket
>> boundary: 16
>> 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 lo, ::1#123 Enabled
>> addto_syslog: Listening on interface #3 eth0,
>> fe80::21a:a0ff:fec5:579e#123 Enabled
>> addto_syslog: Listening on interface #4 lo, 127.0.0.1#123 Enabled
>> addto_syslog: Listening on interface #5 lo, 127.0.0.2#123 Enabled
>> addto_syslog: Listening on interface #6 eth0, 193.55.144.75#123 Enabled
>> local_clock: time 0 offset 0.000000 freq 0.000 state 0
>> addto_syslog: kernel time sync status 0040
>> peer_crypto_clear: at 0 next 0 assoc ID 11392
>> peer_clear: at 0 next 1 assoc ID 11392 refid INIT
>> refclock_setup fd 5 modem status: 0x4006
>> refclock_ioctl: fd 5 flags 0x20
>> newpeer: 127.0.0.1->127.127.30.0 mode 3 vers 4 poll 4 4 flags 0x10a1 0x1
>> ttl 0 key 00000000
>> ntp_syslogmask = 0x0000ffff (=all)
>> local_clock: time 0 offset 0.000000 freq 0.000 state 1
>> addto_syslog: system event 'event_restart' (0x01) status 'sync_alarm,
>> sync_unspec, 1 event, event_unspec' (0xc010)
>> report_event: system event 'event_restart' (0x01) status 'sync_alarm,
>> sync_unspec, 1 event, event_unspec' (0xc010)
>> ONCORE[0]: NO <CR><LF> at end of message
>> linux-ulwj:/dev # refclock_transmit: at 1 127.127.30.0
>> filegen 2 3463303804 0 3463257600
>> auth_agekeys: at 1 keys 1 expired 0
>> timer: interface update
>> refclock_transmit: at 19 127.127.30.0
>> addto_syslog: clock GPS_ONCORE(0) event 'clk_badtime' (0x06)
>> addto_syslog: peer GPS_ONCORE(0) event 'event_peer_clock' (0x85) status
>> 'unreach, conf, 1 event, event_peer_clock' (0x8015)
>> peer GPS_ONCORE(0) event 'event_peer_clock' (0x85) status 'unreach,
>> conf, 1 event, event_peer_clock' (0x8015)
>> ONCORE: oncore_get_timestamp, error serial pps
>> ONCORE: oncore_get_timestamp, error serial pps// /
>>
>
> Did you do an ldattach to setup the line discipline for the pps device?
yes, I do : ldattach 18 /dev/ttyS0
>
>> And, if I use ppstest software, I have not pps signal:
>> /sudo ./ppstest /dev/pps0
>> trying PPS source "/dev/pps0"
>> found PPS source "/dev/pps0"
>> ok, found 1 source(s), now start fetching data...
>> time_pps_fetch() error -1 (Connection timed out)
>> time_pps_fetch() error -1 (Connection timed out)
>> /
>> If the assert event doesn't change:
>> / #cat /sys/class/pps/pps0/assert
>> 1254229133.377654873#187
>> # cat /sys/class/pps/pps0/assert
>> 1254229133.377654873#187
>> # cat /sys/class/pps/pps0/assert
>> 1254229133.377654873#187
>> # cat /sys/class/pps/pps0/assert
>> 1254229133.377654873#187/
>>
>>
>> And in the ntp log, I've this message:
>> / 30 Sep 14:18:51 ntpd[4458]: offset 0.000000 sec freq 0.000 ppm error
>> 0.000001 poll 6
>> 30 Sep 14:18:54 ntpd[11516]: system event 'event_restart' (0x01) status
>> 'sync_alarm, sync_unspec, 1 event, event_unspec' (0xc010)
>> 30 Sep 14:19:28 ntpd[11516]: clock GPS_ONCORE(0) event 'clk_badtime'
(0x06)
>> 30 Sep 14:19:28 ntpd[11516]: peer GPS_ONCORE(0) event 'event_peer_clock'
>> (0x85) status 'unreach, conf, 1 event, event_peer_clock' (0x8015)
>> 30 Sep 14:19:45 ntpd[11516]: clock GPS_ONCORE(0) event 'clk_noreply'
(0x01)
>> 30 Sep 14:19:45 ntpd[11516]: peer GPS_ONCORE(0) event 'event_peer_clock'
>> (0x85) status 'unreach, conf, 2 events, event_peer_clock' (0x8025)
>> /
>> Have you an idea about this problem when I start ntp ?
>>
>> Thank for your answer,
>>
>> best regards
>>
>> Christophe TAFFOUREAU
>>
>>
>> _______________________________________________
>> LinuxPPS mailing list
>> LinuxPPS at ml.enneenne.com
>> http://ml.enneenne.com/cgi-bin/mailman/listinfo/linuxpps
>> Wiki: http://wiki.enneenne.com/index.php/LinuxPPS_support
>>
>
> _______________________________________________
> LinuxPPS mailing list
> LinuxPPS at ml.enneenne.com
> http://ml.enneenne.com/cgi-bin/mailman/listinfo/linuxpps
> Wiki: http://wiki.enneenne.com/index.php/LinuxPPS_support
>
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: clockstats.20090930
Url: http://ml.enneenne.com/pipermail/linuxpps/attachments/20091001/0cc21a5d/attachment.txt
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: ntp.conf
Url: http://ml.enneenne.com/pipermail/linuxpps/attachments/20091001/0cc21a5d/attachment-0001.txt
More information about the LinuxPPS
mailing list