diff --git a/components/esp_rom/esp32c2/ld/esp32c2.rom.ld b/components/esp_rom/esp32c2/ld/esp32c2.rom.ld index 75bd2a0d49..81f2d760fc 100644 --- a/components/esp_rom/esp32c2/ld/esp32c2.rom.ld +++ b/components/esp_rom/esp32c2/ld/esp32c2.rom.ld @@ -903,7 +903,7 @@ ieee80211_add_rates = 0x40002054; ieee80211_is_ht_cipher = 0x4000205c; ieee80211_setup_lr_rates = 0x40002068; ieee80211_ht_node_init = 0x4000206c; -ieee80211_is_support_rate = 0x40002070; +/* ieee80211_is_support_rate = 0x40002070; */ ieee80211_setup_rates = 0x40002074; ieee80211_is_lr_only = 0x40002078; ieee80211_setup_phy_mode = 0x4000207c; diff --git a/components/esp_wifi/include/esp_mesh.h b/components/esp_wifi/include/esp_mesh.h index 7a7e85cf89..9bd8cbf034 100644 --- a/components/esp_wifi/include/esp_mesh.h +++ b/components/esp_wifi/include/esp_mesh.h @@ -111,7 +111,7 @@ extern "C" { #define ESP_ERR_MESH_DISCARD_DUPLICATE (ESP_ERR_MESH_BASE + 20) /**< discard the packet due to the duplicate sequence number */ #define ESP_ERR_MESH_DISCARD (ESP_ERR_MESH_BASE + 21) /**< discard the packet */ #define ESP_ERR_MESH_VOTING (ESP_ERR_MESH_BASE + 22) /**< vote in progress */ -#define ESP_ERR_MESH_XMIT (ESP_ERR_MESH_BASE + 23) /**< XMIT */ +#define ESP_ERR_MESH_XMIT (ESP_ERR_MESH_BASE + 23) /**< TX fail, the tx state is a value other than timeout and disconnect */ #define ESP_ERR_MESH_QUEUE_READ (ESP_ERR_MESH_BASE + 24) /**< error in reading queue */ #define ESP_ERR_MESH_PS (ESP_ERR_MESH_BASE + 25) /**< mesh PS is not specified as enable or disable */ #define ESP_ERR_MESH_RECV_RELEASE (ESP_ERR_MESH_BASE + 26) /**< release esp_mesh_recv_toDS */ @@ -682,6 +682,8 @@ esp_err_t esp_mesh_stop(void); * - ESP_ERR_MESH_QUEUE_FULL * - ESP_ERR_MESH_NO_ROUTE_FOUND * - ESP_ERR_MESH_DISCARD + * - ESP_ERR_MESH_NOT_SUPPORT + * - ESP_ERR_MESH_XMIT */ esp_err_t esp_mesh_send(const mesh_addr_t *to, const mesh_data_t *data, int flag, const mesh_opt_t opt[], int opt_count); diff --git a/components/esp_wifi/include/esp_private/wifi.h b/components/esp_wifi/include/esp_private/wifi.h index d9f06401bd..5487286bfe 100644 --- a/components/esp_wifi/include/esp_private/wifi.h +++ b/components/esp_wifi/include/esp_private/wifi.h @@ -1,5 +1,5 @@ /* - * SPDX-FileCopyrightText: 2015-2024 Espressif Systems (Shanghai) CO LTD + * SPDX-FileCopyrightText: 2015-2025 Espressif Systems (Shanghai) CO LTD * * SPDX-License-Identifier: Apache-2.0 */ @@ -777,6 +777,14 @@ esp_err_t esp_wifi_connect_internal(void); */ esp_err_t esp_wifi_disconnect_internal(void); +/** + * @brief Get the time information from the MAC clock. The time is precise only if modem sleep or light sleep is not enabled. + * + * @return 32-bit time value, unit: microsecond. This time is only 32 bits, which means it will overflow and reset to 0 after approximately 71 minutes. + * Therefore, when using it, the time difference between two consecutive readings should not be too long. + */ +uint32_t esp_wifi_internal_get_mac_clock_time(void); + #ifdef __cplusplus } #endif diff --git a/components/esp_wifi/lib b/components/esp_wifi/lib index 1f520709ef..b328e5edbe 160000 --- a/components/esp_wifi/lib +++ b/components/esp_wifi/lib @@ -1 +1 @@ -Subproject commit 1f520709ef1062d7900fbaae0e75fb65c355c9ed +Subproject commit b328e5edbe8c91ee751945953407d183ef119001 diff --git a/examples/wifi/getting_started/station/main/station_example_main.c b/examples/wifi/getting_started/station/main/station_example_main.c index f416ff8d92..2d0dba1205 100644 --- a/examples/wifi/getting_started/station/main/station_example_main.c +++ b/examples/wifi/getting_started/station/main/station_example_main.c @@ -168,6 +168,12 @@ void app_main(void) } ESP_ERROR_CHECK(ret); + if (CONFIG_LOG_MAXIMUM_LEVEL > CONFIG_LOG_DEFAULT_LEVEL) { + /* If you only want to open more logs in the wifi module, you need to make the max level greater than the default level, + * and call esp_log_level_set() before esp_wifi_init() to improve the log level of the wifi module. */ + esp_log_level_set("wifi", CONFIG_LOG_MAXIMUM_LEVEL); + } + ESP_LOGI(TAG, "ESP_WIFI_MODE_STA"); wifi_init_sta(); }