Commit Graph
570 Commits
Author SHA1 Message Date
Luo Xu 85d760323f fix(ble_mesh): re-check scan dev-found cb before scan-rsp invocation
(cherry picked from commit 9a3a767824)

Co-authored-by: luoxu <luoxu@espressif.com>
2026-07-06 17:44:30 +08:00
Luo Xu db95f9081d fix(ble_mesh): comment out logs containing sensitive keys
(cherry picked from commit 781d6b2314)

Co-authored-by: luoxu <luoxu@espressif.com>
2026-07-06 17:44:30 +08:00
Luo Xu 0fd8253754 fix(ble_mesh): validate PB-ADV start segment length
(cherry picked from commit 912ec8dc62)

Co-authored-by: luoxu <luoxu@espressif.com>
2026-07-06 17:44:29 +08:00
Luo Xu 4c79d1f6db fix(ble_mesh): Reset reassembly buffer at start of each transaction
The reassembly buffer must be reset to its origin at the beginning of every
transaction. prov_msg_recv() pulls the PDU type byte (advancing buf->data by
one) and nothing restores it between transactions. Without this reset,
buf->data drifts forward by one byte per received PDU, causing the segment-0
memcpy to write past the end of the statically allocated rx buffer
(PROV_RX_BUF_SIZE), and the XACT_SEG_DATA() offsets used for continuation
segments to be skewed by the accumulated drift.


(cherry picked from commit 2c4acaa2aa)

Co-authored-by: luoxu <luoxu@espressif.com>
2026-07-06 17:44:28 +08:00
Luo Xu fd96eeb6a2 fix(ble_mesh): fix DFD client message parsing and encoding bugs
Fix multiple wire-format and robustness issues in the DFD client
(dfd_cli.c):

- handle_capabilities: read oob_retrieval_supported as u8 instead of
  le32. The server encodes a single byte; le32 over-consumed 3 bytes
  of the URL scheme list and could over-read the buffer.
- handle_upload_status: extract upload_progress from bits 0-6 (& 0x7F)
  and upload_type from bit 7 (>> 7), matching the server encoding
  (progress | BIT(7)). The previous >>1 / &0x01 returned wrong values,
  mis-classified in-band vs OOB, and falsely rejected valid OOB
  messages with high progress.
- handle_dfd_status: correct the transfer-mode byte layout to
  trans_mode bits 0-1, update_policy bit 2, RFU bits 3-7 (previously
  read bits 6-7 / 5), and fix the RFU mask to 0xF8. Now matches the
  struct bitfield definition and the DFD server.
- handle_dfd_status: report status+phase and return early when
  buf->len == 0 (IDLE phase) instead of pulling 10 absent bytes.
- bt_mesh_dfd_cli_distribution_start: encode trans_mode/update_policy
  into bits 0-2 so the server decodes them correctly.
- handle_receiver_list: validate buf->len >= entries_cnt * 5 before
  the loop, and handle entries_cnt == 0 without relying on calloc(0).
- handle_receiver_status: pass the status value (not the whole union)
  to the %d log format, fixing undefined behavior.
- dfd_client_recv_status: drop the dead BLE_MESH_DFD_OP_CAPABILITIES_GET
  case (a client-send opcode) from the receive switch.
- bt_mesh_dfd_cli_receivers_add: widen msg_length to uint32_t to avoid
  uint16_t overflow that bypassed the PDU size guard; add a NULL check
  for the receivers array.
- bt_mesh_dfd_cli_distribution_upload_oob_start: return -EINVAL
  instead of -1 for consistency with the rest of the file.


(cherry picked from commit 43137475e1)

Co-authored-by: luoxu <luoxu@espressif.com>
2026-07-06 17:44:26 +08:00
Luo Xu 81602499af fix(ble_mesh): added max dfd srv count limit
(cherry picked from commit 781218cb62)

Co-authored-by: luoxu <luoxu@espressif.com>
2026-07-06 17:44:24 +08:00
Luo Xu e374e94a58 fix(ble_mesh): reject invalid chunk size
(cherry picked from commit 35cd10fbdf)

Co-authored-by: luoxu <luoxu@espressif.com>
2026-07-06 17:44:22 +08:00
Luo Xu 33ef03c65c fix(ble_mesh): fixed invalid disconnect handler wrote
(cherry picked from commit 52cfff707f)

Co-authored-by: luoxu <luoxu@espressif.com>
2026-07-06 17:44:21 +08:00
Luo Xu 0924e81ca6 fix(ble_mesh): fixed BLE-Mesh NimBLE extended-adv reassembly buffer overflow on COMPLETE fragment
(cherry picked from commit 1b22467f63)

Co-authored-by: luoxu <luoxu@espressif.com>
2026-07-06 17:44:20 +08:00
Luo Xu c146056e55 fix(ble_mesh): fixed BLE-Mesh GATTS read-callback error
(cherry picked from commit 00adfb3cbc)

