Commit Graph

34663 Commits

Author SHA1 Message Date
Roland Dobai
11bc5423c9 Merge branch 'feat/cmakev2_bootloader_v6.0' into 'release/v6.0'
feat(cmakev2): build bootloader using the cmakev2 build system (v6.0)

See merge request espressif/esp-idf!47903
2026-04-28 08:53:53 +02:00
Island
7fc3744abd Merge branch 'change/ble_update_lib_20260409_v6.0' into 'release/v6.0'
change(ble): [AUTO_MR] 20260409 - Update ESP BLE Controller Lib (6.0)

See merge request espressif/esp-idf!47419
2026-04-28 14:25:25 +08:00
Island
6cf5b5f67f Merge branch 'dev/ble-log-202603_v6.0' into 'release/v6.0'
dev: BLE Log 202603 (6.0)

See merge request espressif/esp-idf!47277
2026-04-28 13:25:12 +08:00
Zhang Wen Xu
9e2188364b Merge branch 'feat/ot_make_esp_netif_glue_optional_v6.0' into 'release/v6.0'
feat(openthread): make esp_netif glue optional (v6.0)

See merge request espressif/esp-idf!47859
2026-04-28 02:41:19 +00:00
Zhang Wen Xu
b7cb1587d6 Merge branch 'fix/add_ifndef_ot_config_v6.0' into 'release/v6.0'
fix(openthread): add ifndef guards to ftd / mtd config (v6.0)

See merge request espressif/esp-idf!47171
2026-04-28 02:39:54 +00:00
Shu Chen
ae4c1edc0c Merge branch 'feat/update_openthread_upstream_v6.0' into 'release/v6.0'
feat(openthread): update openthread upstream (v6.0)

See merge request espressif/esp-idf!47464
2026-04-28 02:37:57 +00:00
Island
4e1a423a0f Merge branch 'feat/support_adv_monitor_for_bluedroid_host_v6.0' into 'release/v6.0'
feat(ble/bluedroid): support adv monitor feature (6.0)

See merge request espressif/esp-idf!47038
2026-04-28 10:26:54 +08:00
Island
29687c6d70 Merge branch 'bugfix/fix_some_bluedroid_bugs_260121_v6.0' into 'release/v6.0'
Bugfix/fix some bluedroid bugs 260121 (6.0)

See merge request espressif/esp-idf!46984
2026-04-28 10:26:34 +08:00
Island
3ef0ca7e36 Merge branch 'feat/allow_creat_vendor_descriptor_by_service_table_v6.0' into 'release/v6.0'
feat(ble/bluedroid): Allow add vendor descriptor by service table create API (6.0)

See merge request espressif/esp-idf!47043
2026-04-28 10:25:59 +08:00
Marius Vikhammer
2f71725790 Merge branch 'feature/wdt_rom_patch_slim_v6.0' into 'release/v6.0'
fix(esp_hal_wdt): reduce IRAM usage of WDT init ROM patch (v6.0)

See merge request espressif/esp-idf!47359
2026-04-28 09:03:15 +08:00
Marius Vikhammer
d11267de2b Merge branch 'docs/refresh-broken-links_v6.0' into 'release/v6.0'
docs: refresh broken documentation links (v6.0)

See merge request espressif/esp-idf!47493
2026-04-28 09:03:01 +08:00
Frantisek Hrbata
e1fbff334b fix(cmakev2/bootloader): use bootloader.bin when signing is not enabled
When CONFIG_SECURE_BOOT_V2_ENABLED=y but
CONFIG_SECURE_BOOT_BUILD_SIGNED_BINARIES is not set, produce the
binary directly as bootloader.bin instead of bootloader-unsigned.bin.

This matches the v1 behavior where the intermediate binary name is
conditional: bootloader-unsigned.bin only when build-time signing is
enabled (so the signed output can be named bootloader.bin), otherwise
the output is bootloader.bin directly.

