mirror of
https://github.com/espressif/esp-idf.git
synced 2025-10-03 02:20:57 +02:00
Merge branch 'bugfix/remove_depricated_code' into 'master'
WiFi: remove deprecated code See merge request espressif/esp-idf!40576
This commit is contained in:
@@ -1,30 +0,0 @@
|
|||||||
/*
|
|
||||||
* SPDX-FileCopyrightText: 2015-2021 Espressif Systems (Shanghai) CO LTD
|
|
||||||
*
|
|
||||||
* SPDX-License-Identifier: Apache-2.0
|
|
||||||
*/
|
|
||||||
|
|
||||||
|
|
||||||
#ifndef __ESP_INTERFACE_H__
|
|
||||||
#define __ESP_INTERFACE_H__
|
|
||||||
|
|
||||||
#include <stdint.h>
|
|
||||||
|
|
||||||
#ifdef __cplusplus
|
|
||||||
extern "C" {
|
|
||||||
#endif
|
|
||||||
|
|
||||||
typedef enum {
|
|
||||||
ESP_IF_WIFI_STA = 0, /**< Station interface */
|
|
||||||
ESP_IF_WIFI_AP, /**< Soft-AP interface */
|
|
||||||
ESP_IF_WIFI_NAN, /**< NAN interface */
|
|
||||||
ESP_IF_ETH, /**< Ethernet interface */
|
|
||||||
ESP_IF_MAX
|
|
||||||
} esp_interface_t;
|
|
||||||
|
|
||||||
#ifdef __cplusplus
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
|
|
||||||
|
|
||||||
#endif /* __ESP_INTERFACE_TYPES_H__ */
|
|
@@ -283,25 +283,6 @@ esp_err_t esp_now_del_peer(const uint8_t *peer_addr);
|
|||||||
*/
|
*/
|
||||||
esp_err_t esp_now_mod_peer(const esp_now_peer_info_t *peer);
|
esp_err_t esp_now_mod_peer(const esp_now_peer_info_t *peer);
|
||||||
|
|
||||||
/**
|
|
||||||
* @brief Config ESPNOW rate of specified interface
|
|
||||||
*
|
|
||||||
* @deprecated please use esp_now_set_peer_rate_config() instead.
|
|
||||||
*
|
|
||||||
* @attention 1. This API should be called after esp_wifi_start().
|
|
||||||
* @attention 2. This API only work when not use Wi-Fi 6 and esp_now_set_peer_rate_config() not called.
|
|
||||||
*
|
|
||||||
* @param ifx Interface to be configured.
|
|
||||||
* @param rate Phy rate to be configured.
|
|
||||||
*
|
|
||||||
* @return
|
|
||||||
* - ESP_OK: succeed
|
|
||||||
* - others: failed
|
|
||||||
*/
|
|
||||||
esp_err_t esp_wifi_config_espnow_rate(wifi_interface_t ifx, wifi_phy_rate_t rate)
|
|
||||||
__attribute__((deprecated("This API can be only used when rate is non-HE rate, \
|
|
||||||
please use esp_now_set_peer_rate_config if you want full support of the rate.")));
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @brief Set ESPNOW rate config for each peer
|
* @brief Set ESPNOW rate config for each peer
|
||||||
*
|
*
|
||||||
|
@@ -1288,54 +1288,6 @@ esp_err_t esp_wifi_get_csi_config(wifi_csi_config_t *config);
|
|||||||
*/
|
*/
|
||||||
esp_err_t esp_wifi_set_csi(bool en);
|
esp_err_t esp_wifi_set_csi(bool en);
|
||||||
|
|
||||||
/**
|
|
||||||
* @brief Set antenna GPIO configuration
|
|
||||||
*
|
|
||||||
* @param config Antenna GPIO configuration.
|
|
||||||
*
|
|
||||||
* @return
|
|
||||||
* - ESP_OK: succeed
|
|
||||||
* - ESP_ERR_WIFI_NOT_INIT: WiFi is not initialized by esp_wifi_init
|
|
||||||
* - ESP_ERR_INVALID_ARG: Invalid argument, e.g. parameter is NULL, invalid GPIO number etc
|
|
||||||
*/
|
|
||||||
esp_err_t esp_wifi_set_ant_gpio(const wifi_ant_gpio_config_t *config) __attribute__((deprecated("Please use esp_phy_set_ant_gpio instead")));
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @brief Get current antenna GPIO configuration
|
|
||||||
*
|
|
||||||
* @param config Antenna GPIO configuration.
|
|
||||||
*
|
|
||||||
* @return
|
|
||||||
* - ESP_OK: succeed
|
|
||||||
* - ESP_ERR_WIFI_NOT_INIT: WiFi is not initialized by esp_wifi_init
|
|
||||||
* - ESP_ERR_INVALID_ARG: invalid argument, e.g. parameter is NULL
|
|
||||||
*/
|
|
||||||
esp_err_t esp_wifi_get_ant_gpio(wifi_ant_gpio_config_t *config) __attribute__((deprecated("Please use esp_phy_get_ant_gpio instead")));
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @brief Set antenna configuration
|
|
||||||
*
|
|
||||||
* @param config Antenna configuration.
|
|
||||||
*
|
|
||||||
* @return
|
|
||||||
* - ESP_OK: succeed
|
|
||||||
* - ESP_ERR_WIFI_NOT_INIT: WiFi is not initialized by esp_wifi_init
|
|
||||||
* - ESP_ERR_INVALID_ARG: Invalid argument, e.g. parameter is NULL, invalid antenna mode or invalid GPIO number
|
|
||||||
*/
|
|
||||||
esp_err_t esp_wifi_set_ant(const wifi_ant_config_t *config) __attribute__((deprecated("Please use esp_phy_set_ant instead")));
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @brief Get current antenna configuration
|
|
||||||
*
|
|
||||||
* @param config Antenna configuration.
|
|
||||||
*
|
|
||||||
* @return
|
|
||||||
* - ESP_OK: succeed
|
|
||||||
* - ESP_ERR_WIFI_NOT_INIT: WiFi is not initialized by esp_wifi_init
|
|
||||||
* - ESP_ERR_INVALID_ARG: invalid argument, e.g. parameter is NULL
|
|
||||||
*/
|
|
||||||
esp_err_t esp_wifi_get_ant(wifi_ant_config_t *config) __attribute__((deprecated("Please use esp_phy_get_ant instead")));
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @brief Get the TSF time
|
* @brief Get the TSF time
|
||||||
* In Station mode or SoftAP+Station mode if station is not connected or station doesn't receive at least
|
* In Station mode or SoftAP+Station mode if station is not connected or station doesn't receive at least
|
||||||
@@ -1458,8 +1410,7 @@ esp_err_t esp_wifi_ftm_resp_set_offset(int16_t offset_cm);
|
|||||||
* (sizeof(wifi_ftm_report_entry_t) * num_entries) where the API will fill up to num_entries
|
* (sizeof(wifi_ftm_report_entry_t) * num_entries) where the API will fill up to num_entries
|
||||||
* valid FTM measurements in the buffer. Total number of entries can be found in the event
|
* valid FTM measurements in the buffer. Total number of entries can be found in the event
|
||||||
* WIFI_EVENT_FTM_REPORT as ftm_report_num_entries
|
* WIFI_EVENT_FTM_REPORT as ftm_report_num_entries
|
||||||
* @attention 2. The internal FTM report is freed upon use of this API which means the API can only be used
|
* @attention 2. The internal FTM report is freed upon use of this API OR after initiating a fresh FTM session
|
||||||
* once after every FTM session initiated
|
|
||||||
* @attention 3. Passing the buffer as NULL merely frees the FTM report
|
* @attention 3. Passing the buffer as NULL merely frees the FTM report
|
||||||
*
|
*
|
||||||
* @param report Pointer to the buffer for receiving the FTM report
|
* @param report Pointer to the buffer for receiving the FTM report
|
||||||
|
@@ -11,7 +11,6 @@
|
|||||||
#include <stddef.h>
|
#include <stddef.h>
|
||||||
#include "sdkconfig.h"
|
#include "sdkconfig.h"
|
||||||
#include "esp_event_base.h"
|
#include "esp_event_base.h"
|
||||||
#include "esp_interface.h"
|
|
||||||
|
|
||||||
#ifdef __cplusplus
|
#ifdef __cplusplus
|
||||||
extern "C" {
|
extern "C" {
|
||||||
@@ -35,10 +34,10 @@ typedef enum {
|
|||||||
* @brief Wi-Fi interface type
|
* @brief Wi-Fi interface type
|
||||||
*/
|
*/
|
||||||
typedef enum {
|
typedef enum {
|
||||||
WIFI_IF_STA = ESP_IF_WIFI_STA, /**< Station interface */
|
WIFI_IF_STA, /**< Station interface */
|
||||||
WIFI_IF_AP = ESP_IF_WIFI_AP, /**< Soft-AP interface */
|
WIFI_IF_AP, /**< Soft-AP interface */
|
||||||
#if CONFIG_SOC_WIFI_NAN_SUPPORT || !CONFIG_SOC_WIFI_ENABLED
|
#if CONFIG_SOC_WIFI_NAN_SUPPORT || !CONFIG_SOC_WIFI_ENABLED
|
||||||
WIFI_IF_NAN = ESP_IF_WIFI_NAN, /**< NAN interface */
|
WIFI_IF_NAN, /**< NAN interface */
|
||||||
#endif
|
#endif
|
||||||
WIFI_IF_MAX /**< Maximum number of interfaces */
|
WIFI_IF_MAX /**< Maximum number of interfaces */
|
||||||
} wifi_interface_t;
|
} wifi_interface_t;
|
||||||
@@ -96,8 +95,8 @@ typedef enum {
|
|||||||
WIFI_AUTH_WAPI_PSK, /**< Authenticate mode : WAPI_PSK */
|
WIFI_AUTH_WAPI_PSK, /**< Authenticate mode : WAPI_PSK */
|
||||||
WIFI_AUTH_OWE, /**< Authenticate mode : OWE */
|
WIFI_AUTH_OWE, /**< Authenticate mode : OWE */
|
||||||
WIFI_AUTH_WPA3_ENT_192, /**< Authenticate mode : WPA3_ENT_SUITE_B_192_BIT */
|
WIFI_AUTH_WPA3_ENT_192, /**< Authenticate mode : WPA3_ENT_SUITE_B_192_BIT */
|
||||||
WIFI_AUTH_WPA3_EXT_PSK, /**< This authentication mode will yield same result as WIFI_AUTH_WPA3_PSK and not recommended to be used. It will be deprecated in future, please use WIFI_AUTH_WPA3_PSK instead. */
|
WIFI_AUTH_DUMMY_1, /**< Placeholder: Previously used by WIFI_AUTH_WPA3_EXT_PSK */
|
||||||
WIFI_AUTH_WPA3_EXT_PSK_MIXED_MODE, /**< This authentication mode will yield same result as WIFI_AUTH_WPA3_PSK and not recommended to be used. It will be deprecated in future, please use WIFI_AUTH_WPA3_PSK instead.*/
|
WIFI_AUTH_DUMMY_2, /**< Placeholder: Previously used by WIFI_AUTH_WPA3_EXT_PSK_MIXED_MODE */
|
||||||
WIFI_AUTH_DPP, /**< Authenticate mode : DPP */
|
WIFI_AUTH_DPP, /**< Authenticate mode : DPP */
|
||||||
WIFI_AUTH_WPA3_ENTERPRISE, /**< Authenticate mode : WPA3-Enterprise Only Mode */
|
WIFI_AUTH_WPA3_ENTERPRISE, /**< Authenticate mode : WPA3-Enterprise Only Mode */
|
||||||
WIFI_AUTH_WPA2_WPA3_ENTERPRISE, /**< Authenticate mode : WPA3-Enterprise Transition Mode */
|
WIFI_AUTH_WPA2_WPA3_ENTERPRISE, /**< Authenticate mode : WPA3-Enterprise Transition Mode */
|
||||||
@@ -114,12 +113,9 @@ typedef enum {
|
|||||||
WIFI_REASON_UNSPECIFIED = 1, /**< Unspecified reason */
|
WIFI_REASON_UNSPECIFIED = 1, /**< Unspecified reason */
|
||||||
WIFI_REASON_AUTH_EXPIRE = 2, /**< Authentication expired */
|
WIFI_REASON_AUTH_EXPIRE = 2, /**< Authentication expired */
|
||||||
WIFI_REASON_AUTH_LEAVE = 3, /**< Deauthentication due to leaving */
|
WIFI_REASON_AUTH_LEAVE = 3, /**< Deauthentication due to leaving */
|
||||||
WIFI_REASON_ASSOC_EXPIRE = 4, /**< Deprecated, will be removed in next IDF major release */
|
|
||||||
WIFI_REASON_DISASSOC_DUE_TO_INACTIVITY = 4, /**< Disassociated due to inactivity */
|
WIFI_REASON_DISASSOC_DUE_TO_INACTIVITY = 4, /**< Disassociated due to inactivity */
|
||||||
WIFI_REASON_ASSOC_TOOMANY = 5, /**< Too many associated stations */
|
WIFI_REASON_ASSOC_TOOMANY = 5, /**< Too many associated stations */
|
||||||
WIFI_REASON_NOT_AUTHED = 6, /**< Deprecated, will be removed in next IDF major release */
|
|
||||||
WIFI_REASON_CLASS2_FRAME_FROM_NONAUTH_STA = 6, /**< Class 2 frame received from nonauthenticated STA */
|
WIFI_REASON_CLASS2_FRAME_FROM_NONAUTH_STA = 6, /**< Class 2 frame received from nonauthenticated STA */
|
||||||
WIFI_REASON_NOT_ASSOCED = 7, /**< Deprecated, will be removed in next IDF major release */
|
|
||||||
WIFI_REASON_CLASS3_FRAME_FROM_NONASSOC_STA = 7, /**< Class 3 frame received from nonassociated STA */
|
WIFI_REASON_CLASS3_FRAME_FROM_NONASSOC_STA = 7, /**< Class 3 frame received from nonassociated STA */
|
||||||
WIFI_REASON_ASSOC_LEAVE = 8, /**< Deassociated due to leaving */
|
WIFI_REASON_ASSOC_LEAVE = 8, /**< Deassociated due to leaving */
|
||||||
WIFI_REASON_ASSOC_NOT_AUTHED = 9, /**< Association but not authenticated */
|
WIFI_REASON_ASSOC_NOT_AUTHED = 9, /**< Association but not authenticated */
|
||||||
@@ -845,8 +841,6 @@ typedef struct {
|
|||||||
uint8_t channel; /**< Primary channel of the FTM Responder */
|
uint8_t channel; /**< Primary channel of the FTM Responder */
|
||||||
uint8_t frm_count; /**< No. of FTM frames requested in terms of 4 or 8 bursts (allowed values - 0(No pref), 16, 24, 32, 64) */
|
uint8_t frm_count; /**< No. of FTM frames requested in terms of 4 or 8 bursts (allowed values - 0(No pref), 16, 24, 32, 64) */
|
||||||
uint16_t burst_period; /**< Requested period between FTM bursts in 100's of milliseconds (allowed values 0(No pref) - 100) */
|
uint16_t burst_period; /**< Requested period between FTM bursts in 100's of milliseconds (allowed values 0(No pref) - 100) */
|
||||||
bool use_get_report_api; /**< True - Using esp_wifi_ftm_get_report to get FTM report, False - Using ftm_report_data from
|
|
||||||
WIFI_EVENT_FTM_REPORT to get FTM report */
|
|
||||||
} wifi_ftm_initiator_cfg_t;
|
} wifi_ftm_initiator_cfg_t;
|
||||||
|
|
||||||
#define ESP_WIFI_NAN_MAX_SVC_SUPPORTED 2 /**< Maximum number of NAN services supported */
|
#define ESP_WIFI_NAN_MAX_SVC_SUPPORTED 2 /**< Maximum number of NAN services supported */
|
||||||
@@ -904,12 +898,12 @@ typedef struct {
|
|||||||
char service_name[ESP_WIFI_MAX_SVC_NAME_LEN]; /**< Service name identifier */
|
char service_name[ESP_WIFI_MAX_SVC_NAME_LEN]; /**< Service name identifier */
|
||||||
wifi_nan_service_type_t type; /**< Service type */
|
wifi_nan_service_type_t type; /**< Service type */
|
||||||
char matching_filter[ESP_WIFI_MAX_FILTER_LEN]; /**< Comma separated filters for filtering services */
|
char matching_filter[ESP_WIFI_MAX_FILTER_LEN]; /**< Comma separated filters for filtering services */
|
||||||
char svc_info[ESP_WIFI_MAX_SVC_INFO_LEN]; /**< To be deprecated in next major release, use ssi instead */
|
|
||||||
uint8_t single_replied_event: 1; /**< Give single Replied event or every time */
|
uint8_t single_replied_event: 1; /**< Give single Replied event or every time */
|
||||||
uint8_t datapath_reqd: 1; /**< NAN Datapath required for the service */
|
uint8_t datapath_reqd: 1; /**< NAN Datapath required for the service */
|
||||||
uint8_t fsd_reqd: 1; /**< Further Service Discovery(FSD) required */
|
uint8_t fsd_reqd: 1; /**< Further Service Discovery(FSD) required */
|
||||||
uint8_t fsd_gas: 1; /**< 0 - Follow-up used for FSD, 1 - GAS used for FSD */
|
uint8_t fsd_gas: 1; /**< 0 - Follow-up used for FSD, 1 - GAS used for FSD */
|
||||||
uint8_t reserved: 4; /**< Reserved */
|
uint8_t ndp_resp_needed: 1; /**< 0 - Auto-Accept NDP Requests, 1 - Require explicit response with esp_wifi_nan_datapath_resp */
|
||||||
|
uint8_t reserved: 3; /**< Reserved */
|
||||||
uint16_t ssi_len; /**< Length of service specific info, maximum allowed length - ESP_WIFI_MAX_SVC_SSI_LEN */
|
uint16_t ssi_len; /**< Length of service specific info, maximum allowed length - ESP_WIFI_MAX_SVC_SSI_LEN */
|
||||||
uint8_t *ssi; /**< Service Specific Info of type wifi_nan_wfa_ssi_t for WFA defined protocols, otherwise proprietary and defined by Applications */
|
uint8_t *ssi; /**< Service Specific Info of type wifi_nan_wfa_ssi_t for WFA defined protocols, otherwise proprietary and defined by Applications */
|
||||||
} wifi_nan_publish_cfg_t;
|
} wifi_nan_publish_cfg_t;
|
||||||
@@ -922,7 +916,6 @@ typedef struct {
|
|||||||
char service_name[ESP_WIFI_MAX_SVC_NAME_LEN]; /**< Service name identifier */
|
char service_name[ESP_WIFI_MAX_SVC_NAME_LEN]; /**< Service name identifier */
|
||||||
wifi_nan_service_type_t type; /**< Service type */
|
wifi_nan_service_type_t type; /**< Service type */
|
||||||
char matching_filter[ESP_WIFI_MAX_FILTER_LEN]; /**< Comma separated filters for filtering services */
|
char matching_filter[ESP_WIFI_MAX_FILTER_LEN]; /**< Comma separated filters for filtering services */
|
||||||
char svc_info[ESP_WIFI_MAX_SVC_INFO_LEN]; /**< To be deprecated in next major release, use ssi instead */
|
|
||||||
uint8_t single_match_event: 1; /**< Give single Match event(per SSI update) or every time */
|
uint8_t single_match_event: 1; /**< Give single Match event(per SSI update) or every time */
|
||||||
uint8_t datapath_reqd: 1; /**< NAN Datapath required for the service */
|
uint8_t datapath_reqd: 1; /**< NAN Datapath required for the service */
|
||||||
uint8_t fsd_reqd: 1; /**< Further Service Discovery(FSD) required */
|
uint8_t fsd_reqd: 1; /**< Further Service Discovery(FSD) required */
|
||||||
@@ -940,7 +933,6 @@ typedef struct {
|
|||||||
uint8_t inst_id; /**< Own service instance id */
|
uint8_t inst_id; /**< Own service instance id */
|
||||||
uint8_t peer_inst_id; /**< Peer's service instance id */
|
uint8_t peer_inst_id; /**< Peer's service instance id */
|
||||||
uint8_t peer_mac[6]; /**< Peer's MAC address */
|
uint8_t peer_mac[6]; /**< Peer's MAC address */
|
||||||
char svc_info[ESP_WIFI_MAX_SVC_INFO_LEN]; /**< To be deprecated in next major release, use ssi instead */
|
|
||||||
uint16_t ssi_len; /**< Length of service specific info, maximum allowed length - ESP_WIFI_MAX_FUP_SSI_LEN */
|
uint16_t ssi_len; /**< Length of service specific info, maximum allowed length - ESP_WIFI_MAX_FUP_SSI_LEN */
|
||||||
uint8_t *ssi; /**< Service Specific Info of type wifi_nan_wfa_ssi_t for WFA defined protocols, otherwise proprietary and defined by Applications */
|
uint8_t *ssi; /**< Service Specific Info of type wifi_nan_wfa_ssi_t for WFA defined protocols, otherwise proprietary and defined by Applications */
|
||||||
} wifi_nan_followup_params_t;
|
} wifi_nan_followup_params_t;
|
||||||
@@ -1285,9 +1277,7 @@ typedef struct {
|
|||||||
uint32_t rtt_raw; /**< Raw average Round-Trip-Time with peer in Nano-Seconds */
|
uint32_t rtt_raw; /**< Raw average Round-Trip-Time with peer in Nano-Seconds */
|
||||||
uint32_t rtt_est; /**< Estimated Round-Trip-Time with peer in Nano-Seconds */
|
uint32_t rtt_est; /**< Estimated Round-Trip-Time with peer in Nano-Seconds */
|
||||||
uint32_t dist_est; /**< Estimated one-way distance in Centi-Meters */
|
uint32_t dist_est; /**< Estimated one-way distance in Centi-Meters */
|
||||||
wifi_ftm_report_entry_t *ftm_report_data; /**< Pointer to FTM Report, should be freed after use. Note: Highly recommended
|
uint8_t ftm_report_num_entries; /**< Number of entries in the FTM Report, use esp_wifi_ftm_get_report to fetch it */
|
||||||
to use API esp_wifi_ftm_get_report to get the report instead of using this */
|
|
||||||
uint8_t ftm_report_num_entries; /**< Number of entries in the FTM Report data */
|
|
||||||
} wifi_event_ftm_report_t;
|
} wifi_event_ftm_report_t;
|
||||||
|
|
||||||
#define WIFI_STATIS_BUFFER (1<<0) /**< Buffer status */
|
#define WIFI_STATIS_BUFFER (1<<0) /**< Buffer status */
|
||||||
@@ -1373,7 +1363,7 @@ typedef struct {
|
|||||||
uint32_t reserved_2; /**< Reserved */
|
uint32_t reserved_2; /**< Reserved */
|
||||||
uint8_t ssi_version; /**< Indicates version of SSI in Publish instance, 0 if not available */
|
uint8_t ssi_version; /**< Indicates version of SSI in Publish instance, 0 if not available */
|
||||||
uint16_t ssi_len; /**< Length of service specific info */
|
uint16_t ssi_len; /**< Length of service specific info */
|
||||||
uint8_t ssi[]; /**< Service specific info of Publisher */
|
uint8_t *ssi; /**< Service specific info of Publisher */
|
||||||
} wifi_event_nan_svc_match_t;
|
} wifi_event_nan_svc_match_t;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -1386,7 +1376,7 @@ typedef struct {
|
|||||||
uint32_t reserved_1; /**< Reserved */
|
uint32_t reserved_1; /**< Reserved */
|
||||||
uint32_t reserved_2; /**< Reserved */
|
uint32_t reserved_2; /**< Reserved */
|
||||||
uint16_t ssi_len; /**< Length of service specific info */
|
uint16_t ssi_len; /**< Length of service specific info */
|
||||||
uint8_t ssi[]; /**< Service specific info of Subscriber */
|
uint8_t *ssi; /**< Service specific info of Subscriber */
|
||||||
} wifi_event_nan_replied_t;
|
} wifi_event_nan_replied_t;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -1396,11 +1386,10 @@ typedef struct {
|
|||||||
uint8_t inst_id; /**< Our Service Identifier */
|
uint8_t inst_id; /**< Our Service Identifier */
|
||||||
uint8_t peer_inst_id; /**< Peer's Service Identifier */
|
uint8_t peer_inst_id; /**< Peer's Service Identifier */
|
||||||
uint8_t peer_if_mac[6]; /**< Peer's NAN Interface MAC */
|
uint8_t peer_if_mac[6]; /**< Peer's NAN Interface MAC */
|
||||||
uint8_t peer_svc_info[ESP_WIFI_MAX_SVC_INFO_LEN];/**< To be deprecated in next major release, use ssi instead */
|
|
||||||
uint32_t reserved_1; /**< Reserved */
|
uint32_t reserved_1; /**< Reserved */
|
||||||
uint32_t reserved_2; /**< Reserved */
|
uint32_t reserved_2; /**< Reserved */
|
||||||
uint16_t ssi_len; /**< Length of service specific info */
|
uint16_t ssi_len; /**< Length of service specific info */
|
||||||
uint8_t ssi[]; /**< Service specific info from Follow-up */
|
uint8_t *ssi; /**< Service specific info from Follow-up */
|
||||||
} wifi_event_nan_receive_t;
|
} wifi_event_nan_receive_t;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -1411,11 +1400,10 @@ typedef struct {
|
|||||||
uint8_t ndp_id; /**< NDP instance id */
|
uint8_t ndp_id; /**< NDP instance id */
|
||||||
uint8_t peer_nmi[6]; /**< Peer's NAN Management Interface MAC */
|
uint8_t peer_nmi[6]; /**< Peer's NAN Management Interface MAC */
|
||||||
uint8_t peer_ndi[6]; /**< Peer's NAN Data Interface MAC */
|
uint8_t peer_ndi[6]; /**< Peer's NAN Data Interface MAC */
|
||||||
uint8_t svc_info[ESP_WIFI_MAX_SVC_INFO_LEN];/**< To be deprecated in next major release, use ssi instead */
|
|
||||||
uint32_t reserved_1; /**< Reserved */
|
uint32_t reserved_1; /**< Reserved */
|
||||||
uint32_t reserved_2; /**< Reserved */
|
uint32_t reserved_2; /**< Reserved */
|
||||||
uint16_t ssi_len; /**< Length of service specific info */
|
uint16_t ssi_len; /**< Length of service specific info */
|
||||||
uint8_t ssi[]; /**< Service specific info from NDP/NDPE Attribute */
|
uint8_t *ssi; /**< Service specific info from NDP/NDPE Attribute */
|
||||||
} wifi_event_ndp_indication_t;
|
} wifi_event_ndp_indication_t;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -1427,11 +1415,10 @@ typedef struct {
|
|||||||
uint8_t peer_nmi[6]; /**< Peer's NAN Management Interface MAC */
|
uint8_t peer_nmi[6]; /**< Peer's NAN Management Interface MAC */
|
||||||
uint8_t peer_ndi[6]; /**< Peer's NAN Data Interface MAC */
|
uint8_t peer_ndi[6]; /**< Peer's NAN Data Interface MAC */
|
||||||
uint8_t own_ndi[6]; /**< Own NAN Data Interface MAC */
|
uint8_t own_ndi[6]; /**< Own NAN Data Interface MAC */
|
||||||
uint8_t svc_info[ESP_WIFI_MAX_SVC_INFO_LEN];/**< To be deprecated in next major release, use ssi instead */
|
|
||||||
uint32_t reserved_1; /**< Reserved */
|
uint32_t reserved_1; /**< Reserved */
|
||||||
uint32_t reserved_2; /**< Reserved */
|
uint32_t reserved_2; /**< Reserved */
|
||||||
uint16_t ssi_len; /**< Length of Service Specific Info */
|
uint16_t ssi_len; /**< Length of Service Specific Info */
|
||||||
uint8_t ssi[]; /**< Service specific info from NDP/NDPE Attribute */
|
uint8_t *ssi; /**< Service specific info from NDP/NDPE Attribute */
|
||||||
} wifi_event_ndp_confirm_t;
|
} wifi_event_ndp_confirm_t;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -1447,7 +1434,6 @@ typedef struct {
|
|||||||
* @brief Argument structure for WIFI_EVENT_STA_NEIGHBOR_REP event
|
* @brief Argument structure for WIFI_EVENT_STA_NEIGHBOR_REP event
|
||||||
*/
|
*/
|
||||||
typedef struct {
|
typedef struct {
|
||||||
uint8_t report[ESP_WIFI_MAX_NEIGHBOR_REP_LEN]; /**< Neighbor Report received from the AP (will be deprecated in next major release, use n_report instead)*/
|
|
||||||
uint16_t report_len; /**< Length of the report*/
|
uint16_t report_len; /**< Length of the report*/
|
||||||
uint8_t n_report[]; /**< Neighbor Report received from the AP*/
|
uint8_t n_report[]; /**< Neighbor Report received from the AP*/
|
||||||
} wifi_event_neighbor_report_t;
|
} wifi_event_neighbor_report_t;
|
||||||
|
Submodule components/esp_wifi/lib updated: c34ffa6fcd...04117765f0
@@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
* SPDX-FileCopyrightText: 2023 Espressif Systems (Shanghai) CO LTD
|
* SPDX-FileCopyrightText: 2023-2025 Espressif Systems (Shanghai) CO LTD
|
||||||
*
|
*
|
||||||
* SPDX-License-Identifier: Apache-2.0
|
* SPDX-License-Identifier: Apache-2.0
|
||||||
*/
|
*/
|
||||||
@@ -67,13 +67,12 @@ esp_err_t esp_wifi_nan_stop(void);
|
|||||||
* @attention This API should be called after esp_wifi_nan_start().
|
* @attention This API should be called after esp_wifi_nan_start().
|
||||||
*
|
*
|
||||||
* @param publish_cfg Configuration parameters for publishing a service.
|
* @param publish_cfg Configuration parameters for publishing a service.
|
||||||
* @param ndp_resp_needed Setting this true will require user response for every NDP Req using esp_wifi_nan_datapath_resp API.
|
|
||||||
*
|
*
|
||||||
* @return
|
* @return
|
||||||
* - non-zero: Publish service identifier
|
* - non-zero: Publish service identifier
|
||||||
* - zero: failed
|
* - zero: failed
|
||||||
*/
|
*/
|
||||||
uint8_t esp_wifi_nan_publish_service(const wifi_nan_publish_cfg_t *publish_cfg, bool ndp_resp_needed);
|
uint8_t esp_wifi_nan_publish_service(const wifi_nan_publish_cfg_t *publish_cfg);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @brief Subscribe for a service within the NAN cluster
|
* @brief Subscribe for a service within the NAN cluster
|
||||||
@@ -128,7 +127,7 @@ uint8_t esp_wifi_nan_datapath_req(wifi_nan_datapath_req_t *req);
|
|||||||
/**
|
/**
|
||||||
* @brief Respond to a NAN Datapath request with Accept or Reject
|
* @brief Respond to a NAN Datapath request with Accept or Reject
|
||||||
*
|
*
|
||||||
* @attention This API should be called if ndp_resp_needed is set True by the Publisher and
|
* @attention This API should be called if ndp_resp_needed is set 1 in wifi_nan_publish_cfg_t and
|
||||||
* a WIFI_EVENT_NDP_INDICATION event is received due to an incoming NDP request.
|
* a WIFI_EVENT_NDP_INDICATION event is received due to an incoming NDP request.
|
||||||
*
|
*
|
||||||
* @param resp NAN Datapath Response parameters.
|
* @param resp NAN Datapath Response parameters.
|
||||||
|
@@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
* SPDX-FileCopyrightText: 2023-2024 Espressif Systems (Shanghai) CO LTD
|
* SPDX-FileCopyrightText: 2023-2025 Espressif Systems (Shanghai) CO LTD
|
||||||
*
|
*
|
||||||
* SPDX-License-Identifier: Apache-2.0
|
* SPDX-License-Identifier: Apache-2.0
|
||||||
*/
|
*/
|
||||||
@@ -476,8 +476,8 @@ static void nan_app_action_receive(void *arg, esp_event_base_t event_base, int32
|
|||||||
ESP_LOGD(TAG, "Received payload from Peer "MACSTR" [Peer Service id - %d] - ", MAC2STR(evt->peer_if_mac), evt->peer_inst_id);
|
ESP_LOGD(TAG, "Received payload from Peer "MACSTR" [Peer Service id - %d] - ", MAC2STR(evt->peer_if_mac), evt->peer_inst_id);
|
||||||
ESP_LOG_BUFFER_HEXDUMP(TAG, evt->ssi, evt->ssi_len, ESP_LOG_DEBUG);
|
ESP_LOG_BUFFER_HEXDUMP(TAG, evt->ssi, evt->ssi_len, ESP_LOG_DEBUG);
|
||||||
} else {
|
} else {
|
||||||
ESP_LOGD(TAG, "Received message '%s' from Peer "MACSTR" [Peer Service id - %d]",
|
ESP_LOGD(TAG, "Received message from Peer "MACSTR" [Peer Service id - %d]",
|
||||||
evt->peer_svc_info, MAC2STR(evt->peer_if_mac), evt->peer_inst_id);
|
MAC2STR(evt->peer_if_mac), evt->peer_inst_id);
|
||||||
}
|
}
|
||||||
|
|
||||||
NAN_DATA_LOCK();
|
NAN_DATA_LOCK();
|
||||||
@@ -826,7 +826,7 @@ esp_err_t esp_wifi_nan_stop(void)
|
|||||||
return ESP_OK;
|
return ESP_OK;
|
||||||
}
|
}
|
||||||
|
|
||||||
uint8_t esp_wifi_nan_publish_service(const wifi_nan_publish_cfg_t *publish_cfg, bool ndp_resp_needed)
|
uint8_t esp_wifi_nan_publish_service(const wifi_nan_publish_cfg_t *publish_cfg)
|
||||||
{
|
{
|
||||||
uint8_t pub_id;
|
uint8_t pub_id;
|
||||||
|
|
||||||
@@ -865,7 +865,7 @@ uint8_t esp_wifi_nan_publish_service(const wifi_nan_publish_cfg_t *publish_cfg,
|
|||||||
}
|
}
|
||||||
|
|
||||||
ESP_LOGI(TAG, "Started Publishing %s [Service ID - %u]", publish_cfg->service_name, pub_id);
|
ESP_LOGI(TAG, "Started Publishing %s [Service ID - %u]", publish_cfg->service_name, pub_id);
|
||||||
nan_record_own_svc(pub_id, ESP_NAN_PUBLISH, publish_cfg->service_name, ndp_resp_needed);
|
nan_record_own_svc(pub_id, ESP_NAN_PUBLISH, publish_cfg->service_name, publish_cfg->ndp_resp_needed);
|
||||||
NAN_DATA_UNLOCK();
|
NAN_DATA_UNLOCK();
|
||||||
|
|
||||||
return pub_id;
|
return pub_id;
|
||||||
@@ -969,9 +969,6 @@ esp_err_t esp_wifi_nan_send_message(wifi_nan_followup_params_t *fup_params)
|
|||||||
ESP_LOGD(TAG, "Sent below payload to Peer "MACSTR" with Service ID %d",
|
ESP_LOGD(TAG, "Sent below payload to Peer "MACSTR" with Service ID %d",
|
||||||
MAC2STR(fup_params->peer_mac), fup_params->peer_inst_id);
|
MAC2STR(fup_params->peer_mac), fup_params->peer_inst_id);
|
||||||
ESP_LOG_BUFFER_HEXDUMP(TAG, fup_params->ssi, fup_params->ssi_len, ESP_LOG_DEBUG);
|
ESP_LOG_BUFFER_HEXDUMP(TAG, fup_params->ssi, fup_params->ssi_len, ESP_LOG_DEBUG);
|
||||||
} else {
|
|
||||||
ESP_LOGI(TAG, "Sent message '%s' to Peer "MACSTR" with Service ID %d", fup_params->svc_info,
|
|
||||||
MAC2STR(fup_params->peer_mac), fup_params->peer_inst_id);
|
|
||||||
}
|
}
|
||||||
return ESP_OK;
|
return ESP_OK;
|
||||||
}
|
}
|
||||||
|
@@ -373,13 +373,13 @@ static void roaming_app_neighbor_report_recv_handler(void* arg, esp_event_base_t
|
|||||||
wifi_event_neighbor_report_t *neighbor_report_event = (wifi_event_neighbor_report_t*)event_data;
|
wifi_event_neighbor_report_t *neighbor_report_event = (wifi_event_neighbor_report_t*)event_data;
|
||||||
ESP_LOGD(ROAMING_TAG, "Received cb for Neighbor Report Request");
|
ESP_LOGD(ROAMING_TAG, "Received cb for Neighbor Report Request");
|
||||||
|
|
||||||
uint8_t *pos = (uint8_t *)neighbor_report_event->report;
|
uint8_t *pos = (uint8_t *)neighbor_report_event->n_report;
|
||||||
if (!pos) {
|
uint8_t report_len = neighbor_report_event->report_len;
|
||||||
|
if (!report_len) {
|
||||||
ESP_LOGE(ROAMING_TAG, "Neighbor report is empty");
|
ESP_LOGE(ROAMING_TAG, "Neighbor report is empty");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
uint8_t report_len = neighbor_report_event->report_len;
|
|
||||||
/* dump report info */
|
/* dump report info */
|
||||||
ESP_LOGD(ROAMING_TAG, "rrm: neighbor report len=%d", report_len);
|
ESP_LOGD(ROAMING_TAG, "rrm: neighbor report len=%d", report_len);
|
||||||
ESP_LOG_BUFFER_HEXDUMP(ROAMING_TAG, pos, report_len, ESP_LOG_DEBUG);
|
ESP_LOG_BUFFER_HEXDUMP(ROAMING_TAG, pos, report_len, ESP_LOG_DEBUG);
|
||||||
|
@@ -32,39 +32,16 @@ typedef enum dpp_bootstrap_type {
|
|||||||
DPP_BOOTSTRAP_NFC_URI, /**< NFC URI record Method */
|
DPP_BOOTSTRAP_NFC_URI, /**< NFC URI record Method */
|
||||||
} esp_supp_dpp_bootstrap_t;
|
} esp_supp_dpp_bootstrap_t;
|
||||||
|
|
||||||
/** @brief Types of Callback Events received from DPP Supplicant. */
|
|
||||||
typedef enum {
|
|
||||||
ESP_SUPP_DPP_URI_READY, /**< URI is ready through Bootstrapping */
|
|
||||||
ESP_SUPP_DPP_CFG_RECVD, /**< Config received via DPP Authentication */
|
|
||||||
ESP_SUPP_DPP_PDR_RECVD, /**< Peer Discovery Response is received */
|
|
||||||
ESP_SUPP_DPP_FAIL, /**< DPP Authentication failure */
|
|
||||||
} esp_supp_dpp_event_t;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @brief Callback function for receiving DPP Events from Supplicant.
|
|
||||||
*
|
|
||||||
* Callback function will be called with DPP related information.
|
|
||||||
*
|
|
||||||
* @param evt DPP event ID
|
|
||||||
* @param data Event data payload
|
|
||||||
*/
|
|
||||||
typedef void (*esp_supp_dpp_event_cb_t)(esp_supp_dpp_event_t evt, void *data);
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @brief Initialize DPP Supplicant
|
* @brief Initialize DPP Supplicant
|
||||||
*
|
*
|
||||||
* Starts DPP Supplicant and initializes related Data Structures.
|
* Starts DPP Supplicant and initializes related Data Structures.
|
||||||
*
|
*
|
||||||
* @note The `evt_cb` parameter is deprecated and will be ignored in future IDF versions.
|
|
||||||
* Directly register for WiFi events to get DPP events.
|
|
||||||
*
|
|
||||||
* @param evt_cb (Deprecated) Callback function to receive DPP related events
|
|
||||||
*
|
|
||||||
* return
|
* return
|
||||||
* - ESP_OK: Success
|
* - ESP_OK: Success
|
||||||
* - ESP_FAIL: Failure
|
* - ESP_FAIL: Failure
|
||||||
*/
|
*/
|
||||||
esp_err_t esp_supp_dpp_init(esp_supp_dpp_event_cb_t evt_cb);
|
esp_err_t esp_supp_dpp_init(void);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @brief De-initialize DPP Supplicant
|
* @brief De-initialize DPP Supplicant
|
||||||
|
@@ -26,23 +26,6 @@ extern "C" {
|
|||||||
*/
|
*/
|
||||||
typedef void (*neighbor_rep_request_cb)(void *ctx, const uint8_t *report, size_t report_len);
|
typedef void (*neighbor_rep_request_cb)(void *ctx, const uint8_t *report, size_t report_len);
|
||||||
|
|
||||||
/**
|
|
||||||
* @brief Send Radio measurement neighbor report request to connected AP
|
|
||||||
*
|
|
||||||
* @deprecated This function is deprecated and will be removed in the future.
|
|
||||||
* Please use 'esp_rrm_send_neighbor_report_request'
|
|
||||||
* @param cb: callback function for neighbor report
|
|
||||||
* @param cb_ctx: callback context
|
|
||||||
*
|
|
||||||
* @return
|
|
||||||
* - 0: success
|
|
||||||
* - -1: AP does not support RRM
|
|
||||||
* - -2: station not connected to AP
|
|
||||||
*/
|
|
||||||
|
|
||||||
__attribute__((deprecated("Use 'esp_rrm_send_neighbor_report_request' instead")))
|
|
||||||
int esp_rrm_send_neighbor_rep_request(neighbor_rep_request_cb cb,
|
|
||||||
void *cb_ctx);
|
|
||||||
/**
|
/**
|
||||||
* @brief Send Radio measurement neighbor report request to connected AP
|
* @brief Send Radio measurement neighbor report request to connected AP
|
||||||
* @return
|
* @return
|
||||||
|
@@ -1,332 +0,0 @@
|
|||||||
/*
|
|
||||||
* SPDX-FileCopyrightText: 2019-2023 Espressif Systems (Shanghai) CO LTD
|
|
||||||
*
|
|
||||||
* SPDX-License-Identifier: Apache-2.0
|
|
||||||
*/
|
|
||||||
|
|
||||||
#ifndef _ESP_WPA2_H
|
|
||||||
#define _ESP_WPA2_H
|
|
||||||
|
|
||||||
#pragma message("esp_wpa2.h is deprecated. Use esp_eap_client.h instead.")
|
|
||||||
|
|
||||||
#include "esp_eap_client.h"
|
|
||||||
#ifdef __cplusplus
|
|
||||||
extern "C" {
|
|
||||||
#endif
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @brief Enable wpa2 enterprise authentication.
|
|
||||||
*
|
|
||||||
* @deprecated This function is deprecated and will be removed in the future.
|
|
||||||
* Please use `esp_wifi_sta_enterprise_enable()` instead.
|
|
||||||
*
|
|
||||||
* @attention 1. wpa2 enterprise authentication can only be used when station mode is enabled.
|
|
||||||
* @attention 2. wpa2 enterprise authentication supports EAP-FAST, TLS, PEAP, TTLS(EAP, MSCHAPv2, MSCHAP, PAP, CHAP) methods.
|
|
||||||
*
|
|
||||||
* @return
|
|
||||||
* - ESP_OK: succeed.
|
|
||||||
* - ESP_ERR_NO_MEM: fail(internal memory malloc fail)
|
|
||||||
*/
|
|
||||||
__attribute__((deprecated("Use 'esp_wifi_sta_enterprise_enable' instead")))
|
|
||||||
esp_err_t esp_wifi_sta_wpa2_ent_enable(void);
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @brief Disable wpa2 enterprise authentication.
|
|
||||||
*
|
|
||||||
* @deprecated This function is deprecated and will be removed in the future.
|
|
||||||
* Please use `esp_wifi_sta_enterprise_disable()` instead.
|
|
||||||
*
|
|
||||||
* @attention 1. wpa2 enterprise authentication can only be used when station mode is enabled.
|
|
||||||
* @attention 2. wpa2 enterprise authentication supports EAP-FAST, TLS, PEAP, TTLS(EAP, MSCHAPv2, MSCHAP, PAP, CHAP) methods.
|
|
||||||
*
|
|
||||||
* @return
|
|
||||||
* - ESP_OK: succeed.
|
|
||||||
*/
|
|
||||||
__attribute__((deprecated("Use 'esp_wifi_sta_enterprise_disable' instead")))
|
|
||||||
esp_err_t esp_wifi_sta_wpa2_ent_disable(void);
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @brief Set identity for PEAP/TTLS method.
|
|
||||||
*
|
|
||||||
* @deprecated This function is deprecated and will be removed in the future.
|
|
||||||
* Please use `esp_eap_client_set_identity` instead.
|
|
||||||
*
|
|
||||||
* @attention The API only passes the parameter identity to the global pointer variable in wpa2 enterprise module.
|
|
||||||
*
|
|
||||||
* @param identity: point to address where stores the identity;
|
|
||||||
* @param len: length of identity, limited to 1~127
|
|
||||||
*
|
|
||||||
* @return
|
|
||||||
* - ESP_OK: succeed
|
|
||||||
* - ESP_ERR_INVALID_ARG: fail(len <= 0 or len >= 128)
|
|
||||||
* - ESP_ERR_NO_MEM: fail(internal memory malloc fail)
|
|
||||||
*/
|
|
||||||
__attribute__((deprecated("Use 'esp_eap_client_set_identity' instead")))
|
|
||||||
esp_err_t esp_wifi_sta_wpa2_ent_set_identity(const unsigned char *identity, int len);
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @brief Clear identity for PEAP/TTLS method.
|
|
||||||
*
|
|
||||||
* @deprecated This function is deprecated and will be removed in the future.
|
|
||||||
* Please use `esp_eap_client_clear_identity` instead.
|
|
||||||
*
|
|
||||||
*/
|
|
||||||
__attribute__((deprecated("Use 'esp_eap_client_clear_identity' instead")))
|
|
||||||
void esp_wifi_sta_wpa2_ent_clear_identity(void);
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @brief Set username for PEAP/TTLS method.
|
|
||||||
*
|
|
||||||
* @deprecated This function is deprecated and will be removed in the future.
|
|
||||||
* Please use `esp_eap_client_set_username` instead.
|
|
||||||
*
|
|
||||||
* @param username: point to address where stores the username;
|
|
||||||
* @param len: length of username, limited to 1~127
|
|
||||||
*
|
|
||||||
* @return
|
|
||||||
* - ESP_OK: succeed
|
|
||||||
* - ESP_ERR_INVALID_ARG: fail(len <= 0 or len >= 128)
|
|
||||||
* - ESP_ERR_NO_MEM: fail(internal memory malloc fail)
|
|
||||||
*/
|
|
||||||
__attribute__((deprecated("Use 'esp_eap_client_set_username' instead")))
|
|
||||||
esp_err_t esp_wifi_sta_wpa2_ent_set_username(const unsigned char *username, int len);
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @brief Clear username for PEAP/TTLS method.
|
|
||||||
* @deprecated This function is deprecated and will be removed in the future.
|
|
||||||
* Please use `esp_eap_client_clear_username` instead.
|
|
||||||
*
|
|
||||||
*/
|
|
||||||
__attribute__((deprecated("Use 'esp_eap_client_clear_username' instead")))
|
|
||||||
void esp_wifi_sta_wpa2_ent_clear_username(void);
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @brief Set password for PEAP/TTLS method..
|
|
||||||
*
|
|
||||||
* @deprecated This function is deprecated and will be removed in the future.
|
|
||||||
* Please use `esp_eap_client_set_password` instead.
|
|
||||||
*
|
|
||||||
* @param password: point to address where stores the password;
|
|
||||||
* @param len: length of password(len > 0)
|
|
||||||
*
|
|
||||||
* @return
|
|
||||||
* - ESP_OK: succeed
|
|
||||||
* - ESP_ERR_INVALID_ARG: fail(len <= 0)
|
|
||||||
* - ESP_ERR_NO_MEM: fail(internal memory malloc fail)
|
|
||||||
*/
|
|
||||||
__attribute__((deprecated("Use 'esp_eap_client_set_password' instead")))
|
|
||||||
esp_err_t esp_wifi_sta_wpa2_ent_set_password(const unsigned char *password, int len);
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @brief Clear password for PEAP/TTLS method..
|
|
||||||
*
|
|
||||||
* @deprecated This function is deprecated and will be removed in the future.
|
|
||||||
* Please use `esp_eap_client_clear_password` instead.
|
|
||||||
*/
|
|
||||||
__attribute__((deprecated("Use 'esp_eap_client_clear_password' instead")))
|
|
||||||
void esp_wifi_sta_wpa2_ent_clear_password(void);
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @brief Set new password for MSCHAPv2 method..
|
|
||||||
*
|
|
||||||
* @deprecated This function is deprecated and will be removed in the future.
|
|
||||||
* Please use `esp_eap_client_set_new_password` instead.
|
|
||||||
*
|
|
||||||
* @attention 1. The new password is used to substitute the old password when eap-mschapv2 failure request message with error code ERROR_PASSWD_EXPIRED is received.
|
|
||||||
*
|
|
||||||
* @param new_password: point to address where stores the password;
|
|
||||||
* @param len: length of password
|
|
||||||
*
|
|
||||||
* @return
|
|
||||||
* - ESP_OK: succeed
|
|
||||||
* - ESP_ERR_INVALID_ARG: fail(len <= 0)
|
|
||||||
* - ESP_ERR_NO_MEM: fail(internal memory malloc fail)
|
|
||||||
*/
|
|
||||||
__attribute__((deprecated("Use 'esp_eap_client_set_new_password' instead")))
|
|
||||||
esp_err_t esp_wifi_sta_wpa2_ent_set_new_password(const unsigned char *new_password, int len);
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @brief Clear new password for MSCHAPv2 method..
|
|
||||||
*
|
|
||||||
* @deprecated This function is deprecated and will be removed in the future.
|
|
||||||
* Please use `esp_eap_client_clear_new_password` instead.
|
|
||||||
*
|
|
||||||
*/
|
|
||||||
__attribute__((deprecated("Use 'esp_eap_client_clear_new_password' instead")))
|
|
||||||
void esp_wifi_sta_wpa2_ent_clear_new_password(void);
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @brief Set CA certificate for PEAP/TTLS method.
|
|
||||||
*
|
|
||||||
* @deprecated This function is deprecated and will be removed in the future.
|
|
||||||
* Please use `esp_eap_client_set_ca_cert` instead.
|
|
||||||
*
|
|
||||||
* @attention 1. The API only passes the parameter ca_cert to the global pointer variable in wpa2 enterprise module.
|
|
||||||
* @attention 2. The ca_cert should be zero terminated.
|
|
||||||
*
|
|
||||||
* @param ca_cert: point to address where stores the CA certificate;
|
|
||||||
* @param ca_cert_len: length of ca_cert
|
|
||||||
*
|
|
||||||
* @return
|
|
||||||
* - ESP_OK: succeed
|
|
||||||
*/
|
|
||||||
__attribute__((deprecated("Use 'esp_eap_client_set_ca_cert' instead")))
|
|
||||||
esp_err_t esp_wifi_sta_wpa2_ent_set_ca_cert(const unsigned char *ca_cert, int ca_cert_len);
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @brief Clear CA certificate for PEAP/TTLS method.
|
|
||||||
*
|
|
||||||
* @deprecated This function is deprecated and will be removed in the future.
|
|
||||||
* Please use `esp_eap_client_clear_ca_cert` instead.
|
|
||||||
*
|
|
||||||
*/
|
|
||||||
__attribute__((deprecated("Use 'esp_eap_client_clear_ca_cert' instead")))
|
|
||||||
void esp_wifi_sta_wpa2_ent_clear_ca_cert(void);
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @brief Set client certificate and key.
|
|
||||||
*
|
|
||||||
* @deprecated This function is deprecated and will be removed in the future.
|
|
||||||
* Please use `esp_eap_client_set_certificate_and_key` instead.
|
|
||||||
*
|
|
||||||
* @attention 1. The API only passes the parameter client_cert, private_key and private_key_passwd to the global pointer variable in wpa2 enterprise module.
|
|
||||||
* @attention 2. The client_cert, private_key and private_key_passwd should be zero terminated.
|
|
||||||
*
|
|
||||||
* @param client_cert: point to address where stores the client certificate;
|
|
||||||
* @param client_cert_len: length of client certificate;
|
|
||||||
* @param private_key: point to address where stores the private key;
|
|
||||||
* @param private_key_len: length of private key, limited to 1~2048;
|
|
||||||
* @param private_key_password: point to address where stores the private key password;
|
|
||||||
* @param private_key_password_len: length of private key password;
|
|
||||||
*
|
|
||||||
* @return
|
|
||||||
* - ESP_OK: succeed
|
|
||||||
*/
|
|
||||||
__attribute__((deprecated("Use 'esp_eap_client_set_certificate_and_key' instead")))
|
|
||||||
esp_err_t esp_wifi_sta_wpa2_ent_set_cert_key(const unsigned char *client_cert, int client_cert_len,
|
|
||||||
const unsigned char *private_key, int private_key_len,
|
|
||||||
const unsigned char *private_key_passwd, int private_key_passwd_len);
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @brief Clear client certificate and key.
|
|
||||||
*
|
|
||||||
* @deprecated This function is deprecated and will be removed in the future.
|
|
||||||
* Please use `esp_eap_client_clear_certificate_and_key` instead.
|
|
||||||
*
|
|
||||||
*/
|
|
||||||
__attribute__((deprecated("Use 'esp_eap_client_clear_certificate_and_key' instead")))
|
|
||||||
void esp_wifi_sta_wpa2_ent_clear_cert_key(void);
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @brief Set wpa2 enterprise certs time check(disable or not).
|
|
||||||
*
|
|
||||||
* @deprecated This function is deprecated and will be removed in the future.
|
|
||||||
* Please use `esp_eap_client_set_disable_time_check` instead.
|
|
||||||
*
|
|
||||||
* @param true: disable wpa2 enterprise certs time check
|
|
||||||
* @param false: enable wpa2 enterprise certs time check
|
|
||||||
*
|
|
||||||
* @return
|
|
||||||
* - ESP_OK: succeed
|
|
||||||
*/
|
|
||||||
__attribute__((deprecated("Use 'esp_eap_client_set_disable_time_check' instead")))
|
|
||||||
esp_err_t esp_wifi_sta_wpa2_ent_set_disable_time_check(bool disable);
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @brief Get wpa2 enterprise certs time check(disable or not).
|
|
||||||
*
|
|
||||||
* @deprecated This function is deprecated and will be removed in the future.
|
|
||||||
* Please use `esp_eap_client_get_disable_time_check` instead.
|
|
||||||
*
|
|
||||||
* @param disable: store disable value
|
|
||||||
*
|
|
||||||
* @return
|
|
||||||
* - ESP_OK: succeed
|
|
||||||
*/
|
|
||||||
__attribute__((deprecated("Use 'esp_eap_client_get_disable_time_check' instead")))
|
|
||||||
esp_err_t esp_wifi_sta_wpa2_ent_get_disable_time_check(bool *disable);
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @brief Set wpa2 enterprise ttls phase2 method
|
|
||||||
*
|
|
||||||
* @deprecated This function is deprecated and will be removed in the future.
|
|
||||||
* Please use `esp_eap_client_set_ttls_phase2_method` instead.
|
|
||||||
*
|
|
||||||
* @param type: the type of phase 2 method to be used
|
|
||||||
*
|
|
||||||
* @return
|
|
||||||
* - ESP_OK: succeed
|
|
||||||
*/
|
|
||||||
__attribute__((deprecated("Use 'esp_eap_client_set_ttls_phase2_method' instead")))
|
|
||||||
esp_err_t esp_wifi_sta_wpa2_ent_set_ttls_phase2_method(esp_eap_ttls_phase2_types type);
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @brief enable/disable 192 bit suite b certification checks
|
|
||||||
*
|
|
||||||
* @deprecated This function is deprecated and will be removed in the future.
|
|
||||||
* Please use `esp_eap_client_set_suiteb_192bit_certification` instead.
|
|
||||||
*
|
|
||||||
* @param enable: bool to enable/disable it.
|
|
||||||
*
|
|
||||||
* @return
|
|
||||||
* - ESP_OK: succeed
|
|
||||||
*/
|
|
||||||
__attribute__((deprecated("Use 'esp_eap_client_set_suiteb_192bit_certification' instead")))
|
|
||||||
esp_err_t esp_wifi_sta_wpa2_set_suiteb_192bit_certification(bool enable);
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @brief Set client pac file
|
|
||||||
*
|
|
||||||
* @deprecated This function is deprecated and will be removed in the future.
|
|
||||||
* Please use `esp_eap_client_set_pac_file` instead.
|
|
||||||
*
|
|
||||||
* @attention 1. For files read from the file system, length has to be decremented by 1 byte.
|
|
||||||
* @attention 2. Disabling the ESP_WIFI_MBEDTLS_TLS_CLIENT config is required to use EAP-FAST.
|
|
||||||
*
|
|
||||||
* @param pac_file: pointer to the pac file
|
|
||||||
* pac_file_len: length of the pac file
|
|
||||||
*
|
|
||||||
* @return
|
|
||||||
* - ESP_OK: succeed
|
|
||||||
* - ESP_ERR_NO_MEM: fail(internal memory malloc fail)
|
|
||||||
*/
|
|
||||||
__attribute__((deprecated("Use 'esp_eap_client_set_pac_file' instead")))
|
|
||||||
esp_err_t esp_wifi_sta_wpa2_ent_set_pac_file(const unsigned char *pac_file, int pac_file_len);
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @brief Set Phase 1 parameters for EAP-FAST
|
|
||||||
*
|
|
||||||
* @deprecated This function is deprecated and will be removed in the future.
|
|
||||||
* Please use `esp_eap_client_set_fast_params` instead.
|
|
||||||
*
|
|
||||||
* @attention 1. Disabling the ESP_WIFI_MBEDTLS_TLS_CLIENT config is required to use EAP-FAST.
|
|
||||||
*
|
|
||||||
* @param config: eap fast phase 1 configuration
|
|
||||||
*
|
|
||||||
* @return
|
|
||||||
* - ESP_OK: succeed
|
|
||||||
* - ESP_ERR_INVALID_ARG: fail(out of bound arguments)
|
|
||||||
* - ESP_ERR_NO_MEM: fail(internal memory malloc fail)
|
|
||||||
*/
|
|
||||||
__attribute__((deprecated("Use 'esp_eap_client_set_fast_params' instead")))
|
|
||||||
esp_err_t esp_wifi_sta_wpa2_ent_set_fast_phase1_params(esp_eap_fast_config config);
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @brief Use default CA cert bundle for server validation
|
|
||||||
*
|
|
||||||
* @deprecated This function is deprecated and will be removed in the future.
|
|
||||||
* Please use `esp_eap_client_use_default_cert_bundle` instead.
|
|
||||||
*
|
|
||||||
* @use_default_bundle : whether to use bundle or not
|
|
||||||
*
|
|
||||||
* @return
|
|
||||||
* - ESP_OK: succeed
|
|
||||||
* - ESP_FAIL: fail
|
|
||||||
*/
|
|
||||||
__attribute__((deprecated("Use 'esp_eap_client_use_default_cert_bundle' instead")))
|
|
||||||
esp_err_t esp_wifi_sta_wpa2_use_default_cert_bundle(bool use_default_bundle);
|
|
||||||
|
|
||||||
#ifdef __cplusplus
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
#endif
|
|
@@ -125,11 +125,6 @@ esp_err_t esp_wifi_wps_disable(void);
|
|||||||
*
|
*
|
||||||
* @attention WPS can only be used when station is enabled. WPS needs to be enabled first for using this API.
|
* @attention WPS can only be used when station is enabled. WPS needs to be enabled first for using this API.
|
||||||
*
|
*
|
||||||
* @param timeout_ms : deprecated: This argument's value will have not effect in functionality of API.
|
|
||||||
* The argument will be removed in future.
|
|
||||||
* The app should start WPS and register for WIFI events to get the status.
|
|
||||||
* WPS status is updated through WPS events. See wifi_event_t enum for more info.
|
|
||||||
*
|
|
||||||
* @return
|
* @return
|
||||||
* - ESP_OK : succeed
|
* - ESP_OK : succeed
|
||||||
* - ESP_ERR_WIFI_WPS_TYPE : wps type is invalid
|
* - ESP_ERR_WIFI_WPS_TYPE : wps type is invalid
|
||||||
@@ -137,7 +132,7 @@ esp_err_t esp_wifi_wps_disable(void);
|
|||||||
* - ESP_ERR_WIFI_WPS_SM : wps state machine is not initialized
|
* - ESP_ERR_WIFI_WPS_SM : wps state machine is not initialized
|
||||||
* - ESP_FAIL : wps initialization fails
|
* - ESP_FAIL : wps initialization fails
|
||||||
*/
|
*/
|
||||||
esp_err_t esp_wifi_wps_start(int timeout_ms);
|
esp_err_t esp_wifi_wps_start(void);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @brief Enable Wi-Fi AP WPS function.
|
* @brief Enable Wi-Fi AP WPS function.
|
||||||
|
@@ -139,7 +139,7 @@ static void register_mgmt_frames(struct wpa_supplicant *wpa_s)
|
|||||||
|
|
||||||
#ifdef CONFIG_IEEE80211R
|
#ifdef CONFIG_IEEE80211R
|
||||||
/* register auth/assoc frames if FT is enabled */
|
/* register auth/assoc frames if FT is enabled */
|
||||||
if (esp_wifi_is_ft_enabled_internal(ESP_IF_WIFI_STA))
|
if (esp_wifi_is_ft_enabled_internal(WIFI_IF_STA))
|
||||||
wpa_s->type |= (1 << WLAN_FC_STYPE_AUTH) |
|
wpa_s->type |= (1 << WLAN_FC_STYPE_AUTH) |
|
||||||
(1 << WLAN_FC_STYPE_ASSOC_RESP) |
|
(1 << WLAN_FC_STYPE_ASSOC_RESP) |
|
||||||
(1 << WLAN_FC_STYPE_REASSOC_RESP);
|
(1 << WLAN_FC_STYPE_REASSOC_RESP);
|
||||||
@@ -381,32 +381,6 @@ bool esp_rrm_is_rrm_supported_connection(void)
|
|||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
/*This function has been deprecated in favour of esp_rrm_send_neighbor_report_request*/
|
|
||||||
int esp_rrm_send_neighbor_rep_request(neighbor_rep_request_cb cb,
|
|
||||||
void *cb_ctx)
|
|
||||||
{
|
|
||||||
struct wpa_supplicant *wpa_s = &g_wpa_supp;
|
|
||||||
struct wpa_ssid_value wpa_ssid = {0};
|
|
||||||
struct wifi_ssid *ssid;
|
|
||||||
|
|
||||||
if (!wpa_s->current_bss) {
|
|
||||||
wpa_printf(MSG_ERROR, "STA not associated, return");
|
|
||||||
return -2;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (!(wpa_s->rrm_ie[0] & WLAN_RRM_CAPS_NEIGHBOR_REPORT)) {
|
|
||||||
wpa_printf(MSG_ERROR,
|
|
||||||
"RRM: No network support for Neighbor Report.");
|
|
||||||
return -1;
|
|
||||||
}
|
|
||||||
|
|
||||||
ssid = esp_wifi_sta_get_prof_ssid_internal();
|
|
||||||
|
|
||||||
os_memcpy(wpa_ssid.ssid, ssid->ssid, ssid->len);
|
|
||||||
wpa_ssid.ssid_len = ssid->len;
|
|
||||||
|
|
||||||
return wpas_rrm_send_neighbor_rep_request(wpa_s, &wpa_ssid, 0, 0, cb, cb_ctx);
|
|
||||||
}
|
|
||||||
|
|
||||||
void neighbor_report_recvd_cb(void *ctx, const uint8_t *report, size_t report_len)
|
void neighbor_report_recvd_cb(void *ctx, const uint8_t *report, size_t report_len)
|
||||||
{
|
{
|
||||||
@@ -423,7 +397,6 @@ void neighbor_report_recvd_cb(void *ctx, const uint8_t *report, size_t report_le
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
os_memcpy(neighbor_report_event->report, report, ESP_WIFI_MAX_NEIGHBOR_REP_LEN);
|
|
||||||
os_memcpy(neighbor_report_event->n_report, report, report_len);
|
os_memcpy(neighbor_report_event->n_report, report, report_len);
|
||||||
neighbor_report_event->report_len = report_len;
|
neighbor_report_event->report_len = report_len;
|
||||||
esp_event_post(WIFI_EVENT, WIFI_EVENT_STA_NEIGHBOR_REP, neighbor_report_event, sizeof(wifi_event_neighbor_report_t) + report_len, 0);
|
esp_event_post(WIFI_EVENT, WIFI_EVENT_STA_NEIGHBOR_REP, neighbor_report_event, sizeof(wifi_event_neighbor_report_t) + report_len, 0);
|
||||||
@@ -822,12 +795,6 @@ int esp_rrm_send_neighbor_report_request(void)
|
|||||||
{
|
{
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
int esp_rrm_send_neighbor_rep_request(neighbor_rep_request_cb cb,
|
|
||||||
void *cb_ctx)
|
|
||||||
{
|
|
||||||
return -1;
|
|
||||||
}
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if defined(CONFIG_RRM) || defined(CONFIG_IEEE80211R) || defined(CONFIG_WPA3_SAE)
|
#if defined(CONFIG_RRM) || defined(CONFIG_IEEE80211R) || defined(CONFIG_WPA3_SAE)
|
||||||
|
@@ -70,29 +70,6 @@ static esp_err_t dpp_api_unlock(void)
|
|||||||
return ESP_OK;
|
return ESP_OK;
|
||||||
}
|
}
|
||||||
|
|
||||||
static void dpp_event_handler(void *arg, esp_event_base_t event_base,
|
|
||||||
int32_t event_id, void *event_data)
|
|
||||||
{
|
|
||||||
if (!s_dpp_ctx.dpp_event_cb) {
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
switch (event_id) {
|
|
||||||
case WIFI_EVENT_DPP_URI_READY:
|
|
||||||
wifi_event_dpp_uri_ready_t *event = (wifi_event_dpp_uri_ready_t *) event_data;
|
|
||||||
s_dpp_ctx.dpp_event_cb(ESP_SUPP_DPP_URI_READY, (void *)(event->uri));
|
|
||||||
break;
|
|
||||||
case WIFI_EVENT_DPP_CFG_RECVD:
|
|
||||||
s_dpp_ctx.dpp_event_cb(ESP_SUPP_DPP_CFG_RECVD, (wifi_config_t *)event_data);
|
|
||||||
break;
|
|
||||||
case WIFI_EVENT_DPP_FAILED:
|
|
||||||
s_dpp_ctx.dpp_event_cb(ESP_SUPP_DPP_FAIL, (void *)event_data);
|
|
||||||
break;
|
|
||||||
default:
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
static uint8_t dpp_deinit_auth(void)
|
static uint8_t dpp_deinit_auth(void)
|
||||||
{
|
{
|
||||||
if (s_dpp_ctx.dpp_auth) {
|
if (s_dpp_ctx.dpp_auth) {
|
||||||
@@ -703,14 +680,6 @@ static int esp_dpp_deinit(void *data, void *user_ctx)
|
|||||||
esp_event_handler_unregister(WIFI_EVENT, WIFI_EVENT_ROC_DONE,
|
esp_event_handler_unregister(WIFI_EVENT, WIFI_EVENT_ROC_DONE,
|
||||||
&roc_status_handler);
|
&roc_status_handler);
|
||||||
|
|
||||||
if (s_dpp_ctx.dpp_event_cb) {
|
|
||||||
esp_event_handler_unregister(WIFI_EVENT, WIFI_EVENT_DPP_URI_READY,
|
|
||||||
&dpp_event_handler);
|
|
||||||
esp_event_handler_unregister(WIFI_EVENT, WIFI_EVENT_DPP_CFG_RECVD,
|
|
||||||
&dpp_event_handler);
|
|
||||||
esp_event_handler_unregister(WIFI_EVENT, WIFI_EVENT_DPP_FAILED,
|
|
||||||
&dpp_event_handler);
|
|
||||||
}
|
|
||||||
if (params->info) {
|
if (params->info) {
|
||||||
os_free(params->info);
|
os_free(params->info);
|
||||||
params->info = NULL;
|
params->info = NULL;
|
||||||
@@ -726,7 +695,6 @@ static int esp_dpp_deinit(void *data, void *user_ctx)
|
|||||||
}
|
}
|
||||||
s_dpp_ctx.dpp_init_done = false;
|
s_dpp_ctx.dpp_init_done = false;
|
||||||
s_dpp_ctx.bootstrap_done = false;
|
s_dpp_ctx.bootstrap_done = false;
|
||||||
s_dpp_ctx.dpp_event_cb = NULL;
|
|
||||||
if (s_dpp_event_group) {
|
if (s_dpp_event_group) {
|
||||||
os_event_group_delete(s_dpp_event_group);
|
os_event_group_delete(s_dpp_event_group);
|
||||||
s_dpp_event_group = NULL;
|
s_dpp_event_group = NULL;
|
||||||
@@ -1061,7 +1029,6 @@ static int esp_dpp_init(void *eloop_data, void *user_ctx)
|
|||||||
{
|
{
|
||||||
struct dpp_global_config cfg = {0};
|
struct dpp_global_config cfg = {0};
|
||||||
int ret;
|
int ret;
|
||||||
esp_supp_dpp_event_cb_t cb = user_ctx;
|
|
||||||
|
|
||||||
cfg.cb_ctx = &s_dpp_ctx;
|
cfg.cb_ctx = &s_dpp_ctx;
|
||||||
cfg.msg_ctx = &s_dpp_ctx;
|
cfg.msg_ctx = &s_dpp_ctx;
|
||||||
@@ -1074,16 +1041,6 @@ static int esp_dpp_init(void *eloop_data, void *user_ctx)
|
|||||||
goto init_fail;
|
goto init_fail;
|
||||||
}
|
}
|
||||||
|
|
||||||
s_dpp_ctx.dpp_event_cb = cb;
|
|
||||||
|
|
||||||
if (cb) {
|
|
||||||
esp_event_handler_register(WIFI_EVENT, WIFI_EVENT_DPP_URI_READY,
|
|
||||||
&dpp_event_handler, NULL);
|
|
||||||
esp_event_handler_register(WIFI_EVENT, WIFI_EVENT_DPP_CFG_RECVD,
|
|
||||||
&dpp_event_handler, NULL);
|
|
||||||
esp_event_handler_register(WIFI_EVENT, WIFI_EVENT_DPP_FAILED,
|
|
||||||
&dpp_event_handler, NULL);
|
|
||||||
}
|
|
||||||
esp_event_handler_register(WIFI_EVENT, WIFI_EVENT_ACTION_TX_STATUS,
|
esp_event_handler_register(WIFI_EVENT, WIFI_EVENT_ACTION_TX_STATUS,
|
||||||
&tx_status_handler, NULL);
|
&tx_status_handler, NULL);
|
||||||
esp_event_handler_register(WIFI_EVENT, WIFI_EVENT_ROC_DONE,
|
esp_event_handler_register(WIFI_EVENT, WIFI_EVENT_ROC_DONE,
|
||||||
@@ -1103,7 +1060,7 @@ init_fail:
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
esp_err_t esp_supp_dpp_init(esp_supp_dpp_event_cb_t cb)
|
esp_err_t esp_supp_dpp_init(void)
|
||||||
{
|
{
|
||||||
esp_err_t ret = ESP_OK;
|
esp_err_t ret = ESP_OK;
|
||||||
|
|
||||||
@@ -1127,7 +1084,7 @@ esp_err_t esp_supp_dpp_init(esp_supp_dpp_event_cb_t cb)
|
|||||||
dpp_api_unlock();
|
dpp_api_unlock();
|
||||||
return ESP_FAIL;
|
return ESP_FAIL;
|
||||||
}
|
}
|
||||||
ret = eloop_register_timeout_blocking(esp_dpp_init, NULL, cb);
|
ret = eloop_register_timeout_blocking(esp_dpp_init, NULL, NULL);
|
||||||
dpp_api_unlock();
|
dpp_api_unlock();
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
@@ -34,7 +34,6 @@ struct esp_dpp_context_t {
|
|||||||
struct dpp_bootstrap_params_t bootstrap_params;
|
struct dpp_bootstrap_params_t bootstrap_params;
|
||||||
struct dpp_authentication *dpp_auth;
|
struct dpp_authentication *dpp_auth;
|
||||||
int gas_dialog_token;
|
int gas_dialog_token;
|
||||||
esp_supp_dpp_event_cb_t dpp_event_cb;
|
|
||||||
struct dpp_global *dpp_global;
|
struct dpp_global *dpp_global;
|
||||||
wifi_config_t wifi_cfg;
|
wifi_config_t wifi_cfg;
|
||||||
int id;
|
int id;
|
||||||
|
@@ -1656,7 +1656,7 @@ int esp_wifi_wps_disable(void)
|
|||||||
return ESP_OK;
|
return ESP_OK;
|
||||||
}
|
}
|
||||||
|
|
||||||
int esp_wifi_wps_start(int timeout_ms)
|
int esp_wifi_wps_start(void)
|
||||||
{
|
{
|
||||||
int ret;
|
int ret;
|
||||||
|
|
||||||
|
@@ -174,7 +174,7 @@ static inline int wpa_auth_set_key(struct wpa_authenticator *wpa_auth,
|
|||||||
} else {
|
} else {
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
ret = esp_wifi_set_igtk_internal(ESP_IF_WIFI_AP, igtk);
|
ret = esp_wifi_set_igtk_internal(WIFI_IF_AP, igtk);
|
||||||
os_free(igtk);
|
os_free(igtk);
|
||||||
return ret;
|
return ret;
|
||||||
|
|
||||||
|
@@ -95,6 +95,7 @@ WIFI_DOCS = [
|
|||||||
'migration-guides/release-5.x/5.2/wifi.rst',
|
'migration-guides/release-5.x/5.2/wifi.rst',
|
||||||
'migration-guides/release-5.x/5.4/wifi.rst',
|
'migration-guides/release-5.x/5.4/wifi.rst',
|
||||||
'migration-guides/release-5.x/5.5/wifi.rst',
|
'migration-guides/release-5.x/5.5/wifi.rst',
|
||||||
|
'migration-guides/release-6.x/6.0/wifi.rst',
|
||||||
]
|
]
|
||||||
|
|
||||||
IEEE802154_DOCS = ['migration-guides/release-5.x/5.1/ieee802154.rst', 'migration-guides/release-5.x/5.2/ieee802154.rst']
|
IEEE802154_DOCS = ['migration-guides/release-5.x/5.1/ieee802154.rst', 'migration-guides/release-5.x/5.2/ieee802154.rst']
|
||||||
|
@@ -331,7 +331,7 @@ Modem-sleep Mode Configuration
|
|||||||
},
|
},
|
||||||
};
|
};
|
||||||
ESP_ERROR_CHECK(esp_wifi_set_mode(WIFI_MODE_STA));
|
ESP_ERROR_CHECK(esp_wifi_set_mode(WIFI_MODE_STA));
|
||||||
ESP_ERROR_CHECK(esp_wifi_set_config(ESP_IF_WIFI_STA, &wifi_config));
|
ESP_ERROR_CHECK(esp_wifi_set_config(WIFI_IF_STA, &wifi_config));
|
||||||
ESP_ERROR_CHECK(esp_wifi_start());
|
ESP_ERROR_CHECK(esp_wifi_start());
|
||||||
|
|
||||||
- Recommended Configuration
|
- Recommended Configuration
|
||||||
|
@@ -128,17 +128,7 @@ Instead, post the necessary data to a queue and handle it from a lower priority
|
|||||||
Config ESP-NOW Rate
|
Config ESP-NOW Rate
|
||||||
-------------------
|
-------------------
|
||||||
|
|
||||||
.. only:: esp32 or esp32s2 or esp32s3 or esp32c2 or esp32c3
|
Call :cpp:func:`esp_now_set_peer_rate_config()` to configure ESP-NOW rate of each peer. Make sure that the peer is added before configuring the rate. This API should be called after :cpp:func:`esp_wifi_start()` and :cpp:func:`esp_now_add_peer()`.
|
||||||
|
|
||||||
Call :cpp:func:`esp_wifi_config_espnow_rate()` to config ESP-NOW rate of specified interface. Make sure that the interface is enabled before config rate. This API should be called after :cpp:func:`esp_wifi_start()`.
|
|
||||||
|
|
||||||
.. only:: esp32c5 or esp32c6
|
|
||||||
|
|
||||||
Call :cpp:func:`esp_now_set_peer_rate_config()` to configure ESP-NOW rate of each peer. Make sure that the peer is added before configuring the rate. This API should be called after :cpp:func:`esp_wifi_start()` and :cpp:func:`esp_now_add_peer()`.
|
|
||||||
|
|
||||||
.. note::
|
|
||||||
|
|
||||||
:cpp:func:`esp_wifi_config_espnow_rate()` is deprecated, please use cpp::func:`esp_now_set_peer_rate_config()` instead.
|
|
||||||
|
|
||||||
Config ESP-NOW Power-saving Parameter
|
Config ESP-NOW Power-saving Parameter
|
||||||
--------------------------------------------
|
--------------------------------------------
|
||||||
|
@@ -12,6 +12,7 @@ Migration from 5.5 to 6.0
|
|||||||
peripherals
|
peripherals
|
||||||
provisioning
|
provisioning
|
||||||
protocols
|
protocols
|
||||||
|
:SOC_WIFI_SUPPORTED: wifi
|
||||||
security
|
security
|
||||||
tools
|
tools
|
||||||
storage
|
storage
|
||||||
|
49
docs/en/migration-guides/release-6.x/6.0/wifi.rst
Normal file
49
docs/en/migration-guides/release-6.x/6.0/wifi.rst
Normal file
@@ -0,0 +1,49 @@
|
|||||||
|
Wi-Fi
|
||||||
|
=====
|
||||||
|
|
||||||
|
This document outlines the Wi-Fi related breaking changes in release v6.0.
|
||||||
|
|
||||||
|
Removed Functions and Types
|
||||||
|
---------------------------
|
||||||
|
|
||||||
|
The following functions and types have been removed.
|
||||||
|
|
||||||
|
- **DPP:**
|
||||||
|
- The DPP event callback ``esp_supp_dpp_event_cb_t`` and event enum ``esp_supp_dpp_event_t`` have been removed. Please use Wi-Fi events directly (e.g. ``WIFI_EVENT_DPP_URI_READY``, ``WIFI_EVENT_DPP_CFG_RECVD``, ``WIFI_EVENT_DPP_FAILED``).
|
||||||
|
|
||||||
|
- **RRM:** The function ``esp_rrm_send_neighbor_rep_request`` has been removed. Use ``esp_rrm_send_neighbor_report_request`` instead.
|
||||||
|
|
||||||
|
- **Antenna Configuration:**
|
||||||
|
- The functions ``esp_wifi_set_ant_gpio``, ``esp_wifi_get_ant_gpio``, ``esp_wifi_set_ant``, and ``esp_wifi_get_ant`` have been removed. Please use the equivalent functions from ``esp_phy`` component: ``esp_phy_set_ant_gpio``, ``esp_phy_get_ant_gpio``, ``esp_phy_set_ant``, and ``esp_phy_get_ant``.
|
||||||
|
|
||||||
|
- **ESP-NOW:** The function ``esp_wifi_config_espnow_rate`` has been removed. Use ``esp_now_set_peer_rate_config`` instead.
|
||||||
|
|
||||||
|
Removed Variables, Macros and Enum Values
|
||||||
|
-----------------------------------------
|
||||||
|
|
||||||
|
- **Authentication Modes:** The authentication modes ``WIFI_AUTH_WPA3_EXT_PSK`` and ``WIFI_AUTH_WPA3_EXT_PSK_MIXED_MODE`` have been removed. Use ``WIFI_AUTH_WPA3_PSK`` instead.
|
||||||
|
|
||||||
|
- **Neighbor Report Event:** In the ``wifi_event_neighbor_report_t`` structure, the ``report`` field has been removed. Please use the ``n_report`` field instead, which is a flexible array member.
|
||||||
|
|
||||||
|
- **Wi-Fi Interface:** The header file ``components/esp_wifi/include/esp_interface.h`` has been removed. The ``wifi_interface_t`` enum is now defined in :project_file:`components/esp_wifi/include/esp_wifi_types_generic.h`. The enum values (e.g. ``WIFI_IF_STA``, ``WIFI_IF_AP``) are no longer defined based on ``ESP_IF_WIFI_STA``, ``ESP_IF_WIFI_AP``, etc.
|
||||||
|
|
||||||
|
- **Wi-Fi Interface Macros:** The macros ``ESP_IF_WIFI_STA`` and ``ESP_IF_WIFI_AP`` have been removed. Please use the enum values ``WIFI_IF_STA`` and ``WIFI_IF_AP`` directly.
|
||||||
|
|
||||||
|
- **Wi-Fi Disconnection Reasons:** The disconnection reason codes ``WIFI_REASON_ASSOC_EXPIRE``, ``WIFI_REASON_NOT_AUTHED``, and ``WIFI_REASON_NOT_ASSOCED`` have been removed. Please use ``WIFI_REASON_AUTH_EXPIRE``, ``WIFI_REASON_CLASS2_FRAME_FROM_NONAUTH_STA``, and ``WIFI_REASON_CLASS3_FRAME_FROM_NONASSOC_STA`` respectively.
|
||||||
|
|
||||||
|
- **NAN:**
|
||||||
|
- Field ``svc_info`` from structures ``wifi_nan_publish_cfg_t``, ``wifi_nan_subscribe_cfg_t``, ``wifi_nan_followup_params_t``, ``wifi_event_ndp_indication_t``, ``wifi_event_ndp_confirm_t`` has been removed. Please use the equivalent fields ``ssi`` and ``ssi_len`` instead.
|
||||||
|
- Field ``peer_svc_info`` from structure ``wifi_event_nan_receive_t`` has been removed. Please use the equivalent fields ``ssi`` and ``ssi_len`` instead.
|
||||||
|
|
||||||
|
- **FTM:** Field ``use_get_report_api`` from structure ``wifi_ftm_initiator_cfg_t`` and field ``ftm_report_data`` from structure ``wifi_event_ftm_report_t`` has been removed. Please use ``esp_wifi_ftm_get_report`` to fetch raw FTM report data instead.
|
||||||
|
|
||||||
|
Modified Functions and Types
|
||||||
|
----------------------------
|
||||||
|
|
||||||
|
The following Wi-Fi functions have been modified.
|
||||||
|
|
||||||
|
- **DPP:** The function ``esp_supp_dpp_init`` no longer accepts a callback and should be called as ``esp_supp_dpp_init(void)``.
|
||||||
|
|
||||||
|
- **WPS:** The function ``esp_wifi_wps_start`` no longer accepts a ``timeout_ms`` argument. It should now be called as ``esp_wifi_wps_start(void)``.
|
||||||
|
|
||||||
|
- **NAN:** The function argument ``ndp_resp_needed`` of ``esp_wifi_nan_publish_service`` has been moved to structure ``wifi_nan_publish_cfg_t``.
|
@@ -331,7 +331,7 @@ Modem-sleep 模式配置
|
|||||||
},
|
},
|
||||||
};
|
};
|
||||||
ESP_ERROR_CHECK(esp_wifi_set_mode(WIFI_MODE_STA));
|
ESP_ERROR_CHECK(esp_wifi_set_mode(WIFI_MODE_STA));
|
||||||
ESP_ERROR_CHECK(esp_wifi_set_config(ESP_IF_WIFI_STA, &wifi_config));
|
ESP_ERROR_CHECK(esp_wifi_set_config(WIFI_IF_STA, &wifi_config));
|
||||||
ESP_ERROR_CHECK(esp_wifi_start());
|
ESP_ERROR_CHECK(esp_wifi_start());
|
||||||
|
|
||||||
- 推荐配置
|
- 推荐配置
|
||||||
|
@@ -126,19 +126,9 @@ ESP-NOW 数据可以从 Station 或 SoftAP 接口发送。确保在发送 ESP-NO
|
|||||||
相反,将必要的数据发布到队列,并交给优先级较低的任务处理。
|
相反,将必要的数据发布到队列,并交给优先级较低的任务处理。
|
||||||
|
|
||||||
配置 ESP-NOW 速率
|
配置 ESP-NOW 速率
|
||||||
----------------------
|
-------------------
|
||||||
|
|
||||||
.. only:: esp32 or esp32s2 or esp32s3 or esp32c2 or esp32c3
|
调用 :cpp:func:`esp_now_set_peer_rate_config()` 配置每个 peer 的 ESP-NOW 速率。请确保在配置速率之前添加 peer。此 API 应在 :cpp:func:`esp_wifi_start()` 和 :cpp:func:`esp_now_add_peer()` 之后调用。
|
||||||
|
|
||||||
调用 :cpp:func:`esp_wifi_config_espnow_rate()` 配置指定接口的 ESP-NOW 速率。确保在配置速率之前启用接口。这个 API 应该在 :cpp:func:`esp_wifi_start()` 之后调用。
|
|
||||||
|
|
||||||
.. only:: esp32c5 or esp32c6
|
|
||||||
|
|
||||||
调用 :cpp:func:`esp_now_set_peer_rate_config()` 配置指定 peer 的 ESP-NOW 速率。确保在配置速率之前添加 peer。这个 API 应该在 :cpp:func:`esp_wifi_start()` 和 :cpp:func:`esp_now_add_peer()` 之后调用。
|
|
||||||
|
|
||||||
.. note::
|
|
||||||
|
|
||||||
:cpp:func:`esp_wifi_config_espnow_rate()` 已弃用,请使用 :cpp:func:`esp_now_set_peer_rate_config()`
|
|
||||||
|
|
||||||
配置 ESP-NOW 功耗参数
|
配置 ESP-NOW 功耗参数
|
||||||
----------------------
|
----------------------
|
||||||
|
@@ -12,6 +12,7 @@
|
|||||||
peripherals
|
peripherals
|
||||||
provisioning
|
provisioning
|
||||||
protocols
|
protocols
|
||||||
|
:SOC_WIFI_SUPPORTED: wifi
|
||||||
security
|
security
|
||||||
tools
|
tools
|
||||||
storage
|
storage
|
||||||
|
50
docs/zh_CN/migration-guides/release-6.x/6.0/wifi.rst
Normal file
50
docs/zh_CN/migration-guides/release-6.x/6.0/wifi.rst
Normal file
@@ -0,0 +1,50 @@
|
|||||||
|
Wi-Fi
|
||||||
|
=====
|
||||||
|
|
||||||
|
本文档概述了 v6.0 版本中与 Wi-Fi 相关的重大更改。
|
||||||
|
|
||||||
|
已移除的函数和类型
|
||||||
|
------------------
|
||||||
|
|
||||||
|
以下函数和类型已被移除。
|
||||||
|
|
||||||
|
- **DPP:**
|
||||||
|
- DPP 事件回调 ``esp_supp_dpp_event_cb_t`` 和事件枚举 ``esp_supp_dpp_event_t`` 已被移除。请直接使用 Wi-Fi 事件(例如 ``WIFI_EVENT_DPP_URI_READY``、``WIFI_EVENT_DPP_CFG_RECVD``、``WIFI_EVENT_DPP_FAILED``)。
|
||||||
|
|
||||||
|
- **RRM:** 函数 ``esp_rrm_send_neighbor_rep_request`` 已被移除。请改用 ``esp_rrm_send_neighbor_report_request``。
|
||||||
|
|
||||||
|
- **天线配置:**
|
||||||
|
- 函数 ``esp_wifi_set_ant_gpio``、``esp_wifi_get_ant_gpio``、``esp_wifi_set_ant`` 和 ``esp_wifi_get_ant`` 已被移除。请改用 ``esp_phy`` 组件中的等效函数:``esp_phy_set_ant_gpio``、``esp_phy_get_ant_gpio``、``esp_phy_set_ant`` 和 ``esp_phy_get_ant``。
|
||||||
|
|
||||||
|
- **ESP-NOW:** 函数 ``esp_wifi_config_espnow_rate`` 已被移除。请改用 ``esp_now_set_peer_rate_config``。
|
||||||
|
|
||||||
|
已移除的变量、宏和枚举值
|
||||||
|
------------------------
|
||||||
|
|
||||||
|
- **认证模式:** 认证模式 ``WIFI_AUTH_WPA3_EXT_PSK`` 和 ``WIFI_AUTH_WPA3_EXT_PSK_MIXED_MODE`` 已被移除。请改用 ``WIFI_AUTH_WPA3_PSK``。
|
||||||
|
|
||||||
|
- **邻居报告事件:** 在 ``wifi_event_neighbor_report_t`` 结构体中,``report`` 字段已被移除。请改用 ``n_report`` 字段,它是一个灵活的数组成员。
|
||||||
|
|
||||||
|
- **Wi-Fi 接口:** 头文件 ``components/esp_wifi/include/esp_interface.h`` 已被移除。``wifi_interface_t`` 枚举现在定义在 :project_file:`components/esp_wifi/include/esp_wifi_types_generic.h` 中。枚举值(例如 ``WIFI_IF_STA``、``WIFI_IF_AP``)不再基于 ``ESP_IF_WIFI_STA``、``ESP_IF_WIFI_AP`` 等定义。
|
||||||
|
|
||||||
|
- **Wi-Fi 接口宏:** 宏 ``ESP_IF_WIFI_STA`` 和 ``ESP_IF_WIFI_AP`` 已被移除。请直接使用枚举值 ``WIFI_IF_STA`` 和 ``WIFI_IF_AP``。
|
||||||
|
|
||||||
|
- **Wi-Fi 断开连接原因:** 断开连接原因代码 ``WIFI_REASON_ASSOC_EXPIRE``、``WIFI_REASON_NOT_AUTHED`` 和 ``WIFI_REASON_NOT_ASSOCED`` 已被移除。请改用 ``WIFI_REASON_AUTH_EXPIRE``、``WIFI_REASON_CLASS2_FRAME_FROM_NONAUTH_STA`` 和 ``WIFI_REASON_CLASS3_FRAME_FROM_NONASSOC_STA``。
|
||||||
|
|
||||||
|
- **NAN:**
|
||||||
|
- 结构体 ``wifi_nan_publish_cfg_t``、``wifi_nan_subscribe_cfg_t``、``wifi_nan_followup_params_t``、``wifi_event_ndp_indication_t``、``wifi_event_ndp_confirm_t`` 中的字段 ``svc_info`` 已被移除。请改用等效字段 ``ssi`` 和 ``ssi_len``。
|
||||||
|
- 结构体 ``wifi_event_nan_receive_t`` 中的字段 ``peer_svc_info`` 已被移除。请改用等效字段 ``ssi`` 和 ``ssi_len``。
|
||||||
|
|
||||||
|
- **FTM:** 结构体 ``wifi_ftm_initiator_cfg_t`` 中的字段 ``use_get_report_api`` 和结构体 ``wifi_event_ftm_report_t`` 中的字段 ``ftm_report_data`` 已被移除。请改用 ``esp_wifi_ftm_get_report`` 获取原始 FTM 报告数据。
|
||||||
|
|
||||||
|
已修改的函数和类型
|
||||||
|
------------------
|
||||||
|
|
||||||
|
以下 Wi-Fi 函数已修改。
|
||||||
|
|
||||||
|
- **DPP:** 函数 ``esp_supp_dpp_init`` 不再接受回调函数,应调用为 ``esp_supp_dpp_init(void)``。
|
||||||
|
|
||||||
|
- **WPS:** 函数 ``esp_wifi_wps_start`` 不再接受 ``timeout_ms`` 参数。现在应调用为 ``esp_wifi_wps_start(void)``。
|
||||||
|
|
||||||
|
- **NAN:** 函数 ``esp_wifi_nan_publish_service`` 的参数 ``ndp_resp_needed`` 已移至结构体 ``wifi_nan_publish_cfg_t``。
|
||||||
|
|
@@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
* SPDX-FileCopyrightText: 2023 Espressif Systems (Shanghai) CO LTD
|
* SPDX-FileCopyrightText: 2023-2025 Espressif Systems (Shanghai) CO LTD
|
||||||
*
|
*
|
||||||
* SPDX-License-Identifier: Unlicense OR CC0-1.0
|
* SPDX-License-Identifier: Unlicense OR CC0-1.0
|
||||||
*/
|
*/
|
||||||
@@ -40,7 +40,7 @@ static esp_err_t wired_recv_callback(void *buffer, uint16_t len, void *ctx)
|
|||||||
{
|
{
|
||||||
if (s_wifi_is_connected) {
|
if (s_wifi_is_connected) {
|
||||||
mac_spoof(FROM_WIRED, buffer, len, s_sta_mac);
|
mac_spoof(FROM_WIRED, buffer, len, s_sta_mac);
|
||||||
if (esp_wifi_internal_tx(ESP_IF_WIFI_STA, buffer, len) != ESP_OK) {
|
if (esp_wifi_internal_tx(WIFI_IF_STA, buffer, len) != ESP_OK) {
|
||||||
ESP_LOGD(TAG, "Failed to send packet to WiFi!");
|
ESP_LOGD(TAG, "Failed to send packet to WiFi!");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -68,14 +68,14 @@ static void event_handler(void *arg, esp_event_base_t event_base,
|
|||||||
if (event_base == WIFI_EVENT && event_id == WIFI_EVENT_STA_DISCONNECTED) {
|
if (event_base == WIFI_EVENT && event_id == WIFI_EVENT_STA_DISCONNECTED) {
|
||||||
ESP_LOGI(TAG, "Wi-Fi STA disconnected");
|
ESP_LOGI(TAG, "Wi-Fi STA disconnected");
|
||||||
s_wifi_is_connected = false;
|
s_wifi_is_connected = false;
|
||||||
esp_wifi_internal_reg_rxcb(ESP_IF_WIFI_STA, NULL);
|
esp_wifi_internal_reg_rxcb(WIFI_IF_STA, NULL);
|
||||||
esp_wifi_connect();
|
esp_wifi_connect();
|
||||||
|
|
||||||
xEventGroupClearBits(s_event_flags, CONNECTED_BIT);
|
xEventGroupClearBits(s_event_flags, CONNECTED_BIT);
|
||||||
xEventGroupSetBits(s_event_flags, DISCONNECTED_BIT);
|
xEventGroupSetBits(s_event_flags, DISCONNECTED_BIT);
|
||||||
} else if (event_base == WIFI_EVENT && event_id == WIFI_EVENT_STA_CONNECTED) {
|
} else if (event_base == WIFI_EVENT && event_id == WIFI_EVENT_STA_CONNECTED) {
|
||||||
ESP_LOGI(TAG, "Wi-Fi STA connected");
|
ESP_LOGI(TAG, "Wi-Fi STA connected");
|
||||||
esp_wifi_internal_reg_rxcb(ESP_IF_WIFI_STA, wifi_recv_callback);
|
esp_wifi_internal_reg_rxcb(WIFI_IF_STA, wifi_recv_callback);
|
||||||
s_wifi_is_connected = true;
|
s_wifi_is_connected = true;
|
||||||
xEventGroupClearBits(s_event_flags, DISCONNECTED_BIT);
|
xEventGroupClearBits(s_event_flags, DISCONNECTED_BIT);
|
||||||
xEventGroupSetBits(s_event_flags, CONNECTED_BIT);
|
xEventGroupSetBits(s_event_flags, CONNECTED_BIT);
|
||||||
|
@@ -31,7 +31,7 @@ static esp_err_t usb_recv_callback(void *buffer, uint16_t len, void *ctx)
|
|||||||
{
|
{
|
||||||
bool *is_wifi_connected = ctx;
|
bool *is_wifi_connected = ctx;
|
||||||
if (*is_wifi_connected) {
|
if (*is_wifi_connected) {
|
||||||
esp_wifi_internal_tx(ESP_IF_WIFI_STA, buffer, len);
|
esp_wifi_internal_tx(WIFI_IF_STA, buffer, len);
|
||||||
}
|
}
|
||||||
return ESP_OK;
|
return ESP_OK;
|
||||||
}
|
}
|
||||||
@@ -57,11 +57,11 @@ static void wifi_event_handler(void *arg, esp_event_base_t event_base,
|
|||||||
if (event_base == WIFI_EVENT && event_id == WIFI_EVENT_STA_DISCONNECTED) {
|
if (event_base == WIFI_EVENT && event_id == WIFI_EVENT_STA_DISCONNECTED) {
|
||||||
ESP_LOGI(TAG, "WiFi STA disconnected");
|
ESP_LOGI(TAG, "WiFi STA disconnected");
|
||||||
*is_connected = false;
|
*is_connected = false;
|
||||||
esp_wifi_internal_reg_rxcb(ESP_IF_WIFI_STA, NULL);
|
esp_wifi_internal_reg_rxcb(WIFI_IF_STA, NULL);
|
||||||
esp_wifi_connect();
|
esp_wifi_connect();
|
||||||
} else if (event_base == WIFI_EVENT && event_id == WIFI_EVENT_STA_CONNECTED) {
|
} else if (event_base == WIFI_EVENT && event_id == WIFI_EVENT_STA_CONNECTED) {
|
||||||
ESP_LOGI(TAG, "WiFi STA connected");
|
ESP_LOGI(TAG, "WiFi STA connected");
|
||||||
esp_wifi_internal_reg_rxcb(ESP_IF_WIFI_STA, pkt_wifi2usb);
|
esp_wifi_internal_reg_rxcb(WIFI_IF_STA, pkt_wifi2usb);
|
||||||
*is_connected = true;
|
*is_connected = true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@@ -65,7 +65,7 @@ static void wifi_init_softap(void)
|
|||||||
}
|
}
|
||||||
|
|
||||||
ESP_ERROR_CHECK(esp_wifi_set_mode(WIFI_MODE_AP));
|
ESP_ERROR_CHECK(esp_wifi_set_mode(WIFI_MODE_AP));
|
||||||
ESP_ERROR_CHECK(esp_wifi_set_config(ESP_IF_WIFI_AP, &wifi_config));
|
ESP_ERROR_CHECK(esp_wifi_set_config(WIFI_IF_AP, &wifi_config));
|
||||||
ESP_ERROR_CHECK(esp_wifi_start());
|
ESP_ERROR_CHECK(esp_wifi_start());
|
||||||
|
|
||||||
esp_netif_ip_info_t ip_info;
|
esp_netif_ip_info_t ip_info;
|
||||||
|
@@ -13,10 +13,10 @@
|
|||||||
/* ESPNOW can work in both station and softap mode. It is configured in menuconfig. */
|
/* ESPNOW can work in both station and softap mode. It is configured in menuconfig. */
|
||||||
#if CONFIG_ESPNOW_WIFI_MODE_STATION
|
#if CONFIG_ESPNOW_WIFI_MODE_STATION
|
||||||
#define ESPNOW_WIFI_MODE WIFI_MODE_STA
|
#define ESPNOW_WIFI_MODE WIFI_MODE_STA
|
||||||
#define ESPNOW_WIFI_IF ESP_IF_WIFI_STA
|
#define ESPNOW_WIFI_IF WIFI_IF_STA
|
||||||
#else
|
#else
|
||||||
#define ESPNOW_WIFI_MODE WIFI_MODE_AP
|
#define ESPNOW_WIFI_MODE WIFI_MODE_AP
|
||||||
#define ESPNOW_WIFI_IF ESP_IF_WIFI_AP
|
#define ESPNOW_WIFI_IF WIFI_IF_AP
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#define ESPNOW_QUEUE_SIZE 6
|
#define ESPNOW_QUEUE_SIZE 6
|
||||||
|
@@ -302,7 +302,7 @@ static bool wifi_cmd_sta_join(const char *ssid, const char *pass)
|
|||||||
if (pass) {
|
if (pass) {
|
||||||
strlcpy((char *) wifi_config.sta.password, pass, sizeof(wifi_config.sta.password));
|
strlcpy((char *) wifi_config.sta.password, pass, sizeof(wifi_config.sta.password));
|
||||||
}
|
}
|
||||||
ESP_ERROR_CHECK( esp_wifi_set_config(ESP_IF_WIFI_STA, &wifi_config) );
|
ESP_ERROR_CHECK( esp_wifi_set_config(WIFI_IF_STA, &wifi_config) );
|
||||||
ESP_ERROR_CHECK( esp_wifi_connect() );
|
ESP_ERROR_CHECK( esp_wifi_connect() );
|
||||||
s_reconnect = true;
|
s_reconnect = true;
|
||||||
s_retry_num = 0;
|
s_retry_num = 0;
|
||||||
@@ -436,27 +436,27 @@ static bool wifi_cmd_ap_set(const char* ssid, const char* pass, uint8_t channel,
|
|||||||
if (bw == 40) {
|
if (bw == 40) {
|
||||||
proto.ghz_2g = WIFI_PROTOCOL_11B | WIFI_PROTOCOL_11G | WIFI_PROTOCOL_11N;
|
proto.ghz_2g = WIFI_PROTOCOL_11B | WIFI_PROTOCOL_11G | WIFI_PROTOCOL_11N;
|
||||||
proto.ghz_5g = 0;
|
proto.ghz_5g = 0;
|
||||||
esp_wifi_set_protocols(ESP_IF_WIFI_AP, &proto);
|
esp_wifi_set_protocols(WIFI_IF_AP, &proto);
|
||||||
bws.ghz_2g = WIFI_BW_HT40;
|
bws.ghz_2g = WIFI_BW_HT40;
|
||||||
esp_wifi_set_bandwidths(ESP_IF_WIFI_AP, &bws);
|
esp_wifi_set_bandwidths(WIFI_IF_AP, &bws);
|
||||||
} else {
|
} else {
|
||||||
bws.ghz_2g = WIFI_BW_HT20;
|
bws.ghz_2g = WIFI_BW_HT20;
|
||||||
esp_wifi_set_bandwidths(ESP_IF_WIFI_AP, &bws);
|
esp_wifi_set_bandwidths(WIFI_IF_AP, &bws);
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
#if CONFIG_SOC_WIFI_SUPPORT_5G
|
#if CONFIG_SOC_WIFI_SUPPORT_5G
|
||||||
if (bw == 40) {
|
if (bw == 40) {
|
||||||
proto.ghz_2g = 0;
|
proto.ghz_2g = 0;
|
||||||
proto.ghz_5g = WIFI_PROTOCOL_11N | WIFI_PROTOCOL_11A;
|
proto.ghz_5g = WIFI_PROTOCOL_11N | WIFI_PROTOCOL_11A;
|
||||||
esp_wifi_set_protocols(ESP_IF_WIFI_AP, &proto);
|
esp_wifi_set_protocols(WIFI_IF_AP, &proto);
|
||||||
bws.ghz_5g=WIFI_BW_HT40;
|
bws.ghz_5g=WIFI_BW_HT40;
|
||||||
esp_wifi_set_bandwidths(ESP_IF_WIFI_AP, &bws);
|
esp_wifi_set_bandwidths(WIFI_IF_AP, &bws);
|
||||||
} else {
|
} else {
|
||||||
proto.ghz_2g = 0;
|
proto.ghz_2g = 0;
|
||||||
proto.ghz_5g = WIFI_PROTOCOL_11AC | WIFI_PROTOCOL_11A | WIFI_PROTOCOL_11AX;
|
proto.ghz_5g = WIFI_PROTOCOL_11AC | WIFI_PROTOCOL_11A | WIFI_PROTOCOL_11AX;
|
||||||
esp_wifi_set_protocols(ESP_IF_WIFI_AP, &proto);
|
esp_wifi_set_protocols(WIFI_IF_AP, &proto);
|
||||||
bws.ghz_5g = WIFI_BW_HT20;
|
bws.ghz_5g = WIFI_BW_HT20;
|
||||||
esp_wifi_set_bandwidths(ESP_IF_WIFI_AP, &bws);
|
esp_wifi_set_bandwidths(WIFI_IF_AP, &bws);
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
@@ -464,7 +464,7 @@ static bool wifi_cmd_ap_set(const char* ssid, const char* pass, uint8_t channel,
|
|||||||
g_ap_config.ap.authmode = WIFI_AUTH_OPEN;
|
g_ap_config.ap.authmode = WIFI_AUTH_OPEN;
|
||||||
}
|
}
|
||||||
g_ap_config.ap.channel = channel;
|
g_ap_config.ap.channel = channel;
|
||||||
ESP_ERROR_CHECK(esp_wifi_set_config(ESP_IF_WIFI_AP, &g_ap_config));
|
ESP_ERROR_CHECK(esp_wifi_set_config(WIFI_IF_AP, &g_ap_config));
|
||||||
ESP_LOGI(TAG_AP, "Starting SoftAP with FTM Responder support, SSID - %s, Password - %s, Primary Channel - %d, Bandwidth - %dMHz",
|
ESP_LOGI(TAG_AP, "Starting SoftAP with FTM Responder support, SSID - %s, Password - %s, Primary Channel - %d, Bandwidth - %dMHz",
|
||||||
ap_args.ssid->sval[0], ap_args.password->sval[0], channel, bw);
|
ap_args.ssid->sval[0], ap_args.password->sval[0], channel, bw);
|
||||||
|
|
||||||
@@ -571,7 +571,6 @@ static int wifi_cmd_ftm(int argc, char **argv)
|
|||||||
wifi_ftm_initiator_cfg_t ftmi_cfg = {
|
wifi_ftm_initiator_cfg_t ftmi_cfg = {
|
||||||
.frm_count = 32,
|
.frm_count = 32,
|
||||||
.burst_period = 2,
|
.burst_period = 2,
|
||||||
.use_get_report_api = true,
|
|
||||||
};
|
};
|
||||||
|
|
||||||
if (nerrors != 0) {
|
if (nerrors != 0) {
|
||||||
@@ -667,7 +666,7 @@ ftm_responder:
|
|||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
g_ap_config.ap.ftm_responder = true;
|
g_ap_config.ap.ftm_responder = true;
|
||||||
ESP_ERROR_CHECK(esp_wifi_set_config(ESP_IF_WIFI_AP, &g_ap_config));
|
ESP_ERROR_CHECK(esp_wifi_set_config(WIFI_IF_AP, &g_ap_config));
|
||||||
ESP_LOGI(TAG_AP, "Re-starting SoftAP with FTM Responder enabled");
|
ESP_LOGI(TAG_AP, "Re-starting SoftAP with FTM Responder enabled");
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
@@ -679,7 +678,7 @@ ftm_responder:
|
|||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
g_ap_config.ap.ftm_responder = false;
|
g_ap_config.ap.ftm_responder = false;
|
||||||
ESP_ERROR_CHECK(esp_wifi_set_config(ESP_IF_WIFI_AP, &g_ap_config));
|
ESP_ERROR_CHECK(esp_wifi_set_config(WIFI_IF_AP, &g_ap_config));
|
||||||
ESP_LOGI(TAG_AP, "Re-starting SoftAP with FTM Responder disabled");
|
ESP_LOGI(TAG_AP, "Re-starting SoftAP with FTM Responder disabled");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -114,9 +114,6 @@ static void nan_receive_event_handler(void *arg, esp_event_base_t event_base,
|
|||||||
if (evt->ssi_len) {
|
if (evt->ssi_len) {
|
||||||
ESP_LOGI(TAG, "Received payload from Peer "MACSTR" [Peer Service id - %d] - ", MAC2STR(evt->peer_if_mac), evt->peer_inst_id);
|
ESP_LOGI(TAG, "Received payload from Peer "MACSTR" [Peer Service id - %d] - ", MAC2STR(evt->peer_if_mac), evt->peer_inst_id);
|
||||||
ESP_LOG_BUFFER_HEXDUMP(TAG, evt->ssi, evt->ssi_len, ESP_LOG_INFO);
|
ESP_LOG_BUFFER_HEXDUMP(TAG, evt->ssi, evt->ssi_len, ESP_LOG_INFO);
|
||||||
} else {
|
|
||||||
ESP_LOGI(TAG, "Received message '%s' from Peer "MACSTR" [Peer Service id - %d]",
|
|
||||||
evt->peer_svc_info, MAC2STR(evt->peer_if_mac), evt->peer_inst_id);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -290,7 +287,6 @@ static int wifi_cmd_nan_publish(int argc, char **argv)
|
|||||||
{
|
{
|
||||||
int nerrors = arg_parse(argc, argv, (void **) &pub_args);
|
int nerrors = arg_parse(argc, argv, (void **) &pub_args);
|
||||||
uint32_t pub_id;
|
uint32_t pub_id;
|
||||||
bool ndp_resp_needed = false;
|
|
||||||
|
|
||||||
if (nerrors != 0) {
|
if (nerrors != 0) {
|
||||||
arg_print_errors(stderr, pub_args.end, argv[0]);
|
arg_print_errors(stderr, pub_args.end, argv[0]);
|
||||||
@@ -324,7 +320,7 @@ static int wifi_cmd_nan_publish(int argc, char **argv)
|
|||||||
strlcpy(publish.matching_filter, pub_args.filter->sval[0], ESP_WIFI_MAX_SVC_NAME_LEN);
|
strlcpy(publish.matching_filter, pub_args.filter->sval[0], ESP_WIFI_MAX_SVC_NAME_LEN);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!esp_wifi_nan_publish_service(&publish, ndp_resp_needed)) {
|
if (!esp_wifi_nan_publish_service(&publish)) {
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
* SPDX-FileCopyrightText: 2023 Espressif Systems (Shanghai) CO LTD
|
* SPDX-FileCopyrightText: 2023-2025 Espressif Systems (Shanghai) CO LTD
|
||||||
*
|
*
|
||||||
* SPDX-License-Identifier: Unlicense OR CC0-1.0
|
* SPDX-License-Identifier: Unlicense OR CC0-1.0
|
||||||
*/
|
*/
|
||||||
@@ -50,9 +50,6 @@ static void nan_receive_event_handler(void *arg, esp_event_base_t event_base,
|
|||||||
if (evt->ssi_len) {
|
if (evt->ssi_len) {
|
||||||
ESP_LOGI(TAG, "Received payload from Peer "MACSTR" [Peer Service id - %d] - ", MAC2STR(evt->peer_if_mac), evt->peer_inst_id);
|
ESP_LOGI(TAG, "Received payload from Peer "MACSTR" [Peer Service id - %d] - ", MAC2STR(evt->peer_if_mac), evt->peer_inst_id);
|
||||||
ESP_LOG_BUFFER_HEXDUMP(TAG, evt->ssi, evt->ssi_len, ESP_LOG_INFO);
|
ESP_LOG_BUFFER_HEXDUMP(TAG, evt->ssi, evt->ssi_len, ESP_LOG_INFO);
|
||||||
} else {
|
|
||||||
ESP_LOGI(TAG, "Received message '%s' from Peer "MACSTR" [Peer Service id - %d]",
|
|
||||||
evt->peer_svc_info, MAC2STR(evt->peer_if_mac), evt->peer_inst_id);
|
|
||||||
}
|
}
|
||||||
xEventGroupSetBits(nan_event_group, NAN_RECEIVE);
|
xEventGroupSetBits(nan_event_group, NAN_RECEIVE);
|
||||||
}
|
}
|
||||||
@@ -83,12 +80,6 @@ void wifi_nan_publish(void)
|
|||||||
NULL,
|
NULL,
|
||||||
&instance_any_id));
|
&instance_any_id));
|
||||||
|
|
||||||
/* ndp_require_consent
|
|
||||||
* If set to false - All incoming NDP requests will be internally accepted if valid.
|
|
||||||
* If set to true - All incoming NDP requests raise NDP_INDICATION event, upon which application can either accept or reject them.
|
|
||||||
*/
|
|
||||||
bool ndp_require_consent = true;
|
|
||||||
|
|
||||||
/* Start NAN Discovery */
|
/* Start NAN Discovery */
|
||||||
wifi_nan_config_t nan_cfg = WIFI_NAN_CONFIG_DEFAULT();
|
wifi_nan_config_t nan_cfg = WIFI_NAN_CONFIG_DEFAULT();
|
||||||
|
|
||||||
@@ -112,9 +103,12 @@ void wifi_nan_publish(void)
|
|||||||
#endif
|
#endif
|
||||||
.matching_filter = EXAMPLE_NAN_MATCHING_FILTER,
|
.matching_filter = EXAMPLE_NAN_MATCHING_FILTER,
|
||||||
.single_replied_event = 1,
|
.single_replied_event = 1,
|
||||||
|
/* 0 - All incoming NDP requests will be internally accepted,
|
||||||
|
1 - All incoming NDP requests raise NDP_INDICATION event and require esp_wifi_nan_datapath_resp to accept or reject. */
|
||||||
|
.ndp_resp_needed = 1,
|
||||||
};
|
};
|
||||||
|
|
||||||
pub_id = esp_wifi_nan_publish_service(&publish_cfg, ndp_require_consent);
|
pub_id = esp_wifi_nan_publish_service(&publish_cfg);
|
||||||
if (pub_id == 0) {
|
if (pub_id == 0) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
@@ -52,9 +52,6 @@ static void nan_receive_event_handler(void *arg, esp_event_base_t event_base,
|
|||||||
if (evt->ssi_len) {
|
if (evt->ssi_len) {
|
||||||
ESP_LOGI(TAG, "Received payload from Peer "MACSTR" [Peer Service id - %d] - ", MAC2STR(evt->peer_if_mac), evt->peer_inst_id);
|
ESP_LOGI(TAG, "Received payload from Peer "MACSTR" [Peer Service id - %d] - ", MAC2STR(evt->peer_if_mac), evt->peer_inst_id);
|
||||||
ESP_LOG_BUFFER_HEXDUMP(TAG, evt->ssi, evt->ssi_len, ESP_LOG_INFO);
|
ESP_LOG_BUFFER_HEXDUMP(TAG, evt->ssi, evt->ssi_len, ESP_LOG_INFO);
|
||||||
} else {
|
|
||||||
ESP_LOGI(TAG, "Received message '%s' from Peer "MACSTR" [Peer Service id - %d]",
|
|
||||||
evt->peer_svc_info, MAC2STR(evt->peer_if_mac), evt->peer_inst_id);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -85,7 +85,7 @@ static void event_handler(void *arg, esp_event_base_t event_base,
|
|||||||
wifi_event_dpp_config_received_t *config = event_data;
|
wifi_event_dpp_config_received_t *config = event_data;
|
||||||
memcpy(&s_dpp_wifi_config, &config->wifi_cfg, sizeof(s_dpp_wifi_config));
|
memcpy(&s_dpp_wifi_config, &config->wifi_cfg, sizeof(s_dpp_wifi_config));
|
||||||
s_retry_num = 0;
|
s_retry_num = 0;
|
||||||
esp_wifi_set_config(ESP_IF_WIFI_STA, &s_dpp_wifi_config);
|
esp_wifi_set_config(WIFI_IF_STA, &s_dpp_wifi_config);
|
||||||
esp_wifi_connect();
|
esp_wifi_connect();
|
||||||
break;
|
break;
|
||||||
case WIFI_EVENT_DPP_FAILED:
|
case WIFI_EVENT_DPP_FAILED:
|
||||||
@@ -161,7 +161,7 @@ void dpp_enrollee_init(void)
|
|||||||
ESP_ERROR_CHECK(esp_wifi_init(&cfg));
|
ESP_ERROR_CHECK(esp_wifi_init(&cfg));
|
||||||
|
|
||||||
ESP_ERROR_CHECK(esp_wifi_set_mode(WIFI_MODE_STA));
|
ESP_ERROR_CHECK(esp_wifi_set_mode(WIFI_MODE_STA));
|
||||||
ESP_ERROR_CHECK(esp_supp_dpp_init(NULL));
|
ESP_ERROR_CHECK(esp_supp_dpp_init());
|
||||||
ESP_ERROR_CHECK(dpp_enrollee_bootstrap());
|
ESP_ERROR_CHECK(dpp_enrollee_bootstrap());
|
||||||
ESP_ERROR_CHECK(esp_wifi_start());
|
ESP_ERROR_CHECK(esp_wifi_start());
|
||||||
|
|
||||||
|
@@ -58,7 +58,7 @@ static void wps_restart(void)
|
|||||||
{
|
{
|
||||||
ESP_ERROR_CHECK(esp_wifi_wps_disable());
|
ESP_ERROR_CHECK(esp_wifi_wps_disable());
|
||||||
ESP_ERROR_CHECK(esp_wifi_wps_enable(&config));
|
ESP_ERROR_CHECK(esp_wifi_wps_enable(&config));
|
||||||
ESP_ERROR_CHECK(esp_wifi_wps_start(0));
|
ESP_ERROR_CHECK(esp_wifi_wps_start());
|
||||||
}
|
}
|
||||||
|
|
||||||
static void handle_wps_success(void *event_data)
|
static void handle_wps_success(void *event_data)
|
||||||
@@ -172,7 +172,7 @@ static void start_wps(void)
|
|||||||
ESP_LOGI(TAG, "start wps...");
|
ESP_LOGI(TAG, "start wps...");
|
||||||
|
|
||||||
ESP_ERROR_CHECK(esp_wifi_wps_enable(&config));
|
ESP_ERROR_CHECK(esp_wifi_wps_enable(&config));
|
||||||
ESP_ERROR_CHECK(esp_wifi_wps_start(0));
|
ESP_ERROR_CHECK(esp_wifi_wps_start());
|
||||||
}
|
}
|
||||||
|
|
||||||
void app_main(void)
|
void app_main(void)
|
||||||
|
@@ -583,3 +583,88 @@
|
|||||||
-
|
-
|
||||||
re: "cannot open linker script file bootloader.ld"
|
re: "cannot open linker script file bootloader.ld"
|
||||||
hint: "The file 'bootloader.ld' was renamed to 'bootloader.ld.in' in ESP-IDF v6.0. Please use update your build scripts."
|
hint: "The file 'bootloader.ld' was renamed to 'bootloader.ld.in' in ESP-IDF v6.0. Please use update your build scripts."
|
||||||
|
|
||||||
|
-
|
||||||
|
re: "fatal error: esp_wpa2.h: No such file or directory"
|
||||||
|
hint: "The header file 'esp_wpa2.h' has been removed. Please use 'esp_eap_client.h' instead."
|
||||||
|
|
||||||
|
-
|
||||||
|
re: "error: implicit declaration of function '(esp_wifi_sta_wpa2_ent_enable|esp_wifi_sta_wpa2_ent_disable|esp_wifi_sta_wpa2_ent_set_identity|esp_wifi_sta_wpa2_ent_clear_identity|esp_wifi_sta_wpa2_ent_set_username|esp_wifi_sta_wpa2_ent_clear_username|esp_wifi_sta_wpa2_ent_set_password|esp_wifi_sta_wpa2_ent_clear_password|esp_wifi_sta_wpa2_ent_set_new_password|esp_wifi_sta_wpa2_ent_clear_new_password|esp_wifi_sta_wpa2_ent_set_ca_cert|esp_wifi_sta_wpa2_ent_clear_ca_cert|esp_wifi_sta_wpa2_ent_set_cert_key|esp_wifi_sta_wpa2_ent_clear_cert_key|esp_wifi_sta_wpa2_ent_set_disable_time_check|esp_wifi_sta_wpa2_ent_get_disable_time_check|esp_wifi_sta_wpa2_ent_set_ttls_phase2_method|esp_wifi_sta_wpa2_set_suiteb_192bit_certification|esp_wifi_sta_wpa2_ent_set_pac_file|esp_wifi_sta_wpa2_ent_set_fast_phase1_params|esp_wifi_sta_wpa2_use_default_cert_bundle)'"
|
||||||
|
hint: "The function '{}' has been removed from esp_wpa2.h. Please use the equivalent function from esp_eap_client.h instead."
|
||||||
|
match_to_output: True
|
||||||
|
|
||||||
|
-
|
||||||
|
re: "error: too many arguments to function 'esp_supp_dpp_init'"
|
||||||
|
hint: "The function 'esp_supp_dpp_init' no longer accepts a callback. Please register for Wi-Fi events directly to get DPP events."
|
||||||
|
|
||||||
|
-
|
||||||
|
re: "error: unknown type name '(esp_supp_dpp_event_t|esp_supp_dpp_event_cb_t)'"
|
||||||
|
hint: "The DPP event callback 'esp_supp_dpp_event_cb_t' and event enum 'esp_supp_dpp_event_t' have been removed. Please use Wi-Fi events directly."
|
||||||
|
|
||||||
|
-
|
||||||
|
re: "error: implicit declaration of function 'esp_rrm_send_neighbor_rep_request'"
|
||||||
|
hint: "The function 'esp_rrm_send_neighbor_rep_request' has been removed. Use 'esp_rrm_send_neighbor_report_request' instead."
|
||||||
|
|
||||||
|
-
|
||||||
|
re: "error: implicit declaration of function '(esp_wifi_set_ant_gpio|esp_wifi_get_ant_gpio|esp_wifi_set_ant|esp_wifi_get_ant)'"
|
||||||
|
hint: "The function '{}' has been removed. Please use the equivalent function from the esp_phy component (e.g. 'esp_phy_set_ant_gpio')."
|
||||||
|
match_to_output: True
|
||||||
|
|
||||||
|
-
|
||||||
|
re: "error: implicit declaration of function 'esp_wifi_config_espnow_rate'"
|
||||||
|
hint: "The function 'esp_wifi_config_espnow_rate' has been removed. Use 'esp_now_set_peer_rate_config' instead."
|
||||||
|
|
||||||
|
-
|
||||||
|
re: "error: too many arguments to function 'esp_wifi_wps_start'"
|
||||||
|
hint: "The function 'esp_wifi_wps_start' no longer accepts a 'timeout_ms' argument."
|
||||||
|
|
||||||
|
-
|
||||||
|
re: "error: '(WIFI_AUTH_WPA3_EXT_PSK|WIFI_AUTH_WPA3_EXT_PSK_MIXED_MODE)' undeclared"
|
||||||
|
hint: "The authentication modes 'WIFI_AUTH_WPA3_EXT_PSK' and 'WIFI_AUTH_WPA3_EXT_PSK_MIXED_MODE' have been removed. Use 'WIFI_AUTH_WPA3_PSK' instead."
|
||||||
|
|
||||||
|
-
|
||||||
|
re: "error: 'struct wifi_event_neighbor_report_t' has no member named 'report'"
|
||||||
|
hint: "In the 'wifi_event_neighbor_report_t' structure, the 'report' field has been removed. Please use the 'n_report' field instead."
|
||||||
|
|
||||||
|
-
|
||||||
|
re: "fatal error: esp_interface.h: No such file or directory"
|
||||||
|
hint: "The header file 'esp_interface.h' has been removed. The 'wifi_interface_t' enum is now defined in 'esp_wifi_types_generic.h'. The enum values (e.g. 'WIFI_IF_STA', 'WIFI_IF_AP') are no longer defined based on 'ESP_IF_WIFI_STA', 'ESP_IF_WIFI_AP', etc."
|
||||||
|
|
||||||
|
-
|
||||||
|
re: "error: 'use_get_report_api' undeclared"
|
||||||
|
hint: "The field 'use_get_report_api' from structure 'wifi_ftm_initiator_cfg_t' has been removed. Please use 'esp_wifi_ftm_get_report' to fetch raw FTM report data instead."
|
||||||
|
|
||||||
|
-
|
||||||
|
re: "error: 'ftm_report_data' undeclared"
|
||||||
|
hint: "The field 'ftm_report_data' from structure 'wifi_event_ftm_report_t' has been removed. Please use 'esp_wifi_ftm_get_report' to fetch raw FTM report data instead."
|
||||||
|
|
||||||
|
-
|
||||||
|
re: "error: 'svc_info' undeclared"
|
||||||
|
hint: "The field 'svc_info' from structures 'wifi_nan_publish_cfg_t', 'wifi_nan_subscribe_cfg_t', 'wifi_nan_followup_params_t', 'wifi_event_ndp_indication_t', 'wifi_event_ndp_confirm_t' has been removed. Please use the equivalent fields 'ssi' and 'ssi_len' instead."
|
||||||
|
|
||||||
|
-
|
||||||
|
re: "error: 'peer_svc_info' undeclared"
|
||||||
|
hint: "The field 'peer_svc_info' from structure 'wifi_event_nan_receive_t' has been removed. Please use the equivalent fields 'ssi' and 'ssi_len' instead."
|
||||||
|
|
||||||
|
-
|
||||||
|
re: "error: too few arguments to function 'esp_wifi_nan_publish_service'"
|
||||||
|
hint: "The function argument 'ndp_resp_needed' of 'esp_wifi_nan_publish_service' has been moved to structure 'wifi_nan_publish_cfg_t'."
|
||||||
|
|
||||||
|
-
|
||||||
|
re: "error: '(WIFI_REASON_ASSOC_EXPIRE|WIFI_REASON_NOT_AUTHED|WIFI_REASON_NOT_ASSOCED)' undeclared"
|
||||||
|
hint: "The Wi-Fi disconnection reason codes '{0}' have been removed. Please use '{1}', '{2}', and '{3}' respectively."
|
||||||
|
variables:
|
||||||
|
-
|
||||||
|
re_variables: ['WIFI_REASON_ASSOC_EXPIRE']
|
||||||
|
hint_variables: ['WIFI_REASON_ASSOC_EXPIRE', 'WIFI_REASON_AUTH_EXPIRE']
|
||||||
|
-
|
||||||
|
re_variables: ['WIFI_REASON_NOT_AUTHED']
|
||||||
|
hint_variables: ['WIFI_REASON_NOT_AUTHED', 'WIFI_REASON_CLASS2_FRAME_FROM_NONAUTH_STA']
|
||||||
|
-
|
||||||
|
re_variables: ['WIFI_REASON_NOT_ASSOCED']
|
||||||
|
hint_variables: ['WIFI_REASON_NOT_ASSOCED', 'WIFI_REASON_CLASS3_FRAME_FROM_NONASSOC_STA']
|
||||||
|
|
||||||
|
-
|
||||||
|
re: "error: '(ESP_IF_WIFI_STA|ESP_IF_WIFI_AP)' undeclared"
|
||||||
|
hint: "The macros '{}' have been removed. Please use the enum values 'WIFI_IF_STA' and 'WIFI_IF_AP' directly."
|
||||||
|
match_to_output: True
|
||||||
|
@@ -368,7 +368,7 @@ class RunTool:
|
|||||||
p = await asyncio.create_subprocess_exec(
|
p = await asyncio.create_subprocess_exec(
|
||||||
*cmd,
|
*cmd,
|
||||||
env=env_copy,
|
env=env_copy,
|
||||||
limit=1024 * 256,
|
limit=1024 * 1024,
|
||||||
cwd=self.cwd,
|
cwd=self.cwd,
|
||||||
stdout=asyncio.subprocess.PIPE,
|
stdout=asyncio.subprocess.PIPE,
|
||||||
stderr=asyncio.subprocess.PIPE,
|
stderr=asyncio.subprocess.PIPE,
|
||||||
|
@@ -70,7 +70,7 @@ static void test_wps_init(void)
|
|||||||
{
|
{
|
||||||
esp_wps_config_t config = WPS_CONFIG_INIT_DEFAULT(WPS_TYPE_DISABLE);
|
esp_wps_config_t config = WPS_CONFIG_INIT_DEFAULT(WPS_TYPE_DISABLE);
|
||||||
ESP_ERROR_CHECK(esp_wifi_wps_enable(&config));
|
ESP_ERROR_CHECK(esp_wifi_wps_enable(&config));
|
||||||
ESP_ERROR_CHECK(esp_wifi_wps_start(0));
|
ESP_ERROR_CHECK(esp_wifi_wps_start());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@@ -65,7 +65,7 @@ static void test_wps_init(void)
|
|||||||
{
|
{
|
||||||
esp_wps_config_t config = WPS_CONFIG_INIT_DEFAULT(WPS_TYPE_DISABLE);
|
esp_wps_config_t config = WPS_CONFIG_INIT_DEFAULT(WPS_TYPE_DISABLE);
|
||||||
ESP_ERROR_CHECK(esp_wifi_wps_enable(&config));
|
ESP_ERROR_CHECK(esp_wifi_wps_enable(&config));
|
||||||
ESP_ERROR_CHECK(esp_wifi_wps_start(0));
|
ESP_ERROR_CHECK(esp_wifi_wps_start());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user