[ntp:questions] Help with Oncore PPS - Update

Thomas Laus lausts at acm.org
Wed Aug 28 15:26:09 UTC 2013


On 2013-08-27, Ron Hahn (EI2JP) <ntp-questions at dhco.org> wrote:
> Colleagues, an update:
>
> I now have the OnCore board actually speaking to the computer. All 
> signals including the PPS signal are translated level using a MAX232 
> chip, with the PPS signal on the DCD line. I also have the kernel 
> recompiled as described on http://blog.doylenet.net/?p=145.
>
> So the everything is appearing to be wired correctly and ntpd is 
> communicating with the OnCore board.
>
That article is not quite a good one to follow.  The author is
building ntp from the package system and starting the one that comes
as part of the base FreeBSD operating system.  If you built ntp from either
the package or the port, everything installs in either /usr/local/bin
or /usr/local/sbin.  Using that referenced article will start the one
in the base system.  Modify your /etc/rc.conf and add the following:

################################################################
# Network Time Services options:                               #
################################################################
ntpdate_enable="YES"            # Run ntpdate to sync time on boot (or# NO).
ntpdate_program="/usr/local/bin/ntpdate" # path to ntpdate, if you want a different one.
ntpdate_flags="-b"              # Flags to ntpdate (if enabled).
ntpdate_config="/etc/ntp.conf"  # ntpdate(8) configuration file
ntpdate_hosts="pool.ntp.org"    # Whitespace-separated list of# ntpdate(8) servers.
ntpd_enable="YES"               # Run ntpd Network Time Protocol (or# NO).
ntpd_program="/usr/local/bin/ntpd" # path to ntpd, if you want a different one.
ntpd_config="/etc/ntp.conf"     # ntpd(8) configuration file
ntpd_sync_on_start="YES"        # Sync time on ntpd startup, even if# offset is high
#ntpd_flags="-p /var/run/ntpd.pid -f /var/db/ntpd.drift"
                                # Flags to ntpd (if enabled).
#
#######################################################################

This startup script comes from the /etc/defaults/rc.conf file and is
modified to look at the version of ntp that you installed.

Add the following to /etc/devfs.conf for ntp to get both serial data
and the pps pulse on DCD.

link    cuau0   oncore.serial.0
link    cuau0   oncore.pps.0

Here is the only contents of my /etc/ntp.conf file:

server  0.us.pool.ntp.org
server  1.us.pool.ntp.org
server  2.us.pool.ntp.org
server  3.us.pool.ntp.org
server  127.127.30.0 prefer

driftfile /var/db/ntp.drift
pidfile /var/run/ntpd.pid

Here is the only content of my /etc/ntp.oncore.0 file:

MODE 1
LON -84.20184
LAT 40.77609
HT 216.3
MASK 20
DELAY 92.1 ns
HARDPPS
ASSERT

You have more servers specified than is required for stable
operation.  Try to simplify things first and then add the rest later
if needed.  Your firewall should permit traffic on port 123 in both
directions and can be narrowed to just UDP after things are running
well for you.  Notice that my configuration files use only one
connection to cuau0 for both pps and serial data from the oncore.

My ntpq billboard:

ntpq -c pe
     remote           refid      st t when poll reach   delay   offset     jitter
==============================================================================
+blueshift.trevo 209.51.161.238   2 u   48   64  377   30.112    1.956     1.372
+4.53.160.75     204.9.54.119     2 u   55   64  377   38.143    5.171     0.595
*tock2.usshc.com .GPS.            1 u   15   64  377   52.432   -4.001     3.582
-pool-test.ntp.o 127.67.113.92    2 u   19   64  377   87.607    8.090     0.435
oGPS_ONCORE(0)   .GPS.            0 l   14   16  377    0.000   -0.004     0.001

This shows that my Oncore ID is just .GPS..  If you look at the
reference clock Oncore program, you will see that the driver delivers
both serial data and reads the pps pulse.

> I can not get any outputs from the ntpdc command so this is to be fixed 
> still. Maybe this is a clue?
>
You may be using the development branch of the NTP port which does nor
have the ntpdc utilities anymore.  I am using the stable version in the ports tree:

Aug 18 20:55:56 mail ntpd[754]: ntpd 4.2.6p5 at 1.2349 Mon Aug  5 8:33:40 UTC 2013 (1)
Aug 18 20:55:57 mail ntpd[755]: proto: precision = 0.217 usec
Aug 18 20:55:57 mail ntpd[755]: ONCORE[0]: ONCORE DRIVER -- ONFIGURING
Aug 18 20:55:57 mail ntpd[755]: ONCORE[0]: state = ONCORE_NO_IDEA
Aug 18 20:55:57 mail ntpd[755]: ONCORE[0]: ONCORE: Can't open SHMEM file
Aug 18 20:55:57 mail ntpd[755]: ONCORE[0]: ONCORE: Can't open shmem
Aug 18 20:55:57 mail ntpd[755]: ONCORE[0]: state = ONCORE_CHECK_ID
Aug 18 20:55:58 mail ntpd[755]: ONCORE[0]: @@Cj
Aug 18 20:55:58 mail ntpd[755]: ONCORE[0]: COPYRIGHT 1991-1997 MOTOROLA INC.
Aug 18 20:55:58 mail ntpd[755]: ONCORE[0]: SFTW P/N #     98-P36848P
Aug 18 20:55:58 mail ntpd[755]: ONCORE[0]: SOFTWARE VER # 2
Aug 18 20:55:58 mail ntpd[755]: ONCORE[0]: SOFTWARE REV # 2
Aug 18 20:55:58 mail ntpd[755]: ONCORE[0]: SOFTWARE DATE  APR 24 1998
Aug 18 20:55:58 mail ntpd[755]: ONCORE[0]: MODEL #    R5122U1152
Aug 18 20:55:58 mail ntpd[755]: ONCORE[0]: HWDR P/N # 5
Aug 18 20:55:58 mail ntpd[755]: ONCORE[0]: SERIAL #   R09E3D
Aug 18 20:55:58 mail ntpd[755]: ONCORE[0]: MANUFACTUR DATE 0H08
Aug 18 20:55:58 mail ntpd[755]: ONCORE[0]:
Aug 18 20:55:58 mail ntpd[755]: ONCORE[0]: state = ONCORE_CHECK_CHAN
Aug 18 20:56:03 mail ntpd[755]: ONCORE[0]: state = ONCORE_HAVE_CHAN
Aug 18 20:56:04 mail ntpd[755]: ONCORE[0]: state = ONCORE_TEST_SENT
Aug 18 20:56:11 mail ntpd[755]: ONCORE[0]: GPS antenna: OK
Aug 18 20:56:11 mail ntpd[755]: ONCORE[0]: state = ONCORE_INIT
Aug 18 20:56:13 mail ntpd[755]: ONCORE[0]: state = ONCORE_ALMANAC
Aug 18 20:56:24 mail ntpd[755]: ONCORE[0]: Have now loaded an ALMANAC
Aug 18 20:56:24 mail ntpd[755]: ONCORE[0]: state = ONCORE_RUN
Aug 18 20:56:24 mail ntpd[755]: ONCORE[0]: SSstate = ONCORE_SS_DONE
Aug 18 20:56:24 mail ntpd[755]: ONCORE[0]: ONCORE: Detected TRAIM,TRAIM = ON

You should not disable TRAIM.  It is provides redundancy to the
receiver time solution when the 'best in sky' satellite changes birds.

Tom

-- 
Public Keys:
PGP KeyID = 0x5F22FDC1
GnuPG KeyID = 0x620836CF



More information about the questions mailing list