Sponsored Content
Top Forums Programming A Slightly Better NTP Client for the ESP8266 Post 303045719 by ReidBecker on Friday 10th of April 2020 12:25:50 PM
Old 04-10-2020
Hi....You can keep local time with the TimeLib.h library. This runs from the processor's clock. You use NTP time from the network to periodically "true up" your local time. See TimeNTP example in the Time library and NTPClient in the ESP8266WiFi libarary.
 

10 More Discussions You Might Find Interesting

1. Windows & DOS: Issues & Discussions

ntp client windows xp

All, I have a Windows XP client which I need to get time synchronized from a Linux ntp server. What are the commands to perform the setup and configuration? Thanks, Mike (1 Reply)
Discussion started by: bubba112557
1 Replies

2. Solaris

ntp server and ntp client

All, How do you set a Solaris 9 server which received ntp updates from a ntp server to broadcast them on a local subnet. I have created a /etc/inet/ntp.conf file to receive the updates from a server on network and need to make this server become like a ntp relay from the main server. Any... (1 Reply)
Discussion started by: bubba112557
1 Replies

3. Fedora

Solaris NTP client

Hello All I have a problem about ntp, I am install a ntp server on a fedora 11 machine and I have 8 ntp client (solaris 10) everything working fine but just a server can not sync time . I have receive this error message -bash-3.00# ntptime ntp_gettime() returns code 5 (ERROR) time... (1 Reply)
Discussion started by: bogacd
1 Replies

4. Linux

ntp client/daemon sync

All, I need to write a script which can determine if my NTP client is X second off from the NTPD server time. I am looking for a crafty oneliner to calculate the time difference? (3 Replies)
Discussion started by: vada010
3 Replies

5. AIX

NTP Client problem

Hello everybody! When I run command "ntpdate" the following error occures "ksh: ntpdate: 0403-006 Execute permission denied. " # oslevel -s 5300-08-06-0918 oslevel -r 5300-08 eny suggestion friends? :-) (3 Replies)
Discussion started by: wwwzviadi
3 Replies

6. Solaris

Cannot configure NTP client

Hi, I am trying to configure NTP client on my Solaris server, but I am getting error like: Jan 13 10:53:33 SPOTS ntpdate: no server suitable for synchronization foundMy ntp.conf file: bash-3.00# pwd /etc/inet bash-3.00# bash-3.00# bash-3.00# cat ntp.conf # ident "@(#)ntp.client... (5 Replies)
Discussion started by: nypreH
5 Replies

7. Solaris

NTP client offset

How to add offset to NTP client so that, for eg., clock is -20 seconds? (2 Replies)
Discussion started by: orange47
2 Replies

8. Solaris

ntp client configuration error

hi all ntp client side configuration file is done but in # ntpq -p remote refid st t when poll reach delay offset disp ============================================================================== ntpserver .INIT. 16 u - 64 0 0.00 0.000... (5 Replies)
Discussion started by: nikhil kasar
5 Replies

9. Red Hat

Ntp client sync with local over ntp server

Hi, I have two ntp servers in my cluster and I want all the nodes in my cluster to sync with either of the ntp servers or just one. Unfortunately it keep rotating the sync, between my ntp server 1, ntp server 2 and local. Is there anyway I can change the sync to avoid local? # ntpq -p ... (3 Replies)
Discussion started by: pjeedu2247
3 Replies

10. Programming

A Slightly Better NTP Client for the ESP32 (ESPWROOM32) on macOS Catalina

Currently have two ESP8266 modules testing some Blynk apps, whereI'm not so happy with the Blynk business model for developers, but that's another story. So, with two of my ESP8266s currently "busy", I decided to work on the ESP32, and in particular the ESPWROOM32. I installed the... (0 Replies)
Discussion started by: Neo
0 Replies
ntp_intro(7)						 Miscellaneous Information Manual					      ntp_intro(7)

