Re: [chrony-users] chrony receiveing GPS timestamp over UDP packet to update SHM

[ Thread Index | Date Index | More chrony.tuxfamily.org/chrony-users Archives ]


It is not clear to me why you are trying to do this. If you are trying to
transfer time from the gps system to the other one, just use it as your time
server, and use chrony to get time from it. Yes, your system would have large variations. It takes time for the first
system to write the data to a file, get the time from the file, prepare it, send it over
the wire to the other system. file reading and writing is highly variable--
the system does not regard it as urgent. iThe client's clock it better than the variations in that whole process. So why do you
want to simulate this whole thing?

Now, you could extend the pps wire from the first system to the second, and
then set up the second system in the same way as the first. Or just use chrony
to have the second one a client of the first.



On Sun, 19 Apr 2015, Pratik Pawar wrote:

Hi All,
    I have one strange question about chrony.
      I am using chrony to keep embedded board system time in sync. When GPS receiver is connected to board,
It can able to sync system time with very negligible deviation. The reference clock for chrony are PPS & SHM.
      Whenever GPS receiver  got new time stamp, application log that value into a file as well as Same
timestamp is being given to SHM. GPS receiver is sending updated time stamp at every 200ms.

   I want to simulate same think. For this I am reading logged timestamp from file & sending it through UDP
packet at 200ms interval using another application.
    Embedded board receive that UDP packet extract timestamp information & write it into SHM. 
   With this approach chrony able to get SHM data & sync system time. But I am getting lots of deviation. PPS
is disable only SHM is enable for this chrony.

   Can any one tell me a better approach or previous experience to achieve this.  

Thanks & Regards,
Pratik Pawar


Here is chrony.conf

#refclock PPS /dev/pps0 lock SHM0
refclock SHM 0 poll 0 offset 0.1 delay 0.5 refid SHM0
makestep 1 10
maxupdateskew 5

local stratum 1
manual
allow

pidfile /mnt/ubi/mk2/chrony/chronyd.pid

driftfile /mnt/ubi/mk2/chrony/chrony.drift

keyfile /mnt/ubi/mk2/chrony/chrony.keys
commandkey 1

logdir /mnt/ubi/mk2/chrony/log
log statistics tracking refclocks
log tracking
noclientlog
logchange 0.1

dumponexit
dumpdir /mnt/ubi/mk2/chrony/log

cmdallow 127.0.0.1




Mail converted by MHonArc 2.6.19+ http://listengine.tuxfamily.org/