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

    NTP PPS with Navisys GR-701W USB GPS?

    Scheduled Pinned Locked Moved General pfSense Questions
    12 Posts 7 Posters 3.9k 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.
    • royce.williamsR
      royce.williams
      last edited by

      tl;dr: How do you get PPS working on Navisys GR-701W USB GPS receivers for NTP with pfSense 2.3.1-RELEASE-p1 ?

      This is the model family I'm using:

      http://www.navisys.com.tw/products/GPS&GNSS_%20receivers/flyer/GR-701_flyer-150703.pdf

      Most USB-based GPSes aren't good for a stratum 1 NTP server, but the GR-601W, GR-701W, and GR-801W (note the "W" suffix) are different. Eric Raymond worked directly with Navisys to offer the "W" models with the "Macx-1" modification that feeds PPS over the USB-to-serial on DCD.

      These GPSes use the U-Blox chips (u-blox-6, u-blox-7, and u-blox 8, respectively) that are better at handling weak signals, and useful for indoor use.  They were previously hard to get in the US, but Mark Atwood bought a big order of the GR-601W and is selling them affordably (not affiliated, just a fan):

      https://www.etsy.com/listing/280336400/navisys-gr-601w-u-blox-6-macx-1-usb-gnss

      I've got proof of concept on a Raspberry Pi 2:

           remote           refid      st t when poll reach   delay   offset  jitter
      ==============================================================================
      -SHM(0)          .GPS.            0 l   39   64  377    0.000    1.501   0.491
      *SHM(1)          .PPS.            0 l   37   64  377    0.000    0.204   0.257
      +tock.usshc.com  .GPS.            1 u    7   64  377   84.946    0.741   0.261
      -clock.isc.org   .GPS.            1 u   15   64  377   56.390   -1.739   0.419
      -tick.apple.com  .GPS.            1 u   14   64  377   58.475    3.925 146.519
      +clock.sjc.he.ne .CDMA.           1 u   15   64  377   53.015    1.973   0.831
      
      

      On the Pi, I had to enable the pps_ldisc kernel module for the PPS to be detected.

      I'm now trying to make it work on my pfSense system. I'm using the U-Blox Serial GPS NTP profile, the cuaU0 USB serial device, and 9600 baud.  The GPS portion is working fine, but I never hear anything from the PPS:

           remote           refid      st t when poll reach   delay   offset  jitter
      ==============================================================================
      PPS(0)          .PPS.            0 l    -   16    0    0.000    0.000   0.000
      xGPS_NMEA(0)     .GPS.            0 l   13   16  377    0.000  145.069   8.832
      -ha2.smatwebdesi 130.207.244.240  2 u   36   64    7   80.379  -35.455   2.032
      +l0-cr10.nwc.acs 204.123.2.5      2 u   37   64    7    5.744  -32.839   2.085
      -jikan.ae7.st    166.70.136.41    2 u   32   64    7   55.920  -34.104   3.218
      *clock.sjc.he.ne .CDMA.           1 u  104   64    6   53.455  -29.355   1.224
      +64.71.128.26 (1 216.218.254.202  2 u   36   64    7   52.536  -32.494   2.584
      

      Otherwise, on both Serial GPS and PPS tabs, I have only the defaults checked.

      Any ideas?

      1 Reply Last reply Reply Quote 0
      • royce.williamsR
        royce.williams
        last edited by

        Found it:

        [2.3.1-RELEASE][admin@pfsense]/root: sysctl hw.usb.ucom.pps_mode=2
        hw.usb.ucom.pps_mode: 0 -> 2
        [2.3.1-RELEASE][admin@pfsense]/root: ntpq -p | head -4
             remote           refid      st t when poll reach   delay   offset  jitter
        ==============================================================================
        xPPS(0)          .PPS.            0 l    3   16    1    0.000  -103.79   0.000
        oGPS_NMEA(0)     .GPS.            0 l    2   16  377    0.000  -10.462  11.618
        

        Persist that sysctl and you're up and running!

        I figured it out by looking for 'pps' in the output of sysctl -a, where I saw this:

        hw.usb.ucom.pps_mode: 0
        dev.uart.1.pps_mode: 2
        dev.uart.0.pps_mode: 2
        
        

        … and this commit documents it: https://lists.freebsd.org/pipermail/svn-src-head/2015-August/075186.html

        The following capture modes are available:
        0  Capture disabled.
        1  Capture pulses on the CTS line.
        2  Capture pulses on the DCD line (default).

        1 Reply Last reply Reply Quote 0
        • K
          kapara
          last edited by

          Looking to use GPS for NTP but difficult to find any out of the box USB solutions available.  I checked some of the links but none available.  Any advice would be great!

          Skype ID:  Marinhd

          1 Reply Last reply Reply Quote 0
          • royce.williamsR
            royce.williams
            last edited by

            Mark doesn't sell the 601 anymore, but he does have the 701:

            https://www.etsy.com/listing/501829632/navisys-gr-701w-u-blox-7-usb-pps-gpsqzss

            1 Reply Last reply Reply Quote 0
            • D
              dweimer
              last edited by

              I don't suppose you can share the settings that you used on the NTP pages of the GUI? I have one of these, and can't get it to report a valid time. I just get a false ticker status on PPS. I can move it over to my Debian Linux server that runs my NVR application and with GPSD I get valid results so I know the GPS is working correctly. But I have tried every combination of settings I can think of with no luck on the pfSense system.

              # sysctl -a | grep pps
              kern.ntp_pll.pps_freq: 249073072340992
              kern.ntp_pll.pps_shift: 6
              kern.ntp_pll.pps_shiftmax: 8
              kern.features.pps_sync: 1
              net.inet6.icmp6.errppslimit: 100
              hw.usb.ucom.pps_mode: 2
              dev.uart.0.pps_mode: 2
              
              

              ![2018-01-04 17_28_46-pfSense.dweimer.local - Status_ NTP.png_thumb](/public/imported_attachments/1/2018-01-04 17_28_46-pfSense.dweimer.local - Status_ NTP.png_thumb)
              ![2018-01-04 17_28_46-pfSense.dweimer.local - Status_ NTP.png](/public/imported_attachments/1/2018-01-04 17_28_46-pfSense.dweimer.local - Status_ NTP.png)

              1 Reply Last reply Reply Quote 0
              • R
                robi
                last edited by

                @kapara:

                Looking to use GPS for NTP but difficult to find any out of the box USB solutions available.  I checked some of the links but none available.  Any advice would be great!

                You can't use any USB GPS device for PPS signalling. USB protocol has a lot of jitter by design, your PPS will be unstable. Any USB-based GPS offering PPS signal is simply lying.
                If you want PPS precision, you must use a serial port GPS module.

                1 Reply Last reply Reply Quote 0
                • royce.williamsR
                  royce.williams
                  last edited by

                  @robi:

                  You can't use any USB GPS device for PPS signalling. USB protocol has a lot of jitter by design, your PPS will be unstable. Any USB-based GPS offering PPS signal is simply lying.
                  If you want PPS precision, you must use a serial port GPS module.

                  This is usually correct, but there is one notable exception, as I said upthread:

                  Most USB-based GPSes aren't good for a stratum 1 NTP server, but the GR-601W, GR-701W, and GR-801W (note the "W" suffix) are different. Eric Raymond worked directly with Navisys to offer the "W" models with the "Macx-1" modification that feeds PPS over the USB-to-serial on DCD.

                  This design works quite well. GPS adds roughly accurate time, and the PPS over DCD adds metronome-like precise time to which the GPS time can be aligned.

                  I've followed these (non-pfSense) instructions with great success on a Raspberry Pi:

                  https://www.ntpsec.org/white-papers/stratum-1-microserver-howto/

                  I haven't revisited this on the pfSense side in a while, and I think my current setup has the same problem that dweimer mentioned, so it may be time to revisit it.

                  1 Reply Last reply Reply Quote 0
                  • J
                    jclear
                    last edited by

                    Just making the PPS available as DCD doesn't overcome the limitations of the USB architecture which sits between the UART and the CPU.  From the PDF you cite: "time precision will be limited by the USB polling interval, usually 0.5 millisecond".    So while you can get the PPS signal, the jitter is horrible.

                    1 Reply Last reply Reply Quote 0
                    • R
                      robi
                      last edited by

                      @Jed:

                      Just making the PPS available as DCD doesn't overcome the limitations of the USB architecture which sits between the UART and the CPU.  From the PDF you cite: "time precision will be limited by the USB polling interval, usually 0.5 millisecond".    So while you can get the PPS signal, the jitter is horrible.

                      Exactly.  8) It doesn't worth the effort, you're way better with public Stratum1 NTP servers from the Internet with real PPS sources, they will be more precise, no wonders your USB-based PPS source will be false sooner or later…

                      1 Reply Last reply Reply Quote 0
                      • Q
                        q54e3w
                        last edited by

                        I tried USB timing with PPS as per Royce's instructions and it does indeed work when connected directly to pfSense, but its a poor imitation of a true serial connection. However, it is better than internet only sources so depending on your remoteness/connectivity/paranoia, it may be a worthwhile option. Here's a comparison of my serial vs USB - note the difference in y axis scale.

                        serial-pps.png
                        serial-pps.png_thumb
                        usb-pps.png
                        usb-pps.png_thumb

                        1 Reply Last reply Reply Quote 0
                        • B
                          briand095
                          last edited by

                          I run a rPi NTP server on my network and a Garmin 18x LVC connected to my pfSense box (serial), does what I need, and seems reliable. Other than some funky message in the NTP log with the Garmin that I really can't find any info on, all is smooth.

                          1 Reply Last reply Reply Quote 0
                          • R
                            robi
                            last edited by

                            I run a Sure GPS serial module with an extrernal GPS antenna, runs smooth for about 4 years now on my pfSense box.

                            1 Reply Last reply Reply Quote 0
                            • First post
                              Last post
                            Copyright 2025 Rubicon Communications LLC (Netgate). All rights reserved.