Yes, it did solve the issue.
But just wondering, why we need to restart the sntp. Can't we have an API which is just to sync time?
Search found 7 matches
- Thu Sep 16, 2021 4:31 am
- Forum: ESP-IDF
- Topic: sntp: how to know if the time sync is done properly
- Replies: 14
- Views: 13791
- Wed Sep 15, 2021 10:34 am
- Forum: ESP-IDF
- Topic: sntp: how to know if the time sync is done properly
- Replies: 14
- Views: 13791
Re: sntp: how to know if the time sync is done properly
Thanks for the confirmation!
- Wed Sep 15, 2021 7:21 am
- Forum: ESP-IDF
- Topic: sntp: how to know if the time sync is done properly
- Replies: 14
- Views: 13791
Re: sntp: how to know if the time sync is done properly
Thanks for the reply,
But if we do sntp_restart does it deinit the sntp and initialize again?
Do we need to again set the operating mode and NTP servers? Or it just uses the previous configurations?
But if we do sntp_restart does it deinit the sntp and initialize again?
Do we need to again set the operating mode and NTP servers? Or it just uses the previous configurations?
- Tue Sep 14, 2021 4:18 pm
- Forum: ESP-IDF
- Topic: sntp: how to know if the time sync is done properly
- Replies: 14
- Views: 13791
Re: sntp: how to know if the time sync is done properly
Thanks for the reply! Yes, that would be the fixed interval of time when the time gets synced and callback is triggered. But how can I sync time at custom intervals i.e. suppose there is a event after which I need to re-sync the time regardless of the current drift. How can I achieve it? Which API w...
- Mon Sep 13, 2021 8:07 am
- Forum: ESP-IDF
- Topic: sntp: how to know if the time sync is done properly
- Replies: 14
- Views: 13791
Re: sntp: how to know if the time sync is done properly
Sure, thanks for the insight. Got the point regarding the time sync first time. The issue I am facing seems to be with the re-sync. What will be the steps when we do want to resync to the ntp server? I am using "sntp_sync_time" API with default implementation, I have not overridden the API. But by u...
- Thu Sep 09, 2021 6:46 am
- Forum: ESP-IDF
- Topic: sntp: how to know if the time sync is done properly
- Replies: 14
- Views: 13791
Re: sntp: how to know if the time sync is done properly
Thanks for the reply, However, the callback is called regardless of the time sync. Check the below logs for the reference. I (7348) sntp.c: Waiting for system time to be set... (1/10) I (9348) sntp.c: Waiting for system time to be set... (2/10) I (11348) sntp.c: Waiting for system time to be set... ...
- Tue Sep 07, 2021 9:45 am
- Forum: ESP-IDF
- Topic: sntp: how to know if the time sync is done properly
- Replies: 14
- Views: 13791
sntp: how to know if the time sync is done properly
Hello, I am performing sntp sync. However, I need to know how I can be aware of the time sync not done? When the device is failing to update the ntp time, it fetches the device time and sets the status as SNTP_SYNC_STATUS_COMPLETED. I can check the timestamp which is updated and can compare it with ...