Search code examples
network-programmingudpxilinxntpzynq

testing NTP for time sync between nodes in a local network


I need your expertise:

I have a Xilinx zynq board and a desktop computer that are syncing their time with an NTP server (stratum 3) the NTP server is a desktop computer which is syncing time with NTP pool, now in order to test and calculate the time differences between the embedded system (Zynq) and the desktop computer I am using a simple echo method described below:

Note: All the communication are through wireless network except local NTP server and NTP pool.

  • client sends its time to the server
  • server reads the packet and compares its time to the packet's time and prints it
  • server puts its time to another packet sends it to the client
  • client gets the packet reads it and print the diff time

This gives me around 1-2 millisecond time difference

Now the problem is, testing with another method: simple send and receive instead of an echo method, meaning one system only sends the packet with its timestamp and the other one only reads and prints the time difference, result in 10 times bigger time difference! I was wondering if you guys know what could be the reason behind it?


Solution

  • The reason is the wireless device has a queue which buffers 10 packets before sending any packets and that makes this process longer than normal.