Signed-off-by: Frantisek Hrbata <frantisek.hrbata@espressif.com>
2026-04-27 22:07:10 +08:00
Frantisek Hrbata
c6db3d1d07 fix(cmakev2/project): guard compiler optimization flags with build property
The __init_project_configuration() function in cmakev2's project.cmake
unconditionally applied app-level compiler optimization flags based on
CONFIG_COMPILER_OPTIMIZATION_* Kconfig options. When the bootloader
subproject was built with cmakev2, these app-level flags leaked into the
bootloader compile command alongside the correct bootloader-specific
flags from CONFIG_BOOTLOADER_COMPILER_OPTIMIZATION_*.

For example, with the default configuration (app: DEBUG, bootloader:
SIZE), the bootloader received both "-Og -fno-shrink-wrap" (from app
config) and "-Os -freorder-blocks" (from bootloader config). While GCC
uses the last -O flag (-Os wins), the stray -fno-shrink-wrap persisted.

Introduce a SET_COMPILER_OPTIMIZATION build property that defaults to
YES when unset. Subprojects that manage their own optimization flags
(like the bootloader) can set this to NO before calling
idf_project_init() to prevent the default optimization flags from being
applied. This keeps project.cmake generic without requiring it to know
about specific subproject types.

Signed-off-by: Frantisek Hrbata <frantisek.hrbata@espressif.com>
2026-04-27 22:07:10 +08:00
Frantisek Hrbata
f34fa1c269 fix(esp_rom): exclude TLSF/multi_heap ROM patches from bootloader build
The bootloader does not use the heap allocator or TLSF, so the ROM
patch files esp_rom_tlsf.c and esp_rom_multi_heap.c are not needed
in the bootloader build.

In the cmakev1 build system this was never an issue because cmakev1
uses an early expansion phase where only Kconfig files for components
listed in BUILD_COMPONENTS are processed. Since the heap component is
not part of the bootloader's component list, its Kconfig options
(CONFIG_HEAP_TLSF_USE_ROM_IMPL, etc.) were never defined and the
conditional compilation of these source files was effectively skipped.

In the cmakev2 build system, Kconfig options from all discovered
components are visible regardless of whether the component is part
of the build. Because the bootloader reuses the main project's
sdkconfig (where CONFIG_HEAP_TLSF_USE_ROM_IMPL defaults to y on
targets with ROM TLSF support like esp32c2), the TLSF patch sources
were being compiled into the bootloader's esp_rom. This caused a
build failure because esp_rom_tlsf.c includes tlsf_block_functions.h
from the heap component, which is not a dependency of esp_rom and is
not part of the bootloader build.

Guard the TLSF and multi_heap ROM patch sources with NOT
BOOTLOADER_BUILD to prevent them from being compiled in the
bootloader context. This fix is compatible with both cmakev1 and
cmakev2.

Signed-off-by: Frantisek Hrbata <frantisek.hrbata@espressif.com>
2026-04-27 22:07:10 +08:00
Frantisek Hrbata
bff4657ad6 feat(bootloader): build bootloader using cmakev2
Add CMakeLists_v2.txt to the bootloader subproject, implementing the
bootloader build using the new cmakev2 IDF build framework.

The file covers the full bootloader build pipeline:
- Sets PROJECT_COMPONENTS_SOURCE to "idf_components" so that the
  subproject's built-in components (main/, components/) are treated as
  IDF components (priority 0) rather than project components (priority
  3).  This preserves the cmakev1 behaviour where user-supplied
  components in bootloader_components/ can override the built-in ones.
- Registers optional user-supplied bootloader components from the
  application project's bootloader_components/ directory, with support
  for selectively excluding individual components via
  IGNORE_EXTRA_COMPONENT.
- Bootstraps the cmakev2 framework (idf.cmake) and initialises the
  project with BOOTLOADER_BUILD and NON_OS_BUILD properties, which are
  also exposed as C preprocessor definitions.
- Sets GENERATE_SDKCONFIG to 0 to prevent the bootloader subproject
  from regenerating the main project's sdkconfig, as the bootloader
  has a different set of components and hence different Kconfig files.
- Sets the common implicit component dependencies shared by every
  bootloader component (log, esp_rom, esp_common, esp_hw_support,
  esp_libc, arch-specific component).
- Applies the compiler options specific for bootloader
- Selects the correct target-specific linker script, including a
  separate script for ESP32-P4 silicon revisions < v3.
