This guide will help you create an NTP server using the PC Enginges APU system board, the Versalogic GPS module and the StartTech serial port module. I'm using the ATOM PPS refclock source, because PPS is'nt provided via /dev/ttyACM0.
# remountrw
useradd username passwd username
apt-get install dialog setserial
apt-get update apt-get upgrade
dpkg-reconfigure tzdata
apt-get install locales dpkg-reconfigure locales
VOYAGE_SYNC_DIRS="var/lib/ntp"
apt-get install gpsd gpsd-clients
dpkg-reconfigure gpsd
(apt-get remove ntp) cd /root apt-get install dpkg-dev dialog devscripts fakeroot pps-tools apt-get source ntp && apt-get build-dep ntp cd ntp-4.2.6.p5+dfsg debuild -us -uc cd .. dpkg --install ntp_4.2.6.p5+dfsg-2_i386.deb dpkg --install ntp-doc_4.2.6.p5+dfsg-2_all.deb
NTPD_OPTS='-g -N'
KERNEL=="ttyS2", SYMLINK+="gps0" KERNEL=="ttyS2", RUN+="/bin/setserial -v /dev/%k low_latency" KERNEL=="ttyS2", RUN+="/usr/sbin/ldattach pps /dev/%k"
# Allow more distance between GPS (USB) and Serial PPS. # Stratum level 12 when no ref source available tos mindist 0.100 orphan 12 driftfile /var/lib/ntp/ntp.drift leapfile /var/lib/ntp/leap-seconds statsdir /var/log/ntpstats/ statistics loopstats peerstats clockstats filegen loopstats file loopstats type day enable filegen peerstats file peerstats type day enable filegen clockstats file clockstats type day enable # Local servers server ntp1.polaire.nl server ntp2.polaire.nl server ntp3.home.polaire.nl # ATOM PPS (/dev/pps0) server 127.127.22.0 minpoll 4 maxpoll 4 fudge 127.127.22.0 refid PPS # GPS (USB /dev/ttyACM0) server 127.127.28.0 minpoll 4 maxpoll 4 prefer fudge 127.127.28.0 refid GPSd fudge 127.127.28.0 time1 0.063 # By default, exchange time with everybody, but don't allow configuration. restrict -4 default kod notrap nomodify nopeer noquery restrict -6 default kod notrap nomodify nopeer noquery # Local users may interrogate the ntp server more closely. restrict 127.0.0.1 restrict ::1
update-rc.d ntp enable update-rc.d gpsd enable
# ppswatch /dev/pps0 trying PPS source "/dev/pps0" found PPS source "/dev/pps0" timestamp: 1403289214, sequence: 11, offset: 81613988 timestamp: 1403289214, sequence: 11, offset: 81613988 timestamp: 1403289215, sequence: 12, offset: 81607583 timestamp: 1403289215, sequence: 12, offset: 81607583 timestamp: 1403289216, sequence: 13, offset: 81609303 timestamp: 1403289216, sequence: 13, offset: 81609303 timestamp: 1403289217, sequence: 14, offset: 81601958 ^C
$ ntpq -p remote refid st t when poll reach delay offset jitter ============================================================================== ntp1.polaire.nl .PZF. 1 u 47 64 1 0.270 12.367 0.001 ntp2.polaire.nl 95.97.208.29 2 u 48 64 1 0.293 12.720 0.001 ntp3.home.polai .DCF. 1 u 47 64 1 0.300 13.941 0.001 oPPS(0) .PPS. 0 l - 16 7 0.000 12.355 0.102 *SHM(0) .GPSd. 0 l 2 16 7 0.000 1.188 1.431 # After a while... remote refid st t when poll reach delay offset jitter ============================================================================== +ntp1.polaire.nl .PZF. 1 u 56 64 377 0.292 -0.099 0.075 -ntp2.polaire.nl 95.97.208.29 2 u 50 64 377 0.289 0.638 0.086 +ntp3.home.polai .DCF. 1 u 41 64 377 0.237 1.656 0.048 oPPS(0) .PPS. 0 l 15 16 377 0.000 0.027 0.003 *SHM(0) .GPSd. 0 l 16 16 377 0.000 -8.657 2.708
Automatic download of new leap second file.
apt-get install lftp
chmod +x /etc/cron.weekly/leapsecond
The module is in a embedded device and you cannot run Windows on the APU system board. The following directions will let you pass through the serial device to a Windows computer over the network. Then you will be able to run the u-center GNSS evaluation software for Windows.
apt-get install socat
service ntp stop service gpsd stop
socat file:/dev/ttyACM0,raw,echo=0 tcp-l:3006,fork&
I'm using Windows 7 in this example.
bcdedit.exe -set TESTSIGNING ON
com2tcp.exe --ignore-dsr \\.\COM6 1.2.3.4 3006