Commit Graph

30830 Commits

Author SHA1 Message Date
Xu Si Yu
f46eae9849 feat(openthread): optimize radio spinel uart interface 2026-04-14 14:12:52 +08:00
Jiang Jiang Jian
a52c67a67b Merge branch 'fix/fix_ext_coex_154_stage_switch_v5.4' into 'release/v5.4'
fix(coex): fix ieee802.15.4 external coex tx/rx stage handling (v5.4)

See merge request espressif/esp-idf!46681
2026-04-13 15:22:19 +08:00
Jin Cheng
04ddb36756 fix(bt/bluedroid): moved L2CAP length check into start packets only 2026-04-08 20:41:42 +08:00
Jon Gilmore
02b5d4bb13 fix(bt/bluedroid): fix ACL reassembly dropping valid continuation fragments
The minimum length check in `reassemble_and_dispatch()` applied the START packet minimum (`HCI_ACL_PREAMBLE_SIZE + L2CAP_LENGTH_SIZE` = 8 bytes) to **all** ACL packets, including continuation fragments. Continuation fragments only carry the 4-byte ACL preamble (handle + length) with no L2CAP header, so small but valid continuations (5-7 bytes) were incorrectly rejected as "too short."

This caused the first L2CAP PDU in a rapid burst of BLE GATT indications to be silently dropped. The partial reassembly was orphaned, then discarded when the next indication's START fragment arrived, producing:

```
E BT_HCI: ACL packet too short (len=5)
W BT_HCI: reassemble_and_dispatch found unfinished packet for handle with start packet. Dropping old.
```

Parse the ACL preamble first (requires only 4 bytes) to determine the boundary flag, then apply the L2CAP length check only to START packets. Continuation packets are now accepted with the correct minimum of `HCI_ACL_PREAMBLE_SIZE` (4 bytes).

- ESP32-S3 connected to a BLE peripheral that fragments indications at 40 bytes per L2CAP PDU
- Peripheral sends 8+ indications within ~200ms (burst of state changes)
- The final continuation fragment of the first indication is small (5-6 bytes after type stripping)
- 100% reproducible on every burst; confirmed on ESP-IDF 5.5.3, 5.5.4, and 6.0.0

Verified on ESP32-S3 with a Sub-Zero wall oven (SO3050PESP, firmware 8.5):
- **Before fix:** First indication in every burst lost (ACL reassembly failure)
- **After fix:** All indications in burst delivered correctly, including when the final continuation fragment is 5-6 bytes

Closes https://github.com/espressif/esp-idf/issues/18414
2026-04-08 20:41:42 +08:00
Xu Si Yu
3ab273d3ea fix(coex): fix ieee802.15.4 external coex tx/rx stage handling 2026-04-01 15:42:53 +08:00
zhaoweiliang
b10d5d31f3 fix(ble): Fixed an occasional disconnection issue on ESP32-C6 and ESP32-H2 2026-03-31 19:36:24 +08:00
xiongweichao
0ece0e924c fix(bt): Fix crash due to functions not placed in IRAM 2026-03-26 21:06:55 +08:00
Jiang Jiang Jian
befa3a2c2f Merge branch 'bugfix/sae_pwe_method_log_v5.4' into 'release/v5.4'
fix(esp_wifi): Add a log to print sae_pwe method used by station for wpa3 connection

See merge request espressif/esp-idf!46696
2026-03-26 10:51:26 +08:00
cjin
bc60ae40dd fix(ble): fix conn timeout after phy update on ESP32-C2 2026-03-19 09:51:51 +08:00
Shreyas Sheth
6f14b721b3 fix(esp_wifi): Add a log to print sae_pwe method used by station for wpa3 connection
- Fix crash due to debug log for rssi while scanning
2026-03-17 12:01:04 +05:30
Jiang Jiang Jian
fe2cc0a64c Merge branch 'fix/usj_fifo_bug_v5.4' into 'release/v5.4'
fix(usj):Fix usj fifo write/read on p4 (backport v5.4)

See merge request espressif/esp-idf!46638
2026-03-17 11:48:04 +08:00
Jiang Jiang Jian
5dc27530cc Merge branch 'feat/bt_distance_test_v5.4' into 'release/v5.4'
feat(bt): Add APIs to read ACL real RSSI and read/write tx power of inq/iscan/page/pscan/ACL (v5.4)

See merge request espressif/esp-idf!46646
2026-03-17 11:14:50 +08:00
Jiang Jiang Jian
25a017a9d7 Merge branch 'feature/update_gdbstub_v5.4' into 'release/v5.4'
gdbstub: backport fixes (v5.4)

See merge request espressif/esp-idf!46581
2026-03-17 10:56:55 +08:00
Jiang Jiang Jian
b16c368b3c Merge branch 'bugfix/fix_call_spp_start_discovert_twice_crash_v5.4' into 'release/v5.4'
fix(bt): fix crash when calling esp_spp_start_discovery twice in succession(v5.4)

