GPS-based NTP server

From Wildsong
Jump to navigationJump to search

Setting up the server software is not hard, ntpd can work with NMEA strings coming in from a GPS receiver. The problem is that there will be random time delays imposed by the serial port and the operating system, so getting closer than about 10 ms is not easy.

The MX-9212 does have a PPS output; I always wondered what that was for. It's a TTL output on the back panel that can be connected to the host computer to give a more accurate time base.

Somewhere or other I saw an article on what to do with this signal. I need to find it.

I need to wire it up to an input on the UNIX side that is processed in realtime. Should be interesting.

Two approaches

  1. Using OpenWRT at home
  2. Using Mikrotik at the co-lo facility

OpenWRT

Install the ntpd and gpsd packages. Just use LUCI System/Software

Plug in the GPS. This will be the juicy part of this story since the Buffalo gateway router has no serial port.

TO BE CONTINUED

Mikrotik

GPS receiver. Set up the Leica GPS. I mount its antenna at the top of the equipment rack. Someday I will put it on the roof. I connect power. The GPS goes green. Insert photo here I need a shorter antenna cable for now. :-)

Serial cable This RB2011 router has a Cisco style serial port. http://wiki.mikrotik.com/wiki/Manual:System/Serial_Console#RJ45_type_serial_port I have a Cisco cable already. I need to get it plugged into the GPS receiver. Both the Cisco and the Leica have female connectors.

I should test the NMEA output of the Leica but am pretty sure I left it set to 9600-8-n-1 the last time I used it (at AlseaGeo).

Install the GPS and ntpd packages. I had to download the "all packages" zip file from Mikrotik, unzip it, use scp to put the packages onto the RB2011, and reboot it.

Configure the router

TO BE CONTINUED.