Chapter 2. API Reference
Parameters
• [in] block_ticks: The maxinum number of RTOS ticks to wait for the lock.
void esp_openthread_lock_release(void)
This function releases the OpenThread API lock.
Header File
• components/openthread/include/esp_openthread_netif_glue.h
Functions
void *esp_openthread_netif_glue_init(const esp_openthread_platform_config_t *config)
This function initializes the OpenThread network interface glue.
Return
• glue pointer on success
• NULL on failure
Parameters
• [in] config: The platform configuration.
void esp_openthread_netif_glue_deinit(void)
This function deinitializes the OpenThread network interface glue.
esp_netif_t *esp_openthread_get_netif(void)
This function acquires the OpenThread netif.
Return The OpenThread netif or NULL if not initialzied.
Header File
• components/openthread/include/esp_openthread_border_router.h
Functions
esp_err_t esp_openthread_border_router_init(esp_netif_t *backbone_netif)
Initializes the border router features of OpenThread.
Note Calling this function will make the device behave as an OpenThread border router. Kconfig option
CONFIG_OPENTHREAD_BORDER_ROUTER is required.
Return
• ESP_OK on success
• ESP_ERR_NOT_SUPPORTED if feature not supported
• ESP_ERR_INVALID_STATE if already initialized
• ESP_FIAL on other failures
Parameters
• [in] backbone_netif: The backbone network interface (WiFi or ethernet)
esp_err_t esp_openthread_border_router_deinit(void)
Deinitializes the border router features of OpenThread.
Return
• ESP_OK on success
• ESP_ERR_INVALID_STATE if not initialized
• ESP_FIAL on other failures
esp_netif_t *esp_openthread_get_backbone_netif(void)
Gets the backbone interface of OpenThread border router.
Return The backbone interface or NULL if border router not initialized.
Thread is an IPv6-based mesh networking technology for IoT. Code examples for the Thread API are provided in
the openthread directory of ESP-IDF examples.
Espressif Systems 196
Submit Document Feedback
Release v4.4