diff --git a/components/esp_wifi/include/esp_now.h b/components/esp_wifi/include/esp_now.h index 587f015a824..6dd258b6940 100644 --- a/components/esp_wifi/include/esp_now.h +++ b/components/esp_wifi/include/esp_now.h @@ -1,5 +1,5 @@ /* - * SPDX-FileCopyrightText: 2019-2025 Espressif Systems (Shanghai) CO LTD + * SPDX-FileCopyrightText: 2019-2026 Espressif Systems (Shanghai) CO LTD * * SPDX-License-Identifier: Apache-2.0 */ @@ -388,10 +388,18 @@ esp_err_t esp_now_get_user_oui(uint8_t *oui); * * @param config ESPNOW switch channel relevant information * + * @attention 1. The data_len should not exceed ESP_NOW_MAX_DATA_LEN_V2. + * + * @attention 2. The sec_channel must be set to a valid value. + * + * @attention 3. The status field in WIFI_EVENT_ACTION_TX_STATUS event has only two possible cases: + * WIFI_ACTION_TX_OP_CANCELLED and WIFI_ACTION_TX_DURATION_COMPLETED. + * For the TX status, ESP-NOW already has a TX callback to report it. + * * @return * - ESP_OK : succeed * - ESP_ERR_NO_MEM: failed to allocate memory - * - ESP_ERR_INVALID_ARG: the pair is invalid + * - ESP_ERR_INVALID_ARG: the pair is invalid; the data len is invalid; the dest mac is invalid. * - ESP_FAIL: failed to send frame */ esp_err_t esp_now_switch_channel_tx(esp_now_switch_channel_t *config); diff --git a/components/esp_wifi/lib b/components/esp_wifi/lib index 218da6f3c25..778c894d934 160000 --- a/components/esp_wifi/lib +++ b/components/esp_wifi/lib @@ -1 +1 @@ -Subproject commit 218da6f3c2517beae285c3b6f07d4f3e95698bae +Subproject commit 778c894d9349c6fa852d1e6f2753a4d608c07e7d diff --git a/components/esp_wifi/remote/include/injected/esp_now.h b/components/esp_wifi/remote/include/injected/esp_now.h index 587f015a824..6dd258b6940 100644 --- a/components/esp_wifi/remote/include/injected/esp_now.h +++ b/components/esp_wifi/remote/include/injected/esp_now.h @@ -1,5 +1,5 @@ /* - * SPDX-FileCopyrightText: 2019-2025 Espressif Systems (Shanghai) CO LTD + * SPDX-FileCopyrightText: 2019-2026 Espressif Systems (Shanghai) CO LTD * * SPDX-License-Identifier: Apache-2.0 */ @@ -388,10 +388,18 @@ esp_err_t esp_now_get_user_oui(uint8_t *oui); * * @param config ESPNOW switch channel relevant information * + * @attention 1. The data_len should not exceed ESP_NOW_MAX_DATA_LEN_V2. + * + * @attention 2. The sec_channel must be set to a valid value. + * + * @attention 3. The status field in WIFI_EVENT_ACTION_TX_STATUS event has only two possible cases: + * WIFI_ACTION_TX_OP_CANCELLED and WIFI_ACTION_TX_DURATION_COMPLETED. + * For the TX status, ESP-NOW already has a TX callback to report it. + * * @return * - ESP_OK : succeed * - ESP_ERR_NO_MEM: failed to allocate memory - * - ESP_ERR_INVALID_ARG: the pair is invalid + * - ESP_ERR_INVALID_ARG: the pair is invalid; the data len is invalid; the dest mac is invalid. * - ESP_FAIL: failed to send frame */ esp_err_t esp_now_switch_channel_tx(esp_now_switch_channel_t *config);