LinuxPPS files

Summary:
Hardware 2x Edimax BR-6104KP
GPS Board/PPS Source Motorola Oncore UT+
Linux Kernel 2.6.24.2
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 2.6.24.2. 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 
or
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 127.127.22.0 minpoll 4 maxpoll 4
fudge 127.127.22.0 flag2 0

Results

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°C to 40°C:

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 bifferos@@@yahoo.co.uk to add my patches.

Files

Patches (if you want to compile yourself):

001-setserial_pps.patch
230-pps_support.patch
231-pps_amba.patch
Kernel modul using GPIO2 using unused reset button:
PPS on GPIO2
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.

Links

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


Last updated: 2008-06-23
linuxpps@@@gerhard-bertelsmann.de

Reduced to the max

Impressum: