Skip to content

Commit

Permalink
Merge branch 'feature/wifi_prov_mgr_is_provisioned_api_change' into '…
Browse files Browse the repository at this point in the history
…master'

wifi_provisioning: decouple `wifi_prov_mgr_is_provisioned` from manager state

Closes IDF-5878

See merge request espressif/esp-idf!19911
  • Loading branch information
mahavirj committed Sep 5, 2022
2 parents 7bc264e + 2137cf5 commit ec5df3e
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -266,7 +266,6 @@ void wifi_prov_mgr_deinit(void);
* - ESP_OK : Retrieved provision state successfully
* - ESP_FAIL : Wi-Fi not initialized
* - ESP_ERR_INVALID_ARG : Null argument supplied
* - ESP_ERR_INVALID_STATE : Manager not initialized
*/
esp_err_t wifi_prov_mgr_is_provisioned(bool *provisioned);

Expand Down
5 changes: 0 additions & 5 deletions components/wifi_provisioning/src/manager.c
Original file line number Diff line number Diff line change
Expand Up @@ -1112,11 +1112,6 @@ esp_err_t wifi_prov_mgr_is_provisioned(bool *provisioned)

*provisioned = false;

if (!prov_ctx_lock) {
ESP_LOGE(TAG, "Provisioning manager not initialized");
return ESP_ERR_INVALID_STATE;
}

/* Get Wi-Fi Station configuration */
wifi_config_t wifi_cfg;
if (esp_wifi_get_config(WIFI_IF_STA, &wifi_cfg) != ESP_OK) {
Expand Down
5 changes: 3 additions & 2 deletions docs/en/migration-guides/release-5.x/provisioning.rst
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,10 @@ For example, when using security version 2, the ``sec_params`` parameter should
Wi-Fi Provisioning
------------------

The ``pop`` field in the :cpp:func:`wifi_prov_mgr_start_provisioning` API is now deprecated. Please use the ``wifi_prov_sec_params`` field instead of ``pop``. This parameter should contain the structure (containing the security parameters) as required by the protocol version used.
.. list::
* The ``pop`` field in the :cpp:func:`wifi_prov_mgr_start_provisioning` API is now deprecated. Please use the ``wifi_prov_sec_params`` field instead of ``pop``. This parameter should contain the structure (containing the security parameters) as required by the protocol version used. For example, when using security version 2, the ``wifi_prov_sec_params`` parameter should contain the pointer to the structure of type :cpp:type:`wifi_prov_security2_params_t`.

For example, when using security version 2, the ``wifi_prov_sec_params`` parameter should contain the pointer to the structure of type :cpp:type:`wifi_prov_security2_params_t`.
* The API :cpp:func:`wifi_prov_mgr_is_provisioned` does not return :c:macro:`ESP_ERR_INVALID_STATE` error any more. This API now works without any dependency on provisioning manager initialization state.

ESP Local Control
-----------------
Expand Down

0 comments on commit ec5df3e

Please sign in to comment.