Commit Graph
52940 Commits
Author SHA1 Message Date
Zhang Hai Peng e9fce74445 feat(ble/bluedroid): Optimize Bluedroid memory usage
- Delete unused device records (~356B each)


(cherry picked from commit 7d1c0e9a32)

Co-authored-by: zhanghaipeng <zhanghaipeng@espressif.com>
2026-06-26 20:24:34 +08:00
Zhang Hai Peng 7b2b31bb0d fix(ble/bluedroid): cap Read By Type response length at ATT maximum
Read By Type Response Length is one octet (max 255). When MTU was
large enough to return a long characteristic value in one pair, the
server wrote (UINT8)(value_len + 2) and overflowed (e.g. 513 -> 1),
so the client rejected the PDU as GATT_INVALID_PDU (0x04).

Cap server value to 253 bytes per pair, clamp the length byte, and
continue long reads via Read Blob when the capped size is returned.


(cherry picked from commit 97905afccc)

Co-authored-by: zhanghaipeng <zhanghaipeng@espressif.com>
2026-06-26 20:24:16 +08:00
Zhang Hai Peng 54e7b74cc1 fix(ble/bluedroid): Fixed potential double Execute Write Response
(cherry picked from commit 0a93ccd3b3)

Co-authored-by: zhanghaipeng <zhanghaipeng@espressif.com>
2026-06-26 20:23:59 +08:00
Zhang Hai Peng f00c216ce2 fix(ble/bluedroid): preserve ATT error on prepare write completion
Skip prepare-write echo validation when the GATT stack reports a
non-success status. ATT Error Response carries no prepare-write echo
body (rsp_len=0), so the check incorrectly overwrote errors such as
GATT_INSUF_AUTHENTICATION (0x05) with GATT_INVALID_PDU (0x04).


(cherry picked from commit d5b9350d0f)

Co-authored-by: zhanghaipeng <zhanghaipeng@espressif.com>
2026-06-26 20:23:38 +08:00
Zhang Hai Peng 4bf3d52183 fix(ble/bluedroid): unblock sync HCI cmd on Command Status error
Release the BLE sync semaphore and record HCI status when a
synchronous command is rejected via Command Status, since no
Command Complete event follows.


(cherry picked from commit 29ae92f4ef)

Co-authored-by: zhanghaipeng <zhanghaipeng@espressif.com>
2026-06-26 20:16:49 +08:00
Zhang Hai Peng fab51c7925 fix(ble/bluedroid): set REQ_WAITING before GATTC service-change rediscovery
When service change cancels in-progress discovery, bta_gattc_disc_cmpl()
re-triggers discovery without marking auto_update as REQ_WAITING. If a
client command is queued in p_q_cmd, bta_gattc_start_discover() refuses
to restart and the command is never dispatched.


(cherry picked from commit 13926bb9bc)

Co-authored-by: zhanghaipeng <zhanghaipeng@espressif.com>
2026-06-26 20:16:32 +08:00
Zhang Hai Peng 50c719356c fix(ble/bluedroid): report conn param update failure for unknown BD_ADDR
Route unknown BD_ADDR and other immediate failures through the existing
need_cb path so ESP_GAP_BLE_UPDATE_CONN_PARAMS_EVT is always delivered.


(cherry picked from commit f9eaeb5e84)

Co-authored-by: zhanghaipeng <zhanghaipeng@espressif.com>
2026-06-26 20:16:14 +08:00
Zhang Hai Peng 95c5099ed9 fix(ble/bluedroid): add context to GATTC reg-notify cache warning
Include client_if, handle, bd_addr, and server cache state in the
warning logged when notification registration skips handle validation.


(cherry picked from commit 1085a32be8)

Co-authored-by: zhanghaipeng <zhanghaipeng@espressif.com>
2026-06-26 20:16:14 +08:00
Zhang Hai Peng feb1da9239 fix(ble/bluedroid): return ESP_ERR_INVALID_ARG for invalid conn params
Return ESP_ERR_INVALID_ARG instead of ESP_FAIL when connection
parameter validation fails


(cherry picked from commit 6c53838e66)

Co-authored-by: zhanghaipeng <zhanghaipeng@espressif.com>
2026-06-26 20:16:13 +08:00
Zhang Hai Peng 003a4007e5 fix(ble/bluedroid): reject adv data on legacy directed ext adv
(cherry picked from commit c339cec380)

