-
Notifications
You must be signed in to change notification settings - Fork 7.6k
Second and third NTP servers are not working #4964
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
Support for multiple ntp servers is not compiled into the arduino libraries. You would need to roll your own to get this. |
@lbernstone Thanks for the information. Do you plan to add it in the future? |
That comes from upstream (lwip), but I seriously doubt it. It is a pretty good chunk of memory that most people won't use. Using a pool address from ntp.org is pretty reliable. |
Hello, i was facing the same issue ... moreover, i really need NTP FROM DHCP answer (yes our university is blocking outgoing ntp packets !!)
Then you need to backport those mods to your arduino release:
need to mention i'm using 1.0.6 esp32 arduino so i chose esp-idf 3.3.5 Of course, i would have loved a much more simpler way to achieve this simple lwip mod (fairly simple on esp8266-arduino) |
I think it should be mentioned in the examples like: arduino-esp32/libraries/HTTPClient/examples/BasicHttpsClient/BasicHttpsClient.ino Line 59 in 7856de7
Also if possible a compile warning or runtime log would be useful. |
[STALE_SET] This issue has been automatically marked as stale because it has not had recent activity. It will be closed in 14 days if no further activity occurs. Thank you for your contributions. |
Ugh! This really took me a while to find out why the heck a function with 3 ntp server params just silently ignores two of it. At least a note in source comments would be nice. |
[STALE_CLR] This issue has been removed from the stale queue. Please ensure activity to keep it openin the future. |
… is supported by lwip (#5343) lwip lib bundled with esp32 Arduino supports only one ntp server. Any additional servers set are just silently ignored. This default is different from esp8266 Arduino core and very confusing. Most of the examples provided uses 3 different ntp servers for redundancy while only the first one is used actually. Addressing issue #4964
[STALE_SET] This issue has been automatically marked as stale because it has not had recent activity. It will be closed in 14 days if no further activity occurs. Thank you for your contributions. |
[STALE_DEL] This stale issue has been automatically closed. Thank you for your contributions. |
- increase default number of NTP servers up to 3 (match with Arduino esp8266) - activate SNTP over DHCP requests (match with Arduino esp8266) addressing issue espressif/arduino-esp32#4964 provided via espressif/esp-idf#7336
- increase default number of NTP servers up to 3 (match with Arduino esp8266) - activate SNTP over DHCP requests (match with Arduino esp8266) addressing issue espressif/arduino-esp32#4964 provided via espressif/esp-idf#7336
Hardware:
Board: ESP32 Dev Module
Core Installation version: 1.0.5
IDE name: Arduino IDE
Flash Frequency: 80Mhz
PSRAM enabled: no
Upload Speed: 115200
Computer OS: Windows 10
Description:
I am using SimpleTime example. I have added second and third NTP server, but when I change first NTP server's address to wrong one, it cannot obtain time.
configTzTime()
andconfigTime()
are not using second and third NTP servers.Sketch: (leave the backquotes for code formatting)
Debug Messages:
The text was updated successfully, but these errors were encountered: