pub unsafe extern "C" fn esp_mesh_set_config(
    config: *const mesh_cfg_t
) -> esp_err_t
Expand description

@brief Set mesh stack configuration - Use MESH_INIT_CONFIG_DEFAULT() to initialize the default values, mesh IE is encrypted by default. - Mesh network is established on a fixed channel (1-14). - Mesh event callback is mandatory. - 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.

@param[in] config pointer to mesh stack configuration

@return

  • ESP_OK
  • ESP_ERR_MESH_ARGUMENT
  • ESP_ERR_MESH_NOT_ALLOWED