mirror of
https://github.com/espressif/esp-idf.git
synced 2026-10-02 11:10:54 +03:00
feat(provisioning): Addded api to set Authmode in provisioning
Added api to set threshold authmode for provisioning demo
This commit is contained in:
committed by
Hrushikesh Bhosale
parent
ffdf59a898
commit
95f5b29ffc
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* SPDX-FileCopyrightText: 2019-2023 Espressif Systems (Shanghai) CO LTD
|
||||
* SPDX-FileCopyrightText: 2019-2024 Espressif Systems (Shanghai) CO LTD
|
||||
*
|
||||
* SPDX-License-Identifier: Apache-2.0
|
||||
*/
|
||||
@@ -36,6 +36,13 @@ typedef enum {
|
||||
*/
|
||||
WIFI_PROV_START,
|
||||
|
||||
/**
|
||||
* Emitted before accepting the wifi credentials to
|
||||
* set the wifi configurations according to requirement.
|
||||
* NOTE - In this case event_data shall be populated with a pointer to `wifi_config_t`.
|
||||
*/
|
||||
WIFI_PROV_SET_STA_CONFIG,
|
||||
|
||||
/**
|
||||
* Emitted when Wi-Fi AP credentials are received via `protocomm`
|
||||
* endpoint `wifi_config`. The event data in this case is a pointer
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* SPDX-FileCopyrightText: 2019-2022 Espressif Systems (Shanghai) CO LTD
|
||||
* SPDX-FileCopyrightText: 2019-2024 Espressif Systems (Shanghai) CO LTD
|
||||
*
|
||||
* SPDX-License-Identifier: Apache-2.0
|
||||
*/
|
||||
@@ -1240,6 +1240,9 @@ esp_err_t wifi_prov_mgr_configure_sta(wifi_config_t *wifi_cfg)
|
||||
RELEASE_LOCK(prov_ctx_lock);
|
||||
return ESP_FAIL;
|
||||
}
|
||||
|
||||
execute_event_cb(WIFI_PROV_SET_STA_CONFIG, (void *)wifi_cfg, sizeof(wifi_config_t));
|
||||
|
||||
if (prov_ctx->prov_state >= WIFI_PROV_STATE_CRED_RECV) {
|
||||
ESP_LOGE(TAG, "Wi-Fi credentials already received by provisioning app");
|
||||
RELEASE_LOCK(prov_ctx_lock);
|
||||
|
||||
Reference in New Issue
Block a user