[ntp:questions] proprietary hardware clock as NTP reference source

Tom D tpdownes at gmail.com
Mon Jul 19 23:42:01 UTC 2010


Andy-

Thanks for the great instructions. I had some trouble and thought I
would share my solution for others. I followed your instructions to
the letter except I used the final release of 4.2.6p2 and did not need
to do step 5.

Nonetheless I could not get ntpd to start if I had the server options
you suggest (prefer mode 2...). I could start the server without any
options, but then you don't sync. You see these error messages in the
kernel log:

vme_start: RUNLOCK failed Inappropriate ioctl for device
vme_start: WCR0 failed Inappropriate ioctl for device

Turns out that, even though I modified Makefile.am as you suggested,
the changes were not ending up being reflected in the Makefile itself.
So I hacked the Makefile to add the linking to lbcsdk and it worked.
NTPD was not being linked against the shared library and thus the
implicit definition of ioctl (you'll notice compiler warnings about
the implicit definition for refclock_bancomm.c) was never explicitly
linked.

Now things look great. Thought I would share if others have the same
problem. There's probably a cleaner way of doing this, but it works.

Tom

On Jun 17, 8:59 am, apobrien <apobriens... at gmail.com> wrote:
> On Jun 13, 12:21 am, Rob Neal <hun... at comcast.net> wrote:
>
> > On Fri, Jun 11, 2010 at 02:26:13PM -0700, apobrien wrote:
> > > Hello list,
>
> > > I have a set of proprietary hardware timing cards (Symmetricom
> > > bc635PCIe) which synchronize their clocks using a dedicated
> > > interconnect.  As you might imagine the timing card conditioned time
> > > drifts from that of the hosts they're installed in.
>
> > > What I'd like to do is make the "master" timing card's time into a NTP
> > > reference clock then use NTP to distribute that time to the other
> > > hosts in the (private) network.
>
> > > I've looked at Orphan mode and undisciplined local clocks but they
> > > only refer to the host's software clock if I'm not mistaken.  I've
> > > also searched through the archive but I'm afraid I lack the
> > > appropriate terminology to get meaningful results.
>
> > > Can someone point me toward (some google words maybe) creating an
> > > arbitrary NTP reference source (under Linux)?  I think I'm just
> > > missing something very basic.
>
> > > I've been looking at the LinuxPPS project as these cards output a PPS
> > > that I might use to condition the host clock using Linux PPS but I
> > > don't have a 8250 serial port on these new fangled PCs.
>
> > > TIA!
> > > Andy
>
> > > _______________________________________________
> > > questions mailing list
> > > questi... at lists.ntp.org
> > >http://lists.ntp.org/listinfo/questions
>
> > Symmetricomm has a kernel mode driver for the bc635/7 cards, for Linux.
> > If you have a copy you can use ntp reference clock 22 (bancomm) to
> > feed the time to NTP
>
> > refclock 127.127.16.u mode 2
> >         in the config file, where u is whatever unit your card presents as.
>
> > The Symmetricom driver is proprietary, they charge for it, btw.
>
> Thanks Rob, both for updating the driver and for alerting me to its
> existence.  It's exactly what I was looking for.
>
> For those interested, here are the steps I followed to get it working
> using Symmetricom's newer Linux software development kit (SDK).  These
> instructions reference ntp-4.2.6p2-RC6.
>
> 1) install the SDK by following their documentation.  Copy the shared
> library file, libbcsdk.so, to a standard directory (I used /usr/lib/
> libbcsdk.so)
>
> 2) link the default SDK device file to the file expected by the
> Bancomm reference clock driver: ln -s /dev/windrvr6 /dev/btfp0
>
> 3) untar the ntp source and modify ntpd/Makefile.am line 91 from
>
>   ntpd_LDADD = $(LDADD) $(LIBOPTS_LDADD) ../libntp/libntp.a -lm
> @LCRYPTO@ @LSCF@
>     to
>   ntpd_LDADD = $(LDADD) $(LIBOPTS_LDADD) ../libntp/libntp.a -lm -
> lbcsdk @LCRYPTO@ @LSCF@
>
> 4) configure the source with the --enable-BANCOMM option.  I used ./
> configure --enable-BANCOMM --enable-clockctl
>
> 5) make, make install.  If it doesn't compile complaining about
> MOD_NANO, add the line
>    #define MOD_NANO ADJ_NANO somewhere in ntpd/ntp_loopfilter.c
>
> 6) edit ntp.conf as Rob suggests:  I'm using
>   server 127.127.16.0 prefer mode 2 burst minpoll 4
>
> After only a few minutes of operation the timing card and system clock
> average only 2 microseconds disagreement with a [-0.000046, 0.000137]
> range over 1,500,000 samples taken over a ~5 second interval!
>
> Thanks Rob!




More information about the questions mailing list