- Links the bootloader ELF via idf_build_executable and then converts it
  to a flat binary via one of three paths depending on the secure boot
  configuration:
    * No secure boot: plain binary + size check + metadata.
    * Secure Boot V1 one-time-flash: plain binary with post-build
      instructions showing the esptool.py flash command.
    * Secure Boot V1 reflashable: derives the symmetric eFuse key from
      the ECDSA signing key, produces the reflash-digest image, and
      prints burn/flash instructions.
    * Secure Boot V2: produces an unsigned binary, optionally signs it
      with the configured signing key (RSA-PSS 3072, ECDSA P-256, or
      ECDSA P-384) via idf_sign_binary, and prints flash/multi-key
      signing instructions.
- Adds comprehensive inline documentation explaining each section's
  purpose, the rationale behind individual flags, and the relationships
  between Kconfig symbols and generated artefacts.

Signed-off-by: Frantisek Hrbata <frantisek.hrbata@espressif.com>
2026-04-27 22:07:10 +08:00
Frantisek Hrbata
3bd9f3806b fix(bootloader): remove CMAKE_CURRENT_LIST_DIR from bootloader_extra_component_dirs
`CMAKE_CURRENT_LIST_DIR` is actually `components/bootloader`, so it
doesn’t need to be passed via `EXTRA_COMPONENT_DIRS`: the build already
recognizes it as an esp-idf component.

In **cmakev1**, this is silently ignored: if a component with the same
name already exists, its directory is updated and the previous directory
is stored in the `COMPONENT_OVERRIDEN_DIR` component property.

In **cmakev2**, this is correctly detected and reported.

CMake Warning at /home/fhrbata/work/esp-idf/tools/cmakev2/utilities.cmake:63 (message):
   IDF: Component 'bootloader' directory '/home/fhrbata/work/esp-idf/components/bootloader'
   with higher priority 'project_extra_components' will be used instead of component directory
   '/home/fhrbata/work/esp-idf/components/bootloader' with lower priority 'idf_components'
Call Stack (most recent call first):
  /home/fhrbata/work/esp-idf/tools/cmakev2/component.cmake:625 (idf_warn)
  /home/fhrbata/work/esp-idf/tools/cmakev2/idf.cmake:411 (__init_component)
  /home/fhrbata/work/esp-idf/tools/cmakev2/project.cmake:580 (__init_components)
  CMakeLists_v2.txt:28 (idf_project_init)
  CMakeLists.txt:19 (include)

Since it doesn’t make sense to explicitly add the bootloader as an extra
component, remove it.

Signed-off-by: Frantisek Hrbata <frantisek.hrbata@espressif.com>
2026-04-27 22:07:10 +08:00
Frantisek Hrbata
4d85eb5ba7 fix(bootloader_support/cmake): initialize priv_include_dirs variable
For the bootloader build, the `priv_include_dirs` variable is
uninitialized, but it is used in the common call to
`idf_component_register`.

Using uninitialized variables is not allowed in cmakev2 because a
component may be evaluated in the context of another component’s
variable scope.

Signed-off-by: Frantisek Hrbata <frantisek.hrbata@espressif.com>
2026-04-27 22:07:10 +08:00
Frantisek Hrbata
36d3a180cf fix(esp_partition/cmake): remove unused PRIV_INCLUDE_DIRS
Currently, the bootloader version of the `esp_partition` component sets
`PRIV_INCLUDE_DIRS` using the `private_include_dirs` variable. However,
this variable is not properly initialized, which causes issues in
cmakev2. In cmakev2, components are evaluated recursively, and a
component may be evaluated in the context of another component, so
components must initialize all variables before using them.

Moreover, there are effectively no `PRIV_INCLUDE_DIRS` to set when the
component is evaluated for the bootloader. Therefore, remove
`PRIV_INCLUDE_DIRS` entirely for bootloader and test builds.

Signed-off-by: Frantisek Hrbata <frantisek.hrbata@espressif.com>
2026-04-27 22:07:10 +08:00
Roland Dobai
9130b6dd53 Merge branch 'fix/mmu-page-size-always-pass-v6' into 'release/v6.0'
change(esptool_py): always pass --flash-mmu-page-size to elf2image(v6.0)