Co-authored-by: luoxu <luoxu@espressif.com>
2026-07-06 17:44:19 +08:00
luoxu b710ac9830 fix(ble_mesh): Disable warning logging when advertising packets are discarded 2026-06-30 16:59:12 +08:00
Jiang Jiang Jian c1aeac2888 Merge branch 'bugfix/fix_bluedroid_ai_review_bugs_20260427_v6.0' into 'release/v6.0'
Bugfix/fix bluedroid ai review bugs 20260427 (6.0)

See merge request espressif/esp-idf!49541
2026-06-29 15:39:47 +08:00
Zhi Wei Jian b55f972546 fix(bt): fix BTC task and BLE mesh bluedroid adapter
(cherry picked from commit 678fb93245)

Co-authored-by: zhiweijian <zhiweijian@espressif.com>
2026-06-10 19:54:01 +08:00
luoxu 4a4b74fd6d fix(ble_mesh): Miscellaneous bugfixes according to our internal bug report (v2) 2026-06-05 14:32:21 +08:00
ShenWeilong d8c912eb4d change(bt): Separated bt/cmakelist to bt/controller/cmakelist and bt/porting/cmakelist 2026-05-25 21:01:21 +08:00
Luo Xu eb85cacef1 fix(ble_mesh): fix Friend queue losing segmented messages for LPN
(cherry picked from commit 1f4c6ee31b)

Co-authored-by: luoxu <luoxu@espressif.com>
2026-04-30 21:41:29 +08:00
luoxu 5a697b59c9 fix(ble/bluedroid): Change BLE mesh adapter to use BTA APIs 2026-04-24 15:12:54 +08:00
Liu Linyan bb7035f838 fix(ble_mesh): Miscellaneous bugfixes according to our internal bug report 2026-03-20 13:59:28 +08:00
luoxu b738036ee5 feat(ble_mesh): fixed configuration of core nums 2026-03-20 13:59:28 +08:00
Jiang Jiang Jian d6000ccecd Merge branch 'feat/use_common_config_to_sel_crypt_lib_v6.0' into 'release/v6.0'
Feat/use common config to sel crypt lib (v6.0)

See merge request espressif/esp-idf!46408
2026-03-20 10:39:59 +08:00
Jiang Jiang Jian e4caa65b0b Merge branch 'fix/ble_mesh_nimble_connection_failed_v6.0' into 'release/v6.0'
fix(ble_mesh):fixed nimble connection failed (v6.0)

See merge request espressif/esp-idf!46118
2026-03-20 10:37:10 +08:00
Shen Wei Longandluoxu 9601e3ac8e remove(ble_mesh): deprecate the tinycrypt library within the Bluetooth Mesh component
(cherry picked from commit 4e006884f8)

Co-authored-by: luoxu <luoxu@espressif.com>
2026-03-09 09:23:36 +00:00
Shen Wei Long b57d517ef9 change(bt): use BT_SMP_CRYPTO_STACK_MBEDTLS to select bt cryption lib
(cherry picked from commit aa40fdcc64)

Co-authored-by: ShenWeilong <shenweilong@espressif.com>
2026-03-09 09:23:35 +00:00
Luo Xu f06aa06c78 fix(ble_mesh):fixed nimble connection failed
(cherry picked from commit 2af193dac4)

Co-authored-by: luoxu <luoxu@espressif.com>
2026-02-27 17:43:24 +08:00
Luo Xu e61f9a42df feat(ble_mesh): ignored the previous server status to avoid drop target by mistake
(cherry picked from commit bc2d56b72a)

Co-authored-by: luoxu <luoxu@espressif.com>
2026-02-25 15:46:11 +08:00
Luo Xu b1c48b1e58 feat(ble_mesh): refuse to suspend dfu client when the last chunk sent
(cherry picked from commit e039b33bb1)

Co-authored-by: luoxu <luoxu@espressif.com>
2026-02-25 15:46:11 +08:00
Luo Xu 2b72226422 fix(ble_mesh): added internal buffer to store dfu targets
The protocol may still receive DFU-related packets from the
network (such as forwarded or retransmitted ones) after DFU ends,
while the user might release the targets immediately after DFU completion.
However, since the list head is not empty, the protocol could access
already-freed memory when iterating through the targets.


(cherry picked from commit 8c8b43f564)

Co-authored-by: luoxu <luoxu@espressif.com>
2026-02-25 15:46:11 +08:00
Luo Xu 9af31f244e fix(ble_mesh): fix blob transfer failure handling and chunk processing
- Fix DFU server transfer error state ordering to ensure proper callback delivery
- Add validation to discard chunks when blob server is not in busy state
- Prevent chunk processing when server is not in active transfer state


(cherry picked from commit f959884b2f)

Co-authored-by: luoxu <luoxu@espressif.com>
2026-02-25 15:46:11 +08:00
Luo Xu 57f0929cd2 fix(ble_mesh): ensure blob client/server work correctly with varying chunk sizes
(cherry picked from commit 3a8851422f)

