Jeremy W. Langston

Personal Website

Installing and Using NTP with a Garmin 18 GPS (with PPS)

I recently needed to synchronize a Windows XP machine with GPS time.  One of the requirements was sub-millisecond accuracy, which is no small thing for non-RTOS computers.  David Hart to the rescue!  He has written an driver for the NTP (network time protocol) service to incorporate a PPS (pulse per second) signal.  The PPS signal, coming from a GPS, is highly accurate after sufficient time has elapsed for the GPS to sync with the satellites.  I’ve received a lot of help from David Taylor; thanks again, David!  So, without further ado, here’s an example of how to proceed with the installation:

[UPDATE:  from David Hart – “I’ve posted a new serialpps-20091228.zip which should correct that [install.bat bug]. The (huge) debug build of serialpps-ppsapi-provider.dll is also added, along with a tiny bit of instructions in install.bat regarding PPSAPI_DLLS.”]

1.  Configure hardware.
Connect the PPS signal to the DCD pin on the RS232 connector.

2.  Install Meinberg NTP software.
Keep all defaults.
Create and use a special NTP account. (I always had problems using anything else)
Account name:  ntp (use whatever you want)
Account pass:  ntpntp

3.  Stop NTP.
Run “C:\Program Files\NTP\bin\stopntp.bat”.   There are alot of useful utils in the \bin directory.

4.  Replace ntpd.exe with altered version.
Extract “ntpd.exe” from “ntp-4.2.4p6-DLH-QPC-20090315-bin.zip
Copy to “C:\Program Files\NTP\bin”, replacing previous ntpd.exe.

5.  Install SerialPPS.
Extract all from “serialpps-20090606.zip“.
Edit “install.bat”
On line 6, remove ‘if “x86″==”%PROCESSOR_ARCHITECTURE” ‘
Remove line 7 and 8 (you can just put “REM ” in front and they will be ignored, almost like a comment)
Run “install.bat”
Ensure that “serialpps.sys” was copied to “C:\Windows\system32\drivers”
Copy “serialpps-ppsapi-provider\x86\serialpps-ppsapi-provider.dll” to “C:\”
Right-click “My Computer”, go to properties.
Click “Advanced” tab
Click “Environment Variables” button
Under “System variables”, Click “New” button
Name:  PPSAPI_DLLS
Value: C:\serialpps-ppsapi-provider.dll

6.  Configure GPS (for Garmin)
Run “SNSRCFG.exe
Connect to GPS
Configure
Set baud rate to 4800
Enable “Pulse Per Second”
Press F7
Enable GPRMC, disable others
Send config to GPS

7.  Configure NTP
Edit “C:\Program Files\NTP\etc\ntp.conf”
Remove all entries, add the following
driftfile “C:\Program Files\NTP\etc\ntp.drift”
enable stats
statsdir “C:\Program Files\NTP\etc\”
statistics loopstats
server 127.127.22.1 minpoll 4 #PPS
server 127.127.20.1 iburst prefer minpoll 4 maxpoll 7 #GPS
#fudge 127.127.20.1 time1 0.4 refid GPS #uncomment and change time1 as needed

8.  Ensure GPS is connected to serial port 1

9.  Restart computer

10. Unplug GPS and disable Microsoft Ball-mouse (if listed)
Go to device manager: My Computer->Properties->Hardware->Device Manager
Under “Mice and other pointing devices”, right-click and disable “Microsoft Serial BallPoint”

11. Reconnect GPS Restart computer

12. Start NTP server
Run “C:\Program Files\NTP\bin\startntp.bat”

13. Monitor NTP server
Run “C:\Program Files\NTP\bin\ntpstatus.bat”
Both GPS and PPS should show up.  After the GPS gets a lock, NTP should sync to the servers.
Refer to online documentation for help.
Alternatively, use “NTP Time Server Monitor” from Meinberg

To Uninstall PPS driver, run “uninstall.bat”.

