Function esp_idf_sys::wifi_prov_mgr_disable_auto_stop

source ยท
pub unsafe extern "C" fn wifi_prov_mgr_disable_auto_stop(
    cleanup_delay: u32,
) -> esp_err_t
Expand description

@brief Disable auto stopping of provisioning service upon completion

By default, once provisioning is complete, the provisioning service is automatically stopped, and all endpoints (along with those registered by main application) are deactivated.

This API is useful in the case when main application wishes to close provisioning service only after it receives some protocomm command from the client side app. For example, after connecting to Wi-Fi, the device may want to connect to the cloud, and only once that is successfully, the device is said to be fully configured. But, then it is upto the main application to explicitly call wifi_prov_mgr_stop_provisioning() later when the device is fully configured and the provisioning service is no longer required.

@note This must be called before executing wifi_prov_mgr_start_provisioning()

@param[in] cleanup_delay Sets the delay after which the actual cleanup of transport related resources is done after a call to wifi_prov_mgr_stop_provisioning() returns. Minimum allowed value is 100ms. If not specified, this will default to 1000ms.

@return

  • ESP_OK : Success
  • ESP_ERR_INVALID_STATE : Manager not initialized or provisioning service already started