Co-authored-by: zhanghaipeng <zhanghaipeng@espressif.com>
2026-06-26 20:15:54 +08:00
Zhang Hai Peng 2f8c3b6c1a fix(ble/bluedroid): skip identity conversion for static random direct connect
Do not rewrite static or non-resolvable random peer addresses to
identity type 0x03 when CONFIG_BT_BLE_RPA_SUPPORTED is enabled.


(cherry picked from commit 2ef10ef488)

Co-authored-by: zhanghaipeng <zhanghaipeng@espressif.com>
2026-06-26 20:15:35 +08:00
Jiang Jiang Jian a6928be465 Merge branch 'feat/update_esp32s31_phylib_v6.1' into 'release/v6.1'
feat(phy): update esp32s31 phy lib (v6.1)

See merge request espressif/esp-idf!49631
2026-06-23 17:18:51 +08:00
Jiang Jiang Jian c77d428d64 Merge branch 'bugfix/idfci-11637_v6.1' into 'release/v6.1'
backport v6.1: support emac sleep retention runtime attach and detach

See merge request espressif/esp-idf!49630
2026-06-23 15:05:36 +08:00
Jiang Jiang Jian c039510b18 Merge branch 'change/ble_update_lib_20260612_v6.1' into 'release/v6.1'
change(ble): [AUTO_MR] 20260612 - Update ESP BLE Controller Lib (6.1)

See merge request espressif/esp-idf!49611
2026-06-23 14:46:22 +08:00
Jiang Jiang Jian d95621bada Merge branch 'fix/fix_put_phy_init_bin_into_partiiton_when_embed_v6.1' into 'release/v6.1'
fix(phy): fix still put multiple phy init date bin into flash when...

See merge request espressif/esp-idf!49643
2026-06-18 11:40:39 +08:00
Jiang Jiang Jian 7aeecddd13 Merge branch 'fix/fix_crash_of_c61_cause_by_function_miss_comment_out_v6.1' into 'release/v6.1'
fix(wifi): comment out pm_process_tim from ld files for esp32c61(backport v6.1)

See merge request espressif/esp-idf!49655
2026-06-18 11:40:00 +08:00
yinqingzhao 7ff847867e fix(wifi): comment out pm_process_tim from ld files for esp32c61 2026-06-15 15:21:51 +08:00
yinqingzhao fa88427b27 fix(phy): fix still put multiple phy init date bin into flash when CONFIG_ESP_PHY_MULTIPLE_INIT_DATA_BIN_EMBED is enabled 2026-06-15 10:11:49 +08:00
zhuanghang 2fb01f1649 feat(phy): update esp32s31 phy lib 2026-06-15 09:40:51 +08:00
Li Shuai f321f1b100 fix(esp_eth): emac sleep retention runtime attach and detach 2026-06-14 11:09:01 +08:00
Jiang Jiang Jian 85081d2414 Merge branch 'bugfix/fix_bluedroid_ai_review_bugs_20260427_v6.1' into 'release/v6.1'
Bugfix/fix bluedroid ai review bugs 20260427 (6.1)

See merge request espressif/esp-idf!49542
2026-06-14 11:04:54 +08:00
Jiang Jiang Jian 4ec2c27317 Merge branch 'feat/support_esp32h21_coex_v6.1' into 'release/v6.1'
feat(coex): support esp32h21 coexist (v6.1)

See merge request espressif/esp-idf!49364
2026-06-14 10:43:22 +08:00
Jiang Jiang Jian e07db45349 Merge branch 'fix/openthread_rcp_uart_senddone_on_fail_v6.1' into 'release/v6.1'
fix(openthread): avoid HDLC TX stall on fd write failure (v6.1)

See merge request espressif/esp-idf!49070
2026-06-14 10:41:23 +08:00
Jiang Jiang Jian 497fb492b0 Merge branch 'fix/buildv2_bootloader_extra_components_v6.1' into 'release/v6.1'
fix(cmakev2/bootloader): link components from EXTRA_COMPONENT_DIRS (v6.1)

See merge request espressif/esp-idf!49422
2026-06-14 00:04:56 +08:00
Jiang Jiang Jian 8f6ccd3bc3 Merge branch 'docs/ble-uart-tutorial_v6.1' into 'release/v6.1'
docs(ble): added ESP-BLE-UART OpenCode Companion Guide (6.1)