See merge request espressif/esp-idf!47421
2026-04-27 16:00:36 +02:00
Mahavir Jain
38e814ba35 Merge branch 'feat/add_server_handshake_failure_user_cb_v6.0' into 'release/v6.0'
feat(esp_https_server): adds support for user callback on handshake failure (v6.0)

See merge request espressif/esp-idf!47492
2026-04-27 19:26:51 +05:30
Mahavir Jain
bd42cb2bde Merge branch 'fix/fix_esp_local_ctrl_potential_double_free_v6.0' into 'release/v6.0'
fix(esp_local_ctrl): fixes a potential double free (v6.0)

See merge request espressif/esp-idf!47488
2026-04-27 19:26:05 +05:30
Mahavir Jain
ae33665e58 Merge branch 'feat/check_crlf_http_server_response_headers_v6.0' into 'release/v6.0'
feat(esp_http_server): adds check for crlf in response creation (v6.0)

See merge request espressif/esp-idf!47499
2026-04-27 19:25:20 +05:30
Mahavir Jain
a7be1ba98c Merge branch 'fix/fix_esp_srp_sec2_auth_bypass_a_mod_n_v6.0' into 'release/v6.0'
fix(esp_srp): reject SRP client public key when A mod N is zero (v6.0)

See merge request espressif/esp-idf!47703
2026-04-27 19:25:01 +05:30
Mahavir Jain
9024a75850 Merge branch 'fix/protocomm-security2-srp-hd-double-free_v6.0' into 'release/v6.0'
fix(protocomm): null srp_hd after free in sec2 command0 error paths (v6.0)

See merge request espressif/esp-idf!47967
2026-04-27 19:24:24 +05:30
Euripedes Rocha
c10c02297f Merge branch 'fix/remove_asio_v6.0' into 'release/v6.0'
fix(configs): Remove mentions of ASIO from configs files (v6.0)

See merge request espressif/esp-idf!47644
2026-04-27 15:52:03 +02:00
Euripedes Rocha
600f9daba1 Merge branch 'feat/esp_netif_custom_ip_events_v6.0' into 'release/v6.0'
[esp_netif]: Add support for custom got-ip/lost-ip events (v6.0)

See merge request espressif/esp-idf!47641
2026-04-27 15:42:35 +02:00
Euripedes Rocha
700176ffeb Merge branch 'fix/lwip_sys_mem_frag_v6.0' into 'release/v6.0'
[lwip]: Allocate signals/mboxes once to reduce heap frag (v6.0)

See merge request espressif/esp-idf!47642
2026-04-27 15:33:57 +02:00
Fu Hanxi
3132b2edb1 Merge branch 'ci/eco-to-rev_v6.0' into 'release/v6.0'
ci: rename eco tags to revision (v6.0)

See merge request espressif/esp-idf!47085
2026-04-27 15:31:16 +02:00
Mahavir Jain
dc41452462 fix(protocomm): null srp_hd after free in sec2 command0 error paths
handle_session_command0() freed cur_session->srp_hd on every error path
without clearing the pointer. A subsequent sec2_close_session() call
(e.g. on BLE disconnect, or via sec2_new_session evicting the old
session) checks `if (cur_session->srp_hd)` and frees it again,
double-freeing a dangling pointer.
2026-04-27 10:09:17 +05:30
zhiweijian
3355b33b84 fix(ble/bluedroid): Fixed privacy callback triggering multiple times 2026-04-24 15:12:54 +08:00
zhiweijian
9a68172691 fix(ble/bluedroid): Fixed bluedrodi CI build error 2026-04-24 15:12:54 +08:00
zhiweijian
6444087316 fix(bt/bluedroid): Fixed AddCharacteristic failed when attr_len is zero for AUTO_RSP 2026-04-24 15:12:54 +08:00
zhiweijian
20a01bd591 disable some parameters check in CTE APIs 2026-04-24 15:12:54 +08:00
luoxu
5a697b59c9 fix(ble/bluedroid): Change BLE mesh adapter to use BTA APIs 2026-04-24 15:12:54 +08:00
zhiweijian
bc9bdd4580 fix(ble/bluedroid): optimize bluedroid host and fix GAP, memory, status and BTM API issues
- return HCI_ERR_MEMORY_FULL on cmd buffer alloc failure
- remove legacy adv/scan semaphores and mutex
- Use the same legacy gap callback instead of each independent legacy gap event callback
2026-04-24 15:12:54 +08:00
Zhi Wei Jian
344cc0a590 fix(ble/bluedroid): Null/range checks, crypto cleanup and API consistency
- smp_api.h/smp_int.h: SMP_OPCODE_ARRAY_SIZE and SecureConnectionOobDataReply
  declaration alignment