See merge request espressif/esp-idf!46666
2026-03-17 10:13:27 +08:00
morris
6e907ccdbc Merge branch 'bugfix/fix_legacy_touch_driver_stuck_after_dsleep_v5.4' into 'release/v5.4'
fix(legacy_touch): fixed the read stuck issue after deep sleep (v5.4)

See merge request espressif/esp-idf!46011
2026-03-17 10:11:22 +08:00
Jiang Jiang Jian
d6e5d76f66 Merge branch 'contrib/github_pr_18310_v5.4' into 'release/v5.4'
fix(esp_http_server): Dispatch PONG frames to WebSocket handler (GitHub PR) (v5.4)

See merge request espressif/esp-idf!46657
2026-03-17 09:23:52 +08:00
Jiang Jiang Jian
bdc4dc5e9e Merge branch 'feat/expand_periph_skip_ls_no_to_v5.4' into 'release/v5.4'
fix(pm): expand the number of skip light sleep number

See merge request espressif/esp-idf!46625
2026-03-17 09:17:24 +08:00
xiongweichao
76652f73bd fix(bt): fix crash when calling esp_spp_start_discovery twice in succession 2026-03-16 19:40:29 +08:00
Jiang Jiang Jian
9e7abc9f01 Merge branch 'feat/p4_eco5_ccm_v5.4' into 'release/v5.4'
ISP:  support ccm on P4 eco5 (v5.4)

See merge request espressif/esp-idf!44813
2026-03-16 19:23:57 +08:00
Jiang Jiang Jian
48b82d0690 Merge branch 'contrib/github_pr_16130_v5.4' into 'release/v5.4'
esp_adc: Release the peripheral after calibration (GitHub PR) (v5.4)

See merge request espressif/esp-idf!40002
2026-03-16 19:22:01 +08:00
Jiang Jiang Jian
165aff222d Merge branch 'fix/esp32_adc_continuous_loss_sample_v5.4' into 'release/v5.4'
Fix/esp32 adc continuous loss sample (v5.4)

See merge request espressif/esp-idf!42830
2026-03-16 19:19:42 +08:00
Jiang Jiang Jian
00b61e28f2 Merge branch 'fix/adc_c6_get_high_result_v5.4' into 'release/v5.4'
fix(adc): fix ESP32C6 ADC get high result after enable (v5.4)

See merge request espressif/esp-idf!43229
2026-03-16 19:18:38 +08:00
Jiang Jiang Jian
500963afc5 Merge branch 'bugfix/fix_some_wifi_bugs_260313_v5.4' into 'release/v5.4'
fix(wifi): fix some wifi bugs 260313 v5.4(Backport v5.4)

See merge request espressif/esp-idf!46615
2026-03-16 19:18:09 +08:00
Peter Backeris
3d0e26170d fix(esp_http_server): Dispatch PONG frames to WebSocket handler
PONG frames (opcode 0xA) were never dispatched to the user's WebSocket
handler despite an existing comment stating they should be. The dispatch
condition `ra->ws_type < HTTPD_WS_TYPE_CLOSE` excluded PONG (0xA)
since CLOSE is 0x8.

This caused a critical secondary bug: when the server sends PING frames
and the client responds with PONG, httpd_ws_recv_frame() is never
called for the PONG, leaving the remaining frame bytes (second_byte
plus 4-byte mask_key) unconsumed in the TCP buffer. On the next
WebSocket read, these orphaned bytes are misinterpreted as a new frame
header, causing either "WS frame is not properly masked" errors or
EAGAIN timeouts with garbage length values, effectively destroying
the connection.

Add `ra->ws_type == HTTPD_WS_TYPE_PONG` to the dispatch condition so
PONG frames reach the user handler, which calls httpd_ws_recv_frame()
to properly consume the frame bytes from the socket.

Closes https://github.com/espressif/esp-idf/issues/18227
2026-03-16 16:56:13 +08:00
Alexey Lapshin
2eebcf27c6 fix(esp_gdbstub): adapt xtensa headers 2026-03-16 15:17:34 +07:00
yangfeng
23a7b191ca feat(bt): Add APIs to control transmit power level
- API to read ACL real RSSI
- APIs to read/write tx power of inq/iscan/page/pscan/ACL
2026-03-16 15:45:51 +08:00
laokaiyao
732ee2ddc8 fix(legacy_touch): fixed the read stuck issue after deep sleep 2026-03-16 15:26:47 +08:00
C.S.M
4bb47f5145 fix(usj):Fix usj fifo write/read on p4 2026-03-16 15:22:15 +08:00
Jiang Jiang Jian
4193d214e3 Merge branch 'bugfix/report_hid_close_evt_v5.4' into 'release/v5.4'
fix(hid): Fixed HID repeatedly reporting the close event (v5.4)

