mirror of
https://github.com/espressif/esp-idf.git
synced 2024-10-05 20:47:46 -04:00
Merge branch 'bugfix/sntp_example_comment' into 'master'
examples/sntp: Document that SNTP-over-DHCP resets other NTP servers Closes IDFGH-6835 See merge request espressif/esp-idf!17418
This commit is contained in:
commit
fc21b0a789
@ -22,7 +22,7 @@ See `initialize_sntp` function for details.
|
||||
|
||||
## Obtaining time using LwIP SNTP-over-DHCP module
|
||||
|
||||
NTP server addresses could be automatically aquired via DHCP server option 42. This could be usefull on closed environments where public NTPs are not accessible
|
||||
NTP server addresses could be automatically acquired via DHCP server option 42. This could be useful on closed environments where public NTPs are not accessible
|
||||
or to prefer local servers and reduce traffic to the outer world.
|
||||
See following menuconfig options:
|
||||
* `Component config-->LWIP-->SNTP-->Maximum number of NTP servers`
|
||||
@ -30,6 +30,10 @@ See following menuconfig options:
|
||||
* `Component config-->LWIP-->SNTP-->Maximum number of NTP servers aquired via DHCP`
|
||||
* `Component config-->LWIP-->Enable LWIP Debug-->Enable SNTP debug messages`
|
||||
|
||||
Please note, that `dhcp_set_ntp_servers()` does not only set NTP servers provided by DHCP, but also resets all other NTP server configured before. If you want to keep both manually configured and DHCP obtained NTP servers, please use the API in this order:
|
||||
* Enable SNTP-over-DHCP before getting the IP using `sntp_servermode_dhcp()`
|
||||
* Set the static NTP servers after receiving the DHCP lease using `sntp_setserver()`
|
||||
|
||||
## Timekeeping
|
||||
|
||||
Once time is synchronized, ESP32 will perform timekeeping using built-in timers.
|
||||
|
Loading…
x
Reference in New Issue
Block a user