Chapter 2. API Reference
• Mesh ID is an identifier of an MBSS. Nodes with the same mesh ID can communicate with each other.
• Regarding to the router configuration, if the router is hidden, BSSID field is mandatory.
If BSSID field isn’t set and there exists more than one router with same SSID, there is a risk that more roots
than one connected with different BSSID will appear. It means more than one mesh network is established
with the same mesh ID.
Root conflict function could eliminate redundant roots connected with the same BSSID, but couldn’t handle
roots connected with different BSSID. Because users might have such requirements of setting up routers with
same SSID for the future replacement. But in that case, if the above situations happen, please make sure
applications implement forward functions on the root to guarantee devices in different mesh networks can
communicate with each other. max_connection of mesh softAP is limited by the max number of Wi-Fi softAP
supported (max:10).
Attention This API shall be called before mesh is started after mesh is initialized.
Return
• ESP_OK
• ESP_ERR_MESH_ARGUMENT
• ESP_ERR_MESH_NOT_ALLOWED
Parameters
• [in] config: pointer to mesh stack configuration
esp_err_t esp_mesh_get_config(mesh_cfg_t *config)
Get mesh stack configuration.
Return
• ESP_OK
• ESP_ERR_MESH_ARGUMENT
Parameters
• [out] config: pointer to mesh stack configuration
esp_err_t esp_mesh_set_router(const mesh_router_t *router)
Get router configuration.
Attention This API is used to dynamically modify the router configuration after mesh is configured.
Return
• ESP_OK
• ESP_ERR_MESH_ARGUMENT
Parameters
• [in] router: pointer to router configuration
esp_err_t esp_mesh_get_router(mesh_router_t *router)
Get router configuration.
Return
• ESP_OK
• ESP_ERR_MESH_ARGUMENT
Parameters
• [out] router: pointer to router configuration
esp_err_t esp_mesh_set_id(const mesh_addr_t *id)
Set mesh network ID.
Attention This API is used to dynamically modify the mesh network ID.
Return
• ESP_OK
• ESP_ERR_MESH_ARGUMENT: invalid argument
Parameters
• [in] id: pointer to mesh network ID
esp_err_t esp_mesh_get_id(mesh_addr_t *id)
Get mesh network ID.
Return
• ESP_OK
Espressif Systems 144
Submit Document Feedback
Release v4.4