- p_256_ecc_pp/p_256_multprecision: bounds and overflow fixes in ECC/multiprecision
- smp_act: init le_key; p_dev_rec null check in smp_key_distribution;
  smp_compute_dhkey failure notify in smp_both_have_public_keys
- smp_api: early state/cb_evt check in SMP_SecureConnectionOobDataReply
- smp_cmac: input/length validation in cmac_aes_k_calculate and
  aes_cipher_msg_auth_code
- smp_keys: smp_gen_p2_4_confirm return and smp_calculate_comfirm_cont;
  smp_process_private_key/smp_compute_dhkey cleanup and peer_pub_be clear
- smp_l2c: fix callback param types with L2CAP
- smp_main: event/state bounds in smp_sm_event; smp_get_event_name default string
- smp_utils: cmd_code<SMP_OPCODE_ARRAY_SIZE and smp_cmd_build_act check;
  smp_mask_enc_key/smp_command_has_invalid_parameters bounds


(cherry picked from commit 50747e4f63)

Co-authored-by: zhiweijian <zhiweijian@espressif.com>
2026-04-24 15:12:54 +08:00
Zhi Wei Jian
38a232d1b5 fix(ble/bluedroid): BLE credit, reject when p_rcb NULL, timeout and leak fixes
- l2c_int: align struct/constant types with l2c_ble/l2c_main
- l2c_api: null/state checks in L2CA_SendFixedChnlData
- l2c_ble: reject when p_rcb==NULL, add L2CAP_CMD_BLE_FLOW_CTRL_CREDIT;
  l2cble_init_direct_conn int64_t timeout and link_timeout==0 fix
- l2c_link: null/state checks and cleanup in hci_disc_comp/timeout/send_to_lower
- l2c_main: free p_msg on FCR non-Basic and COC branches; fix LE credit handling;
  process_l2cap_cmd bounds
- l2c_utils: credit/queue cleanup and null checks in l2cu_disconnect_chnl


(cherry picked from commit 16d523e9bf)

Co-authored-by: zhiweijian <zhiweijian@espressif.com>
2026-04-24 15:12:54 +08:00
Zhi Wei Jian
71417d530e fix(ble/bluedroid): Fix double-free, exec write, bounds and HCI param checks
- gap_ble: add length/attribute checks in gap_proc_write_req
- gatt_cl: set p_cmd->p_cmd=NULL before memset to avoid double-free;
  pending_cl_req %= GATT_CL_MAX_LCB
- gatt_sr: fix exec write zeroed_attrs and offset/len bounds, OOM cleanup
- gatt_sr_hash: null checks for p_attr->p_next, p_data+=2, len==0 in
  gatts_calculate_datebase_hash, gatts_show_local_database
- gatt_utils: explicit return NULL, indent, idx<GATT_MAX_APPS checks,
  len>GATT_MAX_ATTR_LEN, gatt_cleanup_upon_disc dealloc branch
- hciblecmds: length/handle validation in BLE ext adv/BIG sync HCI commands


(cherry picked from commit 1d31286f1a)

Co-authored-by: zhiweijian <zhiweijian@espressif.com>
2026-04-24 15:12:53 +08:00
Zhi Wei Jian
c4b259b7d1 fix(ble/bluedroid): Event length checks and timer/alarm error handling
- btu_hcif: validate p_msg->len and hci_evt_len in process_event; pass evt_len to
  sub-handlers; fix cs_subevt num_steps_reported==0 malloc; bounds in
  command_complete and role_change_evt
