Bug #10327


Fix/Update GPS initialization commands for Garmin devices.

Added by Grimson Gretzleburg about 2 years ago. Updated over 1 year ago.

Target version:
Start date:
Due date:
% Done:


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


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: [[]] and [[]]

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:


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


With those init commands I have it working quite stable.

Actions #1

Updated by Christian Borchert about 2 years ago

I have found the same issue in my use of the Garmin 18x LVC on pfSense.

In my opinion it would be preferable to select NMEA sentences from a list and the pulse width from a text box - as opposed to manually providing the PGRMC and PGRMO lines.

I believe on a Garmin device the PGRMF sentence is preferred over GPRMC due to the leap second field.

Also - the GPGGA sentence also has the UTC time field, it's the only sentence I use on my setup

Actions #2

Updated by Manuel Piovan about 2 years ago

i partially agree with this
the default now is
$PGRMC,,,,,,,,,,3,,2,8*5E <-- NMEA Baud rate = 4800, pps on, For GPS 18x the max settings is 8 (for LVC is 48)
$PGRMC1,,1,,,,,,W,,,,,,,*30 <-- Binary OutputData Off + WAAS
$PGRMO,,3*74 <-- enable all sentences
$PGRMO,GPRMC,1*3D <-- enable GPRMC
$PGRMO,GPGGA,1*20 <-- enable GPGGA
$PGRMO,GPGLL,1*26 <-- enable GPGLL

the only thing i would change is
from $PGRMO,,3*74 to $PGRMO,,2*75 (from enable all to disable all) as we are already activating sentences on the next 3 lines

from what i can see the default for every "gps type" is to activate RMC,GGA,GLL and ZDA/ZDG, (+sat view when available) and then you select what ntp should listen for from the menu "NMEA Sentences"
of course there are situation were it's best to deactivate some sentences and that is why there is an advanced menu where you can put GPS Initialization of your choice,
changing the initialization now it means that the menu "NMEA Sentences" will stop functioning and possibly misconfigure ntp if you select something wrong.
as a standart initialization to make it work out of the box seems good to me and people interested in better adjusting his own gps should read about it on the forum

Actions #4

Updated by Jim Pingle about 2 years ago

  • Status changed from New to Pull Request Review
  • Target version set to 2.5.0
Actions #5

Updated by Renato Botelho about 2 years ago

  • Status changed from Pull Request Review to Feedback
  • Assignee set to Renato Botelho
  • % Done changed from 0 to 100

PR has been merged. Thanks!

Actions #6

Updated by Anonymous over 1 year ago

  • Status changed from Feedback to Resolved

Also available in: Atom PDF