Skip to content
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

SNTP manual interval request in the application (IDFGH-337) #2277

Closed
Trubochkin opened this issue Aug 7, 2018 · 5 comments
Closed

SNTP manual interval request in the application (IDFGH-337) #2277

Trubochkin opened this issue Aug 7, 2018 · 5 comments

Comments

@Trubochkin
Copy link

The SNTP component provides public methods sntp_init and sntp_stop, but does not provide the method sntp_request publicly. Also, I see that request interval is set by define. I need to set the request interval manually in my application. How can I do this?

@FayeY FayeY changed the title SNTP manual interval request in the application [TW#25621] SNTP manual interval request in the application Aug 20, 2018
@liuzfesp
Copy link
Contributor

@Trubochkin currently LWIP SNTP doesn't provide API to manually set the polling interval. However, you can change the polling interval by changing SNTP_UPDATE_DELAY in lwipopts.h, the default polling interval is 3600000 milliseconds.

@Alvin1Zhang
Copy link
Collaborator

@Trubochkin Could you help share if any updates for this issue? Thanks.

@Trubochkin
Copy link
Author

@Trubochkin Could you help share if any updates for this issue? Thanks.

I'm just doing re-initialization https://github.com/Trubochkin/BLE-WiFi-Gateway/blob/e19b131202b30d53837ea74e309dee601084ee8e/components/f_sntp/f_sntp.c#L93

@X-Ryl669
Copy link
Contributor

@Trubochkin You have an error in your code, you're busy waiting for sntp_enabled (probably a zealous ';' here). You probably need #2349 to be fixed too to avoid waiting 500ms for nothing, and instead be informed when the time has been changed.

@projectgus projectgus changed the title [TW#25621] SNTP manual interval request in the application SNTP manual interval request in the application (IDFGH-337) Mar 12, 2019
@KonstantinKondrashov
Copy link
Collaborator

Hi @Trubochkin! We will add the Kconfig option to change SNTP_UPDATE_DELAY. It will be merged soon.

@igrr igrr closed this as completed in b107b83 Jun 26, 2019
trombik pushed a commit to trombik/esp-idf that referenced this issue Aug 9, 2019
igrr pushed a commit that referenced this issue Oct 18, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants