[ntp:questions] Atheros AR9331 w/GPS + PPS

Gabs Ricalde gsricalde at gmail.com
Thu Sep 10 10:46:45 UTC 2015

On Wed, Sep 9, 2015 at 2:47 PM, Joachim Fabini
<Joachim.Fabini at tuwien.ac.at> wrote:
> Comments inline
> On 08.09.2015 13:46, Gabs Ricalde wrote:
>> On Tue, Sep 8, 2015 at 5:17 PM, Joachim Fabini
>> <Joachim.Fabini at tuwien.ac.at> wrote:
>>> On 08.09.2015 09:44, Gabs Ricalde wrote:
>>>> I've been running two devices (TPLink WR703N, MR3020) for more than 2
>>>> years with almost no issue. Also impressed on what these devices could
>>>> do. Does the new OpenWRT versions have the PPS driver for AR9331? I had
>>>> to use this for Attitude Adjustment:
>>>> https://code.google.com/p/openwrt-stratum1/
>>> Thanks for the pointer, nice project. However, one side-note: the y-axis
>>> label in the diagram shown on the google code page can't be correct -
>>> the unit must be ms, NOT µs.
>>> An offset smaller than +-200ns is imho ways out of reach for such
>>> devices, 200µs is feasible. In particular when considering the
>>> mechanisms used according to the PpsGpioPollDriver description (100µs
>>> interval waiting/polling). Still the accuracy is good and should be
>>> sufficient for many tasks.
>> The scale is correct, if I run ppstest I get this:
>> root at OpenWrt:~# 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 1441711928.999999999, sequence: 6248816 - clear
>> 0.000000000, sequence: 0
>> source 0 - assert 1441711929.999999949, sequence: 6248817 - clear
>> 0.000000000, sequence: 0
>> [...]
>> The 100 us interval is only for determining the coarse time.
> I'm really surprised, that's excellent. Do you have any figures how ntpd
> performs when using this PPS source? My earlier comment was relying on
> the assumption that the diagram displays the ntp log (loopstats)
> statistics. Until now, with Linux, desktop computers and rather
> expensive GPS equipment I couldn't get the system clock's offset better
> than +-5µs over some hours. Publications point out that the CPU
> performance has major influence on the ntp timesync accuracy, too. The
> PPS reporting is a different story but still a main prerequisite. Can
> you share some results on ntp loopstats based offset?

TL-WR703N, polling GPIO driver, ntpd maxpoll 2

The offset depends on these things: the stability of the local clock,
PPS jitter, and loop time constant (controlled by the poll interval).
A low PPS jitter means you can use a faster time constant, which can
control the local clock faster when it drifts, which means lower

You can also improve the stability of the local clock by avoiding rapid
temperature changes. This is the loopstats of a TL-WR841N placed inside
a box where the temperature doesn't change that fast.

> Thanks,
> Joachim

More information about the questions mailing list