- btu_task: handle osi_alarm_new/hash_map_set failure in btu_start_timer,
  btu_start_quick_timer, btu_start_timer_oneshot


(cherry picked from commit 537661fb2e)

Co-authored-by: zhiweijian <zhiweijian@espressif.com>
2026-04-24 15:12:53 +08:00
Zhi Wei Jian
b91d61ca72 fix(ble/bluedroid): BLE GAP/ACL/ISO/SCO null checks, evt_len and resource handling
- btm_acl: malloc/list_append failure handling, remove/memset order in btm_acl_removed
- btm_ble: remove incorrect sec_flags in SMP_OOB/NC/SC_OOB fall-through
- btm_ble_5_gap: btm_ble_hci_status_to_str unreachable return,
  BTM_BleSetExtendedAdvParams/BleStartExtAdv leak and bounds
- btm_ble_addr: fix indent in btm_find_dev_by_identity_addr
- btm_ble_gap: null check p_service_data, pass evt_len to btm_ble_process_adv_pkt,
  bounds in process_adv_pkt
- btm_ble_iso: align param types with declaration
- btm_ble_privacy: handle BTM_BLE_IRK_LIST_INVALID_INDEX in update_resolving_list,
  comment fixes
- btm_devctl: fix btm_vsc_complete param order/type
- btm_sco: add evt_len to btm_sco_process_num_completed_pkts for bounds check
- btm_ble_int.h/btm_int.h: add evt_len to process_adv_pkt and
  process_num_completed_pkts declarations


(cherry picked from commit 65b2cb2728)

Co-authored-by: zhiweijian <zhiweijian@espressif.com>
2026-04-24 15:12:53 +08:00
Zhi Wei Jian
c2b8d4ec44 fix(ble/bluedroid): Add length/pointer checks and fix error paths
- hci_hal_h4: validate packet length and pointers in hci_packet_complete,
  hdl_rx_adv_rpt, callbacks
- hci_layer: align hci_start_up error path and return; validate packet len in
  filter_incoming_event
- hci_packet_factory: ensure BT_HDR length/offset initialized in make_command_no_params
- packet_fragmenter: validate length before fragment_and_dispatch


(cherry picked from commit 778dd2ab5e)

Co-authored-by: zhiweijian <zhiweijian@espressif.com>
2026-04-24 15:12:53 +08:00
Zhi Wei Jian
56f1c192d1 fix(ble/bluedroid): Align config, controller indent and init error paths
- bt_target: remove/align obsolete macros with Kconfig
- device/controller: fix start_up() Secure Connections indent,
  get_ble_resolving_list_max_size return type
- controller.h: align type/interface declarations with implementation
- bte_init: remove unused/redundant code
- bte_main: return -1 on osi_init failure, null check in bte_main_hci_send


(cherry picked from commit b83647f5ea)

Co-authored-by: zhiweijian <zhiweijian@espressif.com>
2026-04-24 15:12:53 +08:00
Zhi Wei Jian
fa71c11a76 fix(ble/bluedroid): Fix init failure handling, storage/config and GATT leaks
- btc_main: handle bte_main_boot_entry failure with cleanup and future_ready(FUTURE_FAIL)
- btc_ble_storage: fix key/length validation in _btc_storage_get_ble_bonding_key
- btc_config: align return/error contract with callers
- btc_dm: use safe BTA_SERVICE_ID_TO_SERVICE_MASK, fix sec_cb_handler type
- btc_gatt_util: fix btc_to_bta_response/set_read_value length and bounds
- btc_gatts: future_free on early return, max_nb_attr uint16_t, fail cleanup,
  handle bounds
- btc_ble_cte/btc_iso_ble: fix callback type/param consistency with BTA


(cherry picked from commit 6f5d9e3440)

Co-authored-by: zhiweijian <zhiweijian@espressif.com>
2026-04-24 15:12:53 +08:00
Zhi Wei Jian
f790a1834b fix(ble/bluedroid): Add null/range checks and fix resource handling in BTA layer
- bta_dm_int: fix BTA_SERVICE_ID_TO_SERVICE_MASK undefined behavior (1<<id when id>=32)
- bta_gattc_main: add event bounds check before state table lookup
- bta_gattc_utils: null checks for remote_bda/p_rcb, fix list_free in clcb_dealloc,
  bta_to_btif_uuid fixes