Co-authored-by: luoxu <luoxu@espressif.com>
2026-02-25 15:46:11 +08:00
Luo Xu c640c3d7ff fix(ble_mesh): Miscellaneous fixes for blob
(cherry picked from commit c3faf5559a)

Co-authored-by: luoxu <luoxu@espressif.com>
2026-02-25 15:46:11 +08:00
Luo Xu afd63b70dd feat(ble_mesh): update log compression for ble mesh lib
(cherry picked from commit 7c4b104f61)

Co-authored-by: luoxu <luoxu@espressif.com>
2026-01-15 17:43:33 +08:00
Island 0444cf0f5d Merge branch 'feat/ble_mesh_blob_adapt_to_long_packet_v6.0' into 'release/v6.0'
feat(ble_mesh): adapt blob cli&srv to long packet (v6.0)

See merge request espressif/esp-idf!44697
2026-01-07 19:47:52 +08:00
Island 35ff0c786d Merge branch 'feat/ble_mesh_unify_crypto_v6.0' into 'release/v6.0'
Feat/ble mesh unify crypto v6.0

See merge request espressif/esp-idf!44818
2026-01-07 19:47:38 +08:00
Island 166ff6f837 Merge branch 'fix/ble_mesh_eliminate_deprecated_warn_for_mbt_v6.0' into 'release/v6.0'
fix(ble_mesh): eliminate deprecated warning for mbt (v6.0)

See merge request espressif/esp-idf!44630
2026-01-07 12:15:23 +08:00
luoxu 87969e4905 feat(ble_mesh): update lib commit to d48251ab82 2026-01-06 15:01:03 +08:00
luoxu 43f92dfc1a feat(ble_mesh): fixed issues where the incorrect node oob private setting 2026-01-06 15:01:03 +08:00
luoxu 650824bad0 feat(ble_mesh): supported using little endian crypto components 2026-01-06 15:01:03 +08:00
luoxu a19a40066e feat(ble_mesh): unified ble mesh crypto 2026-01-06 15:01:03 +08:00
Luo Xu e7c5793f92 fix(ble_mesh): eliminate deprecated warning for mbt
(cherry picked from commit b9d834edc7)

Co-authored-by: luoxu <luoxu@espressif.com>
2026-01-05 00:04:54 +08:00
Luo Xu f4c07b6702 feat(ble_mesh): adapt blob cli&srv to long packet
(cherry picked from commit a232b7c7af)

Co-authored-by: luoxu <luoxu@espressif.com>
2026-01-05 00:04:35 +08:00
luoxu 6e34934433 feat(ble_mesh): dfd client/server supported 2025-12-22 21:20:39 +08:00
Mahavir Jain 7da79a653c Merge branch 'feature/mbedtls_psa_migration_v6.0' into 'release/v6.0'
feat(mbedtls): PSA Migration to release v6.0

See merge request espressif/esp-idf!43323
2025-12-21 13:52:48 +05:30
Jiang Jiang Jian 9e0b06d2b1 Merge branch 'fix/ble_mesh_proxy_cli_coexists_with_adv_v6.0' into 'release/v6.0'
fix(ble_mesh): Fix start callback timing when GATT and ADV bearers coexist (v6.0)

See merge request espressif/esp-idf!44419
2025-12-21 15:37:34 +08:00
Luo Xu 0d4000caf0 feat(ble_mesh): fix issues with advtypes
(cherry picked from commit 1c4f6045cf)

Co-authored-by: luoxu <luoxu@espressif.com>
2025-12-19 13:43:29 +08:00
Luo Xu 9ea0f24646 feat(ble_mesh): update ble mesh multi connections config
(cherry picked from commit b63a0c2b78)

Co-authored-by: luoxu <luoxu@espressif.com>
2025-12-19 13:43:29 +08:00
Luo Xu df0150a16f fix(ble_mesh): Fix start callback timing when GATT and ADV bearers coexist
Add BLE_MESH_SEND_START_CB macro to ensure start callback is called
exactly once when both GATT and ADV bearers are used.


(cherry picked from commit 48a84e8299)

Co-authored-by: luoxu <luoxu@espressif.com>
2025-12-19 13:43:29 +08:00
Ashish Sharma b0da66f7e1 feat(bt): migrate mbedtls to PSA APIs 2025-12-18 21:18:58 +08:00
Luo Xu 62276a3a0e fix(ble_mesh): fixed incorrect rpl behavior in transport enh
(cherry picked from commit 29a722296f)

Co-authored-by: luoxu <luoxu@espressif.com>
2025-12-18 17:43:17 +08:00
Luo Xu d536847cad fix(ble_mesh): fix memory issue in nimble gap event forwarding
(cherry picked from commit aeab65c1a7)

Co-authored-by: luoxu <luoxu@espressif.com>
2025-12-15 17:43:28 +08:00
luoxu 0a716606c7 feat(ble_mesh): update lib commit to 4446669404 2025-12-10 14:35:33 +08:00