See merge request espressif/esp-idf!49385
2026-06-14 00:02:58 +08:00
Jiang Jiang Jian 8b5b4ed238 Merge branch 'fix/ble_mesh_bug_report_v2_v6.1' into 'release/v6.1'
fix(ble_mesh): Miscellaneous bugfixes according to our internal bug report (v2)

See merge request espressif/esp-idf!49294
2026-06-14 00:01:18 +08:00
Jiang Jiang Jian c9f92f7b11 Merge branch 'feat/feat_enable_h21_light_sleep_v6.1' into 'release/v6.1'
fix(ble): disable flash pd config (6.1)

See merge request espressif/esp-idf!49217
2026-06-13 23:59:12 +08:00
Jiang Jiang Jian 43b6096600 Merge branch 'bugfix/h4_cache_error_v6.1' into 'release/v6.1'
fix(cache): fixed cache error not getting raised on H4 (v6.1)

See merge request espressif/esp-idf!49219
2026-06-13 23:52:13 +08:00
Jiang Jiang Jian 27eff00066 Merge branch 'contrib/github_pr_18642_v6.1' into 'release/v6.1'
fix(eth): use stored base_increment when computing PTP addend (GitHub PR) (v6.1)

See merge request espressif/esp-idf!49103
2026-06-13 23:46:27 +08:00
Xu Si Yu 1fd80c5e94 fix(openthread): avoid HDLC TX stall on fd write failure 2026-06-13 23:44:29 +08:00
Jiang Jiang Jian 6d7fde3e05 Merge branch 'feat/esp_trace_example_v6.1' into 'release/v6.1'
esp_trace example library integration (v6.1)

See merge request espressif/esp-idf!49089
2026-06-13 23:39:22 +08:00
Jiang Jiang Jian e4f18caa91 Merge branch 'bugfix/int_wdt_default_psram_v6.1' into 'release/v6.1'
fix(iwdt): increased default timeout if using PSRAM (v6.1)

See merge request espressif/esp-idf!49480
2026-06-13 15:28:33 +08:00
Jiang Jiang Jian 42bd937859 Merge branch 'fix/lp_core_s31_pdma_intr_entry_v6.1' into 'release/v6.1'
fix(ulp): fix LP core interrupt vector entry for LP PDMA on esp32s31

See merge request espressif/esp-idf!49578
2026-06-13 15:03:07 +08:00
Jiang Jiang Jian 6b2f99fdde Merge branch 'bugfix/s31_wvt_test_v6.1' into 'release/v6.1'
Bugfix/s31 wvt test v6.1

See merge request espressif/esp-idf!49616
2026-06-13 15:01:47 +08:00
Jiang Jiang Jian 9e78314d07 Merge branch 'fix/reduce_acl_event_gaps_v6.1' into 'release/v6.1'
feat(ble): updated libble to 71d180a4 for esp32h4 and esp32s31 (6.1)

See merge request espressif/esp-idf!49593
2026-06-13 15:01:07 +08:00
Jiang Jiang Jian 8715df2cd1 Merge branch 'feat/generic_phy_1000m_v6.1' into 'release/v6.1'
feat(esp_eth): generic 802.3 driver to check if 1000M is supported (v6.1)

See merge request espressif/esp-idf!49111
2026-06-13 14:45:54 +08:00
morris 0ea37c0e34 Merge branch 'fix/s31_touch_deep_sleep_v6.1' into 'release/v6.1'
fix(touch): enable touch deep sleep on esp32-s31 (v6.1)

See merge request espressif/esp-idf!49622
2026-06-12 18:39:07 +08:00
Jiang Jiang Jian c30cf517bd Merge branch 'bugfix/isolate_remote_local_cache_v6.1' into 'release/v6.1'
fix(esp_wifi): Isolate wifi-remote API check from local station build (v6.1)

