Bug #10327
closedFix/Update GPS initialization commands for Garmin devices.
100%
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.
Updated by Christian Borchert over 4 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
$PGRMC,,,,,,,,,,3,,2,9*5F
$PGRMC1,,1,,,,,,W,,,,,,,*30
$PGRMO,,4*73
$PGRMO,GPRMC,0*3C
$PGRMO,GPGGA,1*20
$PGRMO,GPGSA,0*35
$PGRMO,GPGSV,0*22
$PGRMO,PGRMT,0*2B
$PGRMO,PGRMF,0*39
Updated by Manuel Piovan over 4 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
Updated by Manuel Piovan over 4 years ago
Updated by Jim Pingle over 4 years ago
- Status changed from New to Pull Request Review
- Target version set to 2.5.0
Updated by Renato Botelho over 4 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!
Updated by Anonymous almost 4 years ago
- Status changed from Feedback to Resolved