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

2010-06-17 Thread apobrien
On Jun 13, 12:21 am, Rob Neal hun...@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...@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.46, 0.000137]
range over 1,500,000 samples taken over a ~5 second interval!

Thanks Rob!

___
questions mailing list
questions@lists.ntp.org
http://lists.ntp.org/listinfo/questions


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

2010-06-13 Thread Rob Neal
On Sun, Jun 13, 2010 at 04:21:58AM +, Rob Neal 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
  questions@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. 
 
 ___
 questions mailing list
 questions@lists.ntp.org
 http://lists.ntp.org/listinfo/questions

ur, refclock 16 is bancomm, not 22, sorry. 22 is the ATOM driver. Sorry
for the confusion. 
___
questions mailing list
questions@lists.ntp.org
http://lists.ntp.org/listinfo/questions


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

2010-06-12 Thread Rob Neal
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
 questions@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. 

___
questions mailing list
questions@lists.ntp.org
http://lists.ntp.org/listinfo/questions


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

2010-06-11 Thread apobrien
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
questions@lists.ntp.org
http://lists.ntp.org/listinfo/questions


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

2010-06-11 Thread Hal Murray
In article 40aa2d27-9826-4948-a405-e5b311358...@z8g2000yqz.googlegroups.com,
 apobrien apobriens...@gmail.com writes:
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

I think you have two choices.

One is to write a stand alone program that talks to your hardware
and puts the info into shared memory where the shared-memory driver
(driver 28) can get it.  gpsd works this way.

The other is to write your own refclock-driver.  The usual
approach is to find a driver that is as close as you can get
and modify it.  If your changes are small and don't break the
old moce, you may be able to convince the ntp project to merge
them into the main source package.

It may be tricky to get started this way.  The best documentation
is to read the code.  There is some overview here, but it
probably won't help much until you look at the code:
  http://www.cis.udel.edu/~mills/ntp/html/howto.html

-- 
These are my opinions, not necessarily my employer's.  I hate spam.

___
questions mailing list
questions@lists.ntp.org
http://lists.ntp.org/listinfo/questions


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

2010-06-11 Thread unruh
On 2010-06-11, apobrien apobriens...@gmail.com 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.

Use shmpps. It uses the shm driver to input the PPS to ntp. It requires
that you have some other source to derive the seconds from (I, PPS can
allow ntp to condition to the exact second, but has no idea which second
it is conditioning to) That serial port is used to input the PPS and the
seconds. How would you input the PPS in your case?

 TIA!
 Andy

___
questions mailing list
questions@lists.ntp.org
http://lists.ntp.org/listinfo/questions