Project

General

Profile

Actions

Bug #10327

closed

Fix/Update GPS initialization commands for Garmin devices.

Added by Grimson Gretzleburg about 4 years ago. Updated over 3 years ago.

Status:
Resolved
Priority:
Low
Category:
NTPD
Target version:
Start date:
03/09/2020
Due date:
% Done:

100%

Estimated time:
Plus Target Version:
Release Notes:
Affected Version:
2.4.5
Affected Architecture:
All

Description

I'm currently using a Garmin GPS 18x LVC receiver (FW 4.40), with PPS connected, as a reference clock for NTP on the 2.4.5 RC of pfSense.

I noticed that with the "Garmin" defaults in pfSense it wasn't working too great, there was quite some jitter and NTPD often would fallback to internet peers for synchronization.

After taking a closer look at the initialization commands and doing some research on the net I found an issue and an improvement for these.

References: [[http://static.garmin.com/pumac/GPS_18x_Tech_Specs.pdf]] and [[http://support.ntp.org/bin/view/Support/ConfiguringNMEARefclocks#Section_6.1.12.2.]]

First the big issue:

This command is wrong: "$PGRMO,,3" it should disable all NMEA output sentences. But the "3" means enable all output sentences, look at the GPS 18x Tech Specs linked above. The correct command would be "$PGRMO,,2"

This caused a lot of chatter on the serial bus which did mess up the timing for the PPS signal.

Additionally it is recommended to only use the GPRMC sentence with a PPS pulse width of about 100 ms. So I found the following init commands worked best for the GPS 18x LVC:

$PGRMC,,,,,,,,,,3,,2,4*52
$PGRMC1,,1,,,,,,W,,,,,,,*30
$PGRMO,,2*75
$PGRMO,GPRMC,1*3D

If you want to see how many satellites are in use you can add the GPGGA sentence to it:

$PGRMC,,,,,,,,,,3,,2,4*52
$PGRMC1,,1,,,,,,W,,,,,,,*30
$PGRMO,,2*75
$PGRMO,GPRMC,1*3D
$PGRMO,GPGGA,1*20

With those init commands I have it working quite stable.

Actions

Also available in: Atom PDF