Prerequisites:
Documentation:
# 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 # GPS device /dev/gps0 # Add -n option
(apt-get remove ntp ntp-doc) 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+deb7u1_amd64.deb dpkg --install ntp-doc_4.2.6.p5+dfsg-2+deb7u1_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 # 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 limited kod notrap nomodify nopeer noquery restrict -6 default limited kod notrap nomodify nopeer noquery # Local users may interrogate the ntp server more closely. restrict 127.0.0.1 restrict ::1
sudo apt-mark hold ntp ntp-doc
Automatic download of new leap second file.
apt-get install lftp
chmod +x /usr/local/bin/get_leap.sh
#!/bin/bash /usr/local/bin/get_leap.sh
chmod +x /etc/cron.weekly/leapsecond
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
ntpdc -c monlist
ntpq -c "rv 0" associd=0 status=0118 leap_none, sync_pps, 1 event, no_sys_peer, version="ntpd 4.2.6p5@1.2349-o Tue Jan 6 09:09:39 UTC 2015 (1)", processor="x86_64", system="Linux/3.10.11-voyage", leap=00, stratum=1, precision=-22, rootdelay=0.000, rootdisp=85.497, refid=PPS, reftime=d8562b21.98df89e1 Tue, Jan 6 2015 10:36:33.597, clock=d8562b2d.36477b48 Tue, Jan 6 2015 10:36:45.212, peer=27238, tc=4, mintc=3, offset=0.000, frequency=0.000, sys_jitter=8.116, clk_jitter=65.587, clk_wander=0.000, leapsec=201207010000, expire=201506280000
The module is attached to an 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
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