LinuxPPS files

Hardware 2x Edimax BR-6104KP
GPS Board/PPS Source Motorola Oncore UT+
Linux Kernel
LinuxPPS 5.1.0 ntp-pps-2.6.24-ter.diff
NTP 4.2.4p4@1.1520

This is a short description how I managed to setup cheap and fairly accurate NTP server
using LinuxPPS on an Edimax BR-6104KP.

Hardware setup

I'm using a FreeeBSD 6.2 machine as reference. FreeBSD has PPS/NANO support since
a long time and is working well. This server is controlling Motorola Oncore UT+ GPS
board thru a McKinney Technology Interface Board:

Both Edmiax routers are using the same PPS signal. A 74HC00 shifts 5V level to 3V3:

Software setup

Base is Squidge with kernel version This distribution uses a USB stick
as root filesystem which breaks the 2MByte onboard flash limitation.
I have first downloaded the Openwrt distribution which had PPS support a while ago.
Copy the ppsutils from the package directory to the appropiate Squidge directory. Add
the patches 230-pps_support.patch and 231-pps_amba.patch to ./openwrt/target/linux/adm5120/patches.
You must compile the serial driver as module (breaking console port) if you want to use
DCD as PPS source. If you use GPIO2 as PPS source you don't have to. I had to setup the devices manually:
mknod -m 0644 /dev/pps0 c 253 0
mknod -m 0644 /dev/pps1 c 253 1
Following modules must be loaded for PPS on DCD:
root@OpenWrt:~# lsmod
Module                  Size  Used by    Not tainted
amba_pl010              4464  2 
serial_core            16928  2 amba_pl010
pps_core                5968  3 amba_pl010,serial_core
ipv6                  237264  18 
root@OpenWrt:~# lsmod
Module                  Size  Used by    Not tainted
pps_gpio2                976  1 
pps_core                5968  2 pps_gpio2
ipv6                  237264  18 
for PPS on GPIO2. Use ppstest (install with ipkg) to check.

Add following entries to your ntp.conf:

# Atom PPS Clock Discipline driver 22 on /dev/pps0
server minpoll 4 maxpoll 4
fudge flag2 0


Quite good:

Sure: This is not a perfect Startum 1 server due to "high" offset and jitter.
The setup is in my garage so environment temperature is variying from 15&#176C to 40&#176C:
Outlook I will try to use the new LinuxPPS code with "ldisc". Tweaks could be done
using a more stable quartz or clock. Probably using Adm5120 FIQ instead of
normal IRQ could reduce jitter and offset.
I am going to ask to add my patches.


Patches (if you want to compile yourself):

Kernel modul using GPIO2 using unused reset button:
Any comments are welcome.

Distribution, which should have all necessary software using GPIO2 as PPS source:

Flash file
Root filesystem
PPS GPIO2 modul
Please read the installation guide.


Where to buy
OpenWrt Distribution
Midge Distribution
Sunspot's useful hints
Most accurate NTP server ?

Last updated: 2008-06-23

Reduced to the max