From e133912fda8d1fe32401e72849dc65a2affebab6 Mon Sep 17 00:00:00 2001 From: zhangyanjiao Date: Thu, 6 Mar 2025 17:27:27 +0800 Subject: [PATCH] fix(wifi): Added oui check for ESPNOW Add new api to set/get user oui for ESPNOW Closes https://github.com/espressif/esp-idf/issues/9577 --- components/esp_wifi/include/esp_now.h | 23 ++++++++++++++++++++++- components/esp_wifi/lib | 2 +- 2 files changed, 23 insertions(+), 2 deletions(-) diff --git a/components/esp_wifi/include/esp_now.h b/components/esp_wifi/include/esp_now.h index 1fcffa4a0e..81341d51db 100644 --- a/components/esp_wifi/include/esp_now.h +++ b/components/esp_wifi/include/esp_now.h @@ -1,5 +1,5 @@ /* - * SPDX-FileCopyrightText: 2019-2024 Espressif Systems (Shanghai) CO LTD + * SPDX-FileCopyrightText: 2019-2025 Espressif Systems (Shanghai) CO LTD * * SPDX-License-Identifier: Apache-2.0 */ @@ -368,6 +368,27 @@ esp_err_t esp_now_set_pmk(const uint8_t *pmk); */ esp_err_t esp_now_set_wake_window(uint16_t window); +/** + * @brief Set the OUI (Organization Identifier) in the vendor-specific element for ESPNOW. + * + * @param oui The oui should occupy 3 bytes. If the oui is NULL, then use the default value (0x18fe34). + * + * @return + * - ESP_OK : succeed + */ +esp_err_t esp_now_set_user_oui(uint8_t *oui); + +/** + * @brief Get the OUI (Organization Identifier) in the vendor-specific element for ESPNOW. + * + * @param oui user configured OUI. + * + * @return + * - ESP_OK : succeed + * - ESP_ERR_ESPNOW_ARG : invalid argument + */ +esp_err_t esp_now_get_user_oui(uint8_t *oui); + /** * @} */ diff --git a/components/esp_wifi/lib b/components/esp_wifi/lib index e117ca4e60..b41192c70c 160000 --- a/components/esp_wifi/lib +++ b/components/esp_wifi/lib @@ -1 +1 @@ -Subproject commit e117ca4e60f64e184bf8247909af9a858479e82b +Subproject commit b41192c70c680a40a69fda6d6b7d1e2b15935357