See merge request espressif/esp-idf!46612
2026-03-16 14:45:20 +08:00
Jiang Jiang Jian
c6ba36d69f Merge branch 'bugfix/pm-673_v5.4' into 'release/v5.4'
backport v5.4: fix analog i2c master race cause by phy retention link

See merge request espressif/esp-idf!46437
2026-03-16 11:51:58 +08:00
Jiang Jiang Jian
0300db2e32 Merge branch 'fix/adc_continuous_iram_config_v5.4' into 'release/v5.4'
fix(adc): fix ESP32/S2 panic when use continuous ADC (v5.4)

See merge request espressif/esp-idf!43640
2026-03-16 11:02:50 +08:00
cjin
1c000d02bc fix(pm): expand the number of skip light sleep number 2026-03-16 08:56:55 +08:00
yangfeng
01fb000eb6 fix(hid): Fixed HID repeatedly reporting the close event 2026-03-15 13:13:12 +08:00
wuzhenghui
378255d28c fix(soc): link rtc_io_num_map to DRAM 2026-03-15 13:12:55 +08:00
yinqingzhao
69cf6b7c4d fix(pm): fix crash issue of esp32 caused by accessing flash in sleep wake process 2026-03-15 13:12:55 +08:00
muhaidong
f12e8de207 fix(wifi): fix some wifi bugs 260213
1. fix some wifi bugs related to csi, twt and bss max idle
2. fix cannot sleep after change ps mode
3. fix memory corruption by avoiding unncessary encryption of Mgmt frames
4. fix regdma contention issue
2026-03-15 13:12:55 +08:00
yinqingzhao
8b25dc7b4a fix(wpa_supplicant): fix race where STA is freed before WPA3 SAE finishes 2026-03-15 13:12:55 +08:00
Jiang Jiang Jian
05785a4869 Merge branch 'feat/use_ot_cmakelists_v5.4' into 'release/v5.4'
feat(openthread): use upstream CMakeLists.txt for radio build (v5.4)

See merge request espressif/esp-idf!46580
2026-03-15 13:09:20 +08:00
Jiang Jiang Jian
f472b966a8 Merge branch 'feat/support_bleqabr25_1521_v5.4' into 'release/v5.4'
feat(ble/bluedroid): Add an API to resolve RPA (v5.4)

See merge request espressif/esp-idf!46502
2026-03-15 13:08:02 +08:00
Jiang Jiang Jian
5fff58de41 Merge branch 'update/spiffs_sync_upstream_5.4' into 'release/v5.4'
change(spiffs): upgrade spiffs module to 0.2-265-gad902ca version (v5.4)

See merge request espressif/esp-idf!45971
2026-03-15 13:05:10 +08:00
Jiang Jiang Jian
5729128d7c Merge branch 'fix/spi_master_bit_trans_add_check_v5.4' into 'release/v5.4'
fix(driver_spi): spi master bit length check and set idle level for all data pin v5.4

See merge request espressif/esp-idf!45135
2026-03-15 13:03:17 +08:00
Jiang Jiang Jian
525343e488 Merge branch 'fix/sdmmc_sdspi_retry_crc_check_v5.4' into 'release/v5.4'
fix(sdspi): 0x106 error during SD card init via SPI related fixes (v5.4)

See merge request espressif/esp-idf!45693
2026-03-15 12:59:10 +08:00
gaoxu
0726a0dc0f feat(isp_color): support ISP color on P4 2026-03-15 12:58:16 +08:00
gaoxu
a70f6c5f60 fix(adc): fix ESP32/S2 panic when use continuous ADC 2026-03-15 12:54:02 +08:00
gaoxu
5bf03720b2 fix(adc): fix ESP32C6 ADC get high result after enable 2026-03-15 12:53:46 +08:00
gaoxu
f21cc28e3c fix(adc): fix ESP32 ADC continuous loss sample times 2026-03-15 12:53:34 +08:00
Tan Yan Quan
541e306799 feat(openthread): use heap_caps_calloc_prefer for messagepool 2026-03-13 21:02:03 +08:00
Tan Yan Quan
8445719b4c feat(openthread): use explicit source list for RCP build 2026-03-13 21:01:57 +08:00
Jiang Jiang Jian
e8069a963d Merge branch 'bugfix/fix_some_wifi_bugs_260312_v5.4' into 'release/v5.4'
Bugfix/fix some wifi bugs 260312 v5.4

See merge request espressif/esp-idf!46542
2026-03-13 19:19:27 +08:00
Shu Chen
1a194b64cf Merge branch 'fix/add_check_and_fix_docs_for_154_v5.4' into 'release/v5.4'
fix(802.15.4) added some error checks to make the code more robust(v5.4)

See merge request espressif/esp-idf!46489
2026-03-13 07:20:25 +00:00