esp_mesh_set_self_organized() function
Enable/disable self-organized networking - Self-organized networking has three main functions: select the root node; find a preferred parent; initiate reconnection if a disconnection is detected. - Self-organized networking is enabled by default. - If self-organized is disabled, users should set a parent for the device via esp_mesh_set_parent(). @attention This API is used to dynamically modify whether to enable the self organizing.
Arguments
enable
enable or disable self-organized networking
select_parent
Only valid when self-organized networking is enabled. - if select_parent is set to true, the root will give up its mesh root status and search for a new parent like other non-root devices.
Return value
- ESP_OK - ESP_FAIL