25 Comments

  1. If someone was interested in configuring an ntpserver on linux – How to install and configure NTP on linux

  2. Thanks for the writeup. I’m embarrassed by the install.bat bug you spell out how to work around. I’ve posted a new serialpps-20091228.zip which should correct that. The (huge) debug build of serialpps-ppsapi-provider.dll is also added, along with a tiny bit of instructions in install.bat regarding PPSAPI_DLLS.

  3. GPS NTP TimeServer Frequently asked questions – maybe someone will be interested in general info about NTP Servers.

  4. Hi Jeremy,
    I have been trying hard to do this, but a step by step instruction was hard to find. Do you have any results that I can take a loot at. I read somewhere that although the NTP servers run very accurately sync to GPS, the NTP clients when they read the timestamps,there is a lot of jitter. Please help

  5. Shital, your best bet is to look at David Taylor’s website. He has several charts from various computers and configurations.

  6. Thanks for your sharing. Does ntpd from “ntp-4.2.4p6-DLH-QPC-20090315-bin.zip” support baud rate of 9600?

  7. I have not tried it and I personally have not looked through the code to see if it is supported. David Hart has posted his source code. That would be a place to start.

  8. What is the advantage of running both PPS and GPS_NMEA drivers simultaneously? They both seem to support PPS on the Windows build, and I am getting almost exactly the same offset from each.

    23 Feb 23:03:15 ntpd.exe[668]: Using user-mode PPS timestamp for GPS_NMEA(1)
    23 Feb 23:03:15 ntpd.exe[668]: GPS_NMEA(1) 8024 84 reachable
    23 Feb 23:04:02 ntpd.exe[668]: PPS(1) 8024 84 reachable

  9. To: “Thanks for your sharing. Does ntpd from “ntp-4.2.4p6-DLH-QPC-20090315-bin.zip” support baud rate of 9600?”

    Yes, it should.

    To: “What is the advantage of running both PPS and GPS_NMEA drivers simultaneously? They both seem to support PPS on the Windows build, and I am getting almost exactly the same offset from each.”

    The ATOM (PPS) driver can run in kernel mode, and thereby get more precise timestamps (less subject to other system activity). I made one brief comparison on Windows XP SP3 here:

    http://www.satsignal.eu/ntp/NTP-on-Windows-serial-port.html#kernel

    Cheers,
    David Taylor

  10. Follow your steps i have installed it …but i don’t know how to update my PC time;I star NTP server and monitor NTP server,i can see NTP stauts….I set a wrong time on my PC ,My PC time doesn’t update the corrcet time.

  11. could you suggest me some nice GPS softwares.. I planning install one in my car..

  12. mahmoud eladawy

    October 6, 2015 at 9:21 am

    I had similar problem to open abaqus from grid computer and my problem got solved with -mesa flag, abaqus cae -mesa, but the display is very slow, each movement takes ages to load on the screen. I have NVIDIA card. Is there any thing we can do to improve the display loading on the screen. شركة نقل عفش بالرياض

  13. It is a technical article which defines some high level of technical things about Installing and Using NTP with a Garmin 18 GPS (with PPS). Very useful for me…
    create facebook apps

  14. This is such a brave step by installing & using NTP with a Garmin 18 GPS. I really like to read and research the new technological things.

  15. This is a very important update & thanks for mentioning the whole procedure. Also I have thankful to Mr. David Hart & Mr. David Taylor that they done a fantastic job.

  16. I have not tried it and I personally have not looked through the code to see if it is supported. David Hart has posted his source code. That would be a place to start.شركة تنظيف بالرياض

  17. Provide you with Al Rayan high quality living accommodation deal and superior performance in the arts of hygiene in respect of places public and private First: places special Kalqsour, villas, apartments, kitchens and offices as cleaning floors, walls and washing of carpets and rugs and cleaning Alantreat and Rushd pesticides to combat insects and liposuction unpleasant odors The company offers special offers for Tndev villas and palaces progress the company’s comprehensive program of cleaning and control at the highest level and the latest equipment and the best workers trained well on the means to help the cleanliness of all places, even small ones, and difficult to access and that accompanied supervisors specialists to follow up the work line and delivered in the best quality شركة تنظيف بالرياض

  18. This is such a brave step by installing & using NTP with a Garmin 18 GPS. I really like to read and research the new technological things.

  19. This is such a brave step by installing & using NTP with a Garmin 18 GPS. I really like to read and research the new technological

  20. hard to find. Do you have any results

  21. it is a nice site i hope i visit it again

Leave a Reply

Your email address will not be published.

© 2016 Jeremy W. Langston

Theme by Anders NorenUp ↑