NTP PPS with Navisys GR-701W USB GPS?
-
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?
-
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). -
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!
-
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
-
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

 -
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. -
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.
-
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.
-
@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…
-
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.
-
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.
-
I run a Sure GPS serial module with an extrernal GPS antenna, runs smooth for about 4 years now on my pfSense box.