mirror of
https://github.com/espressif/esp-idf.git
synced 2025-08-05 13:44:32 +02:00
Merge branch 'feat/wifi_remote' into 'master'
feat(esp_wifi): Add dependency on wifi_remote for chips with no wifi See merge request espressif/esp-idf!26217
This commit is contained in:
@@ -38,11 +38,18 @@ if(CONFIG_ESP_WIFI_ENABLED)
|
|||||||
if(CONFIG_ESP_WIFI_NAN_ENABLE)
|
if(CONFIG_ESP_WIFI_NAN_ENABLE)
|
||||||
list(APPEND srcs "wifi_apps/src/nan_app.c")
|
list(APPEND srcs "wifi_apps/src/nan_app.c")
|
||||||
endif()
|
endif()
|
||||||
|
set(local_include_dirs include/local)
|
||||||
|
else()
|
||||||
|
# No local wifi: provide only netif bindings
|
||||||
|
set(srcs
|
||||||
|
"src/wifi_default.c"
|
||||||
|
"src/wifi_netif.c")
|
||||||
|
set(local_include_dirs)
|
||||||
|
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
idf_component_register(SRCS "${srcs}"
|
idf_component_register(SRCS "${srcs}"
|
||||||
INCLUDE_DIRS "include" "wifi_apps/include"
|
INCLUDE_DIRS "include" "wifi_apps/include" ${local_include_dirs}
|
||||||
REQUIRES esp_event esp_phy esp_netif
|
REQUIRES esp_event esp_phy esp_netif
|
||||||
PRIV_REQUIRES driver esptool_py esp_pm esp_timer nvs_flash
|
PRIV_REQUIRES driver esptool_py esp_pm esp_timer nvs_flash
|
||||||
wpa_supplicant hal lwip esp_coex ${extra_priv_requires}
|
wpa_supplicant hal lwip esp_coex ${extra_priv_requires}
|
||||||
@@ -70,9 +77,15 @@ if(CONFIG_ESP_WIFI_ENABLED)
|
|||||||
target_link_libraries(${COMPONENT_LIB} PUBLIC ${blob})
|
target_link_libraries(${COMPONENT_LIB} PUBLIC ${blob})
|
||||||
endforeach()
|
endforeach()
|
||||||
endif()
|
endif()
|
||||||
|
else()
|
||||||
if(CONFIG_SPIRAM)
|
# No local wifi: use esp_wifi_remote if it's available within our components
|
||||||
idf_component_optional_requires(PRIVATE esp_psram)
|
idf_build_get_property(build_components BUILD_COMPONENTS)
|
||||||
|
if(esp_wifi_remote IN_LIST build_components)
|
||||||
|
idf_component_get_property(esp_wifi_remote esp_wifi_remote COMPONENT_LIB)
|
||||||
|
target_link_libraries(${COMPONENT_LIB} PUBLIC ${esp_wifi_remote})
|
||||||
endif()
|
endif()
|
||||||
|
endif()
|
||||||
|
|
||||||
|
if(CONFIG_SPIRAM)
|
||||||
|
idf_component_optional_requires(PRIVATE esp_psram)
|
||||||
endif()
|
endif()
|
||||||
|
@@ -7,6 +7,8 @@ menu "Wi-Fi"
|
|||||||
bool
|
bool
|
||||||
default y if SOC_WIFI_SUPPORTED
|
default y if SOC_WIFI_SUPPORTED
|
||||||
|
|
||||||
|
if ESP_WIFI_ENABLED
|
||||||
|
|
||||||
config ESP_WIFI_STATIC_RX_BUFFER_NUM
|
config ESP_WIFI_STATIC_RX_BUFFER_NUM
|
||||||
int "Max number of WiFi static RX buffers"
|
int "Max number of WiFi static RX buffers"
|
||||||
range 2 25 if !SOC_WIFI_HE_SUPPORT
|
range 2 25 if !SOC_WIFI_HE_SUPPORT
|
||||||
@@ -227,22 +229,23 @@ menu "Wi-Fi"
|
|||||||
range 752 1256
|
range 752 1256
|
||||||
default 752
|
default 752
|
||||||
help
|
help
|
||||||
ESP-MESH utilizes beacon frames to detect and resolve root node conflicts (see documentation). However the
|
ESP-MESH utilizes beacon frames to detect and resolve root node conflicts (see documentation). However
|
||||||
default length of a beacon frame can simultaneously hold only five root node identifier structures,
|
the default length of a beacon frame can simultaneously hold only five root node identifier structures,
|
||||||
meaning that a root node conflict of up to five nodes can be detected at one time. In the occurence of
|
meaning that a root node conflict of up to five nodes can be detected at one time. In the occurence of
|
||||||
more root nodes conflict involving more than five root nodes, the conflict resolution process will detect
|
more root nodes conflict involving more than five root nodes, the conflict resolution process will
|
||||||
five of the root nodes, resolve the conflict, and re-detect more root nodes. This process will repeat
|
detect five of the root nodes, resolve the conflict, and re-detect more root nodes. This process will
|
||||||
until all root node conflicts are resolved. However this process can generally take a very long time.
|
repeat until all root node conflicts are resolved. However this process can generally take a very long
|
||||||
|
time.
|
||||||
|
|
||||||
To counter this situation, the beacon frame length can be increased such that more root nodes can be
|
To counter this situation, the beacon frame length can be increased such that more root nodes can be
|
||||||
detected simultaneously. Each additional root node will require 36 bytes and should be added ontop of the
|
detected simultaneously. Each additional root node will require 36 bytes and should be added ontop of
|
||||||
default beacon frame length of
|
the default beacon frame length of
|
||||||
752 bytes. For example, if you want to detect 10 root nodes simultaneously, you need to set the beacon
|
752 bytes. For example, if you want to detect 10 root nodes simultaneously, you need to set the beacon
|
||||||
frame length as
|
frame length as
|
||||||
932 (752+36*5).
|
932 (752+36*5).
|
||||||
|
|
||||||
Setting a longer beacon length also assists with debugging as the conflicting root nodes can be identified
|
Setting a longer beacon length also assists with debugging as the conflicting root nodes can be
|
||||||
more quickly.
|
identified more quickly.
|
||||||
|
|
||||||
config ESP_WIFI_MGMT_SBUF_NUM
|
config ESP_WIFI_MGMT_SBUF_NUM
|
||||||
int "WiFi mgmt short buffer number"
|
int "WiFi mgmt short buffer number"
|
||||||
@@ -285,7 +288,8 @@ menu "Wi-Fi"
|
|||||||
help
|
help
|
||||||
Select this option to allow the device to establish a WPA3-Personal connection with eligible AP's.
|
Select this option to allow the device to establish a WPA3-Personal connection with eligible AP's.
|
||||||
PMF (Protected Management Frames) is a prerequisite feature for a WPA3 connection, it needs to be
|
PMF (Protected Management Frames) is a prerequisite feature for a WPA3 connection, it needs to be
|
||||||
explicitly configured before attempting connection. Please refer to the Wi-Fi Driver API Guide for details.
|
explicitly configured before attempting connection. Please refer to the Wi-Fi Driver API Guide
|
||||||
|
for details.
|
||||||
|
|
||||||
config ESP_WIFI_ENABLE_SAE_PK
|
config ESP_WIFI_ENABLE_SAE_PK
|
||||||
bool "Enable SAE-PK"
|
bool "Enable SAE-PK"
|
||||||
@@ -309,7 +313,8 @@ menu "Wi-Fi"
|
|||||||
help
|
help
|
||||||
Select this option to allow the device to establish OWE connection with eligible AP's.
|
Select this option to allow the device to establish OWE connection with eligible AP's.
|
||||||
PMF (Protected Management Frames) is a prerequisite feature for a WPA3 connection, it needs to be
|
PMF (Protected Management Frames) is a prerequisite feature for a WPA3 connection, it needs to be
|
||||||
explicitly configured before attempting connection. Please refer to the Wi-Fi Driver API Guide for details.
|
explicitly configured before attempting connection. Please refer to the Wi-Fi Driver API Guide
|
||||||
|
for details.
|
||||||
|
|
||||||
config ESP_WIFI_SLP_IRAM_OPT
|
config ESP_WIFI_SLP_IRAM_OPT
|
||||||
bool "WiFi SLP IRAM speed optimization"
|
bool "WiFi SLP IRAM speed optimization"
|
||||||
@@ -440,8 +445,8 @@ menu "Wi-Fi"
|
|||||||
Maximum number of encrypted peers supported by espnow.
|
Maximum number of encrypted peers supported by espnow.
|
||||||
The number of hardware keys for encryption is fixed. And the espnow and SoftAP share the same
|
The number of hardware keys for encryption is fixed. And the espnow and SoftAP share the same
|
||||||
hardware keys. So this configuration will affect the maximum connection number of SoftAP.
|
hardware keys. So this configuration will affect the maximum connection number of SoftAP.
|
||||||
Maximum espnow encrypted peers number + maximum number of connections of SoftAP = Max hardware keys number.
|
Maximum espnow encrypted peers number + maximum number of connections of SoftAP = Max hardware
|
||||||
When using ESP mesh, this value should be set to a maximum of 6.
|
keys number. When using ESP mesh, this value should be set to a maximum of 6.
|
||||||
|
|
||||||
config ESP_WIFI_NAN_ENABLE
|
config ESP_WIFI_NAN_ENABLE
|
||||||
bool "WiFi Aware"
|
bool "WiFi Aware"
|
||||||
@@ -633,4 +638,6 @@ menu "Wi-Fi"
|
|||||||
Select this configuration to free dynamic buffers during WiFi enterprise connection.
|
Select this configuration to free dynamic buffers during WiFi enterprise connection.
|
||||||
This will enable chip to reduce heap consumption during WiFi enterprise connection.
|
This will enable chip to reduce heap consumption during WiFi enterprise connection.
|
||||||
|
|
||||||
|
endif # wifi enabled
|
||||||
|
|
||||||
endmenu # Wi-Fi
|
endmenu # Wi-Fi
|
||||||
|
@@ -6,6 +6,9 @@
|
|||||||
|
|
||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
|
#include "sdkconfig.h"
|
||||||
|
#if CONFIG_SOC_WIFI_HE_SUPPORT
|
||||||
|
|
||||||
#include <stdint.h>
|
#include <stdint.h>
|
||||||
#include <stdbool.h>
|
#include <stdbool.h>
|
||||||
#include "esp_err.h"
|
#include "esp_err.h"
|
||||||
@@ -201,3 +204,5 @@ esp_err_t esp_wifi_sta_set_bss_color_collision_detection(int threshold, int dura
|
|||||||
#ifdef __cplusplus
|
#ifdef __cplusplus
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#endif // CONFIG_SOC_WIFI_HE_SUPPORT
|
||||||
|
@@ -1,16 +1,8 @@
|
|||||||
// Copyright 2019 Espressif Systems (Shanghai) PTE LTD
|
/*
|
||||||
//
|
* SPDX-FileCopyrightText: 2019-2023 Espressif Systems (Shanghai) CO LTD
|
||||||
// Licensed under the Apache License, Version 2.0 (the "License");
|
*
|
||||||
// you may not use this file except in compliance with the License.
|
* SPDX-License-Identifier: Apache-2.0
|
||||||
// You may obtain a copy of the License at
|
*/
|
||||||
|
|
||||||
// http://www.apache.org/licenses/LICENSE-2.0
|
|
||||||
//
|
|
||||||
// Unless required by applicable law or agreed to in writing, software
|
|
||||||
// distributed under the License is distributed on an "AS IS" BASIS,
|
|
||||||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
||||||
// See the License for the specific language governing permissions and
|
|
||||||
// limitations under the License.
|
|
||||||
|
|
||||||
#ifndef _ESP_WIFI_TYPES_PRIVATE_H
|
#ifndef _ESP_WIFI_TYPES_PRIVATE_H
|
||||||
#define _ESP_WIFI_TYPES_PRIVATE_H
|
#define _ESP_WIFI_TYPES_PRIVATE_H
|
||||||
@@ -19,7 +11,6 @@
|
|||||||
#include <stdbool.h>
|
#include <stdbool.h>
|
||||||
#include "sys/queue.h"
|
#include "sys/queue.h"
|
||||||
#include "esp_err.h"
|
#include "esp_err.h"
|
||||||
#include "esp_interface.h"
|
|
||||||
#include "esp_event_base.h"
|
#include "esp_event_base.h"
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
@@ -26,7 +26,7 @@ extern "C" {
|
|||||||
#define OSI_QUEUE_SEND_BACK 1
|
#define OSI_QUEUE_SEND_BACK 1
|
||||||
#define OSI_QUEUE_SEND_OVERWRITE 2
|
#define OSI_QUEUE_SEND_OVERWRITE 2
|
||||||
|
|
||||||
typedef struct {
|
typedef struct wifi_osi_funcs_t {
|
||||||
int32_t _version;
|
int32_t _version;
|
||||||
bool (* _env_is_chip)(void);
|
bool (* _env_is_chip)(void);
|
||||||
void (*_set_intr)(int32_t cpu_no, uint32_t intr_source, uint32_t intr_num, int32_t intr_prio);
|
void (*_set_intr)(int32_t cpu_no, uint32_t intr_source, uint32_t intr_num, int32_t intr_prio);
|
||||||
|
@@ -1,19 +1,13 @@
|
|||||||
// Copyright 2015-2019 Espressif Systems (Shanghai) PTE LTD
|
/*
|
||||||
//
|
* SPDX-FileCopyrightText: 2015-2023 Espressif Systems (Shanghai) CO LTD
|
||||||
// Licensed under the Apache License, Version 2.0 (the "License");
|
*
|
||||||
// you may not use this file except in compliance with the License.
|
* SPDX-License-Identifier: Apache-2.0
|
||||||
// You may obtain a copy of the License at
|
*/
|
||||||
|
|
||||||
// http://www.apache.org/licenses/LICENSE-2.0
|
|
||||||
//
|
|
||||||
// Unless required by applicable law or agreed to in writing, software
|
|
||||||
// distributed under the License is distributed on an "AS IS" BASIS,
|
|
||||||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
||||||
// See the License for the specific language governing permissions and
|
|
||||||
// limitations under the License.
|
|
||||||
|
|
||||||
#ifndef _WIFI_TYPES_H
|
#ifndef _WIFI_TYPES_H
|
||||||
#define _WIFI_TYPES_H
|
#define _WIFI_TYPES_H
|
||||||
|
#include <stdbool.h>
|
||||||
|
#include <stdint.h>
|
||||||
|
|
||||||
#ifdef __cplusplus
|
#ifdef __cplusplus
|
||||||
extern "C" {
|
extern "C" {
|
||||||
@@ -47,6 +41,26 @@ typedef struct {
|
|||||||
} data; /**< Configuration of ioctl command */
|
} data; /**< Configuration of ioctl command */
|
||||||
} wifi_ioctl_config_t;
|
} wifi_ioctl_config_t;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief WiFi beacon monitor parameter configuration
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
typedef struct {
|
||||||
|
bool enable; /**< Enable or disable beacon monitor */
|
||||||
|
uint8_t loss_timeout; /**< Beacon lost timeout */
|
||||||
|
uint8_t loss_threshold; /**< Maximum number of consecutive lost beacons allowed */
|
||||||
|
uint8_t delta_intr_early; /**< Delta early time for RF PHY on */
|
||||||
|
uint8_t delta_loss_timeout; /**< Delta timeout time for RF PHY off */
|
||||||
|
#if MAC_SUPPORT_PMU_MODEM_STATE
|
||||||
|
uint8_t beacon_abort: 1, /**< Enable or disable beacon abort */
|
||||||
|
broadcast_wakeup: 1, /**< Enable or disable TIM element multicast wakeup */
|
||||||
|
reserved: 6; /**< Reserved */
|
||||||
|
uint8_t tsf_time_sync_deviation; /**< Deviation range to sync with AP TSF timestamp */
|
||||||
|
uint16_t modem_state_consecutive; /**< PMU MODEM state consecutive count limit */
|
||||||
|
uint16_t rf_ctrl_wait_cycle; /**< RF on wait time (unit: Modem APB clock cycle) */
|
||||||
|
#endif
|
||||||
|
} wifi_beacon_monitor_config_t;
|
||||||
|
|
||||||
#ifdef __cplusplus
|
#ifdef __cplusplus
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
@@ -54,7 +54,7 @@
|
|||||||
#include "esp_err.h"
|
#include "esp_err.h"
|
||||||
#include "esp_wifi_types.h"
|
#include "esp_wifi_types.h"
|
||||||
#include "esp_event.h"
|
#include "esp_event.h"
|
||||||
#include "esp_private/esp_wifi_private.h"
|
#include "esp_wifi_crypto_types.h"
|
||||||
#include "esp_wifi_default.h"
|
#include "esp_wifi_default.h"
|
||||||
|
|
||||||
#ifdef __cplusplus
|
#ifdef __cplusplus
|
||||||
@@ -90,6 +90,8 @@ extern "C" {
|
|||||||
#define ESP_ERR_WIFI_DISCARD (ESP_ERR_WIFI_BASE + 27) /*!< Discard frame */
|
#define ESP_ERR_WIFI_DISCARD (ESP_ERR_WIFI_BASE + 27) /*!< Discard frame */
|
||||||
#define ESP_ERR_WIFI_ROC_IN_PROGRESS (ESP_ERR_WIFI_BASE + 28) /*!< ROC op is in progress */
|
#define ESP_ERR_WIFI_ROC_IN_PROGRESS (ESP_ERR_WIFI_BASE + 28) /*!< ROC op is in progress */
|
||||||
|
|
||||||
|
typedef struct wifi_osi_funcs_t wifi_osi_funcs_t;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @brief WiFi stack configuration parameters passed to esp_wifi_init call.
|
* @brief WiFi stack configuration parameters passed to esp_wifi_init call.
|
||||||
*/
|
*/
|
||||||
@@ -181,6 +183,7 @@ typedef struct {
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
extern const wpa_crypto_funcs_t g_wifi_default_wpa_crypto_funcs;
|
extern const wpa_crypto_funcs_t g_wifi_default_wpa_crypto_funcs;
|
||||||
|
extern wifi_osi_funcs_t g_wifi_osi_funcs;
|
||||||
|
|
||||||
#define WIFI_INIT_CONFIG_MAGIC 0x1F2F3F4F
|
#define WIFI_INIT_CONFIG_MAGIC 0x1F2F3F4F
|
||||||
|
|
||||||
@@ -898,6 +901,12 @@ esp_err_t esp_wifi_set_config(wifi_interface_t interface, wifi_config_t *conf);
|
|||||||
*/
|
*/
|
||||||
esp_err_t esp_wifi_get_config(wifi_interface_t interface, wifi_config_t *conf);
|
esp_err_t esp_wifi_get_config(wifi_interface_t interface, wifi_config_t *conf);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief Forward declare wifi_sta_list_t. The definition depends on the target device
|
||||||
|
* that implements esp_wifi
|
||||||
|
*/
|
||||||
|
typedef struct wifi_sta_list_t wifi_sta_list_t;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @brief Get STAs associated with soft-AP
|
* @brief Get STAs associated with soft-AP
|
||||||
*
|
*
|
||||||
|
@@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
* SPDX-FileCopyrightText: 2019-2022 Espressif Systems (Shanghai) CO LTD
|
* SPDX-FileCopyrightText: 2019-2023 Espressif Systems (Shanghai) CO LTD
|
||||||
*
|
*
|
||||||
* SPDX-License-Identifier: Apache-2.0
|
* SPDX-License-Identifier: Apache-2.0
|
||||||
*/
|
*/
|
||||||
@@ -13,6 +13,19 @@
|
|||||||
extern "C" {
|
extern "C" {
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
||||||
|
#ifndef ESP_WIFI_MAX_CONN_NUM
|
||||||
|
// Number of maximum wifi connection may be undefined if we have no native wifi support on this target
|
||||||
|
// and at the same time there's no native interface injected by the wifi_remote component.
|
||||||
|
// In this case, we just let the header compilable, since no wifi API could be used (let's make a sanity check)
|
||||||
|
#if !CONFIG_SOC_WIFI_SUPPORTED && !CONFIG_ESP_WIFI_REMOTE_ENABLED
|
||||||
|
#define ESP_WIFI_MAX_CONN_NUM (15)
|
||||||
|
typedef struct wifi_sta_list_t wifi_sta_list_t;
|
||||||
|
#else
|
||||||
|
#error WiFi header mismatch! Please make sure you use the correct version of WiFi API
|
||||||
|
#endif
|
||||||
|
#endif // ESP_WIFI_MAX_CONN_NUM
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @brief station list structure
|
* @brief station list structure
|
||||||
*/
|
*/
|
||||||
|
@@ -393,7 +393,7 @@ typedef uint32_t (*esp_crc32_le_t)(uint32_t crc, uint8_t const *buf, uint32_t le
|
|||||||
* The structure can be set as software crypto or the crypto optimized by device's
|
* The structure can be set as software crypto or the crypto optimized by device's
|
||||||
* hardware.
|
* hardware.
|
||||||
*/
|
*/
|
||||||
typedef struct {
|
typedef struct wpa_crypto_funcs_t {
|
||||||
uint32_t size; /**< The crypto callback function structure size */
|
uint32_t size; /**< The crypto callback function structure size */
|
||||||
uint32_t version; /**< The crypto callback function structure version */
|
uint32_t version; /**< The crypto callback function structure version */
|
||||||
esp_aes_wrap_t aes_wrap; /**< The AES wrap callback function used by esp_wifi */
|
esp_aes_wrap_t aes_wrap; /**< The AES wrap callback function used by esp_wifi */
|
||||||
|
@@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
* SPDX-FileCopyrightText: 2022-2023 Espressif Systems (Shanghai) CO LTD
|
* SPDX-FileCopyrightText: 2022-2024 Espressif Systems (Shanghai) CO LTD
|
||||||
*
|
*
|
||||||
* SPDX-License-Identifier: Apache-2.0
|
* SPDX-License-Identifier: Apache-2.0
|
||||||
*/
|
*/
|
||||||
|
File diff suppressed because it is too large
Load Diff
1012
components/esp_wifi/include/esp_wifi_types_generic.h
Normal file
1012
components/esp_wifi/include/esp_wifi_types_generic.h
Normal file
File diff suppressed because it is too large
Load Diff
134
components/esp_wifi/include/local/esp_wifi_types_native.h
Normal file
134
components/esp_wifi/include/local/esp_wifi_types_native.h
Normal file
@@ -0,0 +1,134 @@
|
|||||||
|
/*
|
||||||
|
* SPDX-FileCopyrightText: 2023-2024 Espressif Systems (Shanghai) CO LTD
|
||||||
|
*
|
||||||
|
* SPDX-License-Identifier: Apache-2.0
|
||||||
|
*/
|
||||||
|
|
||||||
|
#pragma once
|
||||||
|
|
||||||
|
#include "sdkconfig.h"
|
||||||
|
#include "esp_wifi_types_generic.h"
|
||||||
|
#if CONFIG_SOC_WIFI_HE_SUPPORT
|
||||||
|
#include "esp_wifi_he_types.h"
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifdef __cplusplus
|
||||||
|
extern "C" {
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#if CONFIG_IDF_TARGET_ESP32C2
|
||||||
|
#define ESP_WIFI_MAX_CONN_NUM (4) /**< max number of stations which can connect to ESP32C2 soft-AP */
|
||||||
|
#elif CONFIG_IDF_TARGET_ESP32C3 || CONFIG_IDF_TARGET_ESP32C6
|
||||||
|
#define ESP_WIFI_MAX_CONN_NUM (10) /**< max number of stations which can connect to ESP32C3 soft-AP */
|
||||||
|
#else
|
||||||
|
#define ESP_WIFI_MAX_CONN_NUM (15) /**< max number of stations which can connect to ESP32/ESP32S3/ESP32S2 soft-AP */
|
||||||
|
#endif
|
||||||
|
|
||||||
|
/** @brief List of stations associated with the Soft-AP */
|
||||||
|
typedef struct wifi_sta_list_t {
|
||||||
|
wifi_sta_info_t sta[ESP_WIFI_MAX_CONN_NUM]; /**< station list */
|
||||||
|
int num; /**< number of stations in the list (other entries are invalid) */
|
||||||
|
} wifi_sta_list_t;
|
||||||
|
|
||||||
|
#if CONFIG_SOC_WIFI_HE_SUPPORT
|
||||||
|
typedef esp_wifi_rxctrl_t wifi_pkt_rx_ctrl_t;
|
||||||
|
#else
|
||||||
|
/** @brief Received packet radio metadata header, this is the common header at the beginning of all promiscuous mode RX callback buffers */
|
||||||
|
typedef struct {
|
||||||
|
signed rssi:8; /**< Received Signal Strength Indicator(RSSI) of packet. unit: dBm */
|
||||||
|
unsigned rate:5; /**< PHY rate encoding of the packet. Only valid for non HT(11bg) packet */
|
||||||
|
unsigned :1; /**< reserved */
|
||||||
|
unsigned sig_mode:2; /**< Protocol of the reveived packet, 0: non HT(11bg) packet; 1: HT(11n) packet; 3: VHT(11ac) packet */
|
||||||
|
unsigned :16; /**< reserved */
|
||||||
|
unsigned mcs:7; /**< Modulation Coding Scheme. If is HT(11n) packet, shows the modulation, range from 0 to 76(MSC0 ~ MCS76) */
|
||||||
|
unsigned cwb:1; /**< Channel Bandwidth of the packet. 0: 20MHz; 1: 40MHz */
|
||||||
|
unsigned :16; /**< reserved */
|
||||||
|
unsigned smoothing:1; /**< Set to 1 indicates that channel estimate smoothing is recommended.
|
||||||
|
Set to 0 indicates that only per-carrierindependent (unsmoothed) channel estimate is recommended. */
|
||||||
|
unsigned not_sounding:1; /**< Set to 0 indicates that PPDU is a sounding PPDU. Set to 1indicates that the PPDU is not a sounding PPDU.
|
||||||
|
sounding PPDU is used for channel estimation by the request receiver */
|
||||||
|
unsigned :1; /**< reserved */
|
||||||
|
unsigned aggregation:1; /**< Aggregation. 0: MPDU packet; 1: AMPDU packet */
|
||||||
|
unsigned stbc:2; /**< Space Time Block Code(STBC). 0: non STBC packet; 1: STBC packet */
|
||||||
|
unsigned fec_coding:1; /**< Forward Error Correction(FEC). Flag is set for 11n packets which are LDPC */
|
||||||
|
unsigned sgi:1; /**< Short Guide Interval(SGI). 0: Long GI; 1: Short GI */
|
||||||
|
#if CONFIG_IDF_TARGET_ESP32
|
||||||
|
signed noise_floor:8; /**< noise floor of Radio Frequency Module(RF). unit: dBm*/
|
||||||
|
#elif CONFIG_IDF_TARGET_ESP32S2 || CONFIG_IDF_TARGET_ESP32S3 || CONFIG_IDF_TARGET_ESP32C3 || CONFIG_IDF_TARGET_ESP32C2
|
||||||
|
unsigned :8; /**< reserved */
|
||||||
|
#endif
|
||||||
|
unsigned ampdu_cnt:8; /**< the number of subframes aggregated in AMPDU */
|
||||||
|
unsigned channel:4; /**< primary channel on which this packet is received */
|
||||||
|
unsigned secondary_channel:4; /**< secondary channel on which this packet is received. 0: none; 1: above; 2: below */
|
||||||
|
unsigned :8; /**< reserved */
|
||||||
|
unsigned timestamp:32; /**< timestamp. The local time when this packet is received. It is precise only if modem sleep or light sleep is not enabled. unit: microsecond */
|
||||||
|
unsigned :32; /**< reserved */
|
||||||
|
#if CONFIG_IDF_TARGET_ESP32S2
|
||||||
|
unsigned :32; /**< reserved */
|
||||||
|
#elif CONFIG_IDF_TARGET_ESP32S3 || CONFIG_IDF_TARGET_ESP32C3 || CONFIG_IDF_TARGET_ESP32C2
|
||||||
|
signed noise_floor:8; /**< noise floor of Radio Frequency Module(RF). unit: dBm*/
|
||||||
|
unsigned :24; /**< reserved */
|
||||||
|
unsigned :32; /**< reserved */
|
||||||
|
#endif
|
||||||
|
unsigned :31; /**< reserved */
|
||||||
|
unsigned ant:1; /**< antenna number from which this packet is received. 0: WiFi antenna 0; 1: WiFi antenna 1 */
|
||||||
|
#if CONFIG_IDF_TARGET_ESP32S2
|
||||||
|
signed noise_floor:8; /**< noise floor of Radio Frequency Module(RF). unit: dBm*/
|
||||||
|
unsigned :24; /**< reserved */
|
||||||
|
#elif CONFIG_IDF_TARGET_ESP32S3 || CONFIG_IDF_TARGET_ESP32C3 || CONFIG_IDF_TARGET_ESP32C2
|
||||||
|
unsigned :32; /**< reserved */
|
||||||
|
unsigned :32; /**< reserved */
|
||||||
|
unsigned :32; /**< reserved */
|
||||||
|
#endif
|
||||||
|
unsigned sig_len:12; /**< length of packet including Frame Check Sequence(FCS) */
|
||||||
|
unsigned :12; /**< reserved */
|
||||||
|
unsigned rx_state:8; /**< state of the packet. 0: no error; others: error numbers which are not public */
|
||||||
|
} wifi_pkt_rx_ctrl_t;
|
||||||
|
#endif
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief Channel state information(CSI) configuration type
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
#if CONFIG_SOC_WIFI_HE_SUPPORT
|
||||||
|
typedef wifi_csi_acquire_config_t wifi_csi_config_t;
|
||||||
|
#else
|
||||||
|
typedef struct {
|
||||||
|
bool lltf_en; /**< enable to receive legacy long training field(lltf) data. Default enabled */
|
||||||
|
bool htltf_en; /**< enable to receive HT long training field(htltf) data. Default enabled */
|
||||||
|
bool stbc_htltf2_en; /**< enable to receive space time block code HT long training field(stbc-htltf2) data. Default enabled */
|
||||||
|
bool ltf_merge_en; /**< enable to generate htlft data by averaging lltf and ht_ltf data when receiving HT packet. Otherwise, use ht_ltf data directly. Default enabled */
|
||||||
|
bool channel_filter_en; /**< enable to turn on channel filter to smooth adjacent sub-carrier. Disable it to keep independence of adjacent sub-carrier. Default enabled */
|
||||||
|
bool manu_scale; /**< manually scale the CSI data by left shifting or automatically scale the CSI data. If set true, please set the shift bits. false: automatically. true: manually. Default false */
|
||||||
|
uint8_t shift; /**< manually left shift bits of the scale of the CSI data. The range of the left shift bits is 0~15 */
|
||||||
|
bool dump_ack_en; /**< enable to dump 802.11 ACK frame, default disabled */
|
||||||
|
} wifi_csi_config_t;
|
||||||
|
#endif // !CONFIG_SOC_WIFI_HE_SUPPORT
|
||||||
|
|
||||||
|
|
||||||
|
/** @brief Payload passed to 'buf' parameter of promiscuous mode RX callback.
|
||||||
|
*/
|
||||||
|
typedef struct {
|
||||||
|
wifi_pkt_rx_ctrl_t rx_ctrl; /**< metadata header */
|
||||||
|
uint8_t payload[0]; /**< Data or management payload. Length of payload is described by rx_ctrl.sig_len. Type of content determined by packet type argument of callback. */
|
||||||
|
} wifi_promiscuous_pkt_t;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief CSI data type
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
typedef struct wifi_csi_info_t {
|
||||||
|
wifi_pkt_rx_ctrl_t rx_ctrl;/**< received packet radio metadata header of the CSI data */
|
||||||
|
uint8_t mac[6]; /**< source MAC address of the CSI data */
|
||||||
|
uint8_t dmac[6]; /**< destination MAC address of the CSI data */
|
||||||
|
bool first_word_invalid; /**< first four bytes of the CSI data is invalid or not, true indicates the first four bytes is invalid due to hardware limition */
|
||||||
|
int8_t *buf; /**< valid buffer of CSI data */
|
||||||
|
uint16_t len; /**< valid length of CSI data */
|
||||||
|
uint8_t *hdr; /**< header of the wifi packet */
|
||||||
|
uint8_t *payload; /**< payload of the wifi packet */
|
||||||
|
uint16_t payload_len; /**< payload len of the wifi packet */
|
||||||
|
} wifi_csi_info_t;
|
||||||
|
|
||||||
|
#ifdef __cplusplus
|
||||||
|
}
|
||||||
|
#endif
|
Submodule components/esp_wifi/lib updated: 4457ec627e...51ec8e854e
@@ -4,6 +4,7 @@
|
|||||||
* SPDX-License-Identifier: Apache-2.0
|
* SPDX-License-Identifier: Apache-2.0
|
||||||
*/
|
*/
|
||||||
#include "sdkconfig.h"
|
#include "sdkconfig.h"
|
||||||
|
#include "esp_system.h"
|
||||||
#include "esp_wifi.h"
|
#include "esp_wifi.h"
|
||||||
#include "esp_netif.h"
|
#include "esp_netif.h"
|
||||||
#include "esp_log.h"
|
#include "esp_log.h"
|
||||||
|
@@ -39,6 +39,8 @@ ${PREFIX}ld --unresolved-symbols=ignore-all --entry 0 -o ${ELF_FILE} \
|
|||||||
-u g_esp_wifi_he_md5 \
|
-u g_esp_wifi_he_md5 \
|
||||||
-u g_wifi_crypto_funcs_md5 \
|
-u g_wifi_crypto_funcs_md5 \
|
||||||
-u g_wifi_type_md5 \
|
-u g_wifi_type_md5 \
|
||||||
|
-u g_wifi_types_generic_md5 \
|
||||||
|
-u g_wifi_types_native_md5 \
|
||||||
-u g_wifi_he_type_md5 \
|
-u g_wifi_he_type_md5 \
|
||||||
-u g_wifi_osi_funcs_md5 \
|
-u g_wifi_osi_funcs_md5 \
|
||||||
-u g_wifi_supplicant_funcs_md5 \
|
-u g_wifi_supplicant_funcs_md5 \
|
||||||
@@ -70,6 +72,8 @@ check_md5 ${IDF_PATH}/components/esp_wifi/include/esp_wifi_he.h g_esp_wifi_he_md
|
|||||||
check_md5 ${IDF_PATH}/components/esp_wifi/include/esp_private/wifi_os_adapter.h g_wifi_osi_funcs_md5
|
check_md5 ${IDF_PATH}/components/esp_wifi/include/esp_private/wifi_os_adapter.h g_wifi_osi_funcs_md5
|
||||||
check_md5 ${IDF_PATH}/components/esp_wifi/include/esp_wifi_crypto_types.h g_wifi_crypto_funcs_md5
|
check_md5 ${IDF_PATH}/components/esp_wifi/include/esp_wifi_crypto_types.h g_wifi_crypto_funcs_md5
|
||||||
check_md5 ${IDF_PATH}/components/esp_wifi/include/esp_wifi_types.h g_wifi_type_md5
|
check_md5 ${IDF_PATH}/components/esp_wifi/include/esp_wifi_types.h g_wifi_type_md5
|
||||||
|
check_md5 ${IDF_PATH}/components/esp_wifi/include/esp_wifi_types_generic.h g_wifi_types_generic_md5
|
||||||
|
check_md5 ${IDF_PATH}/components/esp_wifi/include/local/esp_wifi_types_native.h g_wifi_types_native_md5
|
||||||
check_md5 ${IDF_PATH}/components/esp_wifi/include/esp_wifi_he_types.h g_wifi_he_type_md5
|
check_md5 ${IDF_PATH}/components/esp_wifi/include/esp_wifi_he_types.h g_wifi_he_type_md5
|
||||||
check_md5 ${IDF_PATH}/components/wpa_supplicant/esp_supplicant/src/esp_wifi_driver.h g_wifi_supplicant_funcs_md5
|
check_md5 ${IDF_PATH}/components/wpa_supplicant/esp_supplicant/src/esp_wifi_driver.h g_wifi_supplicant_funcs_md5
|
||||||
|
|
||||||
|
@@ -6,6 +6,13 @@ else()
|
|||||||
set(linker_fragments linker.lf)
|
set(linker_fragments linker.lf)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
|
if(NOT CONFIG_ESP_WIFI_ENABLED AND NOT CMAKE_BUILD_EARLY_EXPANSION)
|
||||||
|
# This component provides only "esp_supplicant" headers if WiFi not enabled
|
||||||
|
# (implementation supported optionally in a managed component esp_wifi_remote)
|
||||||
|
idf_component_register(INCLUDE_DIRS esp_supplicant/include)
|
||||||
|
return()
|
||||||
|
endif()
|
||||||
|
|
||||||
set(srcs "port/os_xtensa.c"
|
set(srcs "port/os_xtensa.c"
|
||||||
"port/eloop.c"
|
"port/eloop.c"
|
||||||
"src/ap/ap_config.c"
|
"src/ap/ap_config.c"
|
||||||
|
@@ -21,6 +21,7 @@
|
|||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
#include "esp_err.h"
|
#include "esp_err.h"
|
||||||
#include "supplicant_opt.h"
|
#include "supplicant_opt.h"
|
||||||
|
#include "esp_private/esp_wifi_private.h"
|
||||||
#include "esp_wifi.h"
|
#include "esp_wifi.h"
|
||||||
|
|
||||||
typedef time_t os_time_t;
|
typedef time_t os_time_t;
|
||||||
|
@@ -20,6 +20,7 @@
|
|||||||
#define INCLUDES_H
|
#define INCLUDES_H
|
||||||
|
|
||||||
#include "supplicant_opt.h"
|
#include "supplicant_opt.h"
|
||||||
|
#include "esp_private/esp_wifi_private.h"
|
||||||
|
|
||||||
#define AES_SMALL_TABLES
|
#define AES_SMALL_TABLES
|
||||||
#define CONFIG_NO_RANDOM_POOL
|
#define CONFIG_NO_RANDOM_POOL
|
||||||
|
@@ -114,9 +114,9 @@ examples/protocols/https_mbedtls:
|
|||||||
examples/protocols/https_request:
|
examples/protocols/https_request:
|
||||||
<<: *default_dependencies
|
<<: *default_dependencies
|
||||||
disable:
|
disable:
|
||||||
- if: IDF_TARGET == "esp32p4"
|
- if: IDF_TARGET in ["esp32h2", "esp32p4"]
|
||||||
temporary: true
|
temporary: true
|
||||||
reason: not supported on p4 # TODO: IDF-8076
|
reason: not supported on p4 and h2 # TODO: IDF-8076 (P4), IDF-9076 (H2)
|
||||||
disable_test:
|
disable_test:
|
||||||
- if: IDF_TARGET != "esp32"
|
- if: IDF_TARGET != "esp32"
|
||||||
reason: only test on esp32
|
reason: only test on esp32
|
||||||
|
@@ -1,5 +1,5 @@
|
|||||||
| Supported Targets | ESP32 | ESP32-C2 | ESP32-C3 | ESP32-C6 | ESP32-H2 | ESP32-S2 | ESP32-S3 |
|
| Supported Targets | ESP32 | ESP32-C2 | ESP32-C3 | ESP32-C6 | ESP32-S2 | ESP32-S3 |
|
||||||
| ----------------- | ----- | -------- | -------- | -------- | -------- | -------- | -------- |
|
| ----------------- | ----- | -------- | -------- | -------- | -------- | -------- |
|
||||||
|
|
||||||
# HTTPS Request Example
|
# HTTPS Request Example
|
||||||
|
|
||||||
|
@@ -24,6 +24,11 @@
|
|||||||
#include "esp_event.h"
|
#include "esp_event.h"
|
||||||
#include "cmd_wifi.h"
|
#include "cmd_wifi.h"
|
||||||
|
|
||||||
|
/**
|
||||||
|
* This component will be supported using esp_wifi_remote
|
||||||
|
*/
|
||||||
|
#if CONFIG_SOC_WIFI_SUPPORTED
|
||||||
|
|
||||||
#define JOIN_TIMEOUT_MS (10000)
|
#define JOIN_TIMEOUT_MS (10000)
|
||||||
|
|
||||||
static EventGroupHandle_t wifi_event_group;
|
static EventGroupHandle_t wifi_event_group;
|
||||||
@@ -134,3 +139,5 @@ void register_wifi(void)
|
|||||||
|
|
||||||
ESP_ERROR_CHECK( esp_console_cmd_register(&join_cmd) );
|
ESP_ERROR_CHECK( esp_console_cmd_register(&join_cmd) );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#endif // CONFIG_SOC_WIFI_SUPPORTED
|
||||||
|
@@ -23,7 +23,6 @@
|
|||||||
#include "iperf.h"
|
#include "iperf.h"
|
||||||
#include "esp_coexist.h"
|
#include "esp_coexist.h"
|
||||||
#include "wifi_cmd.h"
|
#include "wifi_cmd.h"
|
||||||
#include "esp_wifi_he.h"
|
|
||||||
|
|
||||||
typedef struct {
|
typedef struct {
|
||||||
struct arg_str *ip;
|
struct arg_str *ip;
|
||||||
|
@@ -483,8 +483,6 @@ components/esp_rom/linux/esp_rom_crc.c
|
|||||||
components/esp_rom/linux/esp_rom_md5.c
|
components/esp_rom/linux/esp_rom_md5.c
|
||||||
components/esp_rom/patches/esp_rom_crc.c
|
components/esp_rom/patches/esp_rom_crc.c
|
||||||
components/esp_system/ubsan.c
|
components/esp_system/ubsan.c
|
||||||
components/esp_wifi/include/esp_private/esp_wifi_types_private.h
|
|
||||||
components/esp_wifi/include/esp_private/wifi_types.h
|
|
||||||
components/esp_wifi/src/mesh_event.c
|
components/esp_wifi/src/mesh_event.c
|
||||||
components/fatfs/diskio/diskio.c
|
components/fatfs/diskio/diskio.c
|
||||||
components/fatfs/diskio/diskio_impl.h
|
components/fatfs/diskio/diskio_impl.h
|
||||||
|
@@ -5,7 +5,7 @@ message(STATUS "building ESP WIFI MOCKS")
|
|||||||
idf_component_get_property(original_esp_wifi_dir esp_wifi COMPONENT_OVERRIDEN_DIR)
|
idf_component_get_property(original_esp_wifi_dir esp_wifi COMPONENT_OVERRIDEN_DIR)
|
||||||
|
|
||||||
set(include_dirs
|
set(include_dirs
|
||||||
"${original_esp_wifi_dir}/include")
|
"${original_esp_wifi_dir}/include" "${original_esp_wifi_dir}/include/local")
|
||||||
|
|
||||||
idf_component_mock(INCLUDE_DIRS ${include_dirs}
|
idf_component_mock(INCLUDE_DIRS ${include_dirs}
|
||||||
REQUIRES esp_event esp_netif lwip
|
REQUIRES esp_event esp_netif lwip
|
||||||
|
@@ -5,6 +5,7 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
#include "esp_wifi.h"
|
#include "esp_wifi.h"
|
||||||
|
#include "esp_private/wifi_os_adapter.h"
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* The following global objects are defined when WiFi is mocked.
|
* The following global objects are defined when WiFi is mocked.
|
||||||
|
Reference in New Issue
Block a user