Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
docs:user-guide:ntp.gps [2017/09/01 08:46] – ↷ Page moved from docs:howto:ntp.gps to docs:user-guide:ntp.gps bobafetthotmaildocs:guide-user:services:ntp:gps [2021/11/05 12:58] (current) – [VK-172 USB GPS] /etc/ntpd.conf not respected by ntpd in 21.02.0, hence solution from OpenWrt forum added instead tmomas
Line 2: Line 2:
  
 **The main question is:** How to feed GPS time to ntpd? **The main question is:** How to feed GPS time to ntpd?
 +
 +<WRAP center round important 60%>
 +There is significant delay in the serial-to-usb and usb-to-data connection. This approach may be off by hundreds of milliseconds. Most GPS-sync is done through GPIO interrupts off the PPS output directly.
 +</WRAP>
 +
 +
 +Please realize that connecting a consumer-grade (designed for location, not for time keeping) GPS unit over USB serial does not have the accuracy of "proper" GPS synchronization due to significant and inconsistent delays in the serial line itself, as well as in the USB system. Your notion of time will likely be delayed by tens of milliseconds if not hundreds of milliseconds. Any such-configured NTP server certainly can serve as a backup for local timekeeping when Internet connectivity is not available, **//but should never be advertised on the Internet as a Stratum 1 clock.//**
 +
 +Proper GPS synchronization uses a PPS output (or similar) from the device, fed directly into an interrupt-generating line, for example a GPIO or parallel port. A GPSDO (GPS Disciplined Oscillator) is typically used which locks a temperature-compensated oscillator to the GPS time and provides a stable, reliable reference.
 +
  
 Below you find examples for some devices users have successfully got to run with LEDE. Depending on your special USB GPS dongle, you have to follow the one or the other instruction. If you get some other GPS device to work, please add a short howto to this page. Below you find examples for some devices users have successfully got to run with LEDE. Depending on your special USB GPS dongle, you have to follow the one or the other instruction. If you get some other GPS device to work, please add a short howto to this page.
Line 7: Line 17:
 ===== VK-172 USB GPS ===== ===== VK-172 USB GPS =====
  
-  * Source: [[https://forum.lede-project.org/t/lede-as-stratum-1-ntp-server-using-usb-gps/1997]]+  * Source: [[https://forum.openwrt.org/t/lede-as-stratum-1-ntp-server-using-usb-gps/1997]]
   * Source: [[https://forum.openwrt.org/viewtopic.php?id=61161]]\\   * Source: [[https://forum.openwrt.org/viewtopic.php?id=61161]]\\
   * See also [[docs:ntpd|ntpd]]   * See also [[docs:ntpd|ntpd]]
Line 32: Line 42:
     option enabled          "true"     option enabled          "true"
 </code> Set ''listen_globally'' to true to enable remote access to gpsd. If remote access is not desired, set to false. </code> Set ''listen_globally'' to true to enable remote access to gpsd. If remote access is not desired, set to false.
-  - Add this to ''/etc/ntpd.conf'':\\ <code> +  - edit ''/etc/init.d/ntpd'' and add the marked lines ((https://forum.openwrt.org/t/lede-as-stratum-1-ntp-server-using-usb-gps/1997/22?u=tmomas)):<code> 
-# GPS +[...] 
-server 127.127.28.0 minpoll 4 prefer +        emit "\n# No limits for local monitoring" 
-fudge 127.127.28.0 refid GPS +        emit "restrict 127.0.0.1" 
-</code> [[http://doc.ntp.org/4.2.8p6/drivers/driver28.html|Config options and fudge factors]]+        emit "restrict -6 ::1\n" 
 + 
 +        emit "\n# GPS                               <--- add this line 
 +        emit "server 127.127.28.0 minpoll 4 prefer  <--- add this line 
 +        emit "fudge 127.127.28.0 refid GPS\n"         <--- add this line 
 +[...
 +</code>
   - Disable sysntpd\\ <code>   - Disable sysntpd\\ <code>
 /etc/init.d/sysntpd stop /etc/init.d/sysntpd stop
Line 62: Line 78:
 ===== Globalsat USB GPS ===== ===== Globalsat USB GPS =====
  
-Source: [[https://forum.lede-project.org/t/lede-as-stratum-1-ntp-server-using-usb-gps/1997]]+Source: [[https://forum.openwrt.org/t/lede-as-stratum-1-ntp-server-using-usb-gps/1997]]
  
 **Globalsat BU-353** USB GPS receiver originally used the SiRF Star III chipset, now also available with the SiRF Star IV chipset which offers enhanced performance (BU-353-S4 variant). Both versions use the Prolific PL2303 serial/USB chipset. This howto was tested with the original version. It is a high-quality device, readily available (Ebay etc.) for around $30. **Globalsat BU-353** USB GPS receiver originally used the SiRF Star III chipset, now also available with the SiRF Star IV chipset which offers enhanced performance (BU-353-S4 variant). Both versions use the Prolific PL2303 serial/USB chipset. This howto was tested with the original version. It is a high-quality device, readily available (Ebay etc.) for around $30.
  • Last modified: 2021/11/05 12:58
  • by tmomas