-
Notifications
You must be signed in to change notification settings - Fork 28
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
Openthread Custom API (TZ-910) #70
Comments
You can find some helps here openthread.io cli command reference, for any commands you manually set to board, there might be a function call in openthread stack. For examples, the command Tips: the openthread APIs are not thread-safe, so if you want to call some openthread APIs in other task, the ot lock should be acquired first and released after the finish. |
Thank you for your response You mention that openthread APIs are not thread-safe does that mean if we want to implement customAPI we should not use xTaskCreate to run our custom APIs? Any support would help thank you |
Not yet, you can create a task to run the openthread APIs, but when you want to do that, you need to call the function |
And for this example, we only create the state changed callback to do some process when thread state changed, there is no logic related to start the thread network. I mean in your application, you need to join a specific thread network first, this can be done via calling the openthread APIs shown in the link. And for your application task you can implement some specific logic to so something you like(maybe as you metioned, send and receive messages containing sensor readings). Also you can register a state changed callback for doing that. Anyway you like. |
Hello,
I have been able to set up the ESP32 border router with ESP-C6 and I have been able to send messages using the OpenThread commands.
I have used the example here for the border router: https://github.com/espressif/esp-thread-br/tree/main/examples/basic_thread_border_router example
and the examples here for the node: https://github.com/espressif/esp-idf/tree/master/examples/openthread/ot_cli example.
I would like to automatically send and receive messages containing sensor readings.
How can I integrate custom functions and deactivate the command line so that I can do this?
I can see that esp provides ot_common_components example, but its unclear how this can be integrated.
Any support would be appreciated.
The text was updated successfully, but these errors were encountered: