From 58dffd9b3cf15063b047e0f488182345d0968d81 Mon Sep 17 00:00:00 2001 From: liuning Date: Fri, 29 Dec 2023 11:29:38 +0800 Subject: [PATCH 1/8] feat(coex): improve Wi-Fi connecting compatibility at coexistence --- components/esp_coex/lib | 2 +- components/esp_rom/esp32c2/ld/esp32c2.rom.ld | 4 ++-- components/esp_rom/esp32c3/ld/esp32c3.rom.eco7.ld | 2 +- components/esp_rom/esp32c3/ld/esp32c3.rom.ld | 2 +- components/esp_rom/esp32c6/ld/esp32c6.rom.pp.ld | 2 +- components/esp_rom/esp32s3/ld/esp32s3.rom.ld | 2 +- 6 files changed, 7 insertions(+), 7 deletions(-) diff --git a/components/esp_coex/lib b/components/esp_coex/lib index 496ee81e168..7016fb29713 160000 --- a/components/esp_coex/lib +++ b/components/esp_coex/lib @@ -1 +1 @@ -Subproject commit 496ee81e168881cad93f9a813802e7f7a6daec92 +Subproject commit 7016fb297135efc5dbdf84b5c795335c82f561c3 diff --git a/components/esp_rom/esp32c2/ld/esp32c2.rom.ld b/components/esp_rom/esp32c2/ld/esp32c2.rom.ld index 6d4998538af..e1e7ae7d0f4 100644 --- a/components/esp_rom/esp32c2/ld/esp32c2.rom.ld +++ b/components/esp_rom/esp32c2/ld/esp32c2.rom.ld @@ -1474,7 +1474,7 @@ ebuf_list_remove = 0x40001adc; GetAccess = 0x40001aec; hal_mac_is_low_rate_enabled = 0x40001af0; hal_mac_tx_get_blockack = 0x40001af4; -hal_mac_tx_set_ppdu = 0x40001af8; +/*hal_mac_tx_set_ppdu = 0x40001af8;*/ ic_get_trc = 0x40001afc; /* ic_mac_deinit = 0x40001b00; */ ic_mac_init = 0x40001b04; @@ -1561,7 +1561,7 @@ ppTask = 0x40001c44; ppTxPkt = 0x40001c48; ppTxProtoProc = 0x40001c4c; ppTxqUpdateBitmap = 0x40001c50; -pp_coex_tx_request = 0x40001c54; +/*pp_coex_tx_request = 0x40001c54;*/ pp_hdrsize = 0x40001c58; pp_post = 0x40001c5c; pp_process_hmac_waiting_txq = 0x40001c60; diff --git a/components/esp_rom/esp32c3/ld/esp32c3.rom.eco7.ld b/components/esp_rom/esp32c3/ld/esp32c3.rom.eco7.ld index 19f62f387cb..0c1d5c191ab 100644 --- a/components/esp_rom/esp32c3/ld/esp32c3.rom.eco7.ld +++ b/components/esp_rom/esp32c3/ld/esp32c3.rom.eco7.ld @@ -6,7 +6,7 @@ esf_buf_alloc = 0x400015bc; esf_buf_alloc_dynamic = 0x400015c0; esf_buf_recycle = 0x400015c4; -hal_mac_tx_set_ppdu = 0x400015d4; +/*hal_mac_tx_set_ppdu = 0x400015d4;*/ ic_mac_deinit = 0x400015dc; lmacDiscardMSDU = 0x400015f4; /*lmacSetTxFrame = 0x40001628;*/ diff --git a/components/esp_rom/esp32c3/ld/esp32c3.rom.ld b/components/esp_rom/esp32c3/ld/esp32c3.rom.ld index a287e604474..0d86b315ad1 100644 --- a/components/esp_rom/esp32c3/ld/esp32c3.rom.ld +++ b/components/esp_rom/esp32c3/ld/esp32c3.rom.ld @@ -1591,7 +1591,7 @@ ppTask = 0x40001720; ppTxPkt = 0x40001724; ppTxProtoProc = 0x40001728; ppTxqUpdateBitmap = 0x4000172c; -pp_coex_tx_request = 0x40001730; +/*pp_coex_tx_request = 0x40001730;*/ pp_hdrsize = 0x40001734; pp_post = 0x40001738; pp_process_hmac_waiting_txq = 0x4000173c; diff --git a/components/esp_rom/esp32c6/ld/esp32c6.rom.pp.ld b/components/esp_rom/esp32c6/ld/esp32c6.rom.pp.ld index af1fbbc8e1b..751cc2977b6 100644 --- a/components/esp_rom/esp32c6/ld/esp32c6.rom.pp.ld +++ b/components/esp_rom/esp32c6/ld/esp32c6.rom.pp.ld @@ -111,7 +111,7 @@ ppSubFromAMPDU = 0x40000d38; //ppTxPkt = 0x40000d40; ppTxProtoProc = 0x40000d44; ppTxqUpdateBitmap = 0x40000d48; -pp_coex_tx_request = 0x40000d4c; +/*pp_coex_tx_request = 0x40000d4c;*/ pp_hdrsize = 0x40000d50; pp_post = 0x40000d54; pp_process_hmac_waiting_txq = 0x40000d58; diff --git a/components/esp_rom/esp32s3/ld/esp32s3.rom.ld b/components/esp_rom/esp32s3/ld/esp32s3.rom.ld index b38a8772a18..b8cb6f39f8b 100644 --- a/components/esp_rom/esp32s3/ld/esp32s3.rom.ld +++ b/components/esp_rom/esp32s3/ld/esp32s3.rom.ld @@ -1894,7 +1894,7 @@ ppSubFromAMPDU = 0x40005694; ppTxPkt = 0x400056ac; ppTxProtoProc = 0x400056b8; ppTxqUpdateBitmap = 0x400056c4; -pp_coex_tx_request = 0x400056d0; +/*pp_coex_tx_request = 0x400056d0;*/ pp_hdrsize = 0x400056dc; pp_post = 0x400056e8; pp_process_hmac_waiting_txq = 0x400056f4; From 3b86f974ea787eaa847ff69a9d3d68cec374328f Mon Sep 17 00:00:00 2001 From: liuning Date: Tue, 27 Feb 2024 09:42:52 +0800 Subject: [PATCH 2/8] example: add custom partition table for mesh manual networking --- examples/mesh/manual_networking/partitions.csv | 5 +++++ examples/mesh/manual_networking/sdkconfig.defaults | 5 +++++ 2 files changed, 10 insertions(+) create mode 100644 examples/mesh/manual_networking/partitions.csv create mode 100644 examples/mesh/manual_networking/sdkconfig.defaults diff --git a/examples/mesh/manual_networking/partitions.csv b/examples/mesh/manual_networking/partitions.csv new file mode 100644 index 00000000000..028e2a905b6 --- /dev/null +++ b/examples/mesh/manual_networking/partitions.csv @@ -0,0 +1,5 @@ +# Name, Type, SubType, Offset, Size, Flags +# Note: if you have increased the bootloader size, make sure to update the offsets to avoid overlap +nvs, data, nvs, 0x9000, 0x6000, +phy_init, data, phy, 0xf000, 0x1000, +factory, app, factory, 0x10000, 1200K, diff --git a/examples/mesh/manual_networking/sdkconfig.defaults b/examples/mesh/manual_networking/sdkconfig.defaults new file mode 100644 index 00000000000..4fa68056243 --- /dev/null +++ b/examples/mesh/manual_networking/sdkconfig.defaults @@ -0,0 +1,5 @@ +CONFIG_PARTITION_TABLE_CUSTOM=y +CONFIG_PARTITION_TABLE_CUSTOM_FILENAME="partitions.csv" +CONFIG_PARTITION_TABLE_FILENAME="partitions.csv" +CONFIG_PARTITION_TABLE_OFFSET=0x8000 +CONFIG_PARTITION_TABLE_MD5=y From b32d47ab98a9532c75c7d46b011bbd3010db8bf7 Mon Sep 17 00:00:00 2001 From: Sudeep Mohanty Date: Tue, 19 Mar 2024 17:33:18 +0100 Subject: [PATCH 3/8] fix(freertos): Fixed an issue where accessing task lists could overrun memory This commit fixes a potential issue of illegal memory access when accessing the various task lists in FreeRTOS while fetching tasks using the xTaskGetNext() function. --- components/freertos/esp_additions/freertos_tasks_c_additions.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/components/freertos/esp_additions/freertos_tasks_c_additions.h b/components/freertos/esp_additions/freertos_tasks_c_additions.h index 9f3ffbb1224..38af06e264f 100644 --- a/components/freertos/esp_additions/freertos_tasks_c_additions.h +++ b/components/freertos/esp_additions/freertos_tasks_c_additions.h @@ -936,7 +936,7 @@ static List_t * pxGetTaskListByIndex( UBaseType_t uxListIndex ) { pxTaskList = &pxReadyTasksLists[ configMAX_PRIORITIES - 1 - uxListIndex ]; } - else if( uxListIndex < configMAX_PRIORITIES + xNonReadyTaskListsCnt + 1 ) + else if( uxListIndex < configMAX_PRIORITIES + xNonReadyTaskListsCnt ) { pxTaskList = non_ready_task_lists[ uxListIndex - configMAX_PRIORITIES ]; } From f5777749dc78b91e09c3b1b73d8007f8122d6b0e Mon Sep 17 00:00:00 2001 From: luoxu Date: Mon, 13 Nov 2023 11:12:25 +0800 Subject: [PATCH 4/8] bugfix(ble_mesh): Avoid provisioner handling messages from nodes that have already left the network. --- components/bt/esp_ble_mesh/core/net.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/components/bt/esp_ble_mesh/core/net.c b/components/bt/esp_ble_mesh/core/net.c index 66ae08c80d7..8bf6c870156 100644 --- a/components/bt/esp_ble_mesh/core/net.c +++ b/components/bt/esp_ble_mesh/core/net.c @@ -1751,9 +1751,7 @@ static bool ignore_net_msg(uint16_t src, uint16_t dst) } if (IS_ENABLED(CONFIG_BLE_MESH_PROVISIONER) && - bt_mesh_is_provisioner_en() && - BLE_MESH_ADDR_IS_UNICAST(dst) && - bt_mesh_elem_find(dst)) { + bt_mesh_is_provisioner_en()) { /* If the destination address of the message is the element * address of Provisioner, but Provisioner fails to find the * node in its provisioning database, then this message will From 436e3d33457cc2639f3fafa63ab79ed750e663f7 Mon Sep 17 00:00:00 2001 From: wangjialiang Date: Fri, 24 Nov 2023 12:02:34 +0800 Subject: [PATCH 5/8] update invalid links in the ble mesh example documentation --- components/bt/esp_ble_mesh/README.md | 2 +- .../fast_provisioning/fast_prov_server/tutorial/EspBleMesh.md | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/components/bt/esp_ble_mesh/README.md b/components/bt/esp_ble_mesh/README.md index 58255a800c2..3cda5062887 100644 --- a/components/bt/esp_ble_mesh/README.md +++ b/components/bt/esp_ble_mesh/README.md @@ -16,6 +16,6 @@ The ESP-BLE-MESH networking enables many-to-many (m:m) device communications and - [API Reference](https://docs.espressif.com/projects/esp-idf/en/latest/api-reference/bluetooth/esp-ble-mesh.html) -### [ESP-BLE-MESH Examples](https://github.com/espressif/esp-idf/tree/master/examples/bluetooth/esp_ble_mesh) +### [ESP-BLE-MESH Examples](../../../examples/bluetooth/esp_ble_mesh) - Refer to **ESP-BLE-MESH Examples** of [Getting Started](https://docs.espressif.com/projects/esp-idf/en/latest/api-guides/esp-ble-mesh/ble-mesh-index.html#getting-started-with-esp-ble-mesh) for the tutorials of ESP BLE Mesh examples. diff --git a/examples/bluetooth/esp_ble_mesh/fast_provisioning/fast_prov_server/tutorial/EspBleMesh.md b/examples/bluetooth/esp_ble_mesh/fast_provisioning/fast_prov_server/tutorial/EspBleMesh.md index 0d252c886d8..3ddb036fbac 100644 --- a/examples/bluetooth/esp_ble_mesh/fast_provisioning/fast_prov_server/tutorial/EspBleMesh.md +++ b/examples/bluetooth/esp_ble_mesh/fast_provisioning/fast_prov_server/tutorial/EspBleMesh.md @@ -12,7 +12,7 @@ A video of this example can be seen from [here](https://dl.espressif.com/BLE/pub > Note: > -> 1. Please flash the [`fast_prov_server`](https://github.com/espressif/esp-idf/tree/master/examples/bluetooth/esp_ble_mesh/fast_provisioning/fast_prov_server) to the development boards first; +> 1. Please flash the [`fast_prov_server`](../../) to the development boards first; > 2. To have a better understanding of the performance of the BLE Mesh network, we recommend that at least 3 devices should be added in your network. > 3. We recommend that you solder LED indicators if your development board does not come with lights. > 4. Please check the type of board and LED pin definition enabled in `Example BLE Mesh Config` by running `idf.py menuconfig` From 54a38a87e2df702f55679631f7be2470a8c19fb7 Mon Sep 17 00:00:00 2001 From: luoxu Date: Tue, 19 Mar 2024 17:38:17 +0800 Subject: [PATCH 6/8] fix(ble_mesh): fix NRF mesh(android) provisioning node failed Closes: https://github.com/espressif/esp-idf/issues/12871 --- components/bt/esp_ble_mesh/core/net.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/components/bt/esp_ble_mesh/core/net.c b/components/bt/esp_ble_mesh/core/net.c index 66ae08c80d7..4ca54ca820c 100644 --- a/components/bt/esp_ble_mesh/core/net.c +++ b/components/bt/esp_ble_mesh/core/net.c @@ -1810,7 +1810,7 @@ void bt_mesh_net_recv(struct net_buf_simple *data, int8_t rssi, bt_mesh_elem_find(rx.ctx.recv_dst)); if (IS_ENABLED(CONFIG_BLE_MESH_GATT_PROXY_SERVER) && - bt_mesh_private_gatt_proxy_state_get() == BLE_MESH_PRIVATE_GATT_PROXY_DISABLED && + bt_mesh_private_gatt_proxy_state_get() != BLE_MESH_PRIVATE_GATT_PROXY_ENABLED && net_if == BLE_MESH_NET_IF_PROXY) { bt_mesh_proxy_server_addr_add(data, rx.ctx.addr); From c710a583bbd33661c68e00d6865cf133446a9fcc Mon Sep 17 00:00:00 2001 From: luoxu Date: Thu, 21 Mar 2024 15:16:49 +0800 Subject: [PATCH 7/8] fix(ble_mesh): Free segment tx buffers on tx reset for SAR enhancement Closes: https://github.com/espressif/esp-idf/issues/13384 --- components/bt/esp_ble_mesh/core/transport.enh.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/components/bt/esp_ble_mesh/core/transport.enh.c b/components/bt/esp_ble_mesh/core/transport.enh.c index 4951c582905..2dc562d94b1 100644 --- a/components/bt/esp_ble_mesh/core/transport.enh.c +++ b/components/bt/esp_ble_mesh/core/transport.enh.c @@ -368,7 +368,6 @@ static void seg_tx_reset(struct seg_tx *tx) tx->cb_data = NULL; tx->seq_auth = 0U; tx->sub = NULL; - tx->seg_n = 0; tx->last_seg_n = 0; tx->lsn_updated = 0; tx->dst = BLE_MESH_ADDR_UNASSIGNED; @@ -385,6 +384,7 @@ static void seg_tx_reset(struct seg_tx *tx) } tx->nack_count = 0U; + tx->seg_n = 0; bt_mesh_seg_tx_unlock(); From f0e97da81eab200bc0080f9276c75e5de947199a Mon Sep 17 00:00:00 2001 From: liuning Date: Tue, 27 Feb 2024 20:03:25 +0800 Subject: [PATCH 8/8] feat(coex): support to scan long time on channel, fix coexist sync issue --- components/esp_coex/lib | 2 +- components/esp_wifi/lib | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/components/esp_coex/lib b/components/esp_coex/lib index 7016fb29713..2717868407a 160000 --- a/components/esp_coex/lib +++ b/components/esp_coex/lib @@ -1 +1 @@ -Subproject commit 7016fb297135efc5dbdf84b5c795335c82f561c3 +Subproject commit 2717868407a01878a49d19794538b6da120597ae diff --git a/components/esp_wifi/lib b/components/esp_wifi/lib index ca06494db94..0e0ccbb3ed7 160000 --- a/components/esp_wifi/lib +++ b/components/esp_wifi/lib @@ -1 +1 @@ -Subproject commit ca06494db941947214367a95c062805383d6bf74 +Subproject commit 0e0ccbb3ed7afa066a2935a0a3a6bcd65740d2f5