mirror of
https://github.com/espressif/esp-idf.git
synced 2025-08-04 21:24:32 +02:00
Merge branch 'update/wifi_api_Docs' into 'master'
DOC:update wifi api docs Closes WIFI-4380, WIFI-3856, IDFGH-6362, and IDFGH-6778 See merge request espressif/esp-idf!16194
This commit is contained in:
@@ -614,9 +614,10 @@ esp_err_t esp_netif_dhcps_stop(esp_netif_t *esp_netif);
|
|||||||
*
|
*
|
||||||
* If DHCP server is enabled, the Main DNS Server setting is used by the DHCP server to provide a DNS Server option
|
* If DHCP server is enabled, the Main DNS Server setting is used by the DHCP server to provide a DNS Server option
|
||||||
* to DHCP clients (Wi-Fi stations).
|
* to DHCP clients (Wi-Fi stations).
|
||||||
* - The default Main DNS server is typically the IP of the Wi-Fi AP interface itself.
|
* - The default Main DNS server is typically the IP of the DHCP server itself.
|
||||||
* - This function can override it by setting server type ESP_NETIF_DNS_MAIN.
|
* - This function can override it by setting server type ESP_NETIF_DNS_MAIN.
|
||||||
* - Other DNS Server types are not supported for the Wi-Fi AP interface.
|
* - Other DNS Server types are not supported for the DHCP server.
|
||||||
|
* - To propagate the DNS info to client, please stop the DHCP server before using this API.
|
||||||
*
|
*
|
||||||
* @param[in] esp_netif Handle to esp-netif instance
|
* @param[in] esp_netif Handle to esp-netif instance
|
||||||
* @param[in] type Type of DNS Server to set: ESP_NETIF_DNS_MAIN, ESP_NETIF_DNS_BACKUP, ESP_NETIF_DNS_FALLBACK
|
* @param[in] type Type of DNS Server to set: ESP_NETIF_DNS_MAIN, ESP_NETIF_DNS_BACKUP, ESP_NETIF_DNS_FALLBACK
|
||||||
|
@@ -1,16 +1,8 @@
|
|||||||
// Copyright 2015-2016 Espressif Systems (Shanghai) PTE LTD
|
/*
|
||||||
//
|
* SPDX-FileCopyrightText: 2019-2022 Espressif Systems (Shanghai) CO LTD
|
||||||
// Licensed under the Apache License, Version 2.0 (the "License");
|
*
|
||||||
// you may not use this file except in compliance with the License.
|
* SPDX-License-Identifier: Apache-2.0
|
||||||
// You may obtain a copy of the License at
|
*/
|
||||||
|
|
||||||
// http://www.apache.org/licenses/LICENSE-2.0
|
|
||||||
//
|
|
||||||
// Unless required by applicable law or agreed to in writing, software
|
|
||||||
// distributed under the License is distributed on an "AS IS" BASIS,
|
|
||||||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
||||||
// See the License for the specific language governing permissions and
|
|
||||||
// limitations under the License.
|
|
||||||
|
|
||||||
#ifndef __ESP_NOW_H__
|
#ifndef __ESP_NOW_H__
|
||||||
#define __ESP_NOW_H__
|
#define __ESP_NOW_H__
|
||||||
@@ -237,6 +229,20 @@ esp_err_t esp_now_del_peer(const uint8_t *peer_addr);
|
|||||||
*/
|
*/
|
||||||
esp_err_t esp_now_mod_peer(const esp_now_peer_info_t *peer);
|
esp_err_t esp_now_mod_peer(const esp_now_peer_info_t *peer);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief Config ESPNOW rate of specified interface
|
||||||
|
*
|
||||||
|
* @attention 1. This API should be called after esp_wifi_start().
|
||||||
|
*
|
||||||
|
* @param ifx Interface to be configured.
|
||||||
|
* @param rate Phy rate to be configured.
|
||||||
|
*
|
||||||
|
* @return
|
||||||
|
* - ESP_OK: succeed
|
||||||
|
* - others: failed
|
||||||
|
*/
|
||||||
|
esp_err_t esp_wifi_config_espnow_rate(wifi_interface_t ifx, wifi_phy_rate_t rate);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @brief Get a peer whose MAC address matches peer_addr from peer list
|
* @brief Get a peer whose MAC address matches peer_addr from peer list
|
||||||
*
|
*
|
||||||
|
@@ -251,6 +251,7 @@ esp_err_t esp_wifi_internal_set_sta_ip(void);
|
|||||||
*
|
*
|
||||||
* @attention 1. If fixed rate is enabled, both management and data frame are transmitted with fixed rate
|
* @attention 1. If fixed rate is enabled, both management and data frame are transmitted with fixed rate
|
||||||
* @attention 2. Make sure that the receiver is able to receive the frame with the fixed rate if you want the frame to be received
|
* @attention 2. Make sure that the receiver is able to receive the frame with the fixed rate if you want the frame to be received
|
||||||
|
* @attention 3. Not support to set fix rate for espnow and 80211_tx
|
||||||
*
|
*
|
||||||
* @param ifx : wifi interface
|
* @param ifx : wifi interface
|
||||||
* @param en : false - disable, true - enable
|
* @param en : false - disable, true - enable
|
||||||
|
@@ -1208,20 +1208,6 @@ esp_err_t esp_wifi_ftm_resp_set_offset(int16_t offset_cm);
|
|||||||
*/
|
*/
|
||||||
esp_err_t esp_wifi_config_11b_rate(wifi_interface_t ifx, bool disable);
|
esp_err_t esp_wifi_config_11b_rate(wifi_interface_t ifx, bool disable);
|
||||||
|
|
||||||
/**
|
|
||||||
* @brief Config ESPNOW rate of specified interface
|
|
||||||
*
|
|
||||||
* @attention 1. This API should be called after esp_wifi_init() and before esp_wifi_start().
|
|
||||||
*
|
|
||||||
* @param ifx Interface to be configured.
|
|
||||||
* @param rate Phy rate to be configured.
|
|
||||||
*
|
|
||||||
* @return
|
|
||||||
* - ESP_OK: succeed
|
|
||||||
* - others: failed
|
|
||||||
*/
|
|
||||||
esp_err_t esp_wifi_config_espnow_rate(wifi_interface_t ifx, wifi_phy_rate_t rate);
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @brief Set interval for station to wake up periodically at disconnected.
|
* @brief Set interval for station to wake up periodically at disconnected.
|
||||||
*
|
*
|
||||||
|
@@ -344,7 +344,7 @@ typedef struct {
|
|||||||
unsigned fec_coding:1; /**< Flag is set for 11n packets which are LDPC */
|
unsigned fec_coding:1; /**< Flag is set for 11n packets which are LDPC */
|
||||||
unsigned sgi:1; /**< Short Guide Interval(SGI). 0: Long GI; 1: Short GI */
|
unsigned sgi:1; /**< Short Guide Interval(SGI). 0: Long GI; 1: Short GI */
|
||||||
#if CONFIG_IDF_TARGET_ESP32
|
#if CONFIG_IDF_TARGET_ESP32
|
||||||
signed noise_floor:8; /**< noise floor of Radio Frequency Module(RF). unit: 0.25dBm*/
|
signed noise_floor:8; /**< noise floor of Radio Frequency Module(RF). unit: dBm*/
|
||||||
#elif CONFIG_IDF_TARGET_ESP32S2 || CONFIG_IDF_TARGET_ESP32S3 || CONFIG_IDF_TARGET_ESP32C3
|
#elif CONFIG_IDF_TARGET_ESP32S2 || CONFIG_IDF_TARGET_ESP32S3 || CONFIG_IDF_TARGET_ESP32C3
|
||||||
unsigned :8; /**< reserved */
|
unsigned :8; /**< reserved */
|
||||||
#endif
|
#endif
|
||||||
@@ -357,14 +357,14 @@ typedef struct {
|
|||||||
#if CONFIG_IDF_TARGET_ESP32S2
|
#if CONFIG_IDF_TARGET_ESP32S2
|
||||||
unsigned :32; /**< reserved */
|
unsigned :32; /**< reserved */
|
||||||
#elif CONFIG_IDF_TARGET_ESP32S3 || CONFIG_IDF_TARGET_ESP32C3
|
#elif CONFIG_IDF_TARGET_ESP32S3 || CONFIG_IDF_TARGET_ESP32C3
|
||||||
signed noise_floor:8; /**< noise floor of Radio Frequency Module(RF). unit: 0.25dBm*/
|
signed noise_floor:8; /**< noise floor of Radio Frequency Module(RF). unit: dBm*/
|
||||||
unsigned :24; /**< reserved */
|
unsigned :24; /**< reserved */
|
||||||
unsigned :32; /**< reserved */
|
unsigned :32; /**< reserved */
|
||||||
#endif
|
#endif
|
||||||
unsigned :31; /**< reserved */
|
unsigned :31; /**< reserved */
|
||||||
unsigned ant:1; /**< antenna number from which this packet is received. 0: WiFi antenna 0; 1: WiFi antenna 1 */
|
unsigned ant:1; /**< antenna number from which this packet is received. 0: WiFi antenna 0; 1: WiFi antenna 1 */
|
||||||
#if CONFIG_IDF_TARGET_ESP32S2
|
#if CONFIG_IDF_TARGET_ESP32S2
|
||||||
signed noise_floor:8; /**< noise floor of Radio Frequency Module(RF). unit: 0.25dBm*/
|
signed noise_floor:8; /**< noise floor of Radio Frequency Module(RF). unit: dBm*/
|
||||||
unsigned :24; /**< reserved */
|
unsigned :24; /**< reserved */
|
||||||
#elif CONFIG_IDF_TARGET_ESP32S3 || CONFIG_IDF_TARGET_ESP32C3
|
#elif CONFIG_IDF_TARGET_ESP32S3 || CONFIG_IDF_TARGET_ESP32C3
|
||||||
unsigned :32; /**< reserved */
|
unsigned :32; /**< reserved */
|
||||||
|
Submodule components/esp_wifi/lib updated: 3701e26be8...01b1adc0f1
@@ -81,6 +81,11 @@ Receiving ESP-NOW Data
|
|||||||
Call ``esp_now_register_recv_cb`` to register receiving callback function. Call the receiving callback function when receiving ESP-NOW. The receiving callback function also runs from the Wi-Fi task. So, do not do lengthy operations in the callback function.
|
Call ``esp_now_register_recv_cb`` to register receiving callback function. Call the receiving callback function when receiving ESP-NOW. The receiving callback function also runs from the Wi-Fi task. So, do not do lengthy operations in the callback function.
|
||||||
Instead, post the necessary data to a queue and handle it from a lower priority task.
|
Instead, post the necessary data to a queue and handle it from a lower priority task.
|
||||||
|
|
||||||
|
Config ESP-NOW Rate
|
||||||
|
-------------------
|
||||||
|
|
||||||
|
Call ``esp_wifi_config_espnow_rate`` to config ESPNOW rate of specified interface. Make sure that the interface is enabled before config rate. This API should be called after ``esp_wifi_start()``.
|
||||||
|
|
||||||
Application Examples
|
Application Examples
|
||||||
--------------------
|
--------------------
|
||||||
|
|
||||||
|
@@ -1295,7 +1295,7 @@ Wi-Fi 供应商 IE 配置
|
|||||||
Wi-Fi Easy Connect™ (DPP)
|
Wi-Fi Easy Connect™ (DPP)
|
||||||
--------------------------
|
--------------------------
|
||||||
|
|
||||||
Wi-Fi Easy Connect\ :sup:`TM`(也称为设备配置协议)是一个安全且标准化的配置协议,用于配置 Wi-Fi 设备。更多信息请参考 :doc:`esp_dpp <../api-reference/network/esp_dpp>`。
|
Wi-Fi Easy Connect\ :sup:`TM` (也称为设备配置协议)是一个安全且标准化的配置协议,用于配置 Wi-Fi 设备。更多信息请参考 :doc:`esp_dpp <../api-reference/network/esp_dpp>`。
|
||||||
|
|
||||||
WPA2-Enterprise
|
WPA2-Enterprise
|
||||||
+++++++++++++++++++++++++++++++++
|
+++++++++++++++++++++++++++++++++
|
||||||
|
@@ -81,6 +81,11 @@ ESP-NOW 采用 CCMP 方法保护供应商特定动作帧的安全,具体可参
|
|||||||
调用 ``esp_now_register_recv_cb`` 注册接收回调函数。当接收 ESP-NOW 数据时,需要调用接收回调函数。接收回调函数也在 Wi-Fi 任务任务中运行。因此,不要在回调函数中执行冗长的操作。
|
调用 ``esp_now_register_recv_cb`` 注册接收回调函数。当接收 ESP-NOW 数据时,需要调用接收回调函数。接收回调函数也在 Wi-Fi 任务任务中运行。因此,不要在回调函数中执行冗长的操作。
|
||||||
相反,将必要的数据发布到队列,并交给优先级较低的任务处理。
|
相反,将必要的数据发布到队列,并交给优先级较低的任务处理。
|
||||||
|
|
||||||
|
配置 ESP-NOW 速率
|
||||||
|
----------------------
|
||||||
|
|
||||||
|
调用 ``esp_wifi_config_espnow_rate`` 配置指定接口的 ESPNOW 速率。确保在配置速率之前使能接口。这个 API 应该在 ``esp_wifi_start()`` 之后调用。
|
||||||
|
|
||||||
应用示例
|
应用示例
|
||||||
----------
|
----------
|
||||||
|
|
||||||
|
@@ -711,7 +711,6 @@ components/esp_timer/test/test_esp_timer_light_sleep.c
|
|||||||
components/esp_timer/test/test_ets_timer.c
|
components/esp_timer/test/test_ets_timer.c
|
||||||
components/esp_wifi/include/esp_coexist_adapter.h
|
components/esp_wifi/include/esp_coexist_adapter.h
|
||||||
components/esp_wifi/include/esp_mesh_internal.h
|
components/esp_wifi/include/esp_mesh_internal.h
|
||||||
components/esp_wifi/include/esp_now.h
|
|
||||||
components/esp_wifi/include/esp_private/esp_wifi_private.h
|
components/esp_wifi/include/esp_private/esp_wifi_private.h
|
||||||
components/esp_wifi/include/esp_private/esp_wifi_types_private.h
|
components/esp_wifi/include/esp_private/esp_wifi_types_private.h
|
||||||
components/esp_wifi/include/esp_private/wifi_types.h
|
components/esp_wifi/include/esp_private/wifi_types.h
|
||||||
|
Reference in New Issue
Block a user