See merge request espressif/esp-idf!49453
2026-06-12 18:19:34 +08:00
Hu Rui ef674eddd3 fix(touch): enable touch deep sleep on esp32-s31 2026-06-12 18:05:25 +08:00
Scramble ToolsandOndrej Kosta b4131c6ac5 fix(esp_eth): use stored base_increment when computing PTP addend
The addend in `emac_hal_ptp_start()` was derived from the floating-point
`config->ptp_req_accuracy_ns` instead of the integer `base_increment`
register that actually drives the sub-second update. The cast to
`uint8_t` loses the fractional part, so the un-corrected addend leaves
the PTP clock running off-rate.

Example: with a 40 MHz XTAL and the default `req_accuracy_ns = 40`,
`base_increment` rounds 85.899 up to 86, leaving the clock +1170 ppm
fast — well outside the IEEE 802.1AS neighborRateRatio limit (~±200
ppm), so strict-1AS bridges refuse asCapable.

Compute the addend from the stored `base_increment` for both rollover
modes: `addend = 2^32 * clk_period_ns / increment_ns`.

Measured on ESP32-P4: neighborRateRatio drops from +1147.5 ppm to
+4.2 ppm, and asCapable is granted.

Co-authored-by: Ondrej Kosta <panzer412@gmail.com>
2026-06-12 12:00:35 +02:00
Kapil Gupta 4206630b5f fix(esp_wifi): Isolate wifi-remote API check from local station build
Use scripts/station_gen_build with -B and -D SDKCONFIG so generate_and_check
does not read the station example's sdkconfig or build tree. Apply
sdkconfig.defaults and IDF_TARGET=esp32 for stable header preprocessing.

Unset GIT_DIR/GIT_INDEX_FILE (and related vars) before git subprocesses so
pre-commit and git worktrees do not mis-resolve paths after cd into scripts.
2026-06-12 14:49:19 +05:30
Zhi Wei Jian da29ffba88 fix(examples): improve bluedroid BLE example error handling
Check GAP/GATT event status, fix prepare-write buffer lifecycle, and
align example code with updated Bluedroid API behavior.


(cherry picked from commit bfc47ace48)

Co-authored-by: zhiweijian <zhiweijian@espressif.com>
2026-06-12 17:17:37 +08:00
Zhi Wei Jian 109120cc50 refactor(examples): disable unused BT options in bluedroid BLE examples
Add sdkconfig.defaults to turn off unused Bluedroid host features per
example role (GATT client/server, SMP, legacy adv, etc.).



(cherry picked from commit b4b640f233)

Co-authored-by: zhiweijian <zhiweijian@espressif.com>
2026-06-12 17:17:37 +08:00
Zhi Wei Jian 5b8171d0d1 fix(bt): fix BTC task and BLE mesh bluedroid adapter
(cherry picked from commit 678fb93245)

Co-authored-by: zhiweijian <zhiweijian@espressif.com>
2026-06-12 17:17:37 +08:00
Zhi Wei Jian af256786f4 fix(ble/bluedroid): fix HCI command and BTU robustness
(cherry picked from commit c9d13aaf64)

Co-authored-by: zhiweijian <zhiweijian@espressif.com>
2026-06-12 17:17:37 +08:00
Zhi Wei Jian be594ffd57 fix(ble/bluedroid): fix CTE and ISO API validation
(cherry picked from commit 0c3c894b7d)

Co-authored-by: zhiweijian <zhiweijian@espressif.com>
2026-06-12 17:17:37 +08:00
Zhi Wei Jian cd3109a29d fix(ble/bluedroid): fix GATT server lifecycle and callbacks
(cherry picked from commit 54a1e31916)

Co-authored-by: zhiweijian <zhiweijian@espressif.com>
2026-06-12 17:17:37 +08:00
Zhi Wei Jian 02bdc429b9 fix(ble/bluedroid): fix GATT client API parameter validation
(cherry picked from commit 653477c3e9)

Co-authored-by: zhiweijian <zhiweijian@espressif.com>
2026-06-12 17:17:37 +08:00
Zhi Wei Jian 8c4345b672 fix(ble/bluedroid): fix GATT client cache and service discovery
(cherry picked from commit b3ff15ed31)

Co-authored-by: zhiweijian <zhiweijian@espressif.com>
2026-06-12 17:17:37 +08:00
Zhi Wei Jian 0da4c99922 fix(ble/bluedroid): fix GAP BLE API parameter validation
(cherry picked from commit e3311c81c4)

Co-authored-by: zhiweijian <zhiweijian@espressif.com>
2026-06-12 17:17:37 +08:00