NTP clock driver for Garmin GPS handheld receivers using the Garmin proprietary protocol. It is based on both documented and undocumented aspects of the Garmin proprietary protocol.
To use this driver, your Garmin GPS handheld receiver must be configured to use Garmin protocol interface mode, not NMEA.
This driver has been written and tested using a Linux based system. To achieve the best quality results, turn off serial port FIFOs and enable low latency tty driver processing. In Linux, this is accomplished using the setserial application (e.g. setserial /dev/gpsu uart 16550 low_latency). Even better results are obtained with kernel timestamps on received characters. This is what I have been using for most of my tests.
This is a "sloppy" clock but I believe it is possible to recover sub-millisecond results with a good clock filter. Without an accurate reference clock, I am unable to provide more quantitative performance results at this time (sample loopstats).
I suspect that earlier versions of firmware may not return the undisciplined oscillator count as part of a date/time response. This information is needed to recover the higher accuracy results. Without this undocumented field, the driver will only achieve sub-second accuracy. I welcome technical support from the manufacturer to achieve universal support for the entire range of models and firmware versions.
This driver has been testing with the following units. I need feedback from users to populate this list! Check for updates to this list, driver, and other related software at at NTP Drivers for Garmin GPS Handheld Receivers
The following patch was created against the ntp-4.2.0a+stable Debian package that is part of the Debian 3.1 release (Sarge).
In this version, the Garmin GPS driver is clock type 45 (Driver
Version 1.4).
ntp-4.2.0a-garmin.patch (patch file only)
Here is the steps to create Debian ntp packages with the patch:
In these versions, the Garmin GPS driver is clock type 40 (Driver
Version 1.3).
ntp-4.1.1-garmin.patch (patch file only)
ntp-4.1.0-garmin.patch (patch file only)
ntp-4.0.99m-rc3-garmin.patch (patch file only)
ntp-4.0.99k23-garmin.patch (patch file only)
In this version, the Garmin GPS driver is clock type 38 (Driver
Version 1.2).
ntp-4.0.99k-garmin.patch (patch file only)
Patch for ntp3-5.93 distribution. Turn on flag1 for averaging of the samples that pass the recursive median filter. This averaging is done by default in the ntp4 daemon.
In this version, the Garmin GPS driver is clock type 38 (Driver
Version 1.2).
xntp3-5.93-garmin.patch (patch file only)
Version 1.4 of the refclock_garmin driver sets the unitptr to NULL
when the device is closed.
refclock_garmin.c-1.4
Version 1.3 of the refclock_garmin driver file fixes 64 bit issues.
I have it running on a DEC Alpha now.
refclock_garmin.c-1.3
Version 1.2 of the refclock_garmin driver file that attempts to
be compatible with more Garmin models in the lower accuracy mode and
switches to a higher accuracy mode if it detects the features seen on
the Garmin GPS 12 firmware version 4.54. Thanks to Joe Stella for his
help in resolving this problem and testing the solution.
refclock_garmin.c-1.2
Version 1.1 of the refclock_garmin driver file with a bug fix for
double precision alignment on big endian RISC processors (i.e. SPARC).
Thanks to Jeff Woolsey for his help in resolving this problem and testing
the solution.
refclock_garmin.c-1.1
Version 1.0 of the refclock_garmin driver file.
refclock_garmin.c-1.0
A standalone test application that implements the functionality of the
NTP driver. This is useful for analyzing how other models and firmware
versions behave.
testapp.tar.gz
kernel serial port timestamp module for Linux
serial.tar.gz