NAME
ntp_intro - Network Time Protocol (NTP) introductory information DESCRIPTION
The Tru64 UNIX software supports two time services: Network Time Protocol (NTP) Time Synchronization Protocol (TSP) Because it can be traced to clocks of high absolute accuracy, NTP provides a more accurate time service than TSP. By contrast, TSP syn- chronizes time to the average of the network host times. TSP is an acceptable time service if your system is not on the Internet and does not have access to a highly accurate time server; otherwise, NTP is recommended. Network Time Protocol The Network Time Protocol (NTP) provides accurate, dependable, and synchronized time for hosts on both wide area networks (like the Inter- net) and local area networks. In particular, NTP provides synchronization traceable to clocks of high absolute accuracy, and avoids syn- chronization to clocks keeping bad time. Hosts running NTP periodically exchange datagrams querying each other about their current estimate of the time. Using the round-trip time of the packet, a host can estimate the one-way delay to the other host. (The assumption is that the delay is roughly equal in both direc- tions.) By measuring the one-way delay and examining the timestamps that are returned with the NTP packet, a host computes the difference between its clock time and that of the host it queried. A host queries a remote host several times over a period and feeds the results from the multiple samples to a digital-filtering algorithm. The algorithm provides a more accurate estimate of the delay, clock offset, and clock stability than could be obtained with a single sam- ple. NTP messages also contain information about the accuracy and reliability of the time sources. An NTP host connected directly to a highly accurate time source, such as a radio receiver tuned to a time code signal broadcast by a government agency, is called a stratum 1 server. Every other NTP host adopts a stratum number that is one higher than the host from which it sets its own time. For example, a host syn- chronized to a stratum 1 server becomes a stratum 2 host. Stratum determination is done automatically, and the stratum of a host can vary as its connectivity changes. A host running NTP combines various information to decide which of the hosts it queried provides the time it believes to be the most accu- rate. This information includes the output of the digital-filtering algorithm and the stratum numbers of the hosts it queried. By commu- nicating with several other hosts, an NTP host can usually detect those hosts that are keeping bad time, and is able to stay synchronized even if some of the other hosts become unavailable for long periods. In practice, NTP is able to synchronize clocks to within a few milliseconds even over wide area networks spanning thousands of miles. To obtain even greater accuracy, use the NTP_TIME kernel option. See System Administration for more information. You can optionally use a high-resolution clock, enabling the time returned by the clock_gettime routine to be extrapolated between the clock ticks. The granularity of the time returned will be in microseconds. To use the high-resolution clock, use the MICRO_TIME kernel option. For detailed information on NTP, see Network Time Protocol (Version 3) (RFC 1305). Time Synchronization Protocol The Time Synchronization Protocol (TSP) is the protocol used by the daemon. In its simplest application, the TSP servers on a broadcast network (for example, an Ethernet) periodically broadcast TSP packets. The hosts on the network elect one of the hosts on the network run- ning TSP as a master. The master then controls the further operation of the protocol until it fails and a new master is elected. The mas- ter collects time values from the other hosts and computes the average of all the times reported. It then sets its own clock to this aver- age, and tells the other hosts to synchronize their clocks with it. TSP quickly synchronizes all participating hosts. However, because TSP does not trace time back to sources of known accuracy, it is unable to correct for systematic errors. If a clock drifts significantly, or if a mistake is made in setting the time on a participating host, the average time calculated and distributed by the master can be affected significantly. For information on setting up the network time services, refer to Network Administration. RELATED INFORMATION
Commands: ntp(1), ntpdate(8), ntptrace(8), timedsetup(8), xntpdc(8) Functions: ctime(3) Files: ntp.conf(4), ntp.drift(4), ntp.keys(4) Daemons: timed(8), xntpd(8) Network Time Protocol (Version 3) (RFC 1305) Network Administration System Administration delim off ntp_intro(7)
All times are GMT -4. The time now is 12:20 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy