[time-nuts] wifi with time sync
albertson.chris at gmail.com
Fri Jan 13 15:31:20 EST 2017
Even with the long and variable ping time, time sync can work. The reason
it can work is that time is not re-sync'd in one "ping" but time sync is an
on-going process that occurs over a period as long as hours.
Think about adjusting the rate of a clock by hand. The computer (NTP) can
(and does) use the same method. You sync it up as best you can then come
back in 24 hours and see it your clock has gained or lost time then fix the
rate and continue this process forever, eventually some balance is reached
as you learn to make fine adjustments.
So having a few tens of milliseconds of error in the communications channel
is not so bad if we can let the clocks runs for a long time and also we can
average MANY measurements, NTP uses quite a few tricks and works about as
well as it can given the nature of the communications channels it is given
work with. PTP has one more trick it can use that really solves the
problem., PTP depends on special hardware that time stamps the messages so
it knows the ping-like delays you see. But PTP's problem is that it
requires special PTP compatible hardware.
There are people in academia who have sync close to on order 100
nanoseconds over WiFi using PTP. I think this is a do it your self thing
right now. It would not be really hard to build a WiFi router form Linux
or BSD then add PTPd on each end. There might be a commercial solution, I
But in any case don't expect your system clock to bounce around like the
ping times do. NTP is good enough that it does an average.
I run NTP in some WiFi connected autonomous robots and it works well enough
to keep internal log files sync'd between robots. But I only need a few
tens of milliseconds for that.
On Fri, Jan 13, 2017 at 11:35 AM, Chris Caudle <chris at chriscaudle.org>
> On Fri, January 13, 2017 11:40 am, Bob Camp wrote:
> > The ping response is anywhere from 2 ms out to 400 ms. Most of
> > the time it's in the 3 to 9 ms range. Simply taking that
> > down to < 1 us would be a really big deal.
> I doubt that the response time will get that low, rather the time sync
> will be moved lower in the hardware stack so that the variation stays
> below 1us so it can be compensated as a systematic offset. Basically a
> Wi-Fi version of the hardware time stamping that a lot of NIC's do now for
> PTP support. Just a guess at this point.
> Chris Caudle
> time-nuts mailing list -- time-nuts at febo.com
> To unsubscribe, go to https://www.febo.com/cgi-bin/
> and follow the instructions there.
Redondo Beach, California
More information about the time-nuts