Home

 


Re: How to debug GPS PPS? Posted on: Tue, 9 Mar 2010 07:45:00 +0000 (UTC)

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

> On Feb 17, 12:20=A0pm, Thomas Laus wrote:
>
> The entries in your log indicate that you are communicating with your
> Oncore receiver. =A0It sees the firmware information very well. =A0The
> message:
>
> 55242 74297.142 127.127.30.0 ONCORE[0]: ONCORE: oncore_get_timestamp,erro=
r serial pps
>
> Seems to be indicating a problem in your serial interface. =A0Are you
> using an interface board to connect your Oncore TTL signals to RS-232?
> I use one of the TAPR boards for that purpose. =A0Your tester shows data
> being sent on all appropriate pins because all LED's are blinking.
> Right now, I am stumped! =A0Someone 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:
netmos-9820-chipset-pci-i-o-card-1/q/loc/101/207595862.html>
Cables Unlimited 1 Port DB9 Serial Netmos 9820 PCI
+Netmos+9820+PCI&scoring=3Dp>

But I was sent this with the MOSchip MCS9865:
http://www.google.com/products?q=3DSY-PCI15003

Found this driver:
http://www.google.com/#q=3DMCS9865_V1.0.0.1.tar.gz
attachmentid=3D506&d=3D1259682366>

Compiled:
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
make ld

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

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

# mcs9865_uart.ko
mcs9865_uart_load=3D"YES"

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
server 127.127.30.0
fudge 127.127.30.0 refid GPS0

# PPS driver:
server 127.127.22.0
fudge 127.127.22.0 refid PPS0


# GPS Oncore driver 1
server 127.127.30.1
fudge 127.127.30.1 refid GPS1

# PPS driver:
server 127.127.22.1 prefer
fudge 127.127.22.1 refid PPS1


Rebooted:
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
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D
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
192.168.2.255 .BCST. 16 u - 64 0 0.000
0.000 0.002



# ntpq -c rv
assID=3D0 status=3D0415 leap_none, sync_uhf_clock, 1 event,
event_clock_reset,
version=3D"ntpd 4.2.7p19@1.2108-o Mon Feb 15 20:10:40 UTC 2010 (1)",
processor=3D"i386", system=3D"FreeBSD/7.2-RELEASE", leap=3D00, stratum=3D1,
precision=3D-19, rootdelay=3D0.000, rootdisp=3D0.282, refid=3DGPS,
reftime=3Dcf3fbf58.24220c39 Mon, Mar 8 2010 12:24:24.141,
clock=3Dcf3fbf5a.525eaae2 Mon, Mar 8 2010 12:24:26.321, peer=3D56242,
tc=3D4, mintc=3D3, offset=3D-0.001, frequency=3D-49.760, sys_jitter=3D0.002=
,
clk_jitter=3D0.002, clk_wander=3D0.000

Thanks again, Tom and guys. I hope this
documentation helps the next guy having
problems with a serial port.
56975. Re: How to debug GPS PPS?
56976. Re: How to debug GPS PPS?
56977. Re: How to debug GPS PPS?
56978. Re: How to debug GPS PPS?
56979. Re: How to debug GPS PPS?
56980. Re: How to debug GPS PPS?
56981. Re: How to debug GPS PPS?
56982. Re: How to debug GPS PPS?
56983. Re: How to debug GPS PPS?
56984. Re: How to debug GPS PPS?
56985. Re: How to debug GPS PPS?
56986. Re: How to debug GPS PPS?
56987. Re: How to debug GPS PPS?
56988. Re: How to debug GPS PPS?
56989. Re: How to debug GPS PPS?
56990. Re: How to debug GPS PPS?
56991. Re: How to debug GPS PPS?
56992. Re: How to debug GPS PPS?
56993. Re: How to debug GPS PPS?
56994. Re: How to debug GPS PPS?