Skip to content

Network Time Protocol Menu

Torch: Feature Not Supported / EVK: Feature Supported

Ethernet-equipped RTK devices can act as an Ethernet Network Time Protocol (NTP) server.

Network Time Protocol has been around since 1985. It is a simple way for computers to synchronize their clocks with each other, allowing the network latency (delay) to be subtracted:

  • A client sends an NTP request (packet) to the chosen or designated server

    • The request contains the client's current clock time - for identification
  • The server logs the time the client's request arrived and then sends a reply containing:

    • The client's clock time - for identification
    • The server's clock time - when the request arrived at the server
    • The server's clock time - when the reply is sent
    • The time the server's clock was last synchronized - providing the age of the synchronization
  • The client logs the time the reply is received - using its own clock

When the client receives the reply, it can deduce the total round-trip delay which is the sum of:

  • How long the request took to reach the server

  • How long the server took to construct the reply

  • How long the reply took to reach the client

This exchange is repeated typically five times, before the client synchronizes its clock to the server's clock, subtracting the latency (delay) introduced by the network.

Having your own NTP server on your network allows tighter clock synchronization as the network latency is minimized.

Ethernet-equipped RTK devices can be placed into dedicated NTP mode, by clicking the MODE button until NTP is highlighted in the display and double-clicking there.

Animation of selecting NTP mode

Selecting NTP mode

An Ethernet-equipped RTK device will first synchronize its Real Time Clock (RTC) using the very accurate time provided by the u-blox GNSS module. The module's Time Pulse (Pulse-Per-Second) signal is connected to the ESP32 as an interrupt. The ESP32's RTC is synchronized to Universal Time Coordinate (UTC) on the rising edge of the TP signal using the time contained in the UBX-TIM-TP message.

When an Ethernet-equipped RTK device is in Network Time Protocol (NTP) mode, the display also shows a clock symbol - as shown above. The value next to the clock symbol is the Time Accuracy Estimate (tAcc) from the UBX-NAV-PVT message.

Note: tAcc is the time accuracy estimate for the navigation position solution. The timing accuracy of the TP pulse is significantly better than this. We show the tAcc as we believe it is more meaningful than the TIM-TP time pulse quantization error (qErr) - which is generally zero.

The RTK device will respond to each NTP request within a few 10s of milliseconds.

If desired, you can log all NTP requests to a file on the microSD card, and/or print them as diagnostic messages. The log and messages contain the NTP timing information and the IP Address and port of the Client.

The system debug menu showing how to enable the NTP diagnostics

System Debug Menu - NTP Diagnostics (Click for a closer look)

The logging menu showing how to log the NTP requests

Logging Menu - Log NTP Requests

Logged NTP Requests

NTP requests log

NTP uses its own epoch - midnight January 1st, 1900. This is different than the standard Unix epoch - midnight January 1st, 1970 - and the GPS epoch - midnight January 6th, 1980. The times shown in the log and diagnostic messages use the NTP epoch. You can use online calculators to convert between the different epochs:

NTP on Windows

If you want to synchronize your Windows PC to a RTK device running as an NTP Server, here's how to do it:

  • Install Meinberg NTP - this replaces the Windows built-in Time Service

Meinberg NTP initial configuration

  • During the installation, select "Create an initial configuration file" and select the NTP Pool server for your location
  • Select "Use fast initial sync mode" for faster first synchronization

Meinberg NTP service settings

  • The next step is to edit the NTP Configuration File
    • Editing the file requires Administrator privileges
    • Open the Start menu, navigate to Meinberg, right-click on Edit NTP Configuration and select Run as administrator

Meinberg NTP configuration

  • Comment the lines in ntp.conf which name the pool.ntp servers
  • Add an extra server line and include the IP Address for your RTK device. It helps to give your RTK device a fixed IP Address first - see Menu Ethernet
  • Save the file

Meinberg NTP configuration

  • Finally, restart the NTP Service
    • Again this needs to be performed with Administrator privileges
    • Open the Start menu, navigate to Meinberg, right-click on Restart NTP Service and select Open file loctaion

Meinberg NTP configuration

  • Right-click on the Restart NTP Service and select Run as administrator

Meinberg NTP configuration

  • You can check if your PC clock synchronized successfully by opening a Command Prompt (cmd) and running ntpq -pd

Meinberg NTP configuration

If enabled, your Windows PC NTP requests will be printed and logged by the RTK device. See above.