Function esp_idf_svc::sys::esp_mesh_set_parent

source ยท
pub unsafe extern "C" fn esp_mesh_set_parent(
    parent: *const wifi_config_t,
    parent_mesh_id: *const mesh_addr_t,
    my_type: u32,
    my_layer: i32,
) -> i32
Expand description

@brief Set a specified parent for the device

@attention This API can be called at any time after mesh is configured.

@param[in] parent parent configuration, the SSID and the channel of the parent are mandatory. - If the BSSID is set, make sure that the SSID and BSSID represent the same parent, otherwise the device will never find this specified parent. @param[in] parent_mesh_id parent mesh ID, - If this value is not set, the original mesh ID is used. @param[in] my_type mesh type - MESH_STA is not supported. - If the parent set for the device is the same as the router in the network configuration, then my_type shall set MESH_ROOT and my_layer shall set MESH_ROOT_LAYER. @param[in] my_layer mesh layer - my_layer of the device may change after joining the network. - If my_type is set MESH_NODE, my_layer shall be greater than MESH_ROOT_LAYER. - If my_type is set MESH_LEAF, the device becomes a standalone Wi-Fi station and no longer has the ability to extend the network.

@return

  • ESP_OK
  • ESP_ERR_ARGUMENT
  • ESP_ERR_MESH_NOT_CONFIG