• Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Search
  • Register
  • Login
Netgate Discussion Forum
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Search
  • Register
  • Login

NTP GPS-Problem II

Scheduled Pinned Locked Moved Problems Installing or Upgrading pfSense Software
19 Posts 6 Posters 4.6k Views
Loading More Posts
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • M
    masterd01
    last edited by Feb 25, 2015, 9:52 AM

    Hello,

    i've posted this Problem in the old-topic.

    https://forum.pfsense.org/index.php?topic=86637.0

    The Problem is still existing and confusing me.
    I changed the Fudge time 2 to "0.323". Than the GPS-Time is for a long Time stable. It start's at 3 AM every Night that the GPS Source is used as stable:

    Feb 25 03:05:53 ntpd[45400]: GPS_NMEA(0) 911a 8a sys_peer

    But after about 6 till 12 Hours or erlier the Time falls Back to the NTP-Internet-Source. After that the GPS is toggling between NTP-Internet-Source and Satellite.

    Feb 25 09:36:43 ntpd[45400]: GPS_NMEA(0) 911a 8a sys_peer
    Feb 25 09:36:00 ntpd[45400]: 192.53.103.108 941a 8a sys_peer
    Feb 25 09:35:14 ntpd[45400]: GPS_NMEA(0) 911a 8a sys_peer
    Feb 25 09:34:58 ntpd[45400]: 192.53.103.108 941a 8a sys_peer
    Feb 25 09:32:24 ntpd[45400]: GPS_NMEA(0) 911a 8a sys_peer
    Feb 25 09:31:57 ntpd[45400]: 192.53.103.108 941a 8a sys_peer

    and so on …
    It happen every night. On 3 AM the Time get's syncted and stay. Not always on the same time ...
    What's wrong with my config and why does it always gets stable on the night and after a day it fall again?

    Thanks a lot for your great support,

    MasterD

    1 Reply Last reply Reply Quote 0
    • H
      Hugovsky
      last edited by Feb 25, 2015, 10:17 AM

      What gps hardware are you using? GPS precision tends to vary during the day.

      1 Reply Last reply Reply Quote 0
      • M
        masterd01
        last edited by Feb 25, 2015, 11:40 AM

        Hi Hugovsky,

        i use a Trimble Acutime 2000

        1 Reply Last reply Reply Quote 0
        • H
          Hugovsky
          last edited by Feb 25, 2015, 2:40 PM

          Well, you have PPS. Are you using it? Maybe your fudge time is set too low. Can you show me your ntp stats?

          1 Reply Last reply Reply Quote 0
          • M
            masterd01
            last edited by Mar 3, 2015, 8:20 AM

            Hi Hugovsky,

            i don't know what happen here. I think my knowing of the NTP/GPS is too small to explain the things :-)
            For some hours the GPS is stable, after a time it flows away.
            I made some Screenshots. Could you do something with it?

            At all: How do i set the Fudge-Time (1/2) correctly? I don't know what is here set (correctly).

            Thanks a lot.

            ntp1.JPG
            ntp1.JPG_thumb
            ntp2.JPG
            ntp2.JPG_thumb
            ntp3.JPG
            ntp3.JPG_thumb

            1 Reply Last reply Reply Quote 0
            • S
              stephenw10 Netgate Administrator
              last edited by Mar 3, 2015, 9:48 AM

              The jitter seems high for a PPS source, is it connected correctly?

              Steve

              1 Reply Last reply Reply Quote 0
              • M
                masterd01
                last edited by Mar 3, 2015, 10:20 AM

                At this Time the Jitter is at  0.636.
                The PPS is connected via RS232 (COM-Box) to the Server. Is a longer Cable (about 10 Meters). But i also changed the Cable.

                Sould there also be a wrong config on the Trimble?

                1 Reply Last reply Reply Quote 0
                • F
                  fragged
                  last edited by Mar 3, 2015, 11:48 AM

                  .PPS. should be listed in refid's like so:

                  
                       remote           refid      st t when poll reach   delay   offset  jitter
                  ==============================================================================
                  oPPS(0)          .PPS.            0 l    8   16  377    0.000    0.000   0.002
                  *SHM(0)          .GPS.            0 l    7   16  377    0.000   -7.916   2.636
                  
                  
                  1 Reply Last reply Reply Quote 0
                  • M
                    masterd01
                    last edited by Mar 3, 2015, 1:56 PM

                    Now i disabled "GPS" and set to "PPS". It worked for about one hour. Than the PPS is marked als False Ticker:

                         remote           refid      st t when poll reach   delay   offset  jitter
                    ==============================================================================
                    xPPS(0)          .PPS.            0 l    1   16  377    0.000   -0.759   0.843
                     ptbtime1.ptb.de .PTB.            1 u    7   64  377    9.599  -19.061  27.731
                    *ptbtime2.ptb.de .PTB.            1 u   25   64  377    9.138  -18.750  16.145
                    +ptbtime3.ptb.de .PTB.            1 u   19   64  377    9.252  -19.350  13.386
                    +ntp0.rrze.uni-e .GPS.            1 u    1   64  377   14.715  -21.358   0.387
                    +ntp1.rrze.uni-e .DCFp.           1 u   20   64  377   13.880  -20.981   0.314
                    +ntp2.rrze.uni-e .GPS.            1 u    2   64  377   14.594  -21.438   0.433
                    +ntp3.rrze.uni-e .PZF.            1 u   19   64  377   13.902  -21.060   0.454
                    
                    

                    Here is the Screen from my settings …

                    ntp4.JPG
                    ntp4.JPG_thumb

                    1 Reply Last reply Reply Quote 0
                    • M
                      masterd01
                      last edited by Mar 4, 2015, 9:48 AM

                      I switched back to the "GPS"-Settings because the False Ticker stays on every setting. Now this looks still good. But how long?
                      I think at 2 pm it will began to toggle.

                           remote           refid      st t when poll reach   delay   offset  jitter
                      ==============================================================================
                      oGPS_NMEA(0)     .GPS.            0 l    9   16  377    0.000   -0.482   3.705
                      *ptbtime1.ptb.de .PTB.            1 u   57   64  377    9.148   -3.977   0.782
                      +ptbtime2.ptb.de .PTB.            1 u   64   64  377    9.283   -4.149   0.861
                      +ptbtime3.ptb.de .PTB.            1 u   57   64  377    9.094   -3.777   0.613
                       ntp0.rrze.uni-e .GPS.            1 u   61   64  377   14.702   -4.417   1.525
                       ntp1.rrze.uni-e .DCFp.           1 u   56   64  377   13.906   -3.877   1.552
                       ntp2.rrze.uni-e .GPS.            1 u   57   64  377   14.560   -5.337   0.708
                       ntp3.rrze.uni-e .PZF.            1 u   59   64  377   13.931   -4.842   0.722
                      
                      

                      Could somebody tell me some good Settings for the Side "GPS" or what i should enter to make my Trimble Acutime 2000 work.

                      Thanks :-)

                      1 Reply Last reply Reply Quote 0
                      • S
                        stephenw10 Netgate Administrator
                        last edited by Mar 4, 2015, 11:38 AM

                        The jitter on a PPS source should be very low. Like in fragged's output above, 0.002ms. Very low! Do you have good satellite coverage?

                        However I was able to get my GPS to stay as the consistent best source and it's USB connected, no PPS. You just have to set the offset close enough so it doesn't appear to be too far from the other sources. You have to use fudge time 2 if you're not using PPS.

                        Steve

                        1 Reply Last reply Reply Quote 0
                        • F
                          fragged
                          last edited by Mar 4, 2015, 12:18 PM

                          Can't you enable both GPS and PPS on pfSense? That's how my RaspberryPi is set up and it always picks the PPS as used source over GPS. GPS has multitudes higher jitter than PPS.

                          1 Reply Last reply Reply Quote 0
                          • S
                            stephenw10 Netgate Administrator
                            last edited by Mar 4, 2015, 12:45 PM

                            Good point, you seem to be enabling it as just a PPS source. I'm pretty sure (though I can't test) that you can enable PPS on the serial GPS tab to get both.

                            Just plugged mine back again and it's working great.  :) The google maps link is disturbingly accurate!

                            Steve

                            ntp_gps_status2.png
                            ntp_gps_status2.png_thumb

                            1 Reply Last reply Reply Quote 0
                            • C
                              charliem
                              last edited by Mar 6, 2015, 6:29 AM

                              @masterd01:

                              At all: How do i set the Fudge-Time (1/2) correctly? I don't know what is here set (correctly).

                              There is almost no reason to ever adjust fudge time 1 with the NMEA driver: that refers to an offset of the PPS signal, such as with an antenna delay.  Best to leave it undefined, defaulted to zero.  If you are not using the PPS feature of the NMEA driver, this has no effect (ie, you have a serial port USB converter talking to the GPS unit).

                              Fudge time 2 is what you want to use with the NMEA driver: it accounts for the length of time to transmit the serial sentence, and an offset of the NMEA sentence.  It is not that critical when you combine it with PPS, you just need to get the timestamp 'close' to the PPS signal, usually within about 400 mS.

                              To clarify, within pfSense the 'Serial GPS' tab refers to the NMEA driver with ntp, ie, #20, or server 127.127.20.n.  The 'PPS' tab within pfSense is confusing at first glance in that it refers to a completely different ntp driver, #22 or 127.127.22.n, aka the 'atom' driver.  The atom driver has no ability of getting time other than watching for a PPS signal, it still needs an internet connection or a NMEA sentence to get the right time & date.  The atom driver is usually used for clocks that only have a PPS outout and don't have a NMEA sentence, like some radio clocks or lab cesium or rhubidium reference clocks.  This is explained in the help paragraph on the PPS tab.

                              It's recommended by most tutorials to use PPS with the NMEA driver, rather than with the atom driver.  That should really be the recommended configuration withing pfSense.  To do that, simply enable PPS and PPS kernel discipline on the 'Serial GPS' tab in pfSense, and leave the "PPS" tab completely un-configured.

                              1 Reply Last reply Reply Quote 0
                              • M
                                masterd01
                                last edited by Mar 16, 2015, 2:02 PM

                                Hi Guys,

                                big thanks for the explain here. @charliem: Also big Thanks to you. Now i understand a bit more.
                                I activated on your advice the Serial GPS Configuration. GPS is set to "Gerneric".
                                I leave the Fudge time 1 empty, also the "Fudge time 2" for testing.
                                I set "NTP should prefer this clock", "Enable PPS signal processing" and "Enable kernel PPS clock".

                                At this time the PPS-Source is set to false ticker. Is it correct that i now had to "tune" with Fudge2?
                                On my Test 0.400 also goes to false ticker.

                                Greetings

                                ntp5.png
                                ntp5.png_thumb

                                1 Reply Last reply Reply Quote 0
                                • C
                                  charliem
                                  last edited by Mar 16, 2015, 9:05 PM Mar 16, 2015, 4:01 PM

                                  @masterd01:

                                  i use a Trimble Acutime 2000

                                  This is a great system, but will take some work to get PPS delivered to the pfSense box.  It's not a simple plug & play like some other GPS units with PPS, it has special firmware for accurate timing.  There are also a large number of configuration settings that you need to check, like using NMEA output rather than TSIP (a binary protocol from Trimble).  If you don't already have it, grab the trimble "GPS Studio" windows program; it will allow you to check out and set up the unit properly (near the bottom of this page: http://www.trimble.com/timing/resolution-t.aspx)

                                  I have not used one off these, but I did find a full manual here: www.cubinlab.ee.unimelb.edu.au/probing/Acutime2000.pdf

                                  Assuming you have a 'synchronization interface module' box, as shown on p 33 of that guide.  Inputs are power and 12-pin connector to the external dome antenna/GPS unit.  Outputs are RS-232 port A, RS-232 port B, and PPS (looks like a BNC output for PPS).  So, it looks like you do not have PPS going to your pfSense box unfortunately.

                                  You may be able to hack the PPS from the BNC into the 9-pin connector for the serial port (Pin-1, I think).  Be careful though as PPS is a differential signal driven by the RS-422 from the GPS unit.  Maybe get a hardware hacker buddy to help with this part ….

                                  Finally, be sure you go to a real serial port on your pfSense machine, the PPS signal will not work with a USB serial port adapter.

                                  [Edit] You may be able to get quite good time accuracy (20 uS) even without using PPS.  NTPD can use the native TSIP protocol rather than NMEA.  Not as good as NMEA+PPS, but much much improved over NMEA w/o PPS, and no soldering involved!

                                  To try this, you would need to modify /var/etc/ntpd.conf to use the 'Trimble Palisades' refclock driver, number 29, rather than the NMEA GPS number 20.  See https://www.eecis.udel.edu/~mills/ntp/html/drivers/driver29.html for details.  If it works you would need to modify /etc/inc/system.inc to make the changes permanent (until the next upgrade).

                                  1 Reply Last reply Reply Quote 0
                                  • S
                                    stephenw10 Netgate Administrator
                                    last edited by Mar 16, 2015, 4:03 PM

                                    Yes. Work out the difference in offset between the active peer and your GPS source and add it to Fudge time 2. So ~0.3 in your case.
                                    The jitter is still too high though, PPS isn't working.

                                    Steve

                                    1 Reply Last reply Reply Quote 0
                                    • K
                                      kevinsystorm89
                                      last edited by Feb 12, 2018, 9:49 AM

                                      Can't you enable both GPS and PPS on pfSense? That's how my RaspberryPi is set up and it always picks the PPS as used source over GPS. GPS has multitudes higher jitter than PPS.

                                      You can get your IBAN number through here: Access your online account (direct to individuals) where your IBAN number appears in the statement of account along with your old account number.

                                      1 Reply Last reply Reply Quote 0
                                      • S
                                        stephenw10 Netgate Administrator
                                        last edited by Feb 16, 2018, 1:47 AM

                                        Yes you can.

                                        The issue with most USB connected GPS devices though is that they don't provide the PPS signal. And yes USB connected GPS as a time source is bad….very bad! But also fun.  ;)

                                        Steve

                                        1 Reply Last reply Reply Quote 0
                                        • First post
                                          Last post
                                        Copyright 2025 Rubicon Communications LLC (Netgate). All rights reserved.
                                          This community forum collects and processes your personal information.
                                          consent.not_received