From 268061cf38b2071d6bb49bc59123657911312d95 Mon Sep 17 00:00:00 2001 From: xuxiao Date: Thu, 25 Apr 2024 14:57:32 +0800 Subject: [PATCH 1/8] fix(wifi): fix wifi band 3 is not supported --- components/esp_wifi/include/esp_wifi.h | 78 ++++++++++++++++++- .../esp_wifi/include/esp_wifi_types_generic.h | 1 + 2 files changed, 76 insertions(+), 3 deletions(-) diff --git a/components/esp_wifi/include/esp_wifi.h b/components/esp_wifi/include/esp_wifi.h index 7f8cde1c85..a033b1a4bb 100644 --- a/components/esp_wifi/include/esp_wifi.h +++ b/components/esp_wifi/include/esp_wifi.h @@ -676,11 +676,10 @@ esp_err_t esp_wifi_get_ps(wifi_ps_type_t *type); /** * @brief Set protocol type of specified interface * The default protocol is (WIFI_PROTOCOL_11B|WIFI_PROTOCOL_11G|WIFI_PROTOCOL_11N). - * if CONFIG_SOC_WIFI_HE_SUPPORT and band is 2.4G, the default protocol is (WIFI_PROTOCOL_11B|WIFI_PROTOCOL_11G|WIFI_PROTOCOL_11N|WIFI_PROTOCOL_11AX). - * if CONFIG_SOC_WIFI_HE_SUPPORT and band is 5G, the default protocol is (WIFI_PROTOCOL_11A|WIFI_PROTOCOL_11N|WIFI_PROTOCOL_11AC|WIFI_PROTOCOL_11AX). + * if CONFIG_SOC_WIFI_HE_SUPPORT, the default protocol is (WIFI_PROTOCOL_11B|WIFI_PROTOCOL_11G|WIFI_PROTOCOL_11N|WIFI_PROTOCOL_11AX). * * @attention 2.4G: Support 802.11b or 802.11bg or 802.11bgn or 802.11bgnax or LR mode - * 5G: Support 802.11a or 802.11an or 802.11anac or 802.11anacax + * @attention only support set band 2.4G protocol * * @param ifx interfaces * @param protocol_bitmap WiFi protocol bitmap @@ -1643,6 +1642,79 @@ esp_err_t esp_wifi_get_band(wifi_band_t* band); esp_err_t esp_wifi_coex_pwr_configure(bool enabled); #endif +/** + * @brief Set protocol type of specified interface and specified band + * The default protocol is (WIFI_PROTOCOL_11B|WIFI_PROTOCOL_11G|WIFI_PROTOCOL_11N). + * if CONFIG_SOC_WIFI_HE_SUPPORT and band is 2.4G, the default protocol is (WIFI_PROTOCOL_11B|WIFI_PROTOCOL_11G|WIFI_PROTOCOL_11N|WIFI_PROTOCOL_11AX). + * if CONFIG_SOC_WIFI_HE_SUPPORT and band is 5G, the default protocol is (WIFI_PROTOCOL_11A|WIFI_PROTOCOL_11N|WIFI_PROTOCOL_11AC|WIFI_PROTOCOL_11AX). + * + * @attention 2.4G: Support 802.11b or 802.11bg or 802.11bgn or 802.11bgnax or LR mode + * 5G: Support 802.11a or 802.11an or 802.11anac or 802.11anacax + * + * @param band wifi band 2.4G / 5G + * @param ifx interfaces + * @param bitmap WiFi protocol bitmap + * + * @return + * - ESP_OK: succeed + * - ESP_ERR_WIFI_NOT_INIT: WiFi is not initialized by esp_wifi_init + * - ESP_ERR_WIFI_IF: invalid interface + * - others: refer to error codes in esp_err.h + */ +esp_err_t esp_wifi_band_set_protocol(wifi_band_t band, wifi_interface_t ifx, uint32_t bitmap); + +/** + * @brief Get the current protocol bitmap of the specified interface and specified band + * + * @param band wifi band 2.4G / 5G + * @param ifx interface + * @param[out] bitmap store current WiFi protocol bitmap of interface ifx + * + * @return + * - ESP_OK: succeed + * - ESP_ERR_WIFI_NOT_INIT: WiFi is not initialized by esp_wifi_init + * - ESP_ERR_WIFI_IF: invalid interface + * - ESP_ERR_INVALID_ARG: invalid argument + * - others: refer to error codes in esp_err.h + */ +esp_err_t esp_wifi_band_get_protocol(wifi_band_t band, wifi_interface_t ifx, uint32_t *bitmap); + +/** + * @brief Set the bandwidth of specified interface and specified band + * + * @attention 1. API return false if try to configure an interface that is not enabled + * @attention 2. WIFI_BW_HT40 is supported only when the interface support 11N + * + * @param band wifi band 2.4G / 5G + * @param ifx interface to be configured + * @param bw bandwidth + * + * @return + * - ESP_OK: succeed + * - ESP_ERR_WIFI_NOT_INIT: WiFi is not initialized by esp_wifi_init + * - ESP_ERR_WIFI_IF: invalid interface + * - ESP_ERR_INVALID_ARG: invalid argument + * - others: refer to error codes in esp_err.h + */ +esp_err_t esp_wifi_band_set_bandwidth(wifi_band_t band, wifi_interface_t ifx, wifi_bandwidth_t bw); + +/** + * @brief Get the bandwidth of specified interface and specified band + * + * @attention 1. API return false if try to get a interface that is not enable + * + * @param band wifi band 2.4G / 5G + * @param ifx interface to be configured + * @param[out] bw store bandwidth of interface ifx + * + * @return + * - ESP_OK: succeed + * - ESP_ERR_WIFI_NOT_INIT: WiFi is not initialized by esp_wifi_init + * - ESP_ERR_WIFI_IF: invalid interface + * - ESP_ERR_INVALID_ARG: invalid argument + */ +esp_err_t esp_wifi_band_get_bandwidth(wifi_band_t band, wifi_interface_t ifx, wifi_bandwidth_t *bw); + #ifdef __cplusplus } #endif diff --git a/components/esp_wifi/include/esp_wifi_types_generic.h b/components/esp_wifi/include/esp_wifi_types_generic.h index d1ea00f9a2..c47eea9a44 100644 --- a/components/esp_wifi/include/esp_wifi_types_generic.h +++ b/components/esp_wifi/include/esp_wifi_types_generic.h @@ -346,6 +346,7 @@ typedef struct { bool ftm_responder; /**< Enable FTM Responder mode */ wifi_pmf_config_t pmf_cfg; /**< Configuration for Protected Management Frame */ wifi_sae_pwe_method_t sae_pwe_h2e; /**< Configuration for SAE PWE derivation method */ + uint8_t channel_5g; /**< 5G Channel of soft-AP */ } wifi_ap_config_t; #define SAE_H2E_IDENTIFIER_LEN 32 From 5a6571232511632523781cb136ba185447486c45 Mon Sep 17 00:00:00 2001 From: xuxiao Date: Fri, 14 Jun 2024 19:16:26 +0800 Subject: [PATCH 2/8] fix(wifi): update esp32c5 ld files --- .../esp_rom/esp32c5/ld/esp32c5.rom.pp.ld | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/components/esp_rom/esp32c5/ld/esp32c5.rom.pp.ld b/components/esp_rom/esp32c5/ld/esp32c5.rom.pp.ld index 54d3ae9e75..16afe5998b 100644 --- a/components/esp_rom/esp32c5/ld/esp32c5.rom.pp.ld +++ b/components/esp_rom/esp32c5/ld/esp32c5.rom.pp.ld @@ -32,7 +32,7 @@ hal_mac_tx_clr_mplen = 0x40000c10; hal_mac_get_txq_state = 0x40000c14; hal_mac_clr_txq_state = 0x40000c18; hal_mac_get_txq_complete = 0x40000c1c; -hal_mac_deinit_twt_tx = 0x40000c20; +/*hal_mac_deinit_twt_tx = 0x40000c20;*/ hal_mac_is_dma_enable = 0x40000c24; hal_he_get_bss_color = 0x40000c28; hal_he_set_ersu = 0x40000c2c; @@ -62,7 +62,7 @@ ic_get_he_rts_threshold_bytes = 0x40000c88; lmacAdjustTimestamp = 0x40000c8c; lmacDiscardAgedMSDU = 0x40000c90; lmacDiscardMSDU = 0x40000c94; -lmacEndFrameExchangeSequence = 0x40000c98; +/*lmacEndFrameExchangeSequence = 0x40000c98;*/ lmacIsIdle = 0x40000c9c; lmacIsLongFrame = 0x40000ca0; lmacMSDUAged = 0x40000ca4; @@ -81,12 +81,12 @@ lmacDisableTransmit = 0x40000cd4; lmacDiscardFrameExchangeSequence = 0x40000cd8; lmacProcessCollision = 0x40000cdc; lmacProcessAckTimeout = 0x40000ce0; -lmacProcessShortRetryFail = 0x40000ce4; +/*lmacProcessShortRetryFail = 0x40000ce4;*/ lmacProcessCollisions_task = 0x40000ce8; lmacProcessTxRtsError = 0x40000cec; lmacProcessTxError = 0x40000cf0; lmacProcessCtsTimeout = 0x40000cf4; -lmacProcessLongRetryFail = 0x40000cf8; +/*lmacProcessLongRetryFail = 0x40000cf8;*/ lmacRetryTxFrame = 0x40000cfc; lmacEndRetryAMPDUFail = 0x40000d00; lmacProcessTxSuccess = 0x40000d04; @@ -129,7 +129,7 @@ pm_on_isr_set_twt_target = 0x40000d94; pm_on_isr_twt_wake = 0x40000d98; pm_on_tsf_timer = 0x40000d9c; pm_on_twt_force_tx = 0x40000da0; -pm_parse_beacon = 0x40000da4; +/*pm_parse_beacon = 0x40000da4;*/ pm_process_tim = 0x40000da8; pm_rx_beacon_process = 0x40000dac; pm_rx_data_process = 0x40000db0; @@ -145,13 +145,13 @@ pm_disconnected_wake = 0x40000dd4; /*pm_tx_data_process = 0x40000dd8;*/ pm_is_twt_awake = 0x40000ddc; pm_enable_twt_keep_alive = 0x40000de0; -pm_twt_on_tsf_timer = 0x40000de4; +/*pm_twt_on_tsf_timer = 0x40000de4;*/ pm_twt_process = 0x40000de8; pm_is_twt_start = 0x40000dec; pm_twt_set_target_wdev_time = 0x40000df0; pm_twt_set_target_tsf = 0x40000df4; pm_enable_twt_keep_alive_timer = 0x40000df8; -pm_mac_try_enable_modem_state = 0x40000dfc; +/*pm_mac_try_enable_modem_state = 0x40000dfc;*/ pm_beacon_monitor_tbtt_timeout_process = 0x40000e00; /*pm_update_next_tbtt = 0x40000e04;*/ pm_twt_disallow_tx = 0x40000e08; @@ -209,11 +209,11 @@ ppDisableQueue = 0x40000ed4; ppCalVHTDeliNum = 0x40000ed8; ppCalTxVHTSMPDULength = 0x40000edc; ppCheckTxRTS = 0x40000ee0; -ppProcessLifeTime = 0x40000ee4; +/*ppProcessLifeTime = 0x40000ee4;*/ ppProcTxCallback = 0x40000ee8; ppCalPreFecPaddingFactor = 0x40000eec; ppCalDeliNum = 0x40000ef0; -ppRemoveHTC = 0x40000ef4; +/*ppRemoveHTC = 0x40000ef4;*/ ppCheckTxHEAMPDUlength = 0x40000ef8; ppCertSetRate = 0x40000efc; ppSelectTxFormat = 0x40000f00; From bfe3fb099320e3139c3f6f41dce98f867c0b647a Mon Sep 17 00:00:00 2001 From: yinqingzhao Date: Tue, 2 Jul 2024 17:19:24 +0800 Subject: [PATCH 3/8] feat(wifi):wifi support broadcast twt --- components/esp_wifi/include/esp_wifi_he.h | 62 ++++++++++++++++- .../esp_wifi/include/esp_wifi_he_types.h | 66 +++++++++++++++++++ .../esp_wifi/include/esp_wifi_types_generic.h | 2 + 3 files changed, 129 insertions(+), 1 deletion(-) diff --git a/components/esp_wifi/include/esp_wifi_he.h b/components/esp_wifi/include/esp_wifi_he.h index 5bc361c2f8..0eba6ad5c9 100644 --- a/components/esp_wifi/include/esp_wifi_he.h +++ b/components/esp_wifi/include/esp_wifi_he.h @@ -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 */ @@ -142,6 +142,66 @@ esp_err_t esp_wifi_enable_rx_statistics(bool rx_stats, bool rx_mu_stats); */ esp_err_t esp_wifi_enable_tx_statistics(esp_wifi_aci_t aci, bool tx_stats); +/** + * @brief Set up an broadcast TWT agreement (NegotiationType=3) or change TWT parameters of the existing TWT agreement + * - TWT Wake Interval = TWT Wake Interval Mantissa * (2 ^ TWT Wake Interval Exponent), unit: us + * - e.g. TWT Wake Interval Mantissa = 512, TWT Wake Interval Exponent = 12, then TWT Wake Interval is 2097.152 ms + * Nominal Minimum Wake Duration = 255, then TWT Wake Duration is 65.28 ms + * + * @attention Support at most 32 TWT agreements, otherwise ESP_ERR_WIFI_TWT_FULL will be returned. + * Support sleep time up to (1 << 35) us. + * + * @param[in,out] setup_config pointer to btwt setup config structure. + * + * @return + * - ESP_OK: succeed + * - ESP_ERR_WIFI_NOT_INIT: WiFi is not initialized by esp_wifi_init + * - ESP_ERR_WIFI_NOT_STARTED: WiFi is not started by esp_wifi_start + * - ESP_ERR_WIFI_CONN: WiFi internal error, station or soft-AP control block wrong + * - ESP_ERR_WIFI_NOT_CONNECT: The station is in disconnect status + * - ESP_ERR_WIFI_TWT_FULL: no available flow id + * - ESP_ERR_INVALID_ARG: invalid argument + */ +esp_err_t esp_wifi_sta_btwt_setup(wifi_btwt_setup_config_t *config); + +/** + * @brief Tear down broadcast TWT agreements + * + * @param[in] btwt_id The value range is [0, 31]. + * BTWT_ID_ALL indicates tear down all broadcast TWT agreements. + * + * @return + * - ESP_OK: succeed + * - ESP_ERR_WIFI_NOT_INIT: WiFi is not initialized by esp_wifi_init + * - ESP_ERR_WIFI_NOT_STARTED: WiFi is not started by esp_wifi_start + * - ESP_ERR_WIFI_CONN: WiFi internal error, station or soft-AP control block wrong + * - ESP_ERR_WIFI_NOT_CONNECT: The station is in disconnect status + * - ESP_ERR_INVALID_ARG: invalid argument + */ +esp_err_t esp_wifi_sta_btwt_teardown(uint8_t btwt_id); + +/** + * @brief Get broadcast TWT information + * + * @param[in] btwt_info pointer to bTWT information structure. + * + * @return + * - ESP_OK: succeed + * - ESP_FAIL: fail + * - ESP_ERR_WIFI_CONN: WiFi internal error, station or soft-AP control block wrong + */ +esp_err_t esp_wifi_sta_btwt_get_info(esp_wifi_btwt_info_t *btwt_info); + +/** + * @brief Set wifi TWT config + * + * @param[in] config pointer to the wifi TWT configure structure. + * + * @return + * - ESP_OK: succeed + */ +esp_err_t esp_wifi_sta_twt_config(wifi_twt_config_t *config); + #ifdef __cplusplus } #endif diff --git a/components/esp_wifi/include/esp_wifi_he_types.h b/components/esp_wifi/include/esp_wifi_he_types.h index a6ba90d591..1d31f56131 100644 --- a/components/esp_wifi/include/esp_wifi_he_types.h +++ b/components/esp_wifi/include/esp_wifi_he_types.h @@ -15,6 +15,7 @@ extern "C" { #endif #define FLOW_ID_ALL (8) +#define BTWT_ID_ALL (32) #define BSS_MAX_COLOR (63) /** @@ -111,6 +112,17 @@ typedef enum { TWT_REJECT, /**< indicate that the negotiation has ended in failure to create a new TWT agreement */ } wifi_twt_setup_cmds_t; +/** + * @brief broadcast TWT setup config + */ +typedef struct { + wifi_twt_setup_cmds_t setup_cmd; /**< Indicates the type of TWT command*/ + uint8_t btwt_id; /**< When set up an broadcast TWT agreement, the broadcast twt id will be assigned by AP after a successful agreement setup. + broadcast twt id could be specified to a value in the range of [1, 31], but it might be change by AP in the response. + When change TWT parameters of the existing TWT agreement, broadcast twt id should be an existing one. The value range is [1, 31].*/ + uint16_t timeout_time_ms; /**< Timeout times of receving setup action frame response, default 5s*/ +} wifi_btwt_setup_config_t; + /** * @brief TWT setup config */ @@ -294,6 +306,18 @@ typedef struct { } __attribute__((packed)) esp_wifi_rxctrl_t; #endif +/** + * @brief bTWT setup status + */ +typedef enum { + BTWT_SETUP_TXFAIL, /**< station sends btwt setup request frame fail */ + BTWT_SETUP_SUCCESS, /**< station receives btwt setup response frame and setup btwt sucessfully */ + BTWT_SETUP_TIMEOUT, /**< timeout of receiving btwt setup response frame */ + BTWT_SETUP_FULL, /**< indicate there is no avaliable btwt id */ + BTWT_SETUP_INVALID_ARG, /**< indicate invalid argument to setup btwt */ + BTWT_SETUP_INTERNAL_ERR, /**< indicate internal error to setup btwt */ +} wifi_btwt_setup_status_t; + /** Argument structure for WIFI_EVENT_TWT_SET_UP event */ typedef struct { wifi_twt_setup_config_t config; /**< itwt setup config, this value is determined by the AP */ @@ -316,6 +340,34 @@ typedef struct { wifi_itwt_teardown_status_t status; /**< itwt teardown status */ } wifi_event_sta_itwt_teardown_t; +/** Argument structure for WIFI_EVENT_BTWT_SET_UP event */ +typedef struct { + wifi_btwt_setup_status_t status; /**< indicate btwt setup status */ + wifi_twt_setup_cmds_t setup_cmd; /**< indicate the type of TWT command */ + uint8_t btwt_id; /**< indicate btwt id */ + uint8_t min_wake_dura; /**< Nominal Minimum Wake Duration, indicates the minimum amount of time, in unit of 256 us, that the TWT requesting STA expects that it needs to be awake. The value range is [1, 255]. */ + uint8_t wake_invl_expn; /**< TWT Wake Interval Exponent. The value range is [0, 31]. */ + uint16_t wake_invl_mant; /**< TWT Wake Interval Mantissa. The value range is [1, 65535]. */ + bool trigger; /**< 1: a trigger-enabled TWT, 0: a non-trigger-enabled TWT */ + uint8_t flow_type; /**< 0: an announced TWT, 1: an unannounced TWT */ + uint8_t reason; /**< btwt setup frame tx fail reason */ + uint64_t target_wake_time; /**< TWT SP start time */ +} wifi_event_sta_btwt_setup_t; + +/** + * @brief BTWT teardown status + */ +typedef enum { + BTWT_TEARDOWN_FAIL, /**< station sends teardown frame fail */ + BTWT_TEARDOWN_SUCCESS, /**< 1) station successfully sends teardown frame to AP; 2) station receives teardown frame from AP */ +} wifi_btwt_teardown_status_t; + +/** Argument structure for WIFI_EVENT_TWT_TEARDOWN event */ +typedef struct { + uint8_t btwt_id; /**< btwt id */ + wifi_btwt_teardown_status_t status; /**< btwt teardown status */ +} wifi_event_sta_btwt_teardown_t; + /** * @brief iTWT probe status */ @@ -360,6 +412,20 @@ typedef struct { uint8_t flow_id; /**< flow id */ } wifi_event_sta_twt_wakeup_t; +typedef struct { + bool btwt_id_in_use; /**< indicate whether the btwt id is in use or not */ + uint16_t btwt_trigger : 1; /**< 1: a trigger-enabled TWT, 0: a non-trigger-enabled TWT */ + uint16_t btwt_flow_type : 1; /**< 0: an announced TWT, 1: an unannounced TWT */ + uint16_t btwt_recommendation : 3; /**< indicate recommendations on the types of frames. 0: no constraints, [1, 3], [4, 7] reserved */ + uint16_t btwt_wake_interval_exponent : 5; /**< TWT Wake Interval Exponent. The value range is [0, 31]. */ + uint16_t btwt_rsvd : 6; /**< reserved */ + uint8_t btwt_wake_duration; /**< TWT Wake duration unit, 0: 256us 1: TU (TU = 1024us) */ + uint16_t btwt_wake_interval_mantissa; /**< TWT Wake Interval Mantissa. The value range is [1, 65535]. */ + uint16_t btwt_info_id : 5; /**< btwt id */ + uint16_t btwt_info_persistence : 8; /**< indicate the number of TBTTs during which the Broadcast TWT SPs corresponding to this broadcast TWT parameters set are present */ + uint16_t btwt_info_rsvd : 3; /**< reserved */ +} esp_wifi_btwt_info_t; + #ifdef __cplusplus } #endif diff --git a/components/esp_wifi/include/esp_wifi_types_generic.h b/components/esp_wifi/include/esp_wifi_types_generic.h index c47eea9a44..b9069f409e 100644 --- a/components/esp_wifi/include/esp_wifi_types_generic.h +++ b/components/esp_wifi/include/esp_wifi_types_generic.h @@ -818,6 +818,8 @@ typedef enum { WIFI_EVENT_ITWT_PROBE, /**< iTWT probe */ WIFI_EVENT_ITWT_SUSPEND, /**< iTWT suspend */ WIFI_EVENT_TWT_WAKEUP, /**< TWT wakeup */ + WIFI_EVENT_BTWT_SETUP, /**< bTWT setup */ + WIFI_EVENT_BTWT_TEARDOWN, /**< bTWT teardown*/ WIFI_EVENT_NAN_STARTED, /**< NAN Discovery has started */ WIFI_EVENT_NAN_STOPPED, /**< NAN Discovery has stopped */ From c6104388aaa8886e811b79fdf710a0c386734fd8 Mon Sep 17 00:00:00 2001 From: xuxiao Date: Fri, 5 Jul 2024 12:17:49 +0800 Subject: [PATCH 4/8] feat(wifi): add wifi support for esp32c5 mp --- components/esp_rom/CMakeLists.txt | 1 - .../esp32c5/ld/esp32c5.rom.net80211.ld | 2 +- .../esp_rom/esp32c5/ld/esp32c5.rom.pp.ld | 8 ++-- .../esp_private/esp_wifi_he_types_private.h | 1 + components/esp_wifi/src/wifi_init.c | 4 +- .../esp_wifi/test_apps/.build-test-rules.yml | 3 ++ .../esp_wifi/test_apps/wifi_connect/README.md | 4 +- .../test_apps/wifi_function/README.md | 4 +- .../esp32c5/include/soc/Kconfig.soc_caps.in | 44 +++++++++++++++++++ components/soc/esp32c5/include/soc/soc_caps.h | 20 +++++---- .../test_apps/.build-test-rules.yml | 3 ++ components/wpa_supplicant/test_apps/README.md | 4 +- .../mesh/internal_communication/README.md | 6 +-- examples/mesh/ip_internal_network/README.md | 4 +- examples/mesh/manual_networking/README.md | 6 +-- examples/network/eth2ap/README.md | 6 +-- examples/network/simple_sniffer/README.md | 8 ++-- examples/network/sta2eth/README.md | 4 +- examples/openthread/.build-test-rules.yml | 4 +- examples/provisioning/.build-test-rules.yml | 1 + examples/provisioning/wifi_prov_mgr/README.md | 4 +- examples/wifi/.build-test-rules.yml | 4 ++ examples/wifi/espnow/README.md | 4 +- examples/wifi/fast_scan/README.md | 6 +-- examples/wifi/ftm/README.md | 2 +- .../wifi/getting_started/softAP/README.md | 4 +- .../wifi/getting_started/station/README.md | 8 ++-- examples/wifi/iperf/README.md | 4 +- .../wifi/iperf/sdkconfig.defaults.esp32c5 | 24 +++++----- examples/wifi/itwt/README.md | 4 +- examples/wifi/power_save/README.md | 4 +- examples/wifi/roaming/roaming_11kvr/README.md | 4 +- examples/wifi/roaming/roaming_app/README.md | 4 +- examples/wifi/scan/README.md | 4 +- examples/wifi/smart_config/README.md | 4 +- examples/wifi/softap_sta/README.md | 6 +-- examples/wifi/wifi_eap_fast/README.md | 4 +- .../wifi_easy_connect/dpp-enrollee/README.md | 4 +- examples/wifi/wifi_enterprise/README.md | 10 ++--- examples/wifi/wps/README.md | 4 +- examples/wifi/wps_softap_registrar/README.md | 4 +- examples/zigbee/.build-test-rules.yml | 4 +- .../peripherals/.build-test-rules.yml | 3 ++ .../test_apps/peripherals/i2c_wifi/README.md | 6 +-- tools/test_apps/phy/.build-test-rules.yml | 3 ++ .../phy/phy_multi_init_data_test/README.md | 4 +- tools/test_apps/system/.build-test-rules.yml | 2 +- .../system/clang_build_test/README.md | 4 +- 48 files changed, 171 insertions(+), 108 deletions(-) diff --git a/components/esp_rom/CMakeLists.txt b/components/esp_rom/CMakeLists.txt index 305f74d508..31d3e75594 100644 --- a/components/esp_rom/CMakeLists.txt +++ b/components/esp_rom/CMakeLists.txt @@ -182,7 +182,6 @@ else() # Regular app build rom_linker_script("coexist") rom_linker_script("net80211") rom_linker_script("pp") - elseif(target STREQUAL "esp32c5") # esp32c5.rom.api.ld has been split to several lds by components. # esp32c5.rom.api.ld is still reserved to map the APIs diff --git a/components/esp_rom/esp32c5/ld/esp32c5.rom.net80211.ld b/components/esp_rom/esp32c5/ld/esp32c5.rom.net80211.ld index d3dd938ddf..03992297de 100644 --- a/components/esp_rom/esp32c5/ld/esp32c5.rom.net80211.ld +++ b/components/esp_rom/esp32c5/ld/esp32c5.rom.net80211.ld @@ -65,7 +65,7 @@ wifi_get_macaddr = 0x40000bc4; wifi_rf_phy_disable = 0x40000bc8; wifi_rf_phy_enable = 0x40000bcc; wifi_is_started = 0x40000bd0; -sta_input = 0x40000bd4; +/*sta_input = 0x40000bd4;*/ sta_rx_eapol = 0x40000bd8; sta_reset_beacon_timeout = 0x40000bdc; sta_get_beacon_timeout = 0x40000be0; diff --git a/components/esp_rom/esp32c5/ld/esp32c5.rom.pp.ld b/components/esp_rom/esp32c5/ld/esp32c5.rom.pp.ld index 16afe5998b..2090d1edc3 100644 --- a/components/esp_rom/esp32c5/ld/esp32c5.rom.pp.ld +++ b/components/esp_rom/esp32c5/ld/esp32c5.rom.pp.ld @@ -236,10 +236,10 @@ rcGetSched = 0x40000f40; rcLowerSched = 0x40000f44; rcSetTxAmpduLimit = 0x40000f48; rcTxUpdatePer = 0x40000f4c; -rcUpdateAckSnr = 0x40000f50; +/*rcUpdateAckSnr = 0x40000f50;*/ rcUpdateRate = 0x40000f54; -rcUpdateTxDone = 0x40000f58; -rcUpdateTxDoneAmpdu2 = 0x40000f5c; +/*rcUpdateTxDone = 0x40000f58;*/ +/*rcUpdateTxDoneAmpdu2 = 0x40000f5c;*/ rcUpSched = 0x40000f60; rcReachRetryLimit = 0x40000f64; rcGetDCMMaxRate = 0x40000f68; @@ -264,7 +264,7 @@ wDevCheckBlockError = 0x40000fac; wDev_DiscardFrame = 0x40000fb4; wDev_GetNoiseFloor = 0x40000fb8; wDev_IndicateAmpdu = 0x40000fbc; -wDev_IndicateFrame = 0x40000fc0; +/*wDev_IndicateFrame = 0x40000fc0;*/ wdev_mac_reg_load = 0x40000fc4; wdev_mac_reg_store = 0x40000fc8; wdev_mac_special_reg_load = 0x40000fcc; diff --git a/components/esp_wifi/include/esp_private/esp_wifi_he_types_private.h b/components/esp_wifi/include/esp_private/esp_wifi_he_types_private.h index 0907c290a5..4a0197aa4d 100644 --- a/components/esp_wifi/include/esp_private/esp_wifi_he_types_private.h +++ b/components/esp_wifi/include/esp_private/esp_wifi_he_types_private.h @@ -430,6 +430,7 @@ typedef struct { int mubar; int bfrp; int nfrp; + int bar; } esp_test_rx_ctrl_t; typedef enum { diff --git a/components/esp_wifi/src/wifi_init.c b/components/esp_wifi/src/wifi_init.c index 29543b5036..17b670b146 100644 --- a/components/esp_wifi/src/wifi_init.c +++ b/components/esp_wifi/src/wifi_init.c @@ -196,7 +196,7 @@ static esp_err_t wifi_deinit_internal(void) esp_wifi_beacon_monitor_configure(&monitor_config); #endif -#if CONFIG_ESP_WIFI_SLP_IRAM_OPT +#if CONFIG_PM_ENABLE && CONFIG_ESP_WIFI_SLP_IRAM_OPT esp_pm_unregister_light_sleep_default_params_config_callback(); #endif #if CONFIG_FREERTOS_USE_TICKLESS_IDLE @@ -321,7 +321,7 @@ esp_err_t esp_wifi_init(const wifi_init_config_t *config) } #endif -#if CONFIG_ESP_WIFI_SLP_IRAM_OPT +#if CONFIG_PM_ENABLE && CONFIG_ESP_WIFI_SLP_IRAM_OPT int min_freq_mhz = esp_pm_impl_get_cpu_freq(PM_MODE_LIGHT_SLEEP); int max_freq_mhz = esp_pm_impl_get_cpu_freq(PM_MODE_CPU_MAX); esp_wifi_internal_update_light_sleep_default_params(min_freq_mhz, max_freq_mhz); diff --git a/components/esp_wifi/test_apps/.build-test-rules.yml b/components/esp_wifi/test_apps/.build-test-rules.yml index bf19dc53b2..ff8f5aa253 100644 --- a/components/esp_wifi/test_apps/.build-test-rules.yml +++ b/components/esp_wifi/test_apps/.build-test-rules.yml @@ -10,3 +10,6 @@ components/esp_wifi/test_apps/wifi_connect: components/esp_wifi/test_apps/wifi_function: disable: - if: SOC_WIFI_SUPPORTED != 1 + disable_test: + - if: IDF_TARGET in ["esp32c5"] + reason: leak of runner diff --git a/components/esp_wifi/test_apps/wifi_connect/README.md b/components/esp_wifi/test_apps/wifi_connect/README.md index 7e7523ec85..0c839f750c 100644 --- a/components/esp_wifi/test_apps/wifi_connect/README.md +++ b/components/esp_wifi/test_apps/wifi_connect/README.md @@ -1,2 +1,2 @@ -| Supported Targets | ESP32 | ESP32-C2 | ESP32-C3 | ESP32-C6 | ESP32-S2 | ESP32-S3 | -| ----------------- | ----- | -------- | -------- | -------- | -------- | -------- | +| Supported Targets | ESP32 | ESP32-C2 | ESP32-C3 | ESP32-C5 | ESP32-C6 | ESP32-S2 | ESP32-S3 | +| ----------------- | ----- | -------- | -------- | -------- | -------- | -------- | -------- | diff --git a/components/esp_wifi/test_apps/wifi_function/README.md b/components/esp_wifi/test_apps/wifi_function/README.md index cd9be654c0..097edbf0c4 100644 --- a/components/esp_wifi/test_apps/wifi_function/README.md +++ b/components/esp_wifi/test_apps/wifi_function/README.md @@ -1,3 +1,3 @@ -| Supported Targets | ESP32 | ESP32-C2 | ESP32-C3 | ESP32-C6 | ESP32-S2 | ESP32-S3 | -| ----------------- | ----- | -------- | -------- | -------- | -------- | -------- | +| Supported Targets | ESP32 | ESP32-C2 | ESP32-C3 | ESP32-C5 | ESP32-C6 | ESP32-S2 | ESP32-S3 | +| ----------------- | ----- | -------- | -------- | -------- | -------- | -------- | -------- | diff --git a/components/soc/esp32c5/include/soc/Kconfig.soc_caps.in b/components/soc/esp32c5/include/soc/Kconfig.soc_caps.in index fa20d497f7..050d947a8d 100644 --- a/components/soc/esp32c5/include/soc/Kconfig.soc_caps.in +++ b/components/soc/esp32c5/include/soc/Kconfig.soc_caps.in @@ -51,6 +51,14 @@ config SOC_USB_SERIAL_JTAG_SUPPORTED bool default y +config SOC_PHY_SUPPORTED + bool + default y + +config SOC_WIFI_SUPPORTED + bool + default y + config SOC_SUPPORTS_SECURE_DL_MODE bool default y @@ -1099,6 +1107,10 @@ config SOC_UART_SUPPORT_FSM_TX_WAIT_SEND bool default y +config SOC_WIFI_LIGHT_SLEEP_CLK_WIDTH + int + default 12 + config SOC_PM_SUPPORT_MODEM_PD bool default y @@ -1159,6 +1171,38 @@ config SOC_RCC_IS_INDEPENDENT bool default y +config SOC_WIFI_HW_TSF + bool + default y + +config SOC_WIFI_FTM_SUPPORT + bool + default n + +config SOC_WIFI_GCMP_SUPPORT + bool + default y + +config SOC_WIFI_WAPI_SUPPORT + bool + default y + +config SOC_WIFI_CSI_SUPPORT + bool + default y + +config SOC_WIFI_MESH_SUPPORT + bool + default y + +config SOC_WIFI_HE_SUPPORT + bool + default y + +config SOC_WIFI_HE_SUPPORT_5G + bool + default y + config SOC_BLE_SUPPORTED bool default y diff --git a/components/soc/esp32c5/include/soc/soc_caps.h b/components/soc/esp32c5/include/soc/soc_caps.h index 07ae6dd52d..8c2d5b77f5 100644 --- a/components/soc/esp32c5/include/soc/soc_caps.h +++ b/components/soc/esp32c5/include/soc/soc_caps.h @@ -31,7 +31,8 @@ #define SOC_ASYNC_MEMCPY_SUPPORTED 1 #define SOC_USB_SERIAL_JTAG_SUPPORTED 1 // #define SOC_TEMP_SENSOR_SUPPORTED 1 // TODO: [ESP32C5] IDF-8727 -// #define SOC_WIFI_SUPPORTED 1 // TODO: [ESP32C5] IDF-8851 +#define SOC_PHY_SUPPORTED 1 +#define SOC_WIFI_SUPPORTED 1 #define SOC_SUPPORTS_SECURE_DL_MODE 1 #define SOC_LP_CORE_SUPPORTED 1 #define SOC_ULP_SUPPORTED 1 @@ -522,7 +523,7 @@ // #define SOC_PHY_DIG_REGS_MEM_SIZE (21*4) /*--------------- WIFI LIGHT SLEEP CLOCK WIDTH CAPS --------------------------*/ -// #define SOC_WIFI_LIGHT_SLEEP_CLK_WIDTH (12) +#define SOC_WIFI_LIGHT_SLEEP_CLK_WIDTH (12) /*-------------------------- Power Management CAPS ----------------------------*/ // #define SOC_PM_SUPPORT_WIFI_WAKEUP (1) @@ -570,13 +571,14 @@ // #define SOC_TEMPERATURE_SENSOR_INTR_SUPPORT (1) /*------------------------------------ WI-FI CAPS ------------------------------------*/ -// #define SOC_WIFI_HW_TSF (1) /*!< Support hardware TSF */ -// #define SOC_WIFI_FTM_SUPPORT (0) /*!< Support FTM */ -// #define SOC_WIFI_GCMP_SUPPORT (1) /*!< Support GCMP(GCMP128 and GCMP256) */ -// #define SOC_WIFI_WAPI_SUPPORT (1) /*!< Support WAPI */ -// #define SOC_WIFI_CSI_SUPPORT (1) /*!< Support CSI */ -// #define SOC_WIFI_MESH_SUPPORT (1) /*!< Support WIFI MESH */ -// #define SOC_WIFI_HE_SUPPORT (1) /*!< Support Wi-Fi 6 */ +#define SOC_WIFI_HW_TSF (1) /*!< Support hardware TSF */ +#define SOC_WIFI_FTM_SUPPORT (0) /*!< Support FTM */ +#define SOC_WIFI_GCMP_SUPPORT (1) /*!< Support GCMP(GCMP128 and GCMP256) */ +#define SOC_WIFI_WAPI_SUPPORT (1) /*!< Support WAPI */ +#define SOC_WIFI_CSI_SUPPORT (1) /*!< Support CSI */ +#define SOC_WIFI_MESH_SUPPORT (1) /*!< Support WIFI MESH */ +#define SOC_WIFI_HE_SUPPORT (1) /*!< Support Wi-Fi 6 */ +#define SOC_WIFI_HE_SUPPORT_5G (1) /*!< Support Wi-Fi 6 in 5G */ /*---------------------------------- Bluetooth CAPS ----------------------------------*/ #define SOC_BLE_SUPPORTED (1) /*!< Support Bluetooth Low Energy hardware */ diff --git a/components/wpa_supplicant/test_apps/.build-test-rules.yml b/components/wpa_supplicant/test_apps/.build-test-rules.yml index 6013a2343c..0a315ea208 100644 --- a/components/wpa_supplicant/test_apps/.build-test-rules.yml +++ b/components/wpa_supplicant/test_apps/.build-test-rules.yml @@ -3,6 +3,9 @@ components/wpa_supplicant/test_apps: disable: - if: SOC_WIFI_SUPPORTED != 1 + disable_test: + - if: IDF_TARGET in ["esp32c5"] + reason: leak of runner depends_components: - esp_wifi - wpa_supplicant diff --git a/components/wpa_supplicant/test_apps/README.md b/components/wpa_supplicant/test_apps/README.md index 3fa2378f00..57661ca258 100644 --- a/components/wpa_supplicant/test_apps/README.md +++ b/components/wpa_supplicant/test_apps/README.md @@ -1,5 +1,5 @@ -| Supported Targets | ESP32 | ESP32-C2 | ESP32-C3 | ESP32-C6 | ESP32-S2 | ESP32-S3 | -| ----------------- | ----- | -------- | -------- | -------- | -------- | -------- | +| Supported Targets | ESP32 | ESP32-C2 | ESP32-C3 | ESP32-C5 | ESP32-C6 | ESP32-S2 | ESP32-S3 | +| ----------------- | ----- | -------- | -------- | -------- | -------- | -------- | -------- | # wpa_supplicant unit test diff --git a/examples/mesh/internal_communication/README.md b/examples/mesh/internal_communication/README.md index a7179b9b98..a86b04351c 100644 --- a/examples/mesh/internal_communication/README.md +++ b/examples/mesh/internal_communication/README.md @@ -1,5 +1,5 @@ -| Supported Targets | ESP32 | ESP32-C3 | ESP32-C6 | ESP32-S2 | ESP32-S3 | -| ----------------- | ----- | -------- | -------- | -------- | -------- | +| Supported Targets | ESP32 | ESP32-C3 | ESP32-C5 | ESP32-C6 | ESP32-S2 | ESP32-S3 | +| ----------------- | ----- | -------- | -------- | -------- | -------- | -------- | # Mesh Internal Communication Example @@ -22,5 +22,5 @@ Features Demonstrated Open project configuration menu (`idf.py menuconfig`) to configure the mesh network channel, router SSID, router password and mesh softAP settings. When the mesh network is established and if you happen to run this example on ESP-WROVER-KIT boards, the RGB light indicator will show you on which layer devices are. -The pink reprents root; the yellow reprents layer 2; the red reprents layer 3; the blue reprents layer 4; the green reprents layer 5; the white reprents layer greater than 5. +The pink represents root; the yellow represents layer 2; the red represents layer 3; the blue represents layer 4; the green represents layer 5; the white represents layer greater than 5. Root continuously sends an On / Off control message to all devices in its routing table. Devices including root itself receive this message and do the On / Off. diff --git a/examples/mesh/ip_internal_network/README.md b/examples/mesh/ip_internal_network/README.md index 08234b65f6..2cbf75ed58 100644 --- a/examples/mesh/ip_internal_network/README.md +++ b/examples/mesh/ip_internal_network/README.md @@ -1,5 +1,5 @@ -| Supported Targets | ESP32 | ESP32-C3 | ESP32-C6 | ESP32-S2 | ESP32-S3 | -| ----------------- | ----- | -------- | -------- | -------- | -------- | +| Supported Targets | ESP32 | ESP32-C3 | ESP32-C5 | ESP32-C6 | ESP32-S2 | ESP32-S3 | +| ----------------- | ----- | -------- | -------- | -------- | -------- | -------- | # Mesh IP Internal Networking example diff --git a/examples/mesh/manual_networking/README.md b/examples/mesh/manual_networking/README.md index c3dba9ee1e..276ea16130 100644 --- a/examples/mesh/manual_networking/README.md +++ b/examples/mesh/manual_networking/README.md @@ -1,5 +1,5 @@ -| Supported Targets | ESP32 | ESP32-C3 | ESP32-C6 | ESP32-S2 | ESP32-S3 | -| ----------------- | ----- | -------- | -------- | -------- | -------- | +| Supported Targets | ESP32 | ESP32-C3 | ESP32-C5 | ESP32-C6 | ESP32-S2 | ESP32-S3 | +| ----------------- | ----- | -------- | -------- | -------- | -------- | -------- | # Mesh Manual Networking Example @@ -9,6 +9,6 @@ This example demonstrates how to scan a list of parent candidates, choose an app Open project configuration menu (`idf.py menuconfig`) to configure the mesh network channel, router SSID, router password and mesh softAP settings. -When the mesh network is established and if you happen to run this example on ESP-WROVER-KIT boards, the RGB light indicator will show you on which layer devices are. The pink reprents root; the yellow reprents layer 2; the red reprents layer 3; the blue reprents layer 4; the green reprents layer 5; the white reprents layer greater than 5. +When the mesh network is established and if you happen to run this example on ESP-WROVER-KIT boards, the RGB light indicator will show you on which layer devices are. The pink represents root; the yellow represents layer 2; the red represents layer 3; the blue represents layer 4; the green represents layer 5; the white represents layer greater than 5. diff --git a/examples/network/eth2ap/README.md b/examples/network/eth2ap/README.md index 861ddc872c..20306fa973 100644 --- a/examples/network/eth2ap/README.md +++ b/examples/network/eth2ap/README.md @@ -1,5 +1,5 @@ -| Supported Targets | ESP32 | ESP32-C2 | ESP32-C3 | ESP32-C6 | ESP32-S2 | ESP32-S3 | -| ----------------- | ----- | -------- | -------- | -------- | -------- | -------- | +| Supported Targets | ESP32 | ESP32-C2 | ESP32-C3 | ESP32-C5 | ESP32-C6 | ESP32-S2 | ESP32-S3 | +| ----------------- | ----- | -------- | -------- | -------- | -------- | -------- | -------- | # eth2ap Example (See the README.md file in the upper level 'examples' directory for more information about examples. To try a more complex application about Ethernet to WiFi data forwarding, please go to [iot-solution](https://github.com/espressif/esp-iot-solution/tree/release/v1.0/examples/eth2wifi).) @@ -66,7 +66,7 @@ I (538) system_api: Base MAC address is not set, read default base MAC address f I (538) system_api: Base MAC address is not set, read default base MAC address from BLK0 of EFUSE I (568) wifi: wifi firmware version: ec61a20 I (568) wifi: config NVS flash: enabled -I (568) wifi: config nano formating: disabled +I (568) wifi: config nano formatting: disabled I (568) wifi: Init dynamic tx buffer num: 32 I (568) wifi: Init data frame dynamic rx buffer num: 32 I (578) wifi: Init management frame dynamic rx buffer num: 32 diff --git a/examples/network/simple_sniffer/README.md b/examples/network/simple_sniffer/README.md index 4eda0836a9..9503435084 100644 --- a/examples/network/simple_sniffer/README.md +++ b/examples/network/simple_sniffer/README.md @@ -1,5 +1,5 @@ -| Supported Targets | ESP32 | ESP32-C2 | ESP32-C3 | ESP32-C6 | ESP32-S2 | ESP32-S3 | -| ----------------- | ----- | -------- | -------- | -------- | -------- | -------- | +| Supported Targets | ESP32 | ESP32-C2 | ESP32-C3 | ESP32-C5 | ESP32-C6 | ESP32-S2 | ESP32-S3 | +| ----------------- | ----- | -------- | -------- | -------- | -------- | -------- | -------- | # Simple Sniffer Example @@ -314,8 +314,8 @@ I (130566) cmd_pcap: .pcap file close done ## Troubleshooting -- Make sure you have pluged in your SD card and mount it into filesystem before doing sniffer work or you will get error message like “Create file /sdcard/sniffer0.pcap failed”. -- To protect the SD card, we recommand you to execute command `unmount sd` before you plug out your SD card. +- Make sure you have plugged in your SD card and mount it into filesystem before doing sniffer work or you will get error message like “Create file /sdcard/sniffer0.pcap failed”. +- To protect the SD card, we recommend you to execute command `unmount sd` before you plug out your SD card. - Make sure to run `esp32 apptrace` command before or immediately after a new sniffer task started when you try this example with JTAG. Otherwise the console will issue warning message `waiting for apptrace established` every 1 second. If the apptrace communication doesn't be established within 10 seconds (can be altered by macro `SNIFFER_APPTRACE_RETRY`), this sniffer command will failed with an error message `waiting for apptrace established timeout`. (For any technical queries, please open an [issue](https://github.com/espressif/esp-idf/issues) on GitHub. We will get back to you as soon as possible.) diff --git a/examples/network/sta2eth/README.md b/examples/network/sta2eth/README.md index 9bf63dd42b..8c91e7a477 100644 --- a/examples/network/sta2eth/README.md +++ b/examples/network/sta2eth/README.md @@ -1,5 +1,5 @@ -| Supported Targets | ESP32 | ESP32-C2 | ESP32-C3 | ESP32-C6 | ESP32-S2 | ESP32-S3 | -| ----------------- | ----- | -------- | -------- | -------- | -------- | -------- | +| Supported Targets | ESP32 | ESP32-C2 | ESP32-C3 | ESP32-C5 | ESP32-C6 | ESP32-S2 | ESP32-S3 | +| ----------------- | ----- | -------- | -------- | -------- | -------- | -------- | -------- | # WiFi station to "Wired" interface L2 forwarder diff --git a/examples/openthread/.build-test-rules.yml b/examples/openthread/.build-test-rules.yml index d431fd6861..4b1dc50b25 100644 --- a/examples/openthread/.build-test-rules.yml +++ b/examples/openthread/.build-test-rules.yml @@ -20,9 +20,9 @@ examples/openthread/ot_br: enable: - - if: SOC_WIFI_SUPPORTED == 1 + - if: SOC_WIFI_SUPPORTED == 1 and IDF_TARGET != "esp32c5" disable_test: - - if: IDF_TARGET in ["esp32", "esp32c3", "esp32c2", "esp32c6", "esp32s2"] + - if: IDF_TARGET in ["esp32", "esp32c3", "esp32c2", "esp32c6", "esp32s2", "esp32c5"] temporary: true reason: only test on esp32s3 <<: *openthread_dependencies diff --git a/examples/provisioning/.build-test-rules.yml b/examples/provisioning/.build-test-rules.yml index 550cd82588..5c3aa40a22 100644 --- a/examples/provisioning/.build-test-rules.yml +++ b/examples/provisioning/.build-test-rules.yml @@ -3,6 +3,7 @@ examples/provisioning/wifi_prov_mgr: disable: - if: SOC_WIFI_SUPPORTED != 1 + - if: SOC_BT_SUPPORTED != 1 disable_test: - if: IDF_TARGET != "esp32" temporary: true diff --git a/examples/provisioning/wifi_prov_mgr/README.md b/examples/provisioning/wifi_prov_mgr/README.md index 62f772c9c9..56ac5b6cbd 100644 --- a/examples/provisioning/wifi_prov_mgr/README.md +++ b/examples/provisioning/wifi_prov_mgr/README.md @@ -1,5 +1,5 @@ -| Supported Targets | ESP32 | ESP32-C2 | ESP32-C3 | ESP32-C6 | ESP32-S2 | ESP32-S3 | -| ----------------- | ----- | -------- | -------- | -------- | -------- | -------- | +| Supported Targets | ESP32 | ESP32-C2 | ESP32-C3 | ESP32-C6 | ESP32-S3 | +| ----------------- | ----- | -------- | -------- | -------- | -------- | # Wi-Fi Provisioning Manager Example diff --git a/examples/wifi/.build-test-rules.yml b/examples/wifi/.build-test-rules.yml index 0c91cd8448..6662a103c5 100644 --- a/examples/wifi/.build-test-rules.yml +++ b/examples/wifi/.build-test-rules.yml @@ -61,6 +61,10 @@ examples/wifi/power_save: <<: *wifi_depends_default disable: - if: SOC_WIFI_SUPPORTED != 1 + disable_test: + - if: IDF_TARGET == "esp32c5" + temporary: true + reason: lack of runners depends_components: - esp_driver_uart diff --git a/examples/wifi/espnow/README.md b/examples/wifi/espnow/README.md index b08a914902..198522d838 100644 --- a/examples/wifi/espnow/README.md +++ b/examples/wifi/espnow/README.md @@ -1,5 +1,5 @@ -| Supported Targets | ESP32 | ESP32-C2 | ESP32-C3 | ESP32-C6 | ESP32-S2 | ESP32-S3 | -| ----------------- | ----- | -------- | -------- | -------- | -------- | -------- | +| Supported Targets | ESP32 | ESP32-C2 | ESP32-C3 | ESP32-C5 | ESP32-C6 | ESP32-S2 | ESP32-S3 | +| ----------------- | ----- | -------- | -------- | -------- | -------- | -------- | -------- | # ESPNOW Example diff --git a/examples/wifi/fast_scan/README.md b/examples/wifi/fast_scan/README.md index faede35c52..2be7009b42 100644 --- a/examples/wifi/fast_scan/README.md +++ b/examples/wifi/fast_scan/README.md @@ -1,5 +1,5 @@ -| Supported Targets | ESP32 | ESP32-C2 | ESP32-C3 | ESP32-C6 | ESP32-S2 | ESP32-S3 | -| ----------------- | ----- | -------- | -------- | -------- | -------- | -------- | +| Supported Targets | ESP32 | ESP32-C2 | ESP32-C3 | ESP32-C5 | ESP32-C6 | ESP32-S2 | ESP32-S3 | +| ----------------- | ----- | -------- | -------- | -------- | -------- | -------- | -------- | # Wi-Fi Fast Scan Example @@ -57,7 +57,7 @@ As you run the example, you will see the following log: I (616) wifi:wifi firmware version: 6bff005 I (616) wifi:wifi certification version: v7.0 I (616) wifi:config NVS flash: enabled -I (616) wifi:config nano formating: disabled +I (616) wifi:config nano formatting: disabled I (626) wifi:Init data frame dynamic rx buffer num: 32 I (626) wifi:Init management frame dynamic rx buffer num: 32 I (636) wifi:Init management short buffer num: 32 diff --git a/examples/wifi/ftm/README.md b/examples/wifi/ftm/README.md index 1928681dfc..a124ac79de 100644 --- a/examples/wifi/ftm/README.md +++ b/examples/wifi/ftm/README.md @@ -69,7 +69,7 @@ Issue `ftm -I` to initiate a session with default configuration of 32 FTM frames Where - * `-I` OR `--ftm_initiator`: FTM Initiator mode * `-c` OR `--frm_count`: FTM frames to be exchanged (Valid values: 0=No preference, 8, 16, 24, 32, 64, default: 32) -* `-p` OR `--burst_period`: Periodicity of FTM bursts in 100's of miliseconds (0: No preference, default: 2) +* `-p` OR `--burst_period`: Periodicity of FTM bursts in 100's of milliseconds (0: No preference, default: 2) * `-s` OR `--ssid=SSID`: SSID of AP that supports FTM Responder mode Currently FTM is only supported in below configuration - diff --git a/examples/wifi/getting_started/softAP/README.md b/examples/wifi/getting_started/softAP/README.md index 176a4ed8fb..7a7277cfa5 100644 --- a/examples/wifi/getting_started/softAP/README.md +++ b/examples/wifi/getting_started/softAP/README.md @@ -1,5 +1,5 @@ -| Supported Targets | ESP32 | ESP32-C2 | ESP32-C3 | ESP32-C6 | ESP32-S2 | ESP32-S3 | -| ----------------- | ----- | -------- | -------- | -------- | -------- | -------- | +| Supported Targets | ESP32 | ESP32-C2 | ESP32-C3 | ESP32-C5 | ESP32-C6 | ESP32-S2 | ESP32-S3 | +| ----------------- | ----- | -------- | -------- | -------- | -------- | -------- | -------- | # Wi-Fi SoftAP Example diff --git a/examples/wifi/getting_started/station/README.md b/examples/wifi/getting_started/station/README.md index f194a1fcba..6a35555d95 100644 --- a/examples/wifi/getting_started/station/README.md +++ b/examples/wifi/getting_started/station/README.md @@ -1,5 +1,5 @@ -| Supported Targets | ESP32 | ESP32-C2 | ESP32-C3 | ESP32-C6 | ESP32-S2 | ESP32-S3 | -| ----------------- | ----- | -------- | -------- | -------- | -------- | -------- | +| Supported Targets | ESP32 | ESP32-C2 | ESP32-C3 | ESP32-C5 | ESP32-C6 | ESP32-S2 | ESP32-S3 | +| ----------------- | ----- | -------- | -------- | -------- | -------- | -------- | -------- | # Wi-Fi Station Example @@ -46,7 +46,7 @@ I (599) system_api: Base MAC address is not set, read default base MAC address f I (599) system_api: Base MAC address is not set, read default base MAC address from BLK0 of EFUSE I (629) wifi: wifi firmware version: 2d94f02 I (629) wifi: config NVS flash: enabled -I (629) wifi: config nano formating: disabled +I (629) wifi: config nano formatting: disabled I (629) wifi: Init dynamic tx buffer num: 32 I (629) wifi: Init data frame dynamic rx buffer num: 32 I (639) wifi: Init management frame dynamic rx buffer num: 32 @@ -79,7 +79,7 @@ I (599) system_api: Base MAC address is not set, read default base MAC address f I (599) system_api: Base MAC address is not set, read default base MAC address from BLK0 of EFUSE I (629) wifi: wifi firmware version: 2d94f02 I (629) wifi: config NVS flash: enabled -I (629) wifi: config nano formating: disabled +I (629) wifi: config nano formatting: disabled I (629) wifi: Init dynamic tx buffer num: 32 I (629) wifi: Init data frame dynamic rx buffer num: 32 I (639) wifi: Init management frame dynamic rx buffer num: 32 diff --git a/examples/wifi/iperf/README.md b/examples/wifi/iperf/README.md index b42b7c4440..5594591fc1 100644 --- a/examples/wifi/iperf/README.md +++ b/examples/wifi/iperf/README.md @@ -1,5 +1,5 @@ -| Supported Targets | ESP32 | ESP32-C2 | ESP32-C3 | ESP32-C6 | ESP32-S2 | ESP32-S3 | -| ----------------- | ----- | -------- | -------- | -------- | -------- | -------- | +| Supported Targets | ESP32 | ESP32-C2 | ESP32-C3 | ESP32-C5 | ESP32-C6 | ESP32-S2 | ESP32-S3 | +| ----------------- | ----- | -------- | -------- | -------- | -------- | -------- | -------- | # Iperf Example diff --git a/examples/wifi/iperf/sdkconfig.defaults.esp32c5 b/examples/wifi/iperf/sdkconfig.defaults.esp32c5 index a233704aa6..5f5ad472d8 100644 --- a/examples/wifi/iperf/sdkconfig.defaults.esp32c5 +++ b/examples/wifi/iperf/sdkconfig.defaults.esp32c5 @@ -3,40 +3,40 @@ # CONFIG_IDF_ENV_FPGA=n -CONFIG_ESP_WIFI_STATIC_RX_BUFFER_NUM=40 -CONFIG_ESP_WIFI_DYNAMIC_RX_BUFFER_NUM=60 -CONFIG_ESP_WIFI_DYNAMIC_TX_BUFFER_NUM=40 +CONFIG_ESP_WIFI_STATIC_RX_BUFFER_NUM=22 +CONFIG_ESP_WIFI_DYNAMIC_RX_BUFFER_NUM=48 +CONFIG_ESP_WIFI_DYNAMIC_TX_BUFFER_NUM=48 CONFIG_ESP_WIFI_AMPDU_TX_ENABLED=y CONFIG_ESP_WIFI_TX_BA_WIN=32 CONFIG_ESP_WIFI_AMPDU_RX_ENABLED=y -CONFIG_ESP_WIFI_RX_BA_WIN=32 +CONFIG_ESP_WIFI_RX_BA_WIN=22 CONFIG_ESP_WIFI_NVS_ENABLED=n -CONFIG_LWIP_TCP_SND_BUF_DEFAULT=51200 +CONFIG_LWIP_TCP_SND_BUF_DEFAULT=57600 CONFIG_LWIP_TCP_WND_DEFAULT=65535 -CONFIG_LWIP_TCP_RECVMBOX_SIZE=64 +CONFIG_LWIP_TCP_RECVMBOX_SIZE=48 CONFIG_LWIP_UDP_RECVMBOX_SIZE=64 -CONFIG_LWIP_TCPIP_RECVMBOX_SIZE=64 +CONFIG_LWIP_TCPIP_RECVMBOX_SIZE=48 CONFIG_LWIP_IP_REASS_MAX_PBUFS=15 # # Serial flasher config # CONFIG_ESPTOOLPY_FLASHMODE_QIO=y -CONFIG_ESPTOOLPY_FLASHFREQ_40M=y +CONFIG_ESPTOOLPY_FLASHFREQ_80M=y # # Wi-Fi # -CONFIG_ESP_WIFI_ENABLE_WIFI_TX_STATS=n -CONFIG_ESP_WIFI_ENABLE_WIFI_RX_STATS=n -CONFIG_ESP_WIFI_ENABLE_WIFI_RX_MU_STATS=n +CONFIG_ESP_WIFI_ENABLE_WIFI_TX_STATS=y +CONFIG_ESP_WIFI_ENABLE_WIFI_RX_STATS=y +CONFIG_ESP_WIFI_ENABLE_WIFI_RX_MU_STATS=y CONFIG_ESP_WIFI_ENABLE_DUMP_HESIGB=n CONFIG_ESP_WIFI_ENABLE_DUMP_MU_CFO=n CONFIG_ESP_WIFI_ENABLE_DUMP_CTRL_NDPA=n CONFIG_ESP_WIFI_ENABLE_DUMP_CTRL_BFRP=n CONFIG_ESP_WIFI_SLP_IRAM_OPT=n -CONFIG_LWIP_EXTRA_IRAM_OPTIMIZATION=y +CONFIG_LWIP_EXTRA_IRAM_OPTIMIZATION=n CONFIG_LWIP_TCPIP_CORE_LOCKING=y CONFIG_LWIP_TCPIP_CORE_LOCKING_INPUT=y diff --git a/examples/wifi/itwt/README.md b/examples/wifi/itwt/README.md index 265fe586af..49ba38a5c2 100644 --- a/examples/wifi/itwt/README.md +++ b/examples/wifi/itwt/README.md @@ -1,5 +1,5 @@ -| Supported Targets | ESP32-C6 | -| ----------------- | -------- | +| Supported Targets | ESP32-C5 | ESP32-C6 | +| ----------------- | -------- | -------- | # Wifi itwt Example diff --git a/examples/wifi/power_save/README.md b/examples/wifi/power_save/README.md index 95e01f1acd..50df4b8e6e 100644 --- a/examples/wifi/power_save/README.md +++ b/examples/wifi/power_save/README.md @@ -1,5 +1,5 @@ -| Supported Targets | ESP32 | ESP32-C2 | ESP32-C3 | ESP32-C6 | ESP32-S2 | ESP32-S3 | -| ----------------- | ----- | -------- | -------- | -------- | -------- | -------- | +| Supported Targets | ESP32 | ESP32-C2 | ESP32-C3 | ESP32-C5 | ESP32-C6 | ESP32-S2 | ESP32-S3 | +| ----------------- | ----- | -------- | -------- | -------- | -------- | -------- | -------- | # Wifi Power Save Example diff --git a/examples/wifi/roaming/roaming_11kvr/README.md b/examples/wifi/roaming/roaming_11kvr/README.md index 77b69d89fe..024d06cc55 100644 --- a/examples/wifi/roaming/roaming_11kvr/README.md +++ b/examples/wifi/roaming/roaming_11kvr/README.md @@ -1,5 +1,5 @@ -| Supported Targets | ESP32 | ESP32-C2 | ESP32-C3 | ESP32-C6 | ESP32-S2 | ESP32-S3 | -| ----------------- | ----- | -------- | -------- | -------- | -------- | -------- | +| Supported Targets | ESP32 | ESP32-C2 | ESP32-C3 | ESP32-C5 | ESP32-C6 | ESP32-S2 | ESP32-S3 | +| ----------------- | ----- | -------- | -------- | -------- | -------- | -------- | -------- | # Roaming Example diff --git a/examples/wifi/roaming/roaming_app/README.md b/examples/wifi/roaming/roaming_app/README.md index dfe1b1d1c4..5484547e09 100644 --- a/examples/wifi/roaming/roaming_app/README.md +++ b/examples/wifi/roaming/roaming_app/README.md @@ -1,5 +1,5 @@ -| Supported Targets | ESP32 | ESP32-C2 | ESP32-C3 | ESP32-C6 | ESP32-S2 | ESP32-S3 | -| ----------------- | ----- | -------- | -------- | -------- | -------- | -------- | +| Supported Targets | ESP32 | ESP32-C2 | ESP32-C3 | ESP32-C5 | ESP32-C6 | ESP32-S2 | ESP32-S3 | +| ----------------- | ----- | -------- | -------- | -------- | -------- | -------- | -------- | # Wi-Fi Station Example diff --git a/examples/wifi/scan/README.md b/examples/wifi/scan/README.md index 38b1f8fbfa..44fe4c7fe7 100644 --- a/examples/wifi/scan/README.md +++ b/examples/wifi/scan/README.md @@ -1,5 +1,5 @@ -| Supported Targets | ESP32 | ESP32-C2 | ESP32-C3 | ESP32-C6 | ESP32-S2 | ESP32-S3 | -| ----------------- | ----- | -------- | -------- | -------- | -------- | -------- | +| Supported Targets | ESP32 | ESP32-C2 | ESP32-C3 | ESP32-C5 | ESP32-C6 | ESP32-S2 | ESP32-S3 | +| ----------------- | ----- | -------- | -------- | -------- | -------- | -------- | -------- | # Wi-Fi Scan Example diff --git a/examples/wifi/smart_config/README.md b/examples/wifi/smart_config/README.md index 1072af0fbc..822c52226b 100644 --- a/examples/wifi/smart_config/README.md +++ b/examples/wifi/smart_config/README.md @@ -1,5 +1,5 @@ -| Supported Targets | ESP32 | ESP32-C2 | ESP32-C3 | ESP32-C6 | ESP32-S2 | ESP32-S3 | -| ----------------- | ----- | -------- | -------- | -------- | -------- | -------- | +| Supported Targets | ESP32 | ESP32-C2 | ESP32-C3 | ESP32-C5 | ESP32-C6 | ESP32-S2 | ESP32-S3 | +| ----------------- | ----- | -------- | -------- | -------- | -------- | -------- | -------- | # smartconfig Example diff --git a/examples/wifi/softap_sta/README.md b/examples/wifi/softap_sta/README.md index 40eb5ee266..21a5098a2a 100644 --- a/examples/wifi/softap_sta/README.md +++ b/examples/wifi/softap_sta/README.md @@ -1,12 +1,12 @@ -| Supported Targets | ESP32 | ESP32-C2 | ESP32-C3 | ESP32-C6 | ESP32-S2 | ESP32-S3 | -| ----------------- | ----- | -------- | -------- | -------- | -------- | -------- | +| Supported Targets | ESP32 | ESP32-C2 | ESP32-C3 | ESP32-C5 | ESP32-C6 | ESP32-S2 | ESP32-S3 | +| ----------------- | ----- | -------- | -------- | -------- | -------- | -------- | -------- | # Wi-Fi SoftAP & Station Example (See the README.md file in the upper level 'examples' directory for more information about examples.) This example demonstrates how to use the ESP Wi-Fi driver to act as both an Access Point and a Station simultaneously using the SoftAP and Station features. -With NAPT enabled on the softAP interface and the station interface set as the defaut interface this example can be used as Wifi nat router. +With NAPT enabled on the softAP interface and the station interface set as the default interface this example can be used as Wifi nat router. ## How to use example ### Configure the project diff --git a/examples/wifi/wifi_eap_fast/README.md b/examples/wifi/wifi_eap_fast/README.md index b79953bbcd..670c852fcf 100644 --- a/examples/wifi/wifi_eap_fast/README.md +++ b/examples/wifi/wifi_eap_fast/README.md @@ -1,5 +1,5 @@ -| Supported Targets | ESP32 | ESP32-C2 | ESP32-C3 | ESP32-C6 | ESP32-S2 | ESP32-S3 | -| ----------------- | ----- | -------- | -------- | -------- | -------- | -------- | +| Supported Targets | ESP32 | ESP32-C2 | ESP32-C3 | ESP32-C5 | ESP32-C6 | ESP32-S2 | ESP32-S3 | +| ----------------- | ----- | -------- | -------- | -------- | -------- | -------- | -------- | # WPA2 Enterprise Example diff --git a/examples/wifi/wifi_easy_connect/dpp-enrollee/README.md b/examples/wifi/wifi_easy_connect/dpp-enrollee/README.md index c3ff6a0b4b..5e6740aa28 100644 --- a/examples/wifi/wifi_easy_connect/dpp-enrollee/README.md +++ b/examples/wifi/wifi_easy_connect/dpp-enrollee/README.md @@ -1,5 +1,5 @@ -| Supported Targets | ESP32 | ESP32-C2 | ESP32-C3 | ESP32-C6 | ESP32-S2 | ESP32-S3 | -| ----------------- | ----- | -------- | -------- | -------- | -------- | -------- | +| Supported Targets | ESP32 | ESP32-C2 | ESP32-C3 | ESP32-C5 | ESP32-C6 | ESP32-S2 | ESP32-S3 | +| ----------------- | ----- | -------- | -------- | -------- | -------- | -------- | -------- | # Device Provisioning Protocol (Enrollee) Example diff --git a/examples/wifi/wifi_enterprise/README.md b/examples/wifi/wifi_enterprise/README.md index 6522f19494..06404b82c5 100644 --- a/examples/wifi/wifi_enterprise/README.md +++ b/examples/wifi/wifi_enterprise/README.md @@ -1,5 +1,5 @@ -| Supported Targets | ESP32 | ESP32-C2 | ESP32-C3 | ESP32-C6 | ESP32-S2 | ESP32-S3 | -| ----------------- | ----- | -------- | -------- | -------- | -------- | -------- | +| Supported Targets | ESP32 | ESP32-C2 | ESP32-C3 | ESP32-C5 | ESP32-C6 | ESP32-S2 | ESP32-S3 | +| ----------------- | ----- | -------- | -------- | -------- | -------- | -------- | -------- | # Understanding different WiFi enterprise modes: @@ -55,7 +55,7 @@ idf.py -p PORT flash monitor ## Steps to create enterprise openssl certs -1. make directry tree +1. make directory tree ``` mkdir demoCA mkdir demoCA/newcerts @@ -86,7 +86,7 @@ idf.py -p PORT flash monitor openssl req -new -key client.key -out client.csr openssl req -new -key server.key -out server.csr ``` -5. create certs (.crt) for client nd server +5. create certs (.crt) for client and server ``` openssl ca -batch -keyfile ca.key -cert ca.pem -in client.csr -key (password) -out client.crt -extensions xpclient_ext -extfile xpextensions openssl ca -batch -keyfile ca.key -cert ca.pem -in server.csr -key (password) -out server.crt -extensions xpserver_ext -extfile xpextensions @@ -158,7 +158,7 @@ I (635) wifi:wifi driver task: 3ffbf930, prio:23, stack:6656, core=0 I (635) wifi:wifi firmware version: e03c1ca I (635) wifi:wifi certification version: v7.0 I (635) wifi:config NVS flash: enabled -I (635) wifi:config nano formating: disabled +I (635) wifi:config nano formatting: disabled I (645) wifi:Init data frame dynamic rx buffer num: 32 I (645) wifi:Init management frame dynamic rx buffer num: 32 I (655) wifi:Init management short buffer num: 32 diff --git a/examples/wifi/wps/README.md b/examples/wifi/wps/README.md index 63c44dd6ef..089f1fd0f1 100644 --- a/examples/wifi/wps/README.md +++ b/examples/wifi/wps/README.md @@ -1,5 +1,5 @@ -| Supported Targets | ESP32 | ESP32-C2 | ESP32-C3 | ESP32-C6 | ESP32-S2 | ESP32-S3 | -| ----------------- | ----- | -------- | -------- | -------- | -------- | -------- | +| Supported Targets | ESP32 | ESP32-C2 | ESP32-C3 | ESP32-C5 | ESP32-C6 | ESP32-S2 | ESP32-S3 | +| ----------------- | ----- | -------- | -------- | -------- | -------- | -------- | -------- | # Wi-Fi WPS Example diff --git a/examples/wifi/wps_softap_registrar/README.md b/examples/wifi/wps_softap_registrar/README.md index b8d8d98dad..1af61b74d8 100644 --- a/examples/wifi/wps_softap_registrar/README.md +++ b/examples/wifi/wps_softap_registrar/README.md @@ -1,5 +1,5 @@ -| Supported Targets | ESP32 | ESP32-C2 | ESP32-C3 | ESP32-C6 | ESP32-S2 | ESP32-S3 | -| ----------------- | ----- | -------- | -------- | -------- | -------- | -------- | +| Supported Targets | ESP32 | ESP32-C2 | ESP32-C3 | ESP32-C5 | ESP32-C6 | ESP32-S2 | ESP32-S3 | +| ----------------- | ----- | -------- | -------- | -------- | -------- | -------- | -------- | # Wi-Fi WPS Registrar Example diff --git a/examples/zigbee/.build-test-rules.yml b/examples/zigbee/.build-test-rules.yml index ecffa999bd..7f14991ad8 100644 --- a/examples/zigbee/.build-test-rules.yml +++ b/examples/zigbee/.build-test-rules.yml @@ -8,8 +8,8 @@ examples/zigbee/esp_zigbee_gateway: enable: - - if: SOC_WIFI_SUPPORTED == 1 and IDF_TARGET != "esp32c2" - reason: not supported esp32c2 + - if: SOC_WIFI_SUPPORTED == 1 and IDF_TARGET not in ["esp32c2", "esp32c5"] + reason: not supported esp32c2 and esp32c5 <<: *zigbee_dependencies examples/zigbee/esp_zigbee_rcp: diff --git a/tools/test_apps/peripherals/.build-test-rules.yml b/tools/test_apps/peripherals/.build-test-rules.yml index c62ccdbdc5..804db98e17 100644 --- a/tools/test_apps/peripherals/.build-test-rules.yml +++ b/tools/test_apps/peripherals/.build-test-rules.yml @@ -3,3 +3,6 @@ tools/test_apps/peripherals/i2c_wifi: disable: - if: SOC_I2C_SUPPORTED != 1 or SOC_WIFI_SUPPORTED != 1 + disable_test: + - if: IDF_TARGET in ["esp32c5"] + reason: leak of runner diff --git a/tools/test_apps/peripherals/i2c_wifi/README.md b/tools/test_apps/peripherals/i2c_wifi/README.md index a5412d113b..e2fe908965 100644 --- a/tools/test_apps/peripherals/i2c_wifi/README.md +++ b/tools/test_apps/peripherals/i2c_wifi/README.md @@ -1,5 +1,5 @@ -| Supported Targets | ESP32 | ESP32-C2 | ESP32-C3 | ESP32-C6 | ESP32-S2 | ESP32-S3 | -| ----------------- | ----- | -------- | -------- | -------- | -------- | -------- | +| Supported Targets | ESP32 | ESP32-C2 | ESP32-C3 | ESP32-C5 | ESP32-C6 | ESP32-S2 | ESP32-S3 | +| ----------------- | ----- | -------- | -------- | -------- | -------- | -------- | -------- | # I2C-WIFI Test @@ -73,7 +73,7 @@ I (379) system_api: read default base MAC address from EFUSE I (379) wifi:wifi firmware version: d062fdb I (389) wifi:wifi certification version: v7.0 I (389) wifi:config NVS flash: enabled -I (389) wifi:config nano formating: disabled +I (389) wifi:config nano formatting: disabled I (399) wifi:Init data frame dynamic rx buffer num: 32 I (399) wifi:Init management frame dynamic rx buffer num: 32 I (409) wifi:Init management short buffer num: 32 diff --git a/tools/test_apps/phy/.build-test-rules.yml b/tools/test_apps/phy/.build-test-rules.yml index 9dcdbb7636..a6620cc9d1 100644 --- a/tools/test_apps/phy/.build-test-rules.yml +++ b/tools/test_apps/phy/.build-test-rules.yml @@ -3,6 +3,9 @@ tools/test_apps/phy/phy_multi_init_data_test: disable: - if: SOC_WIFI_SUPPORTED != 1 + disable_test: + - if: IDF_TARGET in ["esp32c5"] + reason: leak of runner tools/test_apps/phy/phy_tsens: disable: diff --git a/tools/test_apps/phy/phy_multi_init_data_test/README.md b/tools/test_apps/phy/phy_multi_init_data_test/README.md index 7e7523ec85..0c839f750c 100644 --- a/tools/test_apps/phy/phy_multi_init_data_test/README.md +++ b/tools/test_apps/phy/phy_multi_init_data_test/README.md @@ -1,2 +1,2 @@ -| Supported Targets | ESP32 | ESP32-C2 | ESP32-C3 | ESP32-C6 | ESP32-S2 | ESP32-S3 | -| ----------------- | ----- | -------- | -------- | -------- | -------- | -------- | +| Supported Targets | ESP32 | ESP32-C2 | ESP32-C3 | ESP32-C5 | ESP32-C6 | ESP32-S2 | ESP32-S3 | +| ----------------- | ----- | -------- | -------- | -------- | -------- | -------- | -------- | diff --git a/tools/test_apps/system/.build-test-rules.yml b/tools/test_apps/system/.build-test-rules.yml index b11db03fab..83cb588244 100644 --- a/tools/test_apps/system/.build-test-rules.yml +++ b/tools/test_apps/system/.build-test-rules.yml @@ -13,7 +13,7 @@ tools/test_apps/system/build_test: tools/test_apps/system/clang_build_test: enable: - - if: IDF_TARGET in ["esp32", "esp32s2", "esp32s3", "esp32c2", "esp32c3", "esp32c5", "esp32c6", "esp32h2", "esp32p4"] + - if: IDF_TARGET in ["esp32", "esp32s2", "esp32s3", "esp32c2", "esp32c3", "esp32c6", "esp32h2", "esp32p4"] temporary: true reason: the other targets are not supported yet diff --git a/tools/test_apps/system/clang_build_test/README.md b/tools/test_apps/system/clang_build_test/README.md index c410436a3a..5b165ee322 100644 --- a/tools/test_apps/system/clang_build_test/README.md +++ b/tools/test_apps/system/clang_build_test/README.md @@ -1,4 +1,4 @@ -| Supported Targets | ESP32 | ESP32-C2 | ESP32-C3 | ESP32-C5 | ESP32-C6 | ESP32-H2 | ESP32-P4 | ESP32-S2 | ESP32-S3 | -| ----------------- | ----- | -------- | -------- | -------- | -------- | -------- | -------- | -------- | -------- | +| Supported Targets | ESP32 | ESP32-C2 | ESP32-C3 | ESP32-C6 | ESP32-H2 | ESP32-P4 | ESP32-S2 | ESP32-S3 | +| ----------------- | ----- | -------- | -------- | -------- | -------- | -------- | -------- | -------- | This project is for testing if the application can be built with Clang toolchain. From ba0da2fd14c0a0b71fd9d369fa55dc76312c412c Mon Sep 17 00:00:00 2001 From: yinqingzhao Date: Thu, 11 Jul 2024 17:16:35 +0800 Subject: [PATCH 5/8] feat(wifi):add api to get btwt num that AP supported --- components/esp_wifi/include/esp_wifi_he.h | 19 +++++++++++++++++-- .../esp_wifi/include/esp_wifi_he_types.h | 1 + 2 files changed, 18 insertions(+), 2 deletions(-) diff --git a/components/esp_wifi/include/esp_wifi_he.h b/components/esp_wifi/include/esp_wifi_he.h index 0eba6ad5c9..d7a8a4079d 100644 --- a/components/esp_wifi/include/esp_wifi_he.h +++ b/components/esp_wifi/include/esp_wifi_he.h @@ -180,17 +180,32 @@ esp_err_t esp_wifi_sta_btwt_setup(wifi_btwt_setup_config_t *config); */ esp_err_t esp_wifi_sta_btwt_teardown(uint8_t btwt_id); +/** + * @brief Get number of btwts supported by the connected AP + * + * @param[out] btwt_number store number of btwts supported by the connected AP + * + * @return + * - ESP_OK: succeed + * - ESP_ERR_WIFI_NOT_INIT: WiFi is not initialized by esp_wifi_init + * - ESP_ERR_WIFI_NOT_STARTED: WiFi is not started by esp_wifi_start + * - ESP_ERR_INVALID_ARG: invalid argument + */ +esp_err_t esp_wifi_sta_get_btwt_num(uint8_t *btwt_number); + /** * @brief Get broadcast TWT information * - * @param[in] btwt_info pointer to bTWT information structure. + * @param[inout] btwt_number As input param, it stores max btwt number AP supported. + * As output param, it receives the actual btwt numbers AP supported. + * @param[in] btwt_info array to hold the btwt information supported by AP * * @return * - ESP_OK: succeed * - ESP_FAIL: fail * - ESP_ERR_WIFI_CONN: WiFi internal error, station or soft-AP control block wrong */ -esp_err_t esp_wifi_sta_btwt_get_info(esp_wifi_btwt_info_t *btwt_info); +esp_err_t esp_wifi_sta_btwt_get_info(uint8_t btwt_number, esp_wifi_btwt_info_t *btwt_info); /** * @brief Set wifi TWT config diff --git a/components/esp_wifi/include/esp_wifi_he_types.h b/components/esp_wifi/include/esp_wifi_he_types.h index 1d31f56131..b50889254d 100644 --- a/components/esp_wifi/include/esp_wifi_he_types.h +++ b/components/esp_wifi/include/esp_wifi_he_types.h @@ -412,6 +412,7 @@ typedef struct { uint8_t flow_id; /**< flow id */ } wifi_event_sta_twt_wakeup_t; +/** Argument structure for twt information */ typedef struct { bool btwt_id_in_use; /**< indicate whether the btwt id is in use or not */ uint16_t btwt_trigger : 1; /**< 1: a trigger-enabled TWT, 0: a non-trigger-enabled TWT */ From 888967bcb06b62e72618a5b420742cb98ddea249 Mon Sep 17 00:00:00 2001 From: liuning Date: Wed, 26 Jun 2024 21:21:51 +0800 Subject: [PATCH 6/8] feat(coex): support esp32c5mp coexist --- components/esp_coex/lib | 2 +- components/soc/esp32c5/include/soc/Kconfig.soc_caps.in | 4 ++++ components/soc/esp32c5/include/soc/soc_caps.h | 2 +- 3 files changed, 6 insertions(+), 2 deletions(-) diff --git a/components/esp_coex/lib b/components/esp_coex/lib index d99dfd1883..3880b604ad 160000 --- a/components/esp_coex/lib +++ b/components/esp_coex/lib @@ -1 +1 @@ -Subproject commit d99dfd1883a1468b8986362a1382a4f46e918b60 +Subproject commit 3880b604ad7529c91fb4173da479dd9713ce1f66 diff --git a/components/soc/esp32c5/include/soc/Kconfig.soc_caps.in b/components/soc/esp32c5/include/soc/Kconfig.soc_caps.in index 050d947a8d..4a29366e30 100644 --- a/components/soc/esp32c5/include/soc/Kconfig.soc_caps.in +++ b/components/soc/esp32c5/include/soc/Kconfig.soc_caps.in @@ -1107,6 +1107,10 @@ config SOC_UART_SUPPORT_FSM_TX_WAIT_SEND bool default y +config SOC_COEX_HW_PTI + bool + default y + config SOC_WIFI_LIGHT_SLEEP_CLK_WIDTH int default 12 diff --git a/components/soc/esp32c5/include/soc/soc_caps.h b/components/soc/esp32c5/include/soc/soc_caps.h index 8c2d5b77f5..48fa9c8cc5 100644 --- a/components/soc/esp32c5/include/soc/soc_caps.h +++ b/components/soc/esp32c5/include/soc/soc_caps.h @@ -513,7 +513,7 @@ #define SOC_UART_SUPPORT_FSM_TX_WAIT_SEND (1) /*-------------------------- COEXISTENCE HARDWARE PTI CAPS -------------------------------*/ -// #define SOC_COEX_HW_PTI (1) +#define SOC_COEX_HW_PTI (1) /*-------------------------- EXTERNAL COEXISTENCE CAPS -------------------------------------*/ // #define SOC_EXTERNAL_COEX_ADVANCE (1) /*!< HARDWARE ADVANCED EXTERNAL COEXISTENCE CAPS */ From a481b6c78d5d2389e159b9a25ce1596a1e6f2ab2 Mon Sep 17 00:00:00 2001 From: xuxiao Date: Thu, 18 Jul 2024 16:02:13 +0800 Subject: [PATCH 7/8] fix(wifi): fix code comments --- components/esp_wifi/include/esp_wifi.h | 42 +++++++++++-------- components/esp_wifi/include/esp_wifi_he.h | 5 +-- .../esp_wifi/include/esp_wifi_types_generic.h | 30 +++++++++---- .../mqtt/custom_outbox/sdkconfig.defaults | 1 + examples/provisioning/.build-test-rules.yml | 1 - examples/provisioning/wifi_prov_mgr/README.md | 4 +- tools/test_apps/system/.build-test-rules.yml | 2 +- .../system/clang_build_test/README.md | 4 +- 8 files changed, 54 insertions(+), 35 deletions(-) diff --git a/components/esp_wifi/include/esp_wifi.h b/components/esp_wifi/include/esp_wifi.h index a033b1a4bb..c5ce72e1fa 100644 --- a/components/esp_wifi/include/esp_wifi.h +++ b/components/esp_wifi/include/esp_wifi.h @@ -676,10 +676,12 @@ esp_err_t esp_wifi_get_ps(wifi_ps_type_t *type); /** * @brief Set protocol type of specified interface * The default protocol is (WIFI_PROTOCOL_11B|WIFI_PROTOCOL_11G|WIFI_PROTOCOL_11N). - * if CONFIG_SOC_WIFI_HE_SUPPORT, the default protocol is (WIFI_PROTOCOL_11B|WIFI_PROTOCOL_11G|WIFI_PROTOCOL_11N|WIFI_PROTOCOL_11AX). + * if CONFIG_SOC_WIFI_HE_SUPPORT and band is 2.4G, the default protocol is (WIFI_PROTOCOL_11B|WIFI_PROTOCOL_11G|WIFI_PROTOCOL_11N|WIFI_PROTOCOL_11AX). + * if CONFIG_SOC_WIFI_HE_SUPPORT and band is 5G, the default protocol is (WIFI_PROTOCOL_11A|WIFI_PROTOCOL_11N|WIFI_PROTOCOL_11AC|WIFI_PROTOCOL_11AX). * * @attention 2.4G: Support 802.11b or 802.11bg or 802.11bgn or 802.11bgnax or LR mode - * @attention only support set band 2.4G protocol + * 5G: Support 802.11a or 802.11an or 802.11anac or 802.11anacax + * @attention can not set wifi protocol under band 2.4G + 5G mode * * @param ifx interfaces * @param protocol_bitmap WiFi protocol bitmap @@ -695,6 +697,8 @@ esp_err_t esp_wifi_set_protocol(wifi_interface_t ifx, uint8_t protocol_bitmap); /** * @brief Get the current protocol bitmap of the specified interface * + * @attention can not get wifi protocol under band 2.4G + 5G mode + * * @param ifx interface * @param[out] protocol_bitmap store current WiFi protocol bitmap of interface ifx * @@ -712,6 +716,7 @@ esp_err_t esp_wifi_get_protocol(wifi_interface_t ifx, uint8_t *protocol_bitmap); * * @attention 1. API return false if try to configure an interface that is not enabled * @attention 2. WIFI_BW_HT40 is supported only when the interface support 11N + * @attention 3. can not get wifi bandwidth under band 2.4G + 5G mode * * @param ifx interface to be configured * @param bw bandwidth @@ -729,6 +734,7 @@ esp_err_t esp_wifi_set_bandwidth(wifi_interface_t ifx, wifi_bandwidth_t bw); * @brief Get the bandwidth of specified interface * * @attention 1. API return false if try to get a interface that is not enable + * @attention 2. can not get wifi bandwidth under band 2.4G + 5G mode * * @param ifx interface to be configured * @param[out] bw store bandwidth of interface ifx @@ -1625,6 +1631,18 @@ esp_err_t esp_wifi_set_band(wifi_band_t band); * - ESP_ERR_INVALID_ARG: invalid argument */ esp_err_t esp_wifi_get_band(wifi_band_t* band); + +/** + * @brief Get wifi current band. + * + * @param[in] band store the current band of wifi + * + * @return + * - ESP_OK: succeed + * - ESP_ERR_WIFI_NOT_INIT: WiFi is not initialized by esp_wifi_init + * - ESP_ERR_INVALID_ARG: invalid argument + */ +esp_err_t esp_wifi_get_current_band(wifi_band_t* band); #endif /* SOC_WIFI_HE_SUPPORT_5G */ #if CONFIG_ESP_COEX_POWER_MANAGEMENT @@ -1643,15 +1661,8 @@ esp_err_t esp_wifi_coex_pwr_configure(bool enabled); #endif /** - * @brief Set protocol type of specified interface and specified band - * The default protocol is (WIFI_PROTOCOL_11B|WIFI_PROTOCOL_11G|WIFI_PROTOCOL_11N). - * if CONFIG_SOC_WIFI_HE_SUPPORT and band is 2.4G, the default protocol is (WIFI_PROTOCOL_11B|WIFI_PROTOCOL_11G|WIFI_PROTOCOL_11N|WIFI_PROTOCOL_11AX). - * if CONFIG_SOC_WIFI_HE_SUPPORT and band is 5G, the default protocol is (WIFI_PROTOCOL_11A|WIFI_PROTOCOL_11N|WIFI_PROTOCOL_11AC|WIFI_PROTOCOL_11AX). + * @brief Set the supported WiFi protocols for the specified interface. * - * @attention 2.4G: Support 802.11b or 802.11bg or 802.11bgn or 802.11bgnax or LR mode - * 5G: Support 802.11a or 802.11an or 802.11anac or 802.11anacax - * - * @param band wifi band 2.4G / 5G * @param ifx interfaces * @param bitmap WiFi protocol bitmap * @@ -1661,12 +1672,11 @@ esp_err_t esp_wifi_coex_pwr_configure(bool enabled); * - ESP_ERR_WIFI_IF: invalid interface * - others: refer to error codes in esp_err.h */ -esp_err_t esp_wifi_band_set_protocol(wifi_band_t band, wifi_interface_t ifx, uint32_t bitmap); +esp_err_t esp_wifi_set_protocols(wifi_interface_t ifx, wifi_protocol_bitmap_t *bitmap); /** * @brief Get the current protocol bitmap of the specified interface and specified band * - * @param band wifi band 2.4G / 5G * @param ifx interface * @param[out] bitmap store current WiFi protocol bitmap of interface ifx * @@ -1677,7 +1687,7 @@ esp_err_t esp_wifi_band_set_protocol(wifi_band_t band, wifi_interface_t ifx, uin * - ESP_ERR_INVALID_ARG: invalid argument * - others: refer to error codes in esp_err.h */ -esp_err_t esp_wifi_band_get_protocol(wifi_band_t band, wifi_interface_t ifx, uint32_t *bitmap); +esp_err_t esp_wifi_get_protocols(wifi_interface_t ifx, wifi_protocol_bitmap_t *bitmap); /** * @brief Set the bandwidth of specified interface and specified band @@ -1685,7 +1695,6 @@ esp_err_t esp_wifi_band_get_protocol(wifi_band_t band, wifi_interface_t ifx, uin * @attention 1. API return false if try to configure an interface that is not enabled * @attention 2. WIFI_BW_HT40 is supported only when the interface support 11N * - * @param band wifi band 2.4G / 5G * @param ifx interface to be configured * @param bw bandwidth * @@ -1696,14 +1705,13 @@ esp_err_t esp_wifi_band_get_protocol(wifi_band_t band, wifi_interface_t ifx, uin * - ESP_ERR_INVALID_ARG: invalid argument * - others: refer to error codes in esp_err.h */ -esp_err_t esp_wifi_band_set_bandwidth(wifi_band_t band, wifi_interface_t ifx, wifi_bandwidth_t bw); +esp_err_t esp_wifi_set_bandwidths(wifi_interface_t ifx, wifi_band_bw_t* bw); /** * @brief Get the bandwidth of specified interface and specified band * * @attention 1. API return false if try to get a interface that is not enable * - * @param band wifi band 2.4G / 5G * @param ifx interface to be configured * @param[out] bw store bandwidth of interface ifx * @@ -1713,7 +1721,7 @@ esp_err_t esp_wifi_band_set_bandwidth(wifi_band_t band, wifi_interface_t ifx, wi * - ESP_ERR_WIFI_IF: invalid interface * - ESP_ERR_INVALID_ARG: invalid argument */ -esp_err_t esp_wifi_band_get_bandwidth(wifi_band_t band, wifi_interface_t ifx, wifi_bandwidth_t *bw); +esp_err_t esp_wifi_get_bandwidths(wifi_interface_t ifx, wifi_band_bw_t *bw); #ifdef __cplusplus } diff --git a/components/esp_wifi/include/esp_wifi_he.h b/components/esp_wifi/include/esp_wifi_he.h index d7a8a4079d..bea400ae6e 100644 --- a/components/esp_wifi/include/esp_wifi_he.h +++ b/components/esp_wifi/include/esp_wifi_he.h @@ -151,7 +151,7 @@ esp_err_t esp_wifi_enable_tx_statistics(esp_wifi_aci_t aci, bool tx_stats); * @attention Support at most 32 TWT agreements, otherwise ESP_ERR_WIFI_TWT_FULL will be returned. * Support sleep time up to (1 << 35) us. * - * @param[in,out] setup_config pointer to btwt setup config structure. + * @param[in,out] config pointer to btwt setup config structure. * * @return * - ESP_OK: succeed @@ -196,8 +196,7 @@ esp_err_t esp_wifi_sta_get_btwt_num(uint8_t *btwt_number); /** * @brief Get broadcast TWT information * - * @param[inout] btwt_number As input param, it stores max btwt number AP supported. - * As output param, it receives the actual btwt numbers AP supported. + * @param[in] btwt_number As input param, it stores max btwt number AP supported. * @param[in] btwt_info array to hold the btwt information supported by AP * * @return diff --git a/components/esp_wifi/include/esp_wifi_types_generic.h b/components/esp_wifi/include/esp_wifi_types_generic.h index b9069f409e..5b8e14403a 100644 --- a/components/esp_wifi/include/esp_wifi_types_generic.h +++ b/components/esp_wifi/include/esp_wifi_types_generic.h @@ -291,6 +291,13 @@ typedef enum { WIFI_PS_MAX_MODEM, /**< Maximum modem power saving. In this mode, interval to receive beacons is determined by the listen_interval parameter in wifi_sta_config_t */ } wifi_ps_type_t; +/** Argument structure for wifi band */ +typedef enum { + WIFI_BAND_2G = 1, /* Band is 2.4G */ + WIFI_BAND_5G = 2, /* Band is 5G */ + WIFI_BAND_2G_5G = 3, /* Band is 2,4G + 5G */ +} wifi_band_t; + #define WIFI_PROTOCOL_11B 0x1 #define WIFI_PROTOCOL_11G 0x2 #define WIFI_PROTOCOL_11N 0x4 @@ -299,6 +306,12 @@ typedef enum { #define WIFI_PROTOCOL_11AC 0x20 #define WIFI_PROTOCOL_11AX 0x40 +/** @brief Description of a WiFi protocol bitmap */ +typedef struct { + int ghz_2g_protocol; /**< Represents 2.4 GHz protocol bitmap */ + int ghz_5g_protocol; /**< Represents 5 GHz protocol bitmap */ +} wifi_protocol_bitmap_t; + typedef enum { WIFI_BW_HT20 = 1, /* Bandwidth is HT20 */ WIFI_BW20 = WIFI_BW_HT20, /* Bandwidth is 20 MHz */ @@ -309,6 +322,12 @@ typedef enum { WIFI_BW80_BW80 = 5, /* Bandwidth is 80+80 MHz */ } wifi_bandwidth_t; +/** @brief Description of a WiFi band bandwidths */ +typedef struct { + wifi_bandwidth_t ghz_2g; /* Represents 2.4 GHz bandwidth */ + wifi_bandwidth_t ghz_5g; /* Represents 5 GHz bandwidth */ +} wifi_band_bw_t; + /** Configuration structure for Protected Management Frame */ typedef struct { bool capable; /**< Deprecated variable. Device will always connect in PMF mode if other device also advertises PMF capability. */ @@ -335,7 +354,7 @@ typedef struct { uint8_t ssid[32]; /**< SSID of soft-AP. If ssid_len field is 0, this must be a Null terminated string. Otherwise, length is set according to ssid_len. */ uint8_t password[64]; /**< Password of soft-AP. */ uint8_t ssid_len; /**< Optional length of SSID field. */ - uint8_t channel; /**< Channel of soft-AP */ + uint8_t channel; /**< 2G Channel of soft-AP */ wifi_auth_mode_t authmode; /**< Auth mode of soft-AP. Do not support AUTH_WEP, AUTH_WAPI_PSK and AUTH_OWE in soft-AP mode. When the auth mode is set to WPA2_PSK, WPA2_WPA3_PSK or WPA3_PSK, the pairwise cipher will be overwritten with WIFI_CIPHER_TYPE_CCMP. */ uint8_t ssid_hidden; /**< Broadcast SSID or not, default 0, broadcast the SSID */ uint8_t max_connection; /**< Max number of stations allowed to connect in */ @@ -357,7 +376,7 @@ typedef struct { wifi_scan_method_t scan_method; /**< do all channel scan or fast scan */ bool bssid_set; /**< whether set MAC address of target AP or not. Generally, station_config.bssid_set needs to be 0; and it needs to be 1 only when users need to check the MAC address of the AP.*/ uint8_t bssid[6]; /**< MAC address of target AP*/ - uint8_t channel; /**< channel of target AP. Set to 1~13 to scan starting from the specified channel before connecting to AP. If the channel of AP is unknown, set it to 0.*/ + uint8_t channel; /**< channel of target AP. For 2G AP, set to 1~13 to scan starting from the specified channel before connecting to AP. For 5G AP, set to 36~177 (36, 40, 44 ... 177) to scan starting from the specified channel before connecting to AP. If the channel of AP is unknown, set it to 0.*/ uint16_t listen_interval; /**< Listen interval for ESP32 station to receive beacon when WIFI_PS_MAX_MODEM is set. Units: AP beacon intervals. Defaults to 3 if set to 0. */ wifi_sort_method_t sort_method; /**< sort the connect AP in the list by rssi or security mode */ wifi_scan_threshold_t threshold; /**< When scan_threshold is set, only APs which have an auth mode that is more secure than the selected auth mode and a signal stronger than the minimum RSSI will be used. */ @@ -1068,13 +1087,6 @@ typedef struct { uint16_t report_len; /**< Length of the report*/ } wifi_event_neighbor_report_t; -/** Argument structure for wifi band */ -typedef enum { - WIFI_BAND_2G = 1, /* Band is 2.4G */ - WIFI_BAND_5G = 2, /* Band is 5G */ - WIFI_BAND_2G_5G = 3, /* Band is 2,4G + 5G */ -} wifi_band_t; - #ifdef __cplusplus } #endif diff --git a/examples/protocols/mqtt/custom_outbox/sdkconfig.defaults b/examples/protocols/mqtt/custom_outbox/sdkconfig.defaults index 385da31baf..11f90ceacf 100644 --- a/examples/protocols/mqtt/custom_outbox/sdkconfig.defaults +++ b/examples/protocols/mqtt/custom_outbox/sdkconfig.defaults @@ -1,2 +1,3 @@ CONFIG_MQTT_CUSTOM_OUTBOX=y CONFIG_COMPILER_CXX_EXCEPTIONS=y +CONFIG_COMPILER_OPTIMIZATION_SIZE=y diff --git a/examples/provisioning/.build-test-rules.yml b/examples/provisioning/.build-test-rules.yml index 5c3aa40a22..550cd82588 100644 --- a/examples/provisioning/.build-test-rules.yml +++ b/examples/provisioning/.build-test-rules.yml @@ -3,7 +3,6 @@ examples/provisioning/wifi_prov_mgr: disable: - if: SOC_WIFI_SUPPORTED != 1 - - if: SOC_BT_SUPPORTED != 1 disable_test: - if: IDF_TARGET != "esp32" temporary: true diff --git a/examples/provisioning/wifi_prov_mgr/README.md b/examples/provisioning/wifi_prov_mgr/README.md index 56ac5b6cbd..7648e58670 100644 --- a/examples/provisioning/wifi_prov_mgr/README.md +++ b/examples/provisioning/wifi_prov_mgr/README.md @@ -1,5 +1,5 @@ -| Supported Targets | ESP32 | ESP32-C2 | ESP32-C3 | ESP32-C6 | ESP32-S3 | -| ----------------- | ----- | -------- | -------- | -------- | -------- | +| Supported Targets | ESP32 | ESP32-C2 | ESP32-C3 | ESP32-C5 | ESP32-C6 | ESP32-S2 | ESP32-S3 | +| ----------------- | ----- | -------- | -------- | -------- | -------- | -------- | -------- | # Wi-Fi Provisioning Manager Example diff --git a/tools/test_apps/system/.build-test-rules.yml b/tools/test_apps/system/.build-test-rules.yml index 83cb588244..b11db03fab 100644 --- a/tools/test_apps/system/.build-test-rules.yml +++ b/tools/test_apps/system/.build-test-rules.yml @@ -13,7 +13,7 @@ tools/test_apps/system/build_test: tools/test_apps/system/clang_build_test: enable: - - if: IDF_TARGET in ["esp32", "esp32s2", "esp32s3", "esp32c2", "esp32c3", "esp32c6", "esp32h2", "esp32p4"] + - if: IDF_TARGET in ["esp32", "esp32s2", "esp32s3", "esp32c2", "esp32c3", "esp32c5", "esp32c6", "esp32h2", "esp32p4"] temporary: true reason: the other targets are not supported yet diff --git a/tools/test_apps/system/clang_build_test/README.md b/tools/test_apps/system/clang_build_test/README.md index 5b165ee322..c410436a3a 100644 --- a/tools/test_apps/system/clang_build_test/README.md +++ b/tools/test_apps/system/clang_build_test/README.md @@ -1,4 +1,4 @@ -| Supported Targets | ESP32 | ESP32-C2 | ESP32-C3 | ESP32-C6 | ESP32-H2 | ESP32-P4 | ESP32-S2 | ESP32-S3 | -| ----------------- | ----- | -------- | -------- | -------- | -------- | -------- | -------- | -------- | +| Supported Targets | ESP32 | ESP32-C2 | ESP32-C3 | ESP32-C5 | ESP32-C6 | ESP32-H2 | ESP32-P4 | ESP32-S2 | ESP32-S3 | +| ----------------- | ----- | -------- | -------- | -------- | -------- | -------- | -------- | -------- | -------- | This project is for testing if the application can be built with Clang toolchain. From a397d3116276300a2cff51f804e3359b7449eb1a Mon Sep 17 00:00:00 2001 From: xuxiao Date: Mon, 22 Jul 2024 12:08:50 +0800 Subject: [PATCH 8/8] fix(wifi): add comments for the new API and fix code comments --- components/esp_wifi/include/esp_wifi.h | 127 ++++++++++++------ components/esp_wifi/include/esp_wifi_he.h | 10 +- .../esp_wifi/include/esp_wifi_he_types.h | 24 ++-- .../esp_wifi/include/esp_wifi_types_generic.h | 77 ++++++----- components/esp_wifi/lib | 2 +- .../esp_wifi/test_apps/.build-test-rules.yml | 5 +- .../wifi_connect/pytest_wifi_connect.py | 1 - .../wifi_function/pytest_wifi_function.py | 1 + .../esp32c5/include/soc/Kconfig.soc_caps.in | 4 - components/soc/esp32c5/include/soc/soc_caps.h | 3 +- .../test_apps/.build-test-rules.yml | 3 - .../test_apps/pytest_wpa_supplicant_ut.py | 2 +- examples/bluetooth/blufi/README.md | 8 +- .../blufi/sdkconfig.defaults.esp32c5 | 18 +++ .../nimble/bleprph_wifi_coex/README.md | 4 +- examples/wifi/.build-test-rules.yml | 4 - examples/wifi/itwt/main/itwt_main.c | 2 +- .../wifi/power_save/pytest_wifi_power_save.py | 2 +- .../mock_build_test/main/mock_build_test.c | 2 +- .../peripherals/.build-test-rules.yml | 3 - .../peripherals/i2c_wifi/pytest_i2c_wifi.py | 1 + tools/test_apps/phy/.build-test-rules.yml | 2 +- 22 files changed, 180 insertions(+), 125 deletions(-) create mode 100644 examples/bluetooth/blufi/sdkconfig.defaults.esp32c5 diff --git a/components/esp_wifi/include/esp_wifi.h b/components/esp_wifi/include/esp_wifi.h index c5ce72e1fa..2651ddbfb5 100644 --- a/components/esp_wifi/include/esp_wifi.h +++ b/components/esp_wifi/include/esp_wifi.h @@ -397,7 +397,7 @@ esp_err_t esp_wifi_get_mode(wifi_mode_t *mode); * @return * - ESP_OK: succeed * - ESP_ERR_WIFI_NOT_INIT: WiFi is not initialized by esp_wifi_init - * - ESP_ERR_INVALID_ARG: It doesn't normally happen, the function called inside the API was passed invalid argument, user should check if the wifi related config is correct + * - ESP_ERR_INVALID_ARG: It doesn't normally happen, the function called inside the API was passed invalid argument, user should check if the WiFi related config is correct * - ESP_ERR_NO_MEM: out of memory * - ESP_ERR_WIFI_CONN: WiFi internal error, station or soft-AP control block wrong * - ESP_FAIL: other WiFi internal errors @@ -511,7 +511,7 @@ esp_err_t esp_wifi_deauth_sta(uint16_t aid); * - ESP_ERR_WIFI_NOT_INIT: WiFi is not initialized by esp_wifi_init * - ESP_ERR_WIFI_NOT_STARTED: WiFi was not started by esp_wifi_start * - ESP_ERR_WIFI_TIMEOUT: blocking scan is timeout - * - ESP_ERR_WIFI_STATE: wifi still connecting when invoke esp_wifi_scan_start + * - ESP_ERR_WIFI_STATE: WiFi still connecting when invoke esp_wifi_scan_start * - others: refer to error code in esp_err.h */ esp_err_t esp_wifi_scan_start(const wifi_scan_config_t *config, bool block); @@ -630,7 +630,7 @@ esp_err_t esp_wifi_scan_get_ap_record(wifi_ap_record_t *ap_record); * - ESP_ERR_WIFI_NOT_INIT: WiFi is not initialized by esp_wifi_init * - ESP_ERR_WIFI_NOT_STARTED: WiFi is not started by esp_wifi_start * - ESP_ERR_WIFI_MODE: WiFi mode is wrong - * - ESP_ERR_INVALID_ARG: It doesn't normally happen, the function called inside the API was passed invalid argument, user should check if the wifi related config is correct + * - ESP_ERR_INVALID_ARG: It doesn't normally happen, the function called inside the API was passed invalid argument, user should check if the WiFi related config is correct */ esp_err_t esp_wifi_clear_ap_list(void); @@ -676,20 +676,23 @@ esp_err_t esp_wifi_get_ps(wifi_ps_type_t *type); /** * @brief Set protocol type of specified interface * The default protocol is (WIFI_PROTOCOL_11B|WIFI_PROTOCOL_11G|WIFI_PROTOCOL_11N). - * if CONFIG_SOC_WIFI_HE_SUPPORT and band is 2.4G, the default protocol is (WIFI_PROTOCOL_11B|WIFI_PROTOCOL_11G|WIFI_PROTOCOL_11N|WIFI_PROTOCOL_11AX). - * if CONFIG_SOC_WIFI_HE_SUPPORT and band is 5G, the default protocol is (WIFI_PROTOCOL_11A|WIFI_PROTOCOL_11N|WIFI_PROTOCOL_11AC|WIFI_PROTOCOL_11AX). + * if CONFIG_SOC_WIFI_HE_SUPPORT and band mode is 2.4G, the default protocol is (WIFI_PROTOCOL_11B|WIFI_PROTOCOL_11G|WIFI_PROTOCOL_11N|WIFI_PROTOCOL_11AX). + * if CONFIG_SOC_WIFI_HE_SUPPORT_5G and band mode is 5G, the default protocol is (WIFI_PROTOCOL_11A|WIFI_PROTOCOL_11N|WIFI_PROTOCOL_11AC|WIFI_PROTOCOL_11AX). * - * @attention 2.4G: Support 802.11b or 802.11bg or 802.11bgn or 802.11bgnax or LR mode - * 5G: Support 802.11a or 802.11an or 802.11anac or 802.11anacax - * @attention can not set wifi protocol under band 2.4G + 5G mode + * @attention 1. When WiFi band mode is 2.4G only, support 802.11b or 802.11bg or 802.11bgn or 802.11bgnax or LR mode + * @attention 2. When WiFi band mode is 5G only, support 802.11a or 802.11an or 802.11anac or 802.11anacax + * @attention 3. Can not set WiFi protocol under band mode 2.4G + 5G (WIFI_BAND_MODE_AUTO), you can use esp_wifi_set_protocols instead + * @attention 4. API return ESP_ERR_NOT_SUPPORTED if the band mode is set to 2.4G + 5G (WIFI_BAND_MODE_AUTO) * - * @param ifx interfaces + * @param ifx interface * @param protocol_bitmap WiFi protocol bitmap * * @return * - ESP_OK: succeed * - ESP_ERR_WIFI_NOT_INIT: WiFi is not initialized by esp_wifi_init * - ESP_ERR_WIFI_IF: invalid interface + * - ESP_ERR_INVALID_ARG: invalid argument + * - ESP_ERR_NOT_SUPPORTED: This API is not supported when the band mode is set to 2.4G + 5G (WIFI_BAND_MODE_AUTO) * - others: refer to error codes in esp_err.h */ esp_err_t esp_wifi_set_protocol(wifi_interface_t ifx, uint8_t protocol_bitmap); @@ -697,7 +700,10 @@ esp_err_t esp_wifi_set_protocol(wifi_interface_t ifx, uint8_t protocol_bitmap); /** * @brief Get the current protocol bitmap of the specified interface * - * @attention can not get wifi protocol under band 2.4G + 5G mode + * @attention 1. When WiFi band mode is 2.4G only, it will return the protocol supported in the 2.4G band + * @attention 2. When WiFi band mode is 5G only, it will return the protocol supported in the 5G band + * @attention 3. Can not get WiFi protocol under band mode 2.4G + 5G (WIFI_BAND_MODE_AUTO), you can use esp_wifi_get_protocols instead + * @attention 4. API return ESP_ERR_NOT_SUPPORTED if the band mode is set to 2.4G + 5G (WIFI_BAND_MODE_AUTO) * * @param ifx interface * @param[out] protocol_bitmap store current WiFi protocol bitmap of interface ifx @@ -707,6 +713,7 @@ esp_err_t esp_wifi_set_protocol(wifi_interface_t ifx, uint8_t protocol_bitmap); * - ESP_ERR_WIFI_NOT_INIT: WiFi is not initialized by esp_wifi_init * - ESP_ERR_WIFI_IF: invalid interface * - ESP_ERR_INVALID_ARG: invalid argument + * - ESP_ERR_NOT_SUPPORTED: This API is not supported when the band mode is set to 2.4G + 5G (WIFI_BAND_MODE_AUTO) * - others: refer to error codes in esp_err.h */ esp_err_t esp_wifi_get_protocol(wifi_interface_t ifx, uint8_t *protocol_bitmap); @@ -714,9 +721,10 @@ esp_err_t esp_wifi_get_protocol(wifi_interface_t ifx, uint8_t *protocol_bitmap); /** * @brief Set the bandwidth of specified interface * - * @attention 1. API return false if try to configure an interface that is not enabled - * @attention 2. WIFI_BW_HT40 is supported only when the interface support 11N - * @attention 3. can not get wifi bandwidth under band 2.4G + 5G mode + * @attention 1. WIFI_BW_HT40 is supported only when the interface support 11N + * @attention 2. When the interface supports 11AX/11AC, it only supports setting WIFI_BW_HT20. + * @attention 3. Can not set WiFi bandwidth under band mode 2.4G + 5G (WIFI_BAND_MODE_AUTO), you can use esp_wifi_set_bandwidths instead + * @attention 4. API return ESP_ERR_NOT_SUPPORTED if the band mode is set to 2.4G + 5G (WIFI_BAND_MODE_AUTO) * * @param ifx interface to be configured * @param bw bandwidth @@ -726,6 +734,7 @@ esp_err_t esp_wifi_get_protocol(wifi_interface_t ifx, uint8_t *protocol_bitmap); * - ESP_ERR_WIFI_NOT_INIT: WiFi is not initialized by esp_wifi_init * - ESP_ERR_WIFI_IF: invalid interface * - ESP_ERR_INVALID_ARG: invalid argument + * - ESP_ERR_NOT_SUPPORTED: This API is not supported when the band mode is set to 2.4G + 5G (WIFI_BAND_MODE_AUTO) * - others: refer to error codes in esp_err.h */ esp_err_t esp_wifi_set_bandwidth(wifi_interface_t ifx, wifi_bandwidth_t bw); @@ -733,8 +742,8 @@ esp_err_t esp_wifi_set_bandwidth(wifi_interface_t ifx, wifi_bandwidth_t bw); /** * @brief Get the bandwidth of specified interface * - * @attention 1. API return false if try to get a interface that is not enable - * @attention 2. can not get wifi bandwidth under band 2.4G + 5G mode + * @attention 1. Can not get WiFi bandwidth under band mode 2.4G + 5G (WIFI_BAND_MODE_AUTO), you can use esp_wifi_get_bandwidths instead + * @attention 2. API return ESP_ERR_NOT_SUPPORTED if the band mode is set to 2.4G + 5G (WIFI_BAND_MODE_AUTO) * * @param ifx interface to be configured * @param[out] bw store bandwidth of interface ifx @@ -744,6 +753,7 @@ esp_err_t esp_wifi_set_bandwidth(wifi_interface_t ifx, wifi_bandwidth_t bw); * - ESP_ERR_WIFI_NOT_INIT: WiFi is not initialized by esp_wifi_init * - ESP_ERR_WIFI_IF: invalid interface * - ESP_ERR_INVALID_ARG: invalid argument + * - ESP_ERR_NOT_SUPPORTED: This API is not supported when the band mode is set to 2.4G + 5G (WIFI_BAND_MODE_AUTO) */ esp_err_t esp_wifi_get_bandwidth(wifi_interface_t ifx, wifi_bandwidth_t *bw); @@ -754,8 +764,8 @@ esp_err_t esp_wifi_get_bandwidth(wifi_interface_t ifx, wifi_bandwidth_t *bw); * @attention 2. When device is in STA mode, this API should not be called when STA is scanning or connecting to an external AP * @attention 3. When device is in softAP mode, this API should not be called when softAP has connected to external STAs * @attention 4. When device is in STA+softAP mode, this API should not be called when in the scenarios described above - * @attention 5. The channel info set by this API will not be stored in NVS. So If you want to remember the channel used before wifi stop, - * you need to call this API again after wifi start, or you can call `esp_wifi_set_config()` to store the channel info in NVS. + * @attention 5. The channel info set by this API will not be stored in NVS. So If you want to remember the channel used before WiFi stop, + * you need to call this API again after WiFi start, or you can call `esp_wifi_set_config()` to store the channel info in NVS. * * @param primary for HT20, primary is the channel number, for HT40, primary is the primary channel * @param second for HT20, second is ignored, for HT40, second is the second channel @@ -1094,7 +1104,7 @@ esp_err_t esp_wifi_set_vendor_ie_cb(esp_vendor_ie_cb_t cb, void *ctx); /** * @brief Set maximum transmitting power after WiFi start. * - * @attention 1. Maximum power before wifi startup is limited by PHY init data bin. + * @attention 1. Maximum power before WiFi startup is limited by PHY init data bin. * @attention 2. The value set by this API will be mapped to the max_tx_power of the structure wifi_country_t variable. * @attention 3. Mapping Table {Power, max_tx_power} = {{8, 2}, {20, 5}, {28, 7}, {34, 8}, {44, 11}, * {52, 13}, {56, 14}, {60, 15}, {66, 16}, {72, 18}, {80, 20}}. @@ -1607,11 +1617,16 @@ esp_err_t esp_wifi_set_dynamic_cs(bool enabled); */ esp_err_t esp_wifi_sta_get_rssi(int *rssi); -#if SOC_WIFI_HE_SUPPORT_5G /** - * @brief Set wifi band. + * @brief Set WiFi current band. * - * @param[in] band wifi band 2.4G / 5G / 2.4G + 5G + * @attention 1. This API is only operational when the WiFi band mode is configured to 2.4G + 5G (WIFI_BAND_MODE_AUTO) + * @attention 2. When device is in STA mode, this API should not be called when STA is scanning or connecting to an external AP + * @attention 3. When device is in softAP mode, this API should not be called when softAP has connected to external STAs + * @attention 4. When device is in STA+softAP mode, this API should not be called when in the scenarios described above + * @attention 5. It is recommended not to use this API. If you want to change the current band, you can use esp_wifi_set_channel instead. + * + * @param[in] band WiFi band 2.4G / 5G * * @return * - ESP_OK: succeed @@ -1621,9 +1636,9 @@ esp_err_t esp_wifi_sta_get_rssi(int *rssi); esp_err_t esp_wifi_set_band(wifi_band_t band); /** - * @brief Get wifi band. + * @brief Get WiFi current band. * - * @param[in] band store band of wifi + * @param[in] band store current band of WiFi * * @return * - ESP_OK: succeed @@ -1633,17 +1648,37 @@ esp_err_t esp_wifi_set_band(wifi_band_t band); esp_err_t esp_wifi_get_band(wifi_band_t* band); /** - * @brief Get wifi current band. + * @brief Set WiFi band mode. * - * @param[in] band store the current band of wifi + * @attention 1. When the WiFi band mode is set to 2.4G only, it operates exclusively on the 2.4GHz channels. + * @attention 2. When the WiFi band mode is set to 5G only, it operates exclusively on the 5GHz channels. + * @attention 3. When the WiFi band mode is set to 2.4G + 5G (WIFI_BAND_MODE_AUTO), it can operate on both the 2.4GHz and 5GHz channels. + * @attention 4. WiFi band mode can be set to 5G only or 2.4G + 5G (WIFI_BAND_MODE_AUTO) if CONFIG_SOC_WIFI_HE_SUPPORT_5G is supported. + * @attention 5. If CONFIG_SOC_WIFI_HE_SUPPORT_5G is not supported, the API will return ESP_ERR_INVALID_ARG when the band mode is set to either 5G only or 2.4G + 5G (WIFI_BAND_MODE_AUTO). + * @attention 6. When a WiFi band mode change triggers a band change, if no channel is set for the current band, a default channel will be assigned: channel 1 for 2.4G band and channel 36 for 5G band. + * + * @param[in] band_mode store the band mode of WiFi + * + * @return + * - ESP_OK: succeed + * - ESP_ERR_WIFI_NOT_INIT: WiFi is not initialized by esp_wifi_init + * - ESP_ERR_INVALID_ARG: invalid argument + * + */ +esp_err_t esp_wifi_set_band_mode(wifi_band_mode_t band_mode); + +/** + * @brief get WiFi band mode. + * + * @param[in] band_mode store the band mode of WiFi * * @return * - ESP_OK: succeed * - ESP_ERR_WIFI_NOT_INIT: WiFi is not initialized by esp_wifi_init * - ESP_ERR_INVALID_ARG: invalid argument */ -esp_err_t esp_wifi_get_current_band(wifi_band_t* band); -#endif /* SOC_WIFI_HE_SUPPORT_5G */ + +esp_err_t esp_wifi_get_band_mode(wifi_band_mode_t* band_mode); #if CONFIG_ESP_COEX_POWER_MANAGEMENT /** @@ -1663,8 +1698,12 @@ esp_err_t esp_wifi_coex_pwr_configure(bool enabled); /** * @brief Set the supported WiFi protocols for the specified interface. * - * @param ifx interfaces - * @param bitmap WiFi protocol bitmap + * @attention 1. When the WiFi band mode is set to 2.4G only, it will not set 5G protocol + * @attention 2. When the WiFi band mode is set to 5G only, it will not set 2.4G protocol + * @attention 3. This API supports setting the maximum protocol. For example, if the 2.4G protocol is set to 802.11n, it will automatically configure to 802.11b/g/n. + * + * @param ifx interface + * @param protocols WiFi protocols include 2.4G protocol and 5G protocol * * @return * - ESP_OK: succeed @@ -1672,13 +1711,17 @@ esp_err_t esp_wifi_coex_pwr_configure(bool enabled); * - ESP_ERR_WIFI_IF: invalid interface * - others: refer to error codes in esp_err.h */ -esp_err_t esp_wifi_set_protocols(wifi_interface_t ifx, wifi_protocol_bitmap_t *bitmap); +esp_err_t esp_wifi_set_protocols(wifi_interface_t ifx, wifi_protocols_t *protocols); /** - * @brief Get the current protocol bitmap of the specified interface and specified band + * @brief Get the current protocol of the specified interface and specified band + * + * @attention 1. The 5G protocol can only be read when CONFIG_SOC_WIFI_HE_SUPPORT_5G is enabled. + * @attention 2. When the WiFi band mode is set to 2.4G only, it will not get 5G protocol + * @attention 3. When the WiFi band mode is set to 5G only, it will not get 2.4G protocol * * @param ifx interface - * @param[out] bitmap store current WiFi protocol bitmap of interface ifx + * @param[out] protocols store current WiFi protocols of interface ifx * * @return * - ESP_OK: succeed @@ -1687,16 +1730,18 @@ esp_err_t esp_wifi_set_protocols(wifi_interface_t ifx, wifi_protocol_bitmap_t *b * - ESP_ERR_INVALID_ARG: invalid argument * - others: refer to error codes in esp_err.h */ -esp_err_t esp_wifi_get_protocols(wifi_interface_t ifx, wifi_protocol_bitmap_t *bitmap); +esp_err_t esp_wifi_get_protocols(wifi_interface_t ifx, wifi_protocols_t *protocols); /** * @brief Set the bandwidth of specified interface and specified band * - * @attention 1. API return false if try to configure an interface that is not enabled - * @attention 2. WIFI_BW_HT40 is supported only when the interface support 11N + * @attention 1. WIFI_BW_HT40 is supported only when the interface support 11N + * @attention 2. When the interface supports 11AX/11AC, it only supports setting WIFI_BW_HT20. + * @attention 3. When the WiFi band mode is set to 2.4G only, it will not set 5G bandwidth + * @attention 4. When the WiFi band mode is set to 5G only, it will not set 2.4G bandwidth * * @param ifx interface to be configured - * @param bw bandwidth + * @param bw WiFi bandwidths include 2.4G bandwidth and 5G bandwidth * * @return * - ESP_OK: succeed @@ -1705,15 +1750,17 @@ esp_err_t esp_wifi_get_protocols(wifi_interface_t ifx, wifi_protocol_bitmap_t *b * - ESP_ERR_INVALID_ARG: invalid argument * - others: refer to error codes in esp_err.h */ -esp_err_t esp_wifi_set_bandwidths(wifi_interface_t ifx, wifi_band_bw_t* bw); +esp_err_t esp_wifi_set_bandwidths(wifi_interface_t ifx, wifi_bandwidths_t* bw); /** * @brief Get the bandwidth of specified interface and specified band * - * @attention 1. API return false if try to get a interface that is not enable + * @attention 1. The 5G bandwidth can only be read when CONFIG_SOC_WIFI_HE_SUPPORT_5G is enabled. + * @attention 2. When the WiFi band mode is set to 2.4G only, it will not get 5G bandwidth + * @attention 3. When the WiFi band mode is set to 5G only, it will not get 2.4G bandwidth * * @param ifx interface to be configured - * @param[out] bw store bandwidth of interface ifx + * @param[out] bw store bandwidths of interface ifx * * @return * - ESP_OK: succeed @@ -1721,7 +1768,7 @@ esp_err_t esp_wifi_set_bandwidths(wifi_interface_t ifx, wifi_band_bw_t* bw); * - ESP_ERR_WIFI_IF: invalid interface * - ESP_ERR_INVALID_ARG: invalid argument */ -esp_err_t esp_wifi_get_bandwidths(wifi_interface_t ifx, wifi_band_bw_t *bw); +esp_err_t esp_wifi_get_bandwidths(wifi_interface_t ifx, wifi_bandwidths_t *bw); #ifdef __cplusplus } diff --git a/components/esp_wifi/include/esp_wifi_he.h b/components/esp_wifi/include/esp_wifi_he.h index bea400ae6e..57bf819afd 100644 --- a/components/esp_wifi/include/esp_wifi_he.h +++ b/components/esp_wifi/include/esp_wifi_he.h @@ -35,7 +35,7 @@ extern "C" { * - ESP_ERR_WIFI_TWT_FULL: no available flow id * - ESP_ERR_INVALID_ARG: invalid argument */ -esp_err_t esp_wifi_sta_itwt_setup(wifi_twt_setup_config_t *setup_config); +esp_err_t esp_wifi_sta_itwt_setup(wifi_itwt_setup_config_t *setup_config); /** * @brief Tear down individual TWT agreements @@ -181,7 +181,7 @@ esp_err_t esp_wifi_sta_btwt_setup(wifi_btwt_setup_config_t *config); esp_err_t esp_wifi_sta_btwt_teardown(uint8_t btwt_id); /** - * @brief Get number of btwts supported by the connected AP + * @brief Get number of broadcast TWTs supported by the connected AP * * @param[out] btwt_number store number of btwts supported by the connected AP * @@ -197,7 +197,7 @@ esp_err_t esp_wifi_sta_get_btwt_num(uint8_t *btwt_number); * @brief Get broadcast TWT information * * @param[in] btwt_number As input param, it stores max btwt number AP supported. - * @param[in] btwt_info array to hold the btwt information supported by AP + * @param[in] btwt_info array to hold the btwt information supported by AP, and the array size must be at least as large as the BTWT number. * * @return * - ESP_OK: succeed @@ -207,9 +207,9 @@ esp_err_t esp_wifi_sta_get_btwt_num(uint8_t *btwt_number); esp_err_t esp_wifi_sta_btwt_get_info(uint8_t btwt_number, esp_wifi_btwt_info_t *btwt_info); /** - * @brief Set wifi TWT config + * @brief Set WiFi TWT config * - * @param[in] config pointer to the wifi TWT configure structure. + * @param[in] config pointer to the WiFi TWT configure structure. * * @return * - ESP_OK: succeed diff --git a/components/esp_wifi/include/esp_wifi_he_types.h b/components/esp_wifi/include/esp_wifi_he_types.h index b50889254d..f6b9fcc20e 100644 --- a/components/esp_wifi/include/esp_wifi_he_types.h +++ b/components/esp_wifi/include/esp_wifi_he_types.h @@ -120,28 +120,30 @@ typedef struct { uint8_t btwt_id; /**< When set up an broadcast TWT agreement, the broadcast twt id will be assigned by AP after a successful agreement setup. broadcast twt id could be specified to a value in the range of [1, 31], but it might be change by AP in the response. When change TWT parameters of the existing TWT agreement, broadcast twt id should be an existing one. The value range is [1, 31].*/ - uint16_t timeout_time_ms; /**< Timeout times of receving setup action frame response, default 5s*/ + uint16_t timeout_time_ms; /**< Timeout times of receiving setup action frame response, default 5s*/ } wifi_btwt_setup_config_t; /** - * @brief TWT setup config + * @brief Individual TWT setup config */ typedef struct { wifi_twt_setup_cmds_t setup_cmd; /**< Indicates the type of TWT command */ - uint16_t trigger : 1; /**< 1: a trigger-enabled TWT, 0: a non-trigger-enabled TWT */ - uint16_t flow_type : 1; /**< 0: an announced TWT, 1: an unannounced TWT */ + uint16_t trigger : 1; /**< 1: a trigger-enabled individual TWT, 0: a non-trigger-enabled individual TWT */ + uint16_t flow_type : 1; /**< 0: an announced individual TWT, 1: an unannounced individual TWT */ uint16_t flow_id : 3; /**< When set up an individual TWT agreement, the flow id will be assigned by AP after a successful agreement setup. flow_id could be specified to a value in the range of [0, 7], but it might be changed by AP in the response. When change TWT parameters of the existing TWT agreement, flow_id should be an existing one. The value range is [0, 7]. */ - uint16_t wake_invl_expn : 5; /**< TWT Wake Interval Exponent. The value range is [0, 31]. */ - uint16_t wake_duration_unit : 1; /**< TWT Wake duration unit, 0: 256us 1: TU (TU = 1024us)*/ + uint16_t wake_invl_expn : 5; /**< Individual TWT Wake Interval Exponent. The value range is [0, 31]. */ + uint16_t wake_duration_unit : 1; /**< Individual TWT Wake duration unit, 0: 256us 1: TU (TU = 1024us)*/ uint16_t reserved : 5; /**< bit: 11.15 reserved */ - uint8_t min_wake_dura; /**< Nominal Minimum Wake Duration, indicates the minimum amount of time, in unit of 256 us, that the TWT requesting STA expects that it needs to be awake. The value range is [1, 255]. */ - uint16_t wake_invl_mant; /**< TWT Wake Interval Mantissa. The value range is [1, 65535]. */ - uint16_t twt_id; /**< TWT connection id, the value range is [0, 32767]. */ + uint8_t min_wake_dura; /**< Nominal Minimum Wake Duration, indicates the minimum amount of time, in unit of 256 us, that the individual TWT requesting STA expects that it needs to be awake. The value range is [1, 255]. */ + uint16_t wake_invl_mant; /**< Individual TWT Wake Interval Mantissa. The value range is [1, 65535]. */ + uint16_t twt_id; /**< Individual TWT connection id, the value range is [0, 32767]. */ uint16_t timeout_time_ms; /**< Timeout times of receiving setup action frame response, default 5s*/ } wifi_twt_setup_config_t; +typedef wifi_twt_setup_config_t wifi_itwt_setup_config_t; + /** * @brief HE SU GI and LTF types */ @@ -313,14 +315,14 @@ typedef enum { BTWT_SETUP_TXFAIL, /**< station sends btwt setup request frame fail */ BTWT_SETUP_SUCCESS, /**< station receives btwt setup response frame and setup btwt sucessfully */ BTWT_SETUP_TIMEOUT, /**< timeout of receiving btwt setup response frame */ - BTWT_SETUP_FULL, /**< indicate there is no avaliable btwt id */ + BTWT_SETUP_FULL, /**< indicate there is no available btwt id */ BTWT_SETUP_INVALID_ARG, /**< indicate invalid argument to setup btwt */ BTWT_SETUP_INTERNAL_ERR, /**< indicate internal error to setup btwt */ } wifi_btwt_setup_status_t; /** Argument structure for WIFI_EVENT_TWT_SET_UP event */ typedef struct { - wifi_twt_setup_config_t config; /**< itwt setup config, this value is determined by the AP */ + wifi_itwt_setup_config_t config; /**< itwt setup config, this value is determined by the AP */ esp_err_t status; /**< itwt setup status, 1: indicate setup success, others : indicate setup fail */ uint8_t reason; /**< itwt setup frame tx fail reason */ uint64_t target_wake_time; /**< TWT SP start time */ diff --git a/components/esp_wifi/include/esp_wifi_types_generic.h b/components/esp_wifi/include/esp_wifi_types_generic.h index 5b8e14403a..773c5b374c 100644 --- a/components/esp_wifi/include/esp_wifi_types_generic.h +++ b/components/esp_wifi/include/esp_wifi_types_generic.h @@ -291,13 +291,19 @@ typedef enum { WIFI_PS_MAX_MODEM, /**< Maximum modem power saving. In this mode, interval to receive beacons is determined by the listen_interval parameter in wifi_sta_config_t */ } wifi_ps_type_t; -/** Argument structure for wifi band */ +/** Argument structure for WiFi band */ typedef enum { WIFI_BAND_2G = 1, /* Band is 2.4G */ WIFI_BAND_5G = 2, /* Band is 5G */ - WIFI_BAND_2G_5G = 3, /* Band is 2,4G + 5G */ } wifi_band_t; +/** Argument structure for WiFi band mode */ +typedef enum { + WIFI_BAND_MODE_2G_ONLY = 1, /* WiFi band mode is 2.4G only */ + WIFI_BAND_MODE_5G_ONLY = 2, /* WiFi band mode is 5G only */ + WIFI_BAND_MODE_AUTO = 3, /* WiFi band mode is 2.4G + 5G */ +} wifi_band_mode_t; + #define WIFI_PROTOCOL_11B 0x1 #define WIFI_PROTOCOL_11G 0x2 #define WIFI_PROTOCOL_11N 0x4 @@ -306,11 +312,11 @@ typedef enum { #define WIFI_PROTOCOL_11AC 0x20 #define WIFI_PROTOCOL_11AX 0x40 -/** @brief Description of a WiFi protocol bitmap */ +/** @brief Description of a WiFi protocols */ typedef struct { - int ghz_2g_protocol; /**< Represents 2.4 GHz protocol bitmap */ - int ghz_5g_protocol; /**< Represents 5 GHz protocol bitmap */ -} wifi_protocol_bitmap_t; + uint16_t ghz_2g; /**< Represents 2.4 GHz protocol, support 802.11b or 802.11g or 802.11n or 802.11ax or LR mode */ + uint16_t ghz_5g; /**< Represents 5 GHz protocol, support 802.11a or 802.11n or 802.11ac or 802.11ax */ +} wifi_protocols_t; typedef enum { WIFI_BW_HT20 = 1, /* Bandwidth is HT20 */ @@ -326,7 +332,7 @@ typedef enum { typedef struct { wifi_bandwidth_t ghz_2g; /* Represents 2.4 GHz bandwidth */ wifi_bandwidth_t ghz_5g; /* Represents 5 GHz bandwidth */ -} wifi_band_bw_t; +} wifi_bandwidths_t; /** Configuration structure for Protected Management Frame */ typedef struct { @@ -354,7 +360,7 @@ typedef struct { uint8_t ssid[32]; /**< SSID of soft-AP. If ssid_len field is 0, this must be a Null terminated string. Otherwise, length is set according to ssid_len. */ uint8_t password[64]; /**< Password of soft-AP. */ uint8_t ssid_len; /**< Optional length of SSID field. */ - uint8_t channel; /**< 2G Channel of soft-AP */ + uint8_t channel; /**< Channel of soft-AP */ wifi_auth_mode_t authmode; /**< Auth mode of soft-AP. Do not support AUTH_WEP, AUTH_WAPI_PSK and AUTH_OWE in soft-AP mode. When the auth mode is set to WPA2_PSK, WPA2_WPA3_PSK or WPA3_PSK, the pairwise cipher will be overwritten with WIFI_CIPHER_TYPE_CCMP. */ uint8_t ssid_hidden; /**< Broadcast SSID or not, default 0, broadcast the SSID */ uint8_t max_connection; /**< Max number of stations allowed to connect in */ @@ -365,7 +371,6 @@ typedef struct { bool ftm_responder; /**< Enable FTM Responder mode */ wifi_pmf_config_t pmf_cfg; /**< Configuration for Protected Management Frame */ wifi_sae_pwe_method_t sae_pwe_h2e; /**< Configuration for SAE PWE derivation method */ - uint8_t channel_5g; /**< 5G Channel of soft-AP */ } wifi_ap_config_t; #define SAE_H2E_IDENTIFIER_LEN 32 @@ -376,7 +381,7 @@ typedef struct { wifi_scan_method_t scan_method; /**< do all channel scan or fast scan */ bool bssid_set; /**< whether set MAC address of target AP or not. Generally, station_config.bssid_set needs to be 0; and it needs to be 1 only when users need to check the MAC address of the AP.*/ uint8_t bssid[6]; /**< MAC address of target AP*/ - uint8_t channel; /**< channel of target AP. For 2G AP, set to 1~13 to scan starting from the specified channel before connecting to AP. For 5G AP, set to 36~177 (36, 40, 44 ... 177) to scan starting from the specified channel before connecting to AP. If the channel of AP is unknown, set it to 0.*/ + uint8_t channel; /**< channel of target AP. For 2.4G AP, set to 1~13 to scan starting from the specified channel before connecting to AP. For 5G AP, set to 36~177 (36, 40, 44 ... 177) to scan starting from the specified channel before connecting to AP. If the channel of AP is unknown, set it to 0.*/ uint16_t listen_interval; /**< Listen interval for ESP32 station to receive beacon when WIFI_PS_MAX_MODEM is set. Units: AP beacon intervals. Defaults to 3 if set to 0. */ wifi_sort_method_t sort_method; /**< sort the connect AP in the list by rssi or security mode */ wifi_scan_threshold_t threshold; /**< When scan_threshold is set, only APs which have an auth mode that is more secure than the selected auth mode and a signal stronger than the minimum RSSI will be used. */ @@ -735,19 +740,19 @@ typedef enum { WIFI_PHY_RATE_9M = 0x0F, /**< 9 Mbps */ /**< rate table and guard interval information for each MCS rate*/ /* - ----------------------------------------------------------------------------------------------------------- - MCS RATE | HT20 | HT40 | HE20 | - WIFI_PHY_RATE_MCS0_LGI | 6.5 Mbps (800ns) | 13.5 Mbps (800ns) | 8.1 Mbps (1600ns) | - WIFI_PHY_RATE_MCS1_LGI | 13 Mbps (800ns) | 27 Mbps (800ns) | 16.3 Mbps (1600ns) | - WIFI_PHY_RATE_MCS2_LGI | 19.5 Mbps (800ns) | 40.5 Mbps (800ns) | 24.4 Mbps (1600ns) | - WIFI_PHY_RATE_MCS3_LGI | 26 Mbps (800ns) | 54 Mbps (800ns) | 32.5 Mbps (1600ns) | - WIFI_PHY_RATE_MCS4_LGI | 39 Mbps (800ns) | 81 Mbps (800ns) | 48.8 Mbps (1600ns) | - WIFI_PHY_RATE_MCS5_LGI | 52 Mbps (800ns) | 108 Mbps (800ns) | 65 Mbps (1600ns) | - WIFI_PHY_RATE_MCS6_LGI | 58.5 Mbps (800ns) | 121.5 Mbps (800ns) | 73.1 Mbps (1600ns) | - WIFI_PHY_RATE_MCS7_LGI | 65 Mbps (800ns) | 135 Mbps (800ns) | 81.3 Mbps (1600ns) | - WIFI_PHY_RATE_MCS8_LGI | ----- | ----- | 97.5 Mbps (1600ns) | - WIFI_PHY_RATE_MCS9_LGI | ----- | ----- | 108.3 Mbps (1600ns) | - ----------------------------------------------------------------------------------------------------------- + ------------------------------------------------------------------------------------------------------------------------------------- + MCS RATE | HT20 | HT40 | HE20 | VHT20 | + WIFI_PHY_RATE_MCS0_LGI | 6.5 Mbps (800ns) | 13.5 Mbps (800ns) | 8.1 Mbps (1600ns) | 6.5 Mbps (800ns) | + WIFI_PHY_RATE_MCS1_LGI | 13 Mbps (800ns) | 27 Mbps (800ns) | 16.3 Mbps (1600ns) | 13 Mbps (800ns) | + WIFI_PHY_RATE_MCS2_LGI | 19.5 Mbps (800ns) | 40.5 Mbps (800ns) | 24.4 Mbps (1600ns) | 19.5 Mbps (800ns) | + WIFI_PHY_RATE_MCS3_LGI | 26 Mbps (800ns) | 54 Mbps (800ns) | 32.5 Mbps (1600ns) | 26 Mbps (800ns) | + WIFI_PHY_RATE_MCS4_LGI | 39 Mbps (800ns) | 81 Mbps (800ns) | 48.8 Mbps (1600ns) | 39 Mbps (800ns) | + WIFI_PHY_RATE_MCS5_LGI | 52 Mbps (800ns) | 108 Mbps (800ns) | 65 Mbps (1600ns) | 52 Mbps (800ns) | + WIFI_PHY_RATE_MCS6_LGI | 58.5 Mbps (800ns) | 121.5 Mbps (800ns) | 73.1 Mbps (1600ns) | 58.5 Mbps (800ns) | + WIFI_PHY_RATE_MCS7_LGI | 65 Mbps (800ns) | 135 Mbps (800ns) | 81.3 Mbps (1600ns) | 65 Mbps (800ns) | + WIFI_PHY_RATE_MCS8_LGI | ----- | ----- | 97.5 Mbps (1600ns) | ----- | + WIFI_PHY_RATE_MCS9_LGI | ----- | ----- | 108.3 Mbps (1600ns) | ----- | + ------------------------------------------------------------------------------------------------------------------------------------- */ WIFI_PHY_RATE_MCS0_LGI = 0x10, /**< MCS0 with long GI */ WIFI_PHY_RATE_MCS1_LGI = 0x11, /**< MCS1 with long GI */ @@ -762,19 +767,19 @@ typedef enum { WIFI_PHY_RATE_MCS9_LGI, /**< MCS9 with long GI */ #endif /* - ----------------------------------------------------------------------------------------------------------- - MCS RATE | HT20 | HT40 | HE20 | - WIFI_PHY_RATE_MCS0_SGI | 7.2 Mbps (400ns) | 15 Mbps (400ns) | 8.6 Mbps (800ns) | - WIFI_PHY_RATE_MCS1_SGI | 14.4 Mbps (400ns) | 30 Mbps (400ns) | 17.2 Mbps (800ns) | - WIFI_PHY_RATE_MCS2_SGI | 21.7 Mbps (400ns) | 45 Mbps (400ns) | 25.8 Mbps (800ns) | - WIFI_PHY_RATE_MCS3_SGI | 28.9 Mbps (400ns) | 60 Mbps (400ns) | 34.4 Mbps (800ns) | - WIFI_PHY_RATE_MCS4_SGI | 43.3 Mbps (400ns) | 90 Mbps (400ns) | 51.6 Mbps (800ns) | - WIFI_PHY_RATE_MCS5_SGI | 57.8 Mbps (400ns) | 120 Mbps (400ns) | 68.8 Mbps (800ns) | - WIFI_PHY_RATE_MCS6_SGI | 65 Mbps (400ns) | 135 Mbps (400ns) | 77.4 Mbps (800ns) | - WIFI_PHY_RATE_MCS7_SGI | 72.2 Mbps (400ns) | 150 Mbps (400ns) | 86 Mbps (800ns) | - WIFI_PHY_RATE_MCS8_SGI | ----- | ----- | 103.2 Mbps (800ns) | - WIFI_PHY_RATE_MCS9_SGI | ----- | ----- | 114.7 Mbps (800ns) | - ----------------------------------------------------------------------------------------------------------- + ------------------------------------------------------------------------------------------------------------------------------------- + MCS RATE | HT20 | HT40 | HE20 | VHT20 | + WIFI_PHY_RATE_MCS0_SGI | 7.2 Mbps (400ns) | 15 Mbps (400ns) | 8.6 Mbps (800ns) | 7.2 Mbps (400ns) | + WIFI_PHY_RATE_MCS1_SGI | 14.4 Mbps (400ns) | 30 Mbps (400ns) | 17.2 Mbps (800ns) | 14.4 Mbps (400ns) | + WIFI_PHY_RATE_MCS2_SGI | 21.7 Mbps (400ns) | 45 Mbps (400ns) | 25.8 Mbps (800ns) | 21.7 Mbps (400ns) | + WIFI_PHY_RATE_MCS3_SGI | 28.9 Mbps (400ns) | 60 Mbps (400ns) | 34.4 Mbps (800ns) | 28.9 Mbps (400ns) | + WIFI_PHY_RATE_MCS4_SGI | 43.3 Mbps (400ns) | 90 Mbps (400ns) | 51.6 Mbps (800ns) | 43.3 Mbps (400ns) | + WIFI_PHY_RATE_MCS5_SGI | 57.8 Mbps (400ns) | 120 Mbps (400ns) | 68.8 Mbps (800ns) | 57.8 Mbps (400ns) | + WIFI_PHY_RATE_MCS6_SGI | 65 Mbps (400ns) | 135 Mbps (400ns) | 77.4 Mbps (800ns) | 65 Mbps (400ns) | + WIFI_PHY_RATE_MCS7_SGI | 72.2 Mbps (400ns) | 150 Mbps (400ns) | 86 Mbps (800ns) | 72.2 Mbps (400ns) | + WIFI_PHY_RATE_MCS8_SGI | ----- | ----- | 103.2 Mbps (800ns) | ----- | + WIFI_PHY_RATE_MCS9_SGI | ----- | ----- | 114.7 Mbps (800ns) | ----- | + ------------------------------------------------------------------------------------------------------------------------------------- */ WIFI_PHY_RATE_MCS0_SGI, /**< MCS0 with short GI */ WIFI_PHY_RATE_MCS1_SGI, /**< MCS1 with short GI */ diff --git a/components/esp_wifi/lib b/components/esp_wifi/lib index ce181b3e94..600bbfac04 160000 --- a/components/esp_wifi/lib +++ b/components/esp_wifi/lib @@ -1 +1 @@ -Subproject commit ce181b3e947d3d8495c17b9881930816bb94ed58 +Subproject commit 600bbfac047047bb975a9bf8a8e1c78dfc3a72af diff --git a/components/esp_wifi/test_apps/.build-test-rules.yml b/components/esp_wifi/test_apps/.build-test-rules.yml index ff8f5aa253..7b3e1c0bf0 100644 --- a/components/esp_wifi/test_apps/.build-test-rules.yml +++ b/components/esp_wifi/test_apps/.build-test-rules.yml @@ -5,11 +5,8 @@ components/esp_wifi/test_apps/wifi_connect: - if: SOC_WIFI_SUPPORTED != 1 disable_test: - if: IDF_TARGET not in ["esp32", "esp32c3", "esp32s3", "esp32c2"] - reason: leak of runner + reason: lack of runner components/esp_wifi/test_apps/wifi_function: disable: - if: SOC_WIFI_SUPPORTED != 1 - disable_test: - - if: IDF_TARGET in ["esp32c5"] - reason: leak of runner diff --git a/components/esp_wifi/test_apps/wifi_connect/pytest_wifi_connect.py b/components/esp_wifi/test_apps/wifi_connect/pytest_wifi_connect.py index 1604e79017..1e85a967eb 100644 --- a/components/esp_wifi/test_apps/wifi_connect/pytest_wifi_connect.py +++ b/components/esp_wifi/test_apps/wifi_connect/pytest_wifi_connect.py @@ -1,6 +1,5 @@ # SPDX-FileCopyrightText: 2022-2023 Espressif Systems (Shanghai) CO LTD # SPDX-License-Identifier: Unlicense OR CC0-1.0 - import pytest from pytest_embedded_idf.unity_tester import CaseTester diff --git a/components/esp_wifi/test_apps/wifi_function/pytest_wifi_function.py b/components/esp_wifi/test_apps/wifi_function/pytest_wifi_function.py index ba3f27b63f..bcda4ab192 100644 --- a/components/esp_wifi/test_apps/wifi_function/pytest_wifi_function.py +++ b/components/esp_wifi/test_apps/wifi_function/pytest_wifi_function.py @@ -9,6 +9,7 @@ from pytest_embedded import Dut @pytest.mark.esp32s2 @pytest.mark.esp32s3 @pytest.mark.esp32c6 +@pytest.mark.esp32c5 # @pytest.mark.esp32c2 # esp32c2 are using xtal_26mhz @pytest.mark.generic def test_wifi_unit_test(dut: Dut) -> None: diff --git a/components/soc/esp32c5/include/soc/Kconfig.soc_caps.in b/components/soc/esp32c5/include/soc/Kconfig.soc_caps.in index 4a29366e30..7e66ccf2db 100644 --- a/components/soc/esp32c5/include/soc/Kconfig.soc_caps.in +++ b/components/soc/esp32c5/include/soc/Kconfig.soc_caps.in @@ -51,10 +51,6 @@ config SOC_USB_SERIAL_JTAG_SUPPORTED bool default y -config SOC_PHY_SUPPORTED - bool - default y - config SOC_WIFI_SUPPORTED bool default y diff --git a/components/soc/esp32c5/include/soc/soc_caps.h b/components/soc/esp32c5/include/soc/soc_caps.h index 48fa9c8cc5..1d3369f502 100644 --- a/components/soc/esp32c5/include/soc/soc_caps.h +++ b/components/soc/esp32c5/include/soc/soc_caps.h @@ -31,7 +31,6 @@ #define SOC_ASYNC_MEMCPY_SUPPORTED 1 #define SOC_USB_SERIAL_JTAG_SUPPORTED 1 // #define SOC_TEMP_SENSOR_SUPPORTED 1 // TODO: [ESP32C5] IDF-8727 -#define SOC_PHY_SUPPORTED 1 #define SOC_WIFI_SUPPORTED 1 #define SOC_SUPPORTS_SECURE_DL_MODE 1 #define SOC_LP_CORE_SUPPORTED 1 @@ -572,7 +571,7 @@ /*------------------------------------ WI-FI CAPS ------------------------------------*/ #define SOC_WIFI_HW_TSF (1) /*!< Support hardware TSF */ -#define SOC_WIFI_FTM_SUPPORT (0) /*!< Support FTM */ +#define SOC_WIFI_FTM_SUPPORT (0) /*!< Support FTM */ // TODO: [ESP32C5] WIFI-6426 #define SOC_WIFI_GCMP_SUPPORT (1) /*!< Support GCMP(GCMP128 and GCMP256) */ #define SOC_WIFI_WAPI_SUPPORT (1) /*!< Support WAPI */ #define SOC_WIFI_CSI_SUPPORT (1) /*!< Support CSI */ diff --git a/components/wpa_supplicant/test_apps/.build-test-rules.yml b/components/wpa_supplicant/test_apps/.build-test-rules.yml index 0a315ea208..6013a2343c 100644 --- a/components/wpa_supplicant/test_apps/.build-test-rules.yml +++ b/components/wpa_supplicant/test_apps/.build-test-rules.yml @@ -3,9 +3,6 @@ components/wpa_supplicant/test_apps: disable: - if: SOC_WIFI_SUPPORTED != 1 - disable_test: - - if: IDF_TARGET in ["esp32c5"] - reason: leak of runner depends_components: - esp_wifi - wpa_supplicant diff --git a/components/wpa_supplicant/test_apps/pytest_wpa_supplicant_ut.py b/components/wpa_supplicant/test_apps/pytest_wpa_supplicant_ut.py index 2db192bb11..f48337c3b6 100644 --- a/components/wpa_supplicant/test_apps/pytest_wpa_supplicant_ut.py +++ b/components/wpa_supplicant/test_apps/pytest_wpa_supplicant_ut.py @@ -1,6 +1,5 @@ # SPDX-FileCopyrightText: 2023 Espressif Systems (Shanghai) CO LTD # SPDX-License-Identifier: CC0-1.0 - import pytest from pytest_embedded import Dut from pytest_embedded_idf.unity_tester import CaseTester @@ -13,6 +12,7 @@ from pytest_embedded_idf.unity_tester import CaseTester @pytest.mark.esp32c3 @pytest.mark.esp32c2 @pytest.mark.esp32c6 +@pytest.mark.esp32c5 def test_wpa_supplicant_ut(dut: Dut) -> None: dut.run_all_single_board_cases() diff --git a/examples/bluetooth/blufi/README.md b/examples/bluetooth/blufi/README.md index 91c2ffde0b..0e4224ee50 100644 --- a/examples/bluetooth/blufi/README.md +++ b/examples/bluetooth/blufi/README.md @@ -1,9 +1,9 @@ -| Supported Targets | ESP32 | ESP32-C2 | ESP32-C3 | ESP32-C6 | ESP32-S3 | -| ----------------- | ----- | -------- | -------- | -------- | -------- | +| Supported Targets | ESP32 | ESP32-C2 | ESP32-C3 | ESP32-C5 | ESP32-C6 | ESP32-S3 | +| ----------------- | ----- | -------- | -------- | -------- | -------- | -------- | # ESP-IDF Blufi Example -This demo shows how to use the *Blufi* to configurate the Wi-Fi connection to AP. +This demo shows how to use the *Blufi* to configure the Wi-Fi connection to AP. The BluFi for ESP32 is a Wi-Fi network configuration function via Bluetooth channel. It provides a secure protocol to pass Wi-Fi configuration and credentials to the ESP32. @@ -50,7 +50,7 @@ I (708) system_api: read default base MAC address from EFUSE I (718) wifi:wifi firmware version: 44799ff I (718) wifi:wifi certification version: v7.0 I (718) wifi:config NVS flash: enabled -I (718) wifi:config nano formating: disabled +I (718) wifi:config nano formatting: disabled I (728) wifi:Init data frame dynamic rx buffer num: 32 I (728) wifi:Init management frame dynamic rx buffer num: 32 I (738) wifi:Init management short buffer num: 32 diff --git a/examples/bluetooth/blufi/sdkconfig.defaults.esp32c5 b/examples/bluetooth/blufi/sdkconfig.defaults.esp32c5 new file mode 100644 index 0000000000..128be8ddd8 --- /dev/null +++ b/examples/bluetooth/blufi/sdkconfig.defaults.esp32c5 @@ -0,0 +1,18 @@ +# This file was generated using idf.py save-defconfig. It can be edited manually. +# Espressif IoT Development Framework (ESP-IDF) Project Minimal Configuration +# +CONFIG_PARTITION_TABLE_SINGLE_APP_LARGE=y +CONFIG_BT_ENABLED=y +CONFIG_BT_NIMBLE_BLUFI_ENABLE=y +# CONFIG_BT_GATTC_ENABLE is not set +# CONFIG_BT_BLE_SMP_ENABLE is not set +# CONFIG_BT_BLE_50_FEATURES_SUPPORTED is not set +CONFIG_BT_BLE_42_FEATURES_SUPPORTED=y +CONFIG_MBEDTLS_DHM_C=y +# The config items for NIMBLE HOST +CONFIG_BT_NIMBLE_ENABLED=y +CONFIG_BT_NIMBLE_ROLE_CENTRAL=n +CONFIG_BT_NIMBLE_ROLE_OBSERVER=n +CONFIG_BT_NIMBLE_50_FEATURE_SUPPORT=n +CONFIG_BT_NIMBLE_SECURITY_ENABLE=n +CONFIG_BT_NIMBLE_CRYPTO_STACK_MBEDTLS=n diff --git a/examples/bluetooth/nimble/bleprph_wifi_coex/README.md b/examples/bluetooth/nimble/bleprph_wifi_coex/README.md index 1b17d23e26..dc6e3d215d 100644 --- a/examples/bluetooth/nimble/bleprph_wifi_coex/README.md +++ b/examples/bluetooth/nimble/bleprph_wifi_coex/README.md @@ -1,5 +1,5 @@ -| Supported Targets | ESP32 | ESP32-C2 | ESP32-C3 | ESP32-C6 | ESP32-S3 | -| ----------------- | ----- | -------- | -------- | -------- | -------- | +| Supported Targets | ESP32 | ESP32-C2 | ESP32-C3 | ESP32-C5 | ESP32-C6 | ESP32-S3 | +| ----------------- | ----- | -------- | -------- | -------- | -------- | -------- | # BLE Peripheral with ICMP Echo-Reply diff --git a/examples/wifi/.build-test-rules.yml b/examples/wifi/.build-test-rules.yml index 6662a103c5..0c91cd8448 100644 --- a/examples/wifi/.build-test-rules.yml +++ b/examples/wifi/.build-test-rules.yml @@ -61,10 +61,6 @@ examples/wifi/power_save: <<: *wifi_depends_default disable: - if: SOC_WIFI_SUPPORTED != 1 - disable_test: - - if: IDF_TARGET == "esp32c5" - temporary: true - reason: lack of runners depends_components: - esp_driver_uart diff --git a/examples/wifi/itwt/main/itwt_main.c b/examples/wifi/itwt/main/itwt_main.c index cdc87359b0..e2f4ecc771 100644 --- a/examples/wifi/itwt/main/itwt_main.c +++ b/examples/wifi/itwt/main/itwt_main.c @@ -119,7 +119,7 @@ static void got_ip_handler(void *arg, esp_event_base_t event_base, esp_wifi_sta_get_negotiated_phymode(&phymode); if (phymode == WIFI_PHY_MODE_HE20) { esp_err_t err = ESP_OK; - wifi_twt_setup_config_t setup_config = { + wifi_itwt_setup_config_t setup_config = { .setup_cmd = TWT_REQUEST, .flow_id = 0, .twt_id = CONFIG_EXAMPLE_ITWT_ID, diff --git a/examples/wifi/power_save/pytest_wifi_power_save.py b/examples/wifi/power_save/pytest_wifi_power_save.py index 265e764399..db3d4d2629 100644 --- a/examples/wifi/power_save/pytest_wifi_power_save.py +++ b/examples/wifi/power_save/pytest_wifi_power_save.py @@ -1,6 +1,5 @@ # SPDX-FileCopyrightText: 2021-2023 Espressif Systems (Shanghai) CO LTD # SPDX-License-Identifier: Apache-2.0 - import logging import pexpect @@ -47,6 +46,7 @@ def _run_test(dut: Dut) -> None: @pytest.mark.esp32c3 @pytest.mark.esp32s3 @pytest.mark.esp32c6 +@pytest.mark.esp32c5 @pytest.mark.wifi_ap def test_wifi_power_save(dut: Dut) -> None: _run_test(dut) diff --git a/tools/test_apps/linux_compatible/mock_build_test/main/mock_build_test.c b/tools/test_apps/linux_compatible/mock_build_test/main/mock_build_test.c index 1a00f1cf68..9f64ecbd62 100644 --- a/tools/test_apps/linux_compatible/mock_build_test/main/mock_build_test.c +++ b/tools/test_apps/linux_compatible/mock_build_test/main/mock_build_test.c @@ -116,7 +116,7 @@ void app_main(void) esp_wifi_ap_get_sta_list_with_ip(NULL, NULL); esp_wifi_sta_itwt_setup_IgnoreAndReturn(ESP_OK); - esp_wifi_sta_itwt_setup((wifi_twt_setup_config_t*) NULL); + esp_wifi_sta_itwt_setup((wifi_itwt_setup_config_t*) NULL); sc_send_ack_stop_Ignore(); sc_send_ack_stop(); diff --git a/tools/test_apps/peripherals/.build-test-rules.yml b/tools/test_apps/peripherals/.build-test-rules.yml index 804db98e17..c62ccdbdc5 100644 --- a/tools/test_apps/peripherals/.build-test-rules.yml +++ b/tools/test_apps/peripherals/.build-test-rules.yml @@ -3,6 +3,3 @@ tools/test_apps/peripherals/i2c_wifi: disable: - if: SOC_I2C_SUPPORTED != 1 or SOC_WIFI_SUPPORTED != 1 - disable_test: - - if: IDF_TARGET in ["esp32c5"] - reason: leak of runner diff --git a/tools/test_apps/peripherals/i2c_wifi/pytest_i2c_wifi.py b/tools/test_apps/peripherals/i2c_wifi/pytest_i2c_wifi.py index f4f4b37f93..84511f4c25 100644 --- a/tools/test_apps/peripherals/i2c_wifi/pytest_i2c_wifi.py +++ b/tools/test_apps/peripherals/i2c_wifi/pytest_i2c_wifi.py @@ -10,6 +10,7 @@ from pytest_embedded_idf.dut import IdfDut @pytest.mark.esp32c6 @pytest.mark.esp32s2 @pytest.mark.esp32s3 +@pytest.mark.esp32c5 @pytest.mark.generic def test_i2c_wifi_startup(dut: IdfDut) -> None: dut.expect_exact('I2C-WIFI test success') diff --git a/tools/test_apps/phy/.build-test-rules.yml b/tools/test_apps/phy/.build-test-rules.yml index a6620cc9d1..7e7e924396 100644 --- a/tools/test_apps/phy/.build-test-rules.yml +++ b/tools/test_apps/phy/.build-test-rules.yml @@ -5,7 +5,7 @@ tools/test_apps/phy/phy_multi_init_data_test: - if: SOC_WIFI_SUPPORTED != 1 disable_test: - if: IDF_TARGET in ["esp32c5"] - reason: leak of runner + reason: lack of runner tools/test_apps/phy/phy_tsens: disable: