Description
Platform
- Hardware: [ESP-12|ESP-01|ESP-07|ESP8285 device|other]
- Core Version: 2.5.0 installed from the IDE boards manager
- Development Env: Arduino IDE 1.8.9
- Operating System: Linux Mint 17.3
Settings in IDE
- Module/board: LOLIN(WEMOS) D1 R2 & mini
I am doing some testing with time.c functions and ntp and I'd like to be able to set the sntp update delay. Is there anyway to do this?
There is (or at least used to be) a function to do this sntp_set_update_delay() in ntp.c but it does not seem to be available.
The declaration does not seem to be present in sntp.h which causes a compilation failure.
If I create the appropriate C external declaration in the sketch:
extern "C" void sntp_set_update_delay(uint32 ms);
the sketch will compile but will fail to link with:
undefined reference to `sntp_set_update_delay'
What also seems strange is that code down in ~/.arduino15/packages/esp8266/hardware/esp8266/2.5.0/tools/sdk/lwip/src/core/sntp.c does not seem to be used when building using the Arduino IDE but yet is included with the esp8266 package.
I don't understand the "lwip" vs "lwip2" stuff but it appears that lwip2 is being used by the Arduino core file sntp_lwip2.c
Was sntp_set_update_delay() dropped in lwip2 ?
It would be nice to be able to set the NTP poll/update interval.
Perhaps sntp_set_update_delay() could set the delay for all the servers, and sntp_setserver_update_delay() as described in issue #5879 could set the delay for individual servers.