Merge branch 'bugfix/fix_scan_info_error_in_lr_only_mode_v5.3' into 'release/v5.3'

fix(wifi): Fixed the scan information error in LR only mode (v5.3)

See merge request espressif/esp-idf!37809
This commit is contained in:
Jiang Jiang Jian
2025-04-24 10:39:56 +08:00
7 changed files with 26 additions and 10 deletions

View File

@ -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;

View File

@ -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);

View File

@ -192,7 +192,7 @@ typedef struct {
unsigned : 15; /**< reserved */
unsigned : 15; /**< reserved */
unsigned : 2; /**< reserved */
unsigned noise_floor: 8; /**< the noise floor of the reception frame */
signed noise_floor: 8; /**< the noise floor of the reception frame */
signed : 8; /**< reserved */
signed : 8; /**< reserved */
unsigned : 8; /**< reserved */

View File

@ -76,7 +76,13 @@ When :cpp:func:`esp_now_deinit()` is called, all of the information of paired de
Add Paired Device
-----------------
Call :cpp:func:`esp_now_add_peer()` to add the device to the paired device list before you send data to this device. If security is enabled, the LMK must be set. You can send ESP-NOW data via both the Station and the SoftAP interface. Make sure that the interface is enabled before sending ESP-NOW data.
Call :cpp:func:`esp_now_add_peer()` to add the device to the paired device list before you send data to this device. If security is enabled, the LMK must be set. A device with a broadcast MAC address must be added before sending broadcast data.
You can send ESP-NOW data via both the Station and the SoftAP interface. Make sure that the interface is enabled before sending ESP-NOW data.
The range of the channel of paired devices is from 0 to 14. If the channel is set to 0, data will be sent on the current channel. Otherwise, the channel must be set as the channel that the local device is on.
For the receiving device, calling :cpp:func:`esp_now_add_peer()` is not required. If no paired device is added, it can only receive broadcast packets and unencrypted unicast packets. To receive encrypted unicast packets, a paired device must be added, and the same LMK must be set.
.. only:: esp32c2
@ -86,8 +92,6 @@ Call :cpp:func:`esp_now_add_peer()` to add the device to the paired device list
The maximum number of paired devices is 20, and the paired encryption devices are no more than 17, the default is 7. If you want to change the number of paired encryption devices, set :ref:`CONFIG_ESP_WIFI_ESPNOW_MAX_ENCRYPT_NUM` in the Wi-Fi component configuration menu.
A device with a broadcast MAC address must be added before sending broadcast data. The range of the channel of paired devices is from 0 to 14. If the channel is set to 0, data will be sent on the current channel. Otherwise, the channel must be set as the channel that the local device is on.
Send ESP-NOW Data
-----------------

View File

@ -73,7 +73,13 @@ ESP-NOW 采用 CCMP 方法保护供应商特定动作帧的安全,具体可参
添加配对设备
-----------------
在将数据发送到其他设备之前,请先调用 :cpp:func:`esp_now_add_peer()` 将其添加到配对设备列表中。如果启用了加密,则必须设置 LMK。ESP-NOW 数据可以从 Station 或 SoftAP 接口发送。确保在发送 ESP-NOW 数据之前已启用该接口。
在将数据发送到其他设备之前,请先调用 :cpp:func:`esp_now_add_peer()` 将其添加到配对设备列表中。如果启用了加密,则必须设置 LMK。
ESP-NOW 数据可以从 Station 或 SoftAP 接口发送。确保在发送 ESP-NOW 数据之前已启用该接口。
配对设备的信道范围是从 0 ~ 14。如果信道设置为 0数据将在当前信道上发送。否则必须使用本地设备所在的通道。
对于接收设备,调用 :cpp:func:`esp_now_add_peer()` 不是必需的。如果没有添加配对设备,只能接收广播包和不加密的单播包。如果需要接收加密的单播包,则必须添加配对设备并设置相同的 LMK。
.. only:: esp32c2
@ -83,8 +89,6 @@ ESP-NOW 采用 CCMP 方法保护供应商特定动作帧的安全,具体可参
配对设备的最大数量是 20其中加密设备的数量不超过 17默认值是 7。如果想要修改加密设备的数量在 Wi-Fi menuconfig 设置 :ref:`CONFIG_ESP_WIFI_ESPNOW_MAX_ENCRYPT_NUM`
在发送广播数据之前必须添加具有广播 MAC 地址的设备。配对设备的信道范围是从 0 ~ 14。如果信道设置为 0数据将在当前信道上发送。否则必须使用本地设备所在的通道。
发送 ESP-NOW 数据
-----------------

View File

@ -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();
}