[ntp:questions] How to debug GPS PPS?

xyz-2041 xyz2041 at gmail.com
Tue Mar 9 07:44:59 UTC 2010

Forgot to add the changes to /etc/ntp.conf:

> On Feb 17, 12:20 pm, Thomas Laus <lau... at acm.org> wrote:
> The entries in your log indicate that you are communicating with your
> Oncore receiver.  It sees the firmware information very well.  The
> message:
> 55242 74297.142 ONCORE[0]: ONCORE: oncore_get_timestamp,error serial pps
> Seems to be indicating a problem in your serial interface.  Are you
> using an interface board to connect your Oncore TTL signals to RS-232?
> I use one of the TAPR boards for that purpose.  Your tester shows data
> being sent on all appropriate pins because all LED's are blinking.
> Right now, I am stumped!  Someone with more knowledge is welcome to
> chime into this discussion.

Thanks Tom, et. al. for helping me get this going.
The box is now running as Stratum 1.

The problem apparently was the serial port on the
Gigabyte motherboard.  It started working properly
after ordering and installing a PCI card:

I ordered this from Buy.com:
  Cables Unlimited 1 Port DB9 Serial Netmos 9820 PCI

But I was sent this with the MOSchip MCS9865:

Found this driver:

  cd /usr/src/sys/dev/uart
  mkdir MosChip-9865
  cd MosChip-9865

  tar xvzf MCS9865_V1.0.0.1.tar.gz
  cd MCS9865_V1.0.0.1

  ls -lta
  total 158
  drwxr-xr-x  3 root  wheel        512 Feb 27 15:50 ..
  drwxr-xr-x  2 root  kalauser     512 Oct 25 23:59 MCS9865_isa
  drwxr-xr-x  2 root  kalauser     512 Oct 25 23:59 MCS9865_parallel
  drwxr-xr-x  5 root  kalauser     512 Oct 25 23:58 .
  -rwxr-xr-x  1 root  500          365 Oct 22 07:25 ReleaseNotes
  drwxr-xr-x  2 root  kalauser     512 Oct 22 07:18 MCS9865_serial
  -r-x--x--x  1 root  kalauser  148140 Oct 13 06:37 minicom

  cd MCS9865_serial
  make ld

  cd  /usr/src/sys/dev/uart/MosChip-9865/MCS9865_V1.0.0.1/
  kldload -v ./mcs9865_uart.ko
  Loaded ./mcs9865_uart.ko, id=3

  cp -p mcs9865_uart.ko /boot/modules
  cd /boot
  cp -p loader.conf  loader.1.bak.conf
  nano loader.conf

    # mcs9865_uart.ko

  shutdown -r now

  ls -lta /dev | grep cua

Found a "cuau4" even though I was expecting "cuad1".
Why is that?

Edited /etc/devfs.conf:

  cd /etc
  nano devfs.conf

# Links for NTP Oncore GPS(0)
link cuad0 pps0
link cuad0 oncore.pps.0
link cuad0 oncore.serial.0

# Links for NTP Oncore GPS(1)
link cuau4 pps1
link cuau4 oncore.pps.1
link cuau4 oncore.serial.1

Edited /etc/ntp.conf:

  cd /etc
  cp -p ntp.conf ntp.5.bak.conf
  nano ntp.conf

 Added a 2nd group:

  # GPS Oncore driver 0
  fudge   refid GPS0

  # PPS driver:
  fudge   refid PPS0

  # GPS Oncore driver 1
  fudge   refid GPS1

  # PPS driver:
  server   prefer
  fudge   refid PPS1

  shutdown -r now

On reboot ntpd gave the following error:
  "ONCORE[0]: Oncore: No response from @@Cj,
   shutting down driver"

This is reasonable since there is nothing
connected to that port.

It took about half an hour or so, but NTP
recognized the Oncore unit and is now running
as Stratum 1:

# ntpq -c pe
     remote           refid      st t when poll reach   delay
offset  jitter
 GPS_ONCORE(0)   .GPS.            0 l    -   16    0    0.000
0.000   0.000
 PPS(0)          .PPS.            0 l    -   64    0    0.000
0.000   0.000
oGPS_ONCORE(1)   .GPS.            0 l    5   16  377    0.000
-0.001   0.002
xPPS(1)          .PPS.            0 l   53   64  377    0.000
-0.001   0.002   .BCST.          16 u    -   64    0    0.000
0.000   0.002

# ntpq -c rv
assID=0 status=0415 leap_none, sync_uhf_clock, 1 event,
version="ntpd 4.2.7p19 at 1.2108-o Mon Feb 15 20:10:40 UTC 2010 (1)",
processor="i386", system="FreeBSD/7.2-RELEASE", leap=00, stratum=1,
precision=-19, rootdelay=0.000, rootdisp=0.282, refid=GPS,
reftime=cf3fbf58.24220c39  Mon, Mar  8 2010 12:24:24.141,
clock=cf3fbf5a.525eaae2  Mon, Mar  8 2010 12:24:26.321, peer=56242,
tc=4, mintc=3, offset=-0.001, frequency=-49.760, sys_jitter=0.002,
clk_jitter=0.002, clk_wander=0.000

Thanks again, Tom and guys.  I hope this
documentation helps the next guy having
problems with a serial port.

More information about the questions mailing list