- bta_gatts_act: fix formatting/indent in send_service_change_indication
- bta_gatts_api: validate attr_val/len, add error logs on alloc failure
- bta_sys_main: null/range checks in sm_execute, alarm/hash_map error handling in
  bta_alarm_cb


(cherry picked from commit f4cec2ac4e)

Co-authored-by: zhiweijian <zhiweijian@espressif.com>
2026-04-24 15:12:53 +08:00
zhiweijian
7c0e0fa9c2 fix(ble/bluedroid): fix parameter validation and initialization in BLE APIs
- Add parameter validation in esp_gap_ble_api, esp_gattc_api, esp_gatts_api
- Initialize API args to prevent undefined behavior
- Add host status checks in API functions
- Fix memory leak if bluedroid init failed
2026-04-24 15:12:53 +08:00
Zhi Wei Jian
9de0b82488 fix(ble/bluedroid): fix ISO HCI layer and update Kconfig
- Fix ISO HCI functions and remove unused code
- Fix spelling: BROCASTER to BROADCASTER in Kconfig and headers
- Update common config headers for consistency



(cherry picked from commit 611eef480a)

Co-authored-by: zhiweijian <zhiweijian@espressif.com>
2026-04-24 15:12:53 +08:00
Zhi Wei Jian
b693cb7091 fix(ble/bluedroid): fix L2CAP, SMP and HCI command issues
- Fix active_count check in l2cu_ble_plcb_active_count
- Restore previous state if connection command fails
- Fix HCI cmd buffer size off-by-one errors
- Fix connect handle length errors
- Fix channel sounding event status handling
- Fix SMP param_len check in smp_rand_back
- Fix spelling: BROCASTER to BROADCASTER in definitions



(cherry picked from commit e118d053b3)

Co-authored-by: zhiweijian <zhiweijian@espressif.com>
2026-04-24 15:12:53 +08:00
Zhi Wei Jian
b90d64d06a fix(ble/bluedroid): fix GAP, advertising and security issues in BTM layer
- Fix adv state restore and reset if start/stop failed
- Fix periodic adv v2 event without PAWR feature enabled
- Fix periodic adv sync establish skip handling
- Fix resolving list max_size validation
- Fix RPA addr_type update after host-side resolution
- Fix pairing_state reset if p_dev_rec alloc failed
- Fix ISO cis_cnt limit and ext adv parameter check
- Try to delete smp keys even if not in device list



(cherry picked from commit e0ccc644a8)

Co-authored-by: zhiweijian <zhiweijian@espressif.com>
2026-04-24 15:12:53 +08:00
Zhi Wei Jian
70ef058c3e fix(ble/bluedroid): fix GATT protocol and database operation issues
- Fix GATTC read by type length error and rsp pdu format check
- Fix p_cur_handle update in gatts_db_read_attr_value_by_type
- Fix len calculation error in calculate_database_info_size
- Replace gatt_find_the_connected_bda with p_tcb_list iteration
- Send cmd reject if cid is invalid
- Fix param_len check in smp_rand_back
- Remove duplicate uuid compare functions



(cherry picked from commit 6242e0244c)

Co-authored-by: zhiweijian <zhiweijian@espressif.com>
2026-04-24 15:12:53 +08:00
Zhi Wei Jian
b1bf55bcbe fix(ble/bluedroid): fix parameter handling and deep copy in BTC layer
- Fix CS and CTE callback deep copy errors in btc_gap_ble
- Fix incorrect parameter check in btc_gattc_prepare_write_char_descr
- Fix conn_handle length error and malloc failure handling
- Fix memcpy error and reset params if malloc failed
- Fix spelling: BROCASTER to BROADCASTER
- Delete unused ISO functions in btc_iso_ble



(cherry picked from commit 1fea299dc9)

Co-authored-by: zhiweijian <zhiweijian@espressif.com>
2026-04-24 15:12:53 +08:00