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

Enable otNetworkTimeGet from OpenThread (IDFGH-10962) #12154

Closed
Ereaey opened this issue Aug 29, 2023 · 6 comments
Closed

Enable otNetworkTimeGet from OpenThread (IDFGH-10962) #12154

Ereaey opened this issue Aug 29, 2023 · 6 comments
Assignees
Labels
Resolution: NA Issue resolution is unavailable Status: Done Issue is done internally Type: Feature Request Feature request for IDF

Comments

@Ereaey
Copy link

Ereaey commented Aug 29, 2023

Is your feature request related to a problem?

The problem I am facing is related to the use of otNetworkTimeGet from the OpenThread stack. ESP-IDF does not currently support this function, which is crucial for my application as it requires synchronization with the network time. Although it is possible to set up an SNTP server as an alternative, it is a more time-consuming and resource-intensive approach compared to using otNetworkTimeGet.

Describe the solution you'd like.

I would like ESP-IDF to support the otNetworkTimeGet function from the OpenThread stack. This would significantly simplify the development process by avoiding the need to set up an SNTP server or implement another network time synchronization mechanism. Supporting this function will also make ESP-IDF more compatible with OpenThread and enhance its capabilities.

Describe alternatives you've considered.

I have considered setting up an SNTP server as an alternative, but this approach is time-consuming and resource-intensive. It also increases the development time and maintenance efforts. Another alternative is to use a different chipset or platform that supports otNetworkTimeGet, but this would involve changing the hardware and software architecture of my application, which is not feasible at this stage of development.

Additional context.

Supporting otNetworkTimeGet in ESP-IDF will not only benefit my application but also others that require network time synchronization. It is a fundamental feature for many applications and will make ESP-IDF more versatile and compatible with the OpenThread stack.

@Ereaey Ereaey added the Type: Feature Request Feature request for IDF label Aug 29, 2023
@Ereaey Ereaey changed the title Enable otNetworkTimeGet from OpenThread in ESP-IDF Enable otNetworkTimeGet from OpenThread Aug 29, 2023
@espressif-bot espressif-bot added the Status: Opened Issue is new label Aug 29, 2023
@github-actions github-actions bot changed the title Enable otNetworkTimeGet from OpenThread Enable otNetworkTimeGet from OpenThread (IDFGH-10962) Aug 29, 2023
@chshu
Copy link
Collaborator

chshu commented Sep 11, 2023

@Ereaey The otNetworkTimeGet() is part of the time sync feature in openthread, it allows devices in the same network to synchronize to a single time, the time souce is from Leader.

The time sync feature is independent of SNTP, unless the Leader implements some mechanism and snyc to the network time periodically.

Note that this feature is experimental and not part of the Thread Specification.

@Ereaey
Copy link
Author

Ereaey commented Sep 11, 2023

@Ereaey The otNetworkTimeGet() is part of the time sync feature in openthread, it allows devices in the same network to synchronize to a single time, the time souce is from Leader.

The time sync feature is independent of SNTP, unless the Leader implements some mechanism and snyc to the network time periodically.

Note that this feature is experimental and not part of the Thread Specification.

Yes, you are completely right.
The SNTP server is not a viable solution for my example, as I want to precisely synchronize the cards in my openthreaded network with each other.
The simplified idea being to vary the lights at the same time

@chshu
Copy link
Collaborator

chshu commented Sep 11, 2023

@Ereaey Ok, we will enable the time synce feature on ESP platform, before the end of Sept.

@Ereaey
Copy link
Author

Ereaey commented Sep 11, 2023

@Ereaey Ok, we will enable the time synce feature on ESP platform, before the end of Sept.

Thanks !

@espressif-bot espressif-bot added Status: Done Issue is done internally Resolution: NA Issue resolution is unavailable and removed Status: Opened Issue is new labels Sep 25, 2023
@chshu
Copy link
Collaborator

chshu commented Oct 24, 2023

@Ereaey The Time Sync has been supported since this commit: 2652881

You can simply enable it with OPENTHREAD_TIME_SYNC option. Feel free to have a try, let me know if any issues.

@SimeonAT
Copy link

Hi @chshu,

I am also trying to get Network Time Synchronization to work with my OpenThread devices. However, I'm getting build errors when I enable OPENTHREAD_TIME_SYNC on the ESP Thread Border Router SDK. I document the specific issues I found in Issue 14055.

If time permits, any steps that you can give me to help me debug this issue would greatly be appreciated.

Thank you,

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Resolution: NA Issue resolution is unavailable Status: Done Issue is done internally Type: Feature Request Feature request for IDF
Projects
None yet
Development

No branches or pull requests

4 participants