Compare commits

...

956 Commits

Author SHA1 Message Date
af4a98ba99 change(version): Update version to 5.2.4 2025-02-19 23:17:56 +08:00
0830c08e89 Merge branch 'support/ieee802154_get_rssi_comp_from_phy_v5.2' into 'release/v5.2'
feat(802.15.4): support ieee802154 get rssi comp from phylib (v5.2)

See merge request espressif/esp-idf!37053
2025-02-19 09:56:52 +08:00
zwx
31436bd626 feat(802.15.4): use btbb function to get rssi comp for h2 2025-02-18 12:11:00 +08:00
beb054baad Merge branch 'bugfix/stack_corruption_btm_task_v5.2' into 'release/v5.2'
fix(esp_wifi): Fix stack curruption in btm task (v5.2)

See merge request espressif/esp-idf!36971
2025-02-14 19:02:20 +08:00
f40e875ece fix(esp_wifi): Fix stack curruption in btm task (v5.2) 2025-02-14 13:00:51 +05:30
cc834de6b7 Merge branch 'bugfix/skip_memory_reordering_wpa2_semaphr_v5.2' into 'release/v5.2'
fix(esp_wifi): fixed stack corruption in WiFi tasks (v5.2)

See merge request espressif/esp-idf!36938
2025-02-14 14:30:56 +08:00
22dd269b53 fix(esp_wifi): Fix stack corruption in wpa3 task 2025-02-13 18:08:00 +05:30
5d9db0b972 fix(esp_wifi): fixed Stack corruption in DPP task 2025-02-13 18:08:00 +05:30
9fb88f83df fix(esp_wifi): fixed Stack corruption in WPS processing 2025-02-13 18:08:00 +05:30
d5f7c1253e fix(esp_wifi): Fixed memory corruption in wifi enterprise
Closes https://github.com/espressif/esp-idf/issues/15370
2025-02-13 18:07:46 +05:30
9841f23578 Merge branch 'bugfix/gpio_rom_patch_fix_v5.2' into 'release/v5.2'
fix(gpio): fix esp_rom_gpio_connect_out_signal for gpio num over 31 on esp32/s2 (v5.2)

See merge request espressif/esp-idf!36867
2025-02-13 20:32:42 +08:00
7a778aefce Merge branch 'bugfix/add_bluedroid_init_migration_v5.2' into 'release/v5.2'
docs(bt/bluedroid): Added migration guide for bluedroid init API[backport v5.2]

See merge request espressif/esp-idf!36877
2025-02-12 11:18:40 +08:00
b0f63c505b Merge branch 'bugfix/fix_wep_shared_auth_connect_fail_issue_v5.2' into 'release/v5.2'
fix(wifi): fix wep shared auth connect fail issue(Backport v5.2)

See merge request espressif/esp-idf!36871
2025-02-12 10:42:10 +08:00
b528187291 docs(bt/bluedroid): Added migration guide for bluedroid init API
Closes https://github.com/espressif/esp-idf/issues/15352
2025-02-11 19:41:23 +08:00
2d900a63a2 fix(wifi): fix wep shared auth connect fail issue 2025-02-11 17:53:28 +08:00
bfd7f7723f fix(gpio): fix esp_rom_gpio_connect_out_signal for gpio num over 31 on esp32/s2
Closes https://github.com/espressif/esp-idf/issues/15209
2025-02-11 16:05:35 +08:00
f23a4dc52e Merge branch 'fix/stack_overuse_by_failure_retry_cnt_v5.2' into 'release/v5.2'
fix(wifi): Fix stack overflow when failure_retry_cnt is set in station configuration (Backport v5.2)

See merge request espressif/esp-idf!36836
2025-02-11 15:51:51 +08:00
4c281f8eee Merge branch 'feature/esp32h2_eco5_ecc_v5.2' into 'release/v5.2'
feat(ecc): enable ECC constant time mode for ESP32-H2 ECO5 (v5.2)

See merge request espressif/esp-idf!36586
2025-02-11 09:54:03 +08:00
a01148d536 fix(wifi): Fix stack overflow when failure_retry_cnt is set
Fix issue of increased stack usage when failure_retry_cnt is set
and wifi driver internally retries connection attempts
2025-02-10 23:47:11 +05:30
b8b0046903 Merge branch 'feat/support_aes_pseudo_round_func_in_esp32h2_eco5_v5.2' into 'release/v5.2'
Support AES and XTS-AES's pseudo round function in ESP32H2-ECO5 (v5.2)

See merge request espressif/esp-idf!36466
2025-02-10 23:57:39 +08:00
cc64fb4338 docs: Update CN translation for size.rst 2025-02-10 21:25:07 +05:30
e2086d518e feat(docs): Update minimizing binary size
The ESP32-H2 software countermeasure may not be necessary
        for ESP32-H2 v1.2 and above, this commit updates
        the relevant documentation
2025-02-10 21:25:07 +05:30
6321c4c339 refactor(ecdsa): rely on efuse to get chip revision 2025-02-10 21:25:07 +05:30
9b8a21d128 fix(soc): Fixed ECDSA register compatibility 2025-02-10 21:25:06 +05:30
1c9146f0c2 fix(hal): Make the ECDSA countermeasure dynamically applicable
This commit makes the ECDSA countermeasure dynamically applicable
    across different revisions of the ESP32H2 SoC.
2025-02-10 21:24:58 +05:30
a31e45a39d Merge branch 'revert/use_wpa3_ent_authmode_naming_v5.2' into 'release/v5.2'
revert(wifi): Revert support for WPA3 Enterprise authentication modes (Backport v5.2)

See merge request espressif/esp-idf!36799
2025-02-10 20:27:10 +08:00
f77aa29905 revert(wifi): Revert support for WPA3 Enterprise authentication modes
This commit reverts the support for 'WIFI_AUTH_WPA3_ENTERPRISE' and
'WIFI_AUTH_WPA2_WPA3_ENTERPRISE'.

This reverts commit d2ba44d9e1.
2025-02-10 16:32:42 +08:00
d81b820331 Merge branch 'fix/fix_max_idle_priod_issue_v52' into 'release/v5.2'
fix(wifi): fix max idle period 1 issue

See merge request espressif/esp-idf!36577
2025-02-10 16:24:27 +08:00
84d2a8818c feat(ecc): enable ECC constant time mode for ESP32-H2 ECO5 2025-02-06 08:14:50 +05:30
48e11e68a1 Merge branch 'bugfix/fix_ble_conn_timeout_when_coex_v5.2' into 'release/v5.2'
Bugfix/fix ble conn timeout when coex v5.2

See merge request espressif/esp-idf!36583
2025-01-24 12:15:12 +08:00
9d28b2c297 fix(ble): fix conn supervision tmo when coex ESP32C6 2025-01-23 18:06:32 +08:00
d42269fc62 fix(ble): fix conn supervision tmo when coex ESP32H2 2025-01-23 18:06:32 +08:00
80ea58945d Merge branch 'fix/ping_data_race_v5.2' into 'release/v5.2'
fix(lwip): Fix potential data-race in ping tcpip callback (v5.2)

See merge request espressif/esp-idf!36509
2025-01-23 16:56:49 +08:00
0d4df082fe fix(wifi): fix max idle period 1 issue 2025-01-23 15:31:56 +08:00
c68c6dfb76 fix(lwip): Fix potential data-race in ping tcpip callback
Need to use tcpip_api_call() instead of tcpip_callback(), since the
former waits for the tcpip task to complete and thus prevents potential
data races with subsequent TCP/IP tasks.
2025-01-21 10:03:17 +01:00
3ec6875e41 docs: Update CN trans for security docs 2025-01-21 12:41:13 +05:30
f3e87bb60e feat(bootloader_support): Permanently enable XTS-AES pseudo rounds when FE release mode is enabled 2025-01-21 12:41:05 +05:30
248de17a53 feat(hal/spi_flash_encrypted): Enable pseudo rounds function during XTS-AES operations 2025-01-17 14:18:37 +05:30
e8a0496d36 feat(hal/aes): Enable pseudo rounds function during AES operations 2025-01-17 14:00:14 +05:30
72d91b5117 Merge branch 'change/ble_update_lib_20250103_v5.2' into 'release/v5.2'
change(ble): [AUTO_MR] 20250103 - Update ESP BLE Controller Lib (v5.2)

See merge request espressif/esp-idf!36371
2025-01-17 10:44:25 +08:00
6a465772aa Merge branch 'feature/softap_detect_wrong_password_attempt_v5.2' into 'release/v5.2'
esp_wifi: softAP: detect external station attempting to connect with wrong password  (Backport v5.2)

See merge request espressif/esp-idf!36455
2025-01-17 10:36:42 +08:00
bb268e1131 Merge branch 'fix/sdmmc_write_sectors_dma_always_send_cmd13_v5.2' into 'release/v5.2'
fix(sdmmc): sdmmc_write_sectors_dma always check card status after write (v5.2)

See merge request espressif/esp-idf!34342
2025-01-17 10:32:10 +08:00
806b75938a feat(wpa_supplicant): Add WIFI_EVENT_AP_WRONG_PASSWORD in SoftAP
This event is triggered when external station tries connecting to softAP
with wrong password.

Currently supported softAP AUTH modes: WPA-PSK, WPA2-PSK and WPA3-PSK (SAE-auth)
2025-01-16 20:13:55 +05:30
0bdb71f6b6 Merge branch 'fix/tusb_midi_task_stack_overflow_v5.2' into 'release/v5.2'
fix(examples): tusb_midi task stack overflow fix (v5.2)

See merge request espressif/esp-idf!34935
2025-01-16 22:07:36 +08:00
02935a77a5 Merge branch 'bugfix/sync_buf_crash_v5.2' into 'release/v5.2'
fix(bt/controller): fixed missing critical protections on linked-list structure of (e)SCO buffers (v5.2)

See merge request espressif/esp-idf!36342
2025-01-16 21:04:46 +08:00
3b2d916af0 Merge branch 'fix/esp_vfs_register_fd_range_warning_message_v5.2' into 'release/v5.2'
fix(storage/vfs): incorrect log level in esp_vfs_register_fd_range (v5.2)

See merge request espressif/esp-idf!36320
2025-01-16 20:57:04 +08:00
5c235ffa36 Merge branch 'fix/heap-allocate-in-rtc-iram_v5.2' into 'release/v5.2'
fix(heap): MALLOC_CAP_EXEC does not allocate in RTC IRAM (backport v5.2)

See merge request espressif/esp-idf!35621
2025-01-16 20:53:40 +08:00
e58de4fd50 fix(examples): tusb_midi task stack overflow fix 2025-01-16 20:40:03 +08:00
2dc6551390 fix(sdmmc): Send status (CMD13) even if write/read command fails 2025-01-16 20:39:29 +08:00
a44a659b0f fix(sdmmc): Improve SD card state checking after write/read command 2025-01-16 20:39:29 +08:00
5c627d9d18 Merge branch 'fix/fix_coex_macro_control_5_2' into 'release/v5.2'
fix(openthread): use the correct macros to control code compilation (v5.2)

See merge request espressif/esp-idf!36447
2025-01-16 20:36:29 +08:00
8775d06702 Merge branch 'fix/fix_tsens_power_after_modem_wakeup_v5.2' into 'release/v5.2'
fix(esp_hw_support): fix tsensor power enable failed after modem state wakeup (v5.2)

See merge request espressif/esp-idf!36226
2025-01-16 20:30:54 +08:00
zwl
565c4d0b73 feat(ble): support for putting ble code into flash on ESP32-C6 2025-01-16 18:18:14 +08:00
8487bb7054 fix(openthread): use the correct macros to control code compilation 2025-01-16 18:04:30 +08:00
f0364c578b Merge branch 'test/add_cache2phys_xip_tests_v5.2' into 'release/v5.2'
fix(mmap): fixed spi_flash_phys2cache return addr in PSRAM issue (v5.2)

See merge request espressif/esp-idf!35987
2025-01-16 17:56:55 +08:00
0fc594154a Merge branch 'feature/efuse_update_for_esp32h2_eco5_v5.2' into 'release/v5.2'
feat(efuse): Adds efuses for esp32h2 eco5 (v5.2)

See merge request espressif/esp-idf!36246
2025-01-16 17:50:54 +08:00
ce956ecfad Merge branch 'fix/set_154_cca_duration_v5.2' into 'release/v5.2'
fix(15.4): set 15.4 energy scan duration before cca (v5.2)

See merge request espressif/esp-idf!36426
2025-01-16 16:52:33 +08:00
9a161557a1 Merge branch 'feat/add_h2_config_and_maxver_for_v5.2' into 'release/v5.2'
feat(soc): add Kconfig rev min option and increase max ver for H2 v1.2 (v5.2)

See merge request espressif/esp-idf!36418
2025-01-16 13:32:27 +08:00
d223421f92 fix(15.4): set 15.4 energy scan duration before cca 2025-01-16 11:45:50 +08:00
8eaf6004b3 Merge branch 'refactor/update_lpperi_regs_for_h2_eco5_v5.2' into 'release/v5.2'
refactor(lpperi): compatible refactor for H2 ECO5 (v5.2)

See merge request espressif/esp-idf!36338
2025-01-16 10:51:16 +08:00
e21640838d Merge branch 'bugfix/enable_additional_lp_io_wakeup_v5.2' into 'release/v5.2'
fix(lp_io): allow edge wakeup types for LP-IO on chips which support it

See merge request espressif/esp-idf!36328
2025-01-16 10:02:39 +08:00
e9d35ac8ac feat(soc): add Kconfig rev min option and increase max ver for H2 v1.2 2025-01-16 00:18:20 +08:00
e5da868951 Merge branch 'bugfix/fix_compilation_warn_v5.2' into 'release/v5.2'
fix(nimble): Address compilation warnings for different flag combination (v5.2)

See merge request espressif/esp-idf!36394
2025-01-15 21:32:56 +08:00
43ad52ee95 refactor(lpperi): improve compatibility solution 2025-01-15 20:42:44 +08:00
be89694353 refactor(lpperi): compatible refactor for H2 ECO5 2025-01-15 20:42:44 +08:00
21c23c146e Merge branch 'fix_not_rm_micro_definition_v5.2' into 'release/v5.2'
fix(wifi): remove micro definition

See merge request espressif/esp-idf!36264
2025-01-15 19:10:30 +08:00
358d1ec359 fix(wifi): remove micro definition 2025-01-15 16:09:55 +08:00
a83eb05dc0 Merge branch 'feat/increase_c2_supported_ver_v5.2' into 'release/v5.2'
feat(soc): increase c2 max supported version (v5.2)

See merge request espressif/esp-idf!35972
2025-01-15 15:25:56 +08:00
324c7effcc Merge branch 'bugfix/fix_double_wifi_active_time_v5.2' into 'release/v5.2'
bugfix/fix double wifi active time v5.2

See merge request espressif/esp-idf!36357
2025-01-15 14:11:08 +08:00
a0da07d8f3 fix(nimble): Fix compilation issues for different flag combinations 2025-01-15 10:18:05 +05:30
0f5b20f045 Merge branch 'feat/update_thread_lib_v5.2' into 'release/v5.2'
fix(openthread): update SRP server to support zero subtype (v5.2)

See merge request espressif/esp-idf!36334
2025-01-15 11:08:09 +08:00
0e42d52009 Merge branch 'bugfix/postpone_cpu_pll_off_time_in_slp_v5.2' into 'release/v5.2'
fix(clk): postpone CPU PLL off time in sleep (v5.2)

See merge request espressif/esp-idf!36301
2025-01-15 10:14:27 +08:00
ffe563fb74 Merge branch 'fix/lwip_ping_getnetif_threadsafe_v5.2' into 'release/v5.2'
fix(lwip): Fix ping session calling thread unsafe API (v5.2)

See merge request espressif/esp-idf!36381
2025-01-15 00:01:55 +08:00
2e2551030e fix(lwip): Fix ping session calling thread unsafe API
Closes https://github.com/espressif/esp-idf/issues/14982
2025-01-14 11:25:54 +01:00
16595a5a9a fix(ble): fixed ld file for c2eco0 and c2eco4
(cherry picked from commit 937fe2a6e3)

Co-authored-by: zhouxiao <zhouxiao@espressif.com>
2025-01-14 17:43:27 +08:00
304c40c89a fix(ble): fixed esp_ble_tx_power_set api issue on ESP32-H2
(cherry picked from commit d2b62f2130)

Co-authored-by: zwl <zhaoweiliang@espressif.com>
2025-01-14 14:54:08 +08:00
502648625e fix(ble): fixed esp_ble_tx_power_set api issue on ESP32-C6
(cherry picked from commit 8d6ec12838)

Co-authored-by: zwl <zhaoweiliang@espressif.com>
2025-01-14 14:54:06 +08:00
bfcb67058a fix(ble): fixed esp_ble_tx_power_set api issue on ESP32-C2
(cherry picked from commit 6a752eeb89)

Co-authored-by: zwl <zhaoweiliang@espressif.com>
2025-01-14 14:54:03 +08:00
5095bba000 feat(ble): support for putting ble code into flash on ESP32-H2
(cherry picked from commit 5a9acdc379)

Co-authored-by: zwl <zhaoweiliang@espressif.com>
2025-01-14 14:54:01 +08:00
c2762f9206 change(ble): Update lib_esp32c2 to 2a00fb0b
(cherry picked from commit 7cd3fe6953)

Co-authored-by: zhouxiao <zhouxiao@espressif.com>
2025-01-14 14:53:59 +08:00
85a1305052 change(ble): Update lib_esp32c6 to 3422b706
(cherry picked from commit 4fc95fa91f)

Co-authored-by: zhouxiao <zhouxiao@espressif.com>
2025-01-14 14:53:57 +08:00
dd5230866b change(ble): Update lib_esp32h2 to 3422b706
(cherry picked from commit fe5a12e7e7)

Co-authored-by: zhouxiao <zhouxiao@espressif.com>
2025-01-14 14:53:54 +08:00
5d2609911e Merge branch 'fix/twai_io_init_glitch_v5.2' into 'release/v5.2'
fix(driver_twai): fixed bus-off when twai_init due to wrong gpio config (v5.2)

See merge request espressif/esp-idf!34817
2025-01-14 11:56:22 +08:00
a122a750fb fix(wifi): fix double max active time, fix coex pwr period cant been updated by ps type set 2025-01-14 10:42:47 +08:00
1bb0b02c55 feat(coex): update coexist debug default event 2025-01-14 10:37:32 +08:00
5de8b483ea Merge branch 'fix/lwip_ping_ipv6only_v5.2' into 'release/v5.2'
fix(lwip): Fix IP6 raw socket checksum in IPv6-only configuration (v5.2)

See merge request espressif/esp-idf!35087
2025-01-14 01:59:07 +08:00
6050f356c2 Merge branch 'bugfix/fix_the_wpa3_connect_error_in_mesh_v5.2' into 'release/v5.2'
fix(wifi/mesh): fixed the mesh connection failure in WPA3 mode after erasing flash (v5.2)

See merge request espressif/esp-idf!36326
2025-01-13 19:37:06 +08:00
7351290ac4 Merge branch 'bugfix/update_api_to_get_url_correctly_v5.2' into 'release/v5.2'
fix(esp_http_client): updated API esp_http_client_get_url() to get URL in correct format (v5.2)

See merge request espressif/esp-idf!36333
2025-01-13 18:25:24 +08:00
7fac9e4f7a fix(esp_hw_support): Unused variables in memory_utils functions 2025-01-13 11:11:40 +01:00
9c6da59dca Merge branch 'fix/esp_netif_ppp_nullptr_check_v5.2' into 'release/v5.2'
fix(esp_netif): Prevent null deref when checking netif type (v5.2)

See merge request espressif/esp-idf!35672
2025-01-13 17:41:23 +08:00
2e41f0b875 fix(clk): postpone CPU PLL off time in sleep
For PMU supported chips, powering down CPU PLL in sleep will be done by PMU, not sleep code
2025-01-13 17:33:23 +08:00
38323b6601 fix(lwip): Fix ping_v6 receiving to accept only echo replies
This fixes a bug where we ping our own IP and the request itself
bounces back to the raw receive function and is incorrectly treated as
reply. (this bug was discovered when fixing ICMPv6 pings with incorrect
checksums, while the ping request was dropped in icmpv6.c due to wrong
checksum, but was also fed to raw layers where it was treated as
"correct" response, so the PINGv6 to ourselves still worked)
2025-01-13 10:25:45 +01:00
a662c54630 fix(common_connect): Fix example's stdin/out to setup UART interrupt once
Function example_configure_stdin_stdout() was used for simple UART I/O
operation in CI to enter test env configuration (wifi ssid, IPs, etc).
It could be called multiple times, but didn't handle the situation where
we install UART interrupt from multiple source (e.g. in ICMP tests,
where we first need to enter wifi credentials of test AP and then we
start ping-cmd console to handle ping commands)
2025-01-13 10:25:45 +01:00
4e18af6d43 fix(lwip): Fix IP6 raw socket checksum in IPv6-only configuration
* Update submodule: git log --oneline 0606eed9..3ca49ce4
  - sockets: Make IPv6 only netconn type IPv6 aware (espressif/esp-lwip@3ca49ce4)
2025-01-13 10:25:45 +01:00
7c61170550 fix(lp_io): allow edge wakeup types for LP-IO on chips which support it 2025-01-13 16:51:04 +08:00
7a63e00c4c Merge branch 'bugfix/uart_single_wire_mode_v5.2_fix' into 'release/v5.2'
fix(uart): fix incorrect IO configuration for TX and RX configure to the same pin

See merge request espressif/esp-idf!36294
2025-01-13 16:50:34 +08:00
a2034f258d fix(bt/controller): fixed missing critical protections on linked-list structure of (e)SCO buffers 2025-01-13 14:58:51 +08:00
fe62246f5a fix(uart): fix incorrect IO configuration for TX and RX configure to the same pin 2025-01-13 14:48:33 +08:00
47e889c809 fix(openthread): update SRP server to support zero subtype/v5.2
* esp-openthread: 4f3fd4895
* openthread: 005c5cefc
* esp-idf: 81bce81a1
2025-01-13 14:22:47 +08:00
51c668f2b9 fix(esp_http_client): updated API esp_http_client_get_url to get URL in correct format
This commit updates the API to include the port number in the URL,
which was previously missing.
2025-01-13 11:14:48 +05:30
81bce81a18 Merge branch 'bugfix/fix_few_nimble_issues_v5.2' into 'release/v5.2'
fix(nimble): Fix few nimble issues 11012025 (v5.2)

See merge request espressif/esp-idf!36313
2025-01-13 13:26:40 +08:00
db2d0eff7c Merge branch 'fix/return_esp_err_t_for_httpd_req_get_url_query_str_v5.2' into 'release/v5.2'
feat(https_server): Added checks to verify if uri is empty (v5.2)

See merge request espressif/esp-idf!36288
2025-01-13 11:51:49 +08:00
3dd245fbc4 Merge branch 'lwip/dns_clear_cache_fix_v5.2' into 'release/v5.2'
fix(lwip): Fixed active DNS entries before clearing cache(v5.2)

See merge request espressif/esp-idf!36213
2025-01-13 11:33:04 +08:00
e221554c3e fix(wifi/mesh): fixed the mesh connection failure in WPA3 mode after erasing flash
Closes https://github.com/espressif/esp-idf/issues/14095
2025-01-13 11:16:47 +08:00
54df5ddae1 Merge branch 'bugfix/use_wpa3_ent_authmode_naming_v5.2' into 'release/v5.2'
fix(wifi): Add support to recongize different WPA3 Authentication modes from specifications  (Backport v5.2)

See merge request espressif/esp-idf!36146
2025-01-13 10:31:19 +08:00
3f76bbe225 Merge branch 'fix/spi_slave_no_dma_rx_overwrite_v5.2' into 'release/v5.2'
fix(driver_spi): fixed slave no dma rx overwrite when trans_len below or over (v5.2)

See merge request espressif/esp-idf!34172
2025-01-13 10:02:35 +08:00
3c6372d711 fix(storage/vfs): incorrect log level in esp_vfs_register_fd_range
Closes https://github.com/espressif/esp-idf/issues/14327
2025-01-10 16:51:47 +01:00
b3a5fe83a4 feat(nimble): Additional changes in PAWR IDF Examples/support for ESP IP 2025-01-10 17:44:36 +05:30
f38a2dbce7 fix(nimble): Reset data length global variables 2025-01-10 17:42:33 +05:30
6333e1d826 fix(nimble): Fixed a typo in Kconfig file 2025-01-10 17:40:07 +05:30
466a41864c fix(nimble): Added HCI_Read_Remote_Version_Information command 2025-01-10 17:39:58 +05:30
12f868ca5e fix(nimble): Clear our and peer security records during unpair 2025-01-10 17:38:08 +05:30
778aa5731f Merge branch 'feature/usb_host_hubs_support_msg_backport_v5.2' into 'release/v5.2'
feat(hub): Added notification when hubs support is disabled (backport to v5.2)

See merge request espressif/esp-idf!35453
2025-01-10 18:59:48 +08:00
a88c2e85b6 feat(https_server): Added checks to verify if uri is empty
Added the checks if the URI is empty for the funtions httpd_req_get_url_query_len
and httpd_req_get_url_query_str in httpd_parser.c
2025-01-10 11:09:57 +05:30
a73c62ef9a Merge branch 'bugfix/uart_single_wire_mode_v5.2' into 'release/v5.2'
fix(uart): allow same pin for tx and rx in uart_set_pin; UART_SELECT_READ_NOTIF race conditon fix (v5.2)

See merge request espressif/esp-idf!36261
2025-01-10 11:42:19 +08:00
d2ba44d9e1 fix(wifi): Add support to recongize different WPA3 Authentication modes from specs
1. Add support  to recognize APs supporting 'WPA3-Enterprise-Only Mode' and
   'WPA3-Enterprise-Transition Mode' using authmodes WIFI_AUTH_WPA3_ENTERPRISE
   and WIFI_AUTH_WPA2_WPA3_ENTERPRISE, respectively.
2. Add placeholder enums in 'wifi_auth_mode_t' for maintaining
   forward compatibility with minor versions > v5.2
2025-01-09 10:41:28 +05:30
fd55869f82 fix(uart): allow same pin for tx and rx in uart_set_pin
Closes https://github.com/espressif/esp-idf/issues/14787
2025-01-09 12:04:45 +08:00
59cf08863a Merge branch 'backport/backport_some_changes_to_v5.2_20250106' into 'release/v5.2'
Backport/backport some changes to v5.2 20250106

See merge request espressif/esp-idf!36231
2025-01-09 11:55:27 +08:00
a863380698 fix(driver_spi): fixed slave no dma rx overwrite when trans_len below or over
Closes https://github.com/espressif/esp-idf/issues/14462
2025-01-09 11:53:53 +08:00
d5cd3b734d Merge branch 'feat/add_config_for_ble_vs_qa_cmd_v5.2' into 'release/v5.2'
fixed interrupt WDT when shutdown bt controller on ESP32(ba6739f) (v5.2)

See merge request espressif/esp-idf!36174
2025-01-09 11:51:26 +08:00
58001363d6 Merge branch 'fix/c61_h2_pmu_icg_csv_update_v5.2' into 'release/v5.2'
fix(pmu): h2 update pmu_icg_mapping.h (v5.2)

See merge request espressif/esp-idf!34798
2025-01-09 11:50:27 +08:00
82e72bcf53 Merge branch 'fix/adc_monitor_not_work_v5.2' into 'release/v5.2'
fix(esp_adc): fixed adc continue monitor don't work issue (v5.2)

See merge request espressif/esp-idf!35167
2025-01-09 11:49:43 +08:00
95873178f6 Merge branch 'fix/blufi_example_mem_access_v5.2' into 'release/v5.2'
fix(ble/blufi): Fixed blufi example security issue (v5.2)

See merge request espressif/esp-idf!36162
2025-01-09 11:47:02 +08:00
611ddca83a Merge branch 'bugfix/enable_eap_workarounds_v5.2' into 'release/v5.2'
fix(esp_wifi): Enable EAP workarounds by default (v5.2)

See merge request espressif/esp-idf!36154
2025-01-09 11:46:21 +08:00
b0d6ba527f fix(uart): fix race condition with the use of UART_SELECT_READ_NOTIF
UART_SELECT_READ_NOTIF needs to be sent after received data got processed
to avoid the potential race condition
2025-01-09 11:45:31 +08:00
c93a343ba0 Merge branch 'fix/fix_pm_trace_rtc_domain_keeping_v5.2' into 'release/v5.2'
fix(esp_pm): enable RTC_PERIPH domain once in esp_pm_trace_init (v5.2)

See merge request espressif/esp-idf!35999
2025-01-09 11:45:21 +08:00
5912a47d41 Merge branch 'fix/fix_flash_leakage_workaroud_config_dependcy_v5.2' into 'release/v5.2'
fix(esp_hw_support): fix FLASH leakage workaround kconfig dependcy (v5.2)

See merge request espressif/esp-idf!35992
2025-01-09 11:44:48 +08:00
578a6f9627 Merge branch 'bugfix/ws_head_buf_size_v5.2' into 'release/v5.2'
fix(tcp_transport): Fix websocket header read to handle overflow (v5.2)

See merge request espressif/esp-idf!35669
2025-01-09 11:44:04 +08:00
fe262a71f0 Merge branch 'change/change_pm_slp_iram_opt_dependence_v5.2' into 'release/v5.2'
change(esp_pm): change pm_slp_iram_opt dependence(backport v5.2)

See merge request espressif/esp-idf!33869
2025-01-09 11:43:40 +08:00
6e51dc41cc Merge branch 'fix/littlefs_image_creation_windows_v5.2' into 'release/v5.2'
fix(littlefs): Allow LittleFS image generation on Windows + version bump (v5.2)

See merge request espressif/esp-idf!34917
2025-01-09 11:42:08 +08:00
cce96ba9f4 Merge branch 'feature/support_esp32h2eco5_phylib_v5.2' into 'release/v5.2'
feat(esp_phy): support esp32h2eco5 phylib (v5.2)

See merge request espressif/esp-idf!36210
2025-01-09 11:37:31 +08:00
a10be2bcae Merge branch 'bugfix/fix_some_ble_bugs_241224_esp32c3_v5.2' into 'release/v5.2'
Fixed some BLE bugs 241224 on ESP32C3(fd62b31) (v5.2)

See merge request espressif/esp-idf!36194
2025-01-09 11:34:55 +08:00
aaf7c6a9ce fix(esp_hw_support): fix modem power enable failed after modem state wakeup 2025-01-09 11:12:51 +08:00
c827c83fee feat(espefuse): Adds efuses for esp32h2 eco5
- Support efuses that are not present in the main efuse table
2025-01-08 12:18:34 +02:00
4e0b39fb69 Merge branch 'feature/154_api_enhancement_for_mp_v5.2' into 'release/v5.2'
feat(802.15.4): support register isr callback (v5.2)

See merge request espressif/esp-idf!36200
2025-01-08 17:12:29 +08:00
44fd1e0d3a feat(wifi): avoid compiling components related to wifi when wifi is not supported 2025-01-08 15:40:42 +08:00
53a526e52d feat(wifi): wifi support 80211tx using 11ax rate 2025-01-08 15:19:18 +08:00
e248c59c37 Merge branch 'bugfix/fix_csfc_write_nvs_v5.2' into 'release/v5.2'
fix(nimble): Corrected storing method of csfc to nvs (v5.2)

See merge request espressif/esp-idf!36167
2025-01-08 13:02:54 +08:00
d96d524cd9 Merge branch 'docs/remove_coex_doxy_v5.2' into 'release/v5.2'
docs(doxygen): removed coex header from doxyfile (v5.2)

See merge request espressif/esp-idf!36224
2025-01-08 10:40:58 +08:00
801b8ef61b docs(doxygen): removed coex header from doxyfile
Failing to build due to missing comments, but the header was
never included in the docs anyway, so might as well remove it.
2025-01-08 09:48:27 +08:00
cdfa57f5c5 ci(app_update): move test_apps to subfolder with a name 2025-01-08 02:03:10 +08:00
3a3d939e82 fix(lwip): Fixed active DNS entries before clearing cache 2025-01-07 21:32:43 +11:00
dbe6efd9a3 feat(esp_phy): support esp32h2eco5 phylib 2025-01-07 17:53:01 +08:00
b3b14bdf43 Merge branch 'bugfix/warn_rc32k_use_in_kconfig_v5.2' into 'release/v5.2'
fix(clk): add an inevitable kconfig option to be selected to use rc32k (v5.2)

See merge request espressif/esp-idf!35966
2025-01-07 15:49:51 +08:00
zwx
82fbf800c6 feat(802.15.4): introduced a feature for registering 802.15.4 ISR callbacks 2025-01-07 15:26:33 +08:00
f1c8a8922c fix(bt): Update bt lib for ESP32-C3 and ESP32-S3(fd62b31)
- Fixed periodic adv enable params checking
- Fixed BLE assert lld_scan.c 1728 when receiving directed adv
- Support resolving RPA to identity address when creating connection
- Fixed BLE assert rwble.c 505 param 00400010
- Fixed peer address type error in HCI LE meta event
- Fixed setting random address failed when extended adv is enabled


(cherry picked from commit 326f391f9c)

Co-authored-by: chenjianhua <chenjianhua@espressif.com>
2025-01-07 14:33:27 +08:00
c3df56b53e fix(esp_adc): fixed adc continue monitor don't work issue
Closes https://github.com/espressif/esp-idf/issues/14769
Closes https://github.com/espressif/esp-idf/issues/14814
2025-01-06 21:09:53 +08:00
c5a5c98660 fix(pmu): c61 and h2 update pmu_icg_mapping.h 2025-01-06 21:08:41 +08:00
721def344a Merge branch 'feat/support_setting_event_for_154_txrx_5_2' into 'release/v5.2'
feat(15.4): support setting 15.4 txrx pti when coex is enabled (backport to 5.2)

See merge request espressif/esp-idf!36105
2025-01-06 19:23:44 +08:00
5eaa63af7d Merge branch 'bugfix/modbus_serial_examples_fix_mode_v52' into 'release/v5.2'
fix(modbus): Fix the mode setup in modbus slave (backport v5.2)

See merge request espressif/esp-idf!36117
2025-01-06 17:06:07 +08:00
02056c7dae fix(bt): Update bt lib for ESP32(ba6739f)
- Fixed assert in lld_evt.c at line 2353
- Fixed interrupt WDT when shutdown bt controller
- Added config for BLE vendor HCI QA command
- Added config for BLE channel assessment and ping procedure


(cherry picked from commit ad3554fbed)

Co-authored-by: chenjianhua <chenjianhua@espressif.com>
2025-01-06 15:20:07 +08:00
2381ff9a41 fix(nimble): Corrected storing method of csfc to nvs 2025-01-06 10:20:16 +05:30
2406947e4a fix(ble/bluedroid): Fixed BLE feature selection configuration
(cherry picked from commit 117aa74705)

Co-authored-by: zhanghaipeng <zhanghaipeng@espressif.com>
2025-01-06 11:14:18 +08:00
976c0cd3e7 docs(ble/bluedroid): Added BLE log when bond info was deleted
(cherry picked from commit c9cdf51b05)

Co-authored-by: zhanghaipeng <zhanghaipeng@espressif.com>
2025-01-06 11:13:45 +08:00
f9b60f6f74 docs(ble/bluedroid): Optimize doc for registering BLE callback functions
(cherry picked from commit d84ccadf90)

Co-authored-by: zhanghaipeng <zhanghaipeng@espressif.com>
2025-01-06 11:13:43 +08:00
a9b840a92c fix(ble/blufi): Fixed blufi example security issue
(cherry picked from commit 3cb2d9c3c6)

Co-authored-by: zhanghaipeng <zhanghaipeng@espressif.com>
2025-01-06 11:13:41 +08:00
20e7428c97 fix(openthread): fix openthread radio spinel deinit 2025-01-06 10:27:51 +08:00
5d60da974c fix(openthread): fix a naming error of kconfig 2025-01-06 10:27:30 +08:00
5280268e65 feat(15.4): support setting 15.4 txrx pti when coex is enabled 2025-01-06 10:27:29 +08:00
2f62363cc6 Merge branch 'feature/add_utf_8_decoding_v5.2' into 'release/v5.2'
feat(tools): Enforced utf-8 encoding with Python open() functions (v5.2)

See merge request espressif/esp-idf!36127
2025-01-05 21:26:37 +08:00
eb4a5194c6 Merge branch 'feat/example_connect_thread_v5_2' into 'release/v5.2'
feat(protocol_examples_common): Add Thread connect to support Thread for the protocol examples(v5.2)

See merge request espressif/esp-idf!36092
2025-01-05 10:58:24 +08:00
33aec06e76 fix(esp_wifi): Enable EAP workarounds by default
Enabling this will make sure our behavior is same as upstream
wpa_supplicant.
2025-01-03 17:43:29 +05:30
c9524e0fd9 Merge branch 'bugfix/fix_sniffer_fail_on_ci_v5.2' into 'release/v5.2'
fix(ci): Enlarge the pcap memory size in sniffer example (v5.2)

See merge request espressif/esp-idf!35696
2025-01-03 19:58:43 +08:00
71dde494c0 Merge branch 'feat/backport_some_feature_and_bugfix_v52' into 'release/v5.2'
Feat/backport some feature and bugfix v52

See merge request espressif/esp-idf!36116
2025-01-03 19:51:18 +08:00
50fe685519 Merge branch 'feature/ieee802154_txpower_table_v5.2' into 'release/v5.2'
Feature/ieee802154 txpower table (v5.2)

See merge request espressif/esp-idf!36134
2025-01-03 16:21:59 +08:00
zwx
40c7be7406 fix(802.15.4): fix a typo for 15.4 Kconfig 2025-01-03 14:22:21 +08:00
zwx
07e0f9df4c feat(802.15.4): introduce a series of APIs related power table 2025-01-03 14:22:21 +08:00
zwx
acacf85a1d feat(openthread): support preferred channel mask 2025-01-03 14:22:21 +08:00
a272c70a5d Merge branch 'bugfix/h2_wifi_intr_v5.2' into 'release/v5.2'
fix(interrupt): fixed wrongly reserved interrupt for wifi on H2 (v5.2)

See merge request espressif/esp-idf!36113
2025-01-03 11:11:38 +08:00
3cca3da1d5 feat(tools): Enforce utf-8 encoding with open() function 2025-01-02 16:12:47 +01:00
bf64894fd8 fix(modbus): Fix the mode setup in modbus slave
https://github.com/espressif/esp-idf/pull/14878
2025-01-02 17:54:22 +08:00
25433ad0e3 Update slave.c to fix the mode
There is an issue in the lines that I have changed. I think it was copied over from the enum by mistake.
2025-01-02 17:54:22 +08:00
4ad1537cda fix(wifi): backport some wifi feature and bugfixs 2025-01-02 17:48:19 +08:00
94d9ab88bb fix(interrupt): fixed wrongly reserved interrupt for wifi on H2 2025-01-02 16:49:11 +08:00
59e0ed5a6c fix(wifi): fix spiram ignore issue 2025-01-02 16:35:42 +08:00
17264b1b74 feat(wifi): fix SPIRAM_IGNORE_NOTFOUND releated config 2025-01-02 16:34:29 +08:00
6b8f294eaa change(wifi): change softap default dtim period to 1 2025-01-02 16:09:30 +08:00
9111d166fb fix(wifi): fix esp32c2eco4 sta_rx_csa ld 2025-01-02 16:07:57 +08:00
dbe1e41c6f Merge branch 'ci/add_build_test_eco_versions_v5.2' into 'release/v5.2'
ci: add build test for eco versions (v5.2)

See merge request espressif/esp-idf!35820
2025-01-02 15:24:47 +08:00
8af4285c24 Merge branch 'bugfix/ledc_get_freq_calc_v5.2' into 'release/v5.2'
fix(ledc): fix ledc_get_freq calculation err due to overflow (v5.2)

See merge request espressif/esp-idf!36021
2025-01-02 15:13:29 +08:00
866a02f258 Merge branch 'fix/ble_i2c_v5.2' into 'release/v5.2'
fix(i2c): Fix i2c read from fifo issue when enabling bt/wifi/uart, etc...  (backport v5.2)

See merge request espressif/esp-idf!36053
2025-01-02 15:05:32 +08:00
0c2b70a83f Merge branch 'feat/xmc_32d_support_v5.2' into 'release/v5.2'
feat(spi_flash): support 120M on xmc25q32d flash (backport v5.2)

See merge request espressif/esp-idf!36080
2025-01-02 14:44:54 +08:00
195a92659b Merge branch 'fix/bod_esp32h2_v5.2' into 'release/v5.2'
fix(bod): Improve esp32h2 brownout handling (backport v5.2)

See merge request espressif/esp-idf!36052
2025-01-02 14:25:12 +08:00
0b138556d7 Merge branch 'fix/fix_parlio_tx_example_line_address_v5.2' into 'release/v5.2'
fix(parlio_tx): fix line address in simple_rgb_martix example (v5.2)

See merge request espressif/esp-idf!36072
2025-01-02 14:12:35 +08:00
32dd4764a1 Merge branch 'bugfix/channel_resolution_calculation_v5.2' into 'release/v5.2'
fix(rmt): channel resolution divider rounding issue (v5.2)

See merge request espressif/esp-idf!36034
2025-01-02 14:09:16 +08:00
87ea3652e0 Merge branch 'feat/set_get_ack_timeout_v5.2' into 'release/v5.2'
feat(802.15.4): add api for set/get ack timeout (v5.2)

See merge request espressif/esp-idf!36087
2025-01-02 12:53:10 +08:00
1ef5e3f3a3 feat(802.15.4): add api for set/get ack timeout (v5.2) 2025-01-02 12:53:10 +08:00
d0c95f419c feat(openthread): update build test rules 2024-12-31 14:52:16 +08:00
6725f0c8d9 fix(openthread): Fix CI failure of ot_trel example build 2024-12-31 14:50:28 +08:00
11d4907521 feat(protocol_examples_common): Add Thread connect to support Thread for the protocol examples 2024-12-31 14:49:22 +08:00
0d79e0f1e2 Merge branch 'feature/use_fixed_dut_in_ot_ci_cases_v5.2' into 'release/v5.2'
feat(openthread): use fixed port in ot ci cases (Backport v5.2)

See merge request espressif/esp-idf!36046
2024-12-31 11:59:56 +08:00
e52ae0b4d8 feat(spi_flash): support 120M on xmc25q32d flash 2024-12-31 11:35:58 +08:00
905a83ecbf Merge branch 'bugfix/fix_ext_reconn_compilation_v5.2' into 'release/v5.2'
fix(nimble): Fix compilation issue for combination of Ext Adv and Reattempt conn flag (v5.2)

See merge request espressif/esp-idf!35933
2024-12-30 19:47:22 +08:00
1f9057df52 Merge branch 'fix/ringbuf_receives_after_aq_wraparound_v5.2' into 'release/v5.2'
fix(esp_ringbuf): Fixed no-split ringbuf issue where acquire pointer  wraps around (v5.2)

See merge request espressif/esp-idf!35869
2024-12-30 17:11:31 +08:00
5d6af0d638 fix(parlio_tx): fix line address in simple_rgb_martix example 2024-12-30 17:09:06 +08:00
52b39983d5 fix(nimble): Fix compilation issue for combination of Ext Adv and Reattempt conn flag 2024-12-30 14:31:39 +05:30
c3681aa036 Merge branch 'bugfix/fix_compile_issue_v5.2' into 'release/v5.2'
fix(nimble): Fix compilation issues when BLE_MAX_STORE_BOND is set to 0 (v5.2)

See merge request espressif/esp-idf!34443
2024-12-30 16:27:16 +08:00
4eee2b0849 fix(heap): MALLOC_CAP_EXEC does not allocate in RTC IRAM
This commit fixes the issue when trying to allocate memory
with the MALLOC_CAP_EXEC in RTC memory. Prior to the fix,
the heap allocator was returning an address in RTC DRAM.

To fix this issue:
- modified memory_layout.c of the concerned targets to fill the iram_address
field in the rtc entry of the soc_memory_region array properly.
- modified heap component  related functions to return IRAM address when
an allocation in RTC memory with MALLOC_CAP_EXEC is requested.

Closes https://github.com/espressif/esp-idf/issues/14835
2024-12-30 09:06:54 +01:00
276083f93e Merge branch 'fix/missing_header_hint_v5.2' into 'release/v5.2'
fix(hints): improve suggestion for missing header file (v5.2)

See merge request espressif/esp-idf!36045
2024-12-30 14:06:20 +08:00
4c051ac6f2 fix(nimble): Fix compilation issues when BLE_MAX_STORE_BOND is set to 0 2024-12-30 11:07:41 +05:30
8cbcd1c2de fix(i2c): Fix lose byte during data reading in i2c master on esp32,
Closes https://github.com/espressif/esp-idf/issues/12860
2024-12-30 13:34:49 +08:00
64513a24c4 fix(i2c_slave): Support 10-bit address on esp32 2024-12-30 13:34:37 +08:00
34ab6cc454 fix(i2c): Correct internal function spelling,
Closes https://github.com/espressif/esp-idf/issues/15100
2024-12-30 13:23:22 +08:00
5559c32a8e fix(bod): Improve esp32h2 brownout handling 2024-12-30 12:17:10 +08:00
f9acbd1754 feat(openthread): use fixed port in ot ci cases 2024-12-30 09:57:05 +08:00
a4de7c8ac4 fix(hints): improve suggestion for missing header file
Currently, we are only suggesting that the header file is likely not
part of the component's INCLUDE_DIRS. However, the header file may be
missing also because of the configuration settings. For instance, the
component might be disabled in sdkconfig, or the feature that supplies
the header might not be enabled. Enhance the hint message to address
this scenario as well.

Signed-off-by: Frantisek Hrbata <frantisek.hrbata@espressif.com>
2024-12-29 18:56:58 +01:00
31259552f5 ci(spi_flash): add tests for cache2phys with XIP 2024-12-28 01:56:01 +08:00
5cb8f87bbe fix(mmap): fixed spi_flash_phys2cache return addr in PSRAM issue
When SPIRAM_FETCH_INSTRUCTIONS or SPIRAM_RODATA enabled
2024-12-28 01:56:01 +08:00
6a29f58770 Merge branch 'bugfix/force_att_tx_q_cleanup_v5.2' into 'release/v5.2'
fix(nimble): Add ATT Tx queue cleanup during link disconnection (v5.2)

See merge request espressif/esp-idf!36014
2024-12-27 20:10:30 +08:00
1d29ca4c02 Merge branch 'docs/refactor_ceva_bt_controller_api_v5.2' into 'release/v5.2'
docs(ble): Refactored the API reference for esp32/c3/s3 BT controller (v5.2)

See merge request espressif/esp-idf!35351
2024-12-27 18:45:15 +08:00
75004877a3 docs(ble): Refactored the API reference for esp32/c3/s3 BT controller (v5.2) 2024-12-27 18:45:15 +08:00
dac174ad76 fix(rmt): channel resolution divider rounding issue
Closes https://github.com/espressif/esp-idf/issues/15092
2024-12-27 16:58:06 +08:00
92bfc4828c Merge branch 'bugfix/fix_btqabr2023330_v5.2' into 'release/v5.2'
fix(bt): Fix error code returned by create_conn_cancel_cmd at different status (backport v5.2)

See merge request espressif/esp-idf!35575
2024-12-27 11:01:07 +08:00
42f8913ca8 Merge branch 'bugfix/esp_rom_gpio_connect_out_signal_patch_v5.2' into 'release/v5.2'
fix(gpio): patched esp_rom_gpio_connect_out_signal for esp32 and esp32s2 (v5.2)

See merge request espressif/esp-idf!35941
2024-12-27 10:35:12 +08:00
a40f7af524 Merge branch 'fix/openthread_dns_hook_v5_2' into 'release/v5.2'
fix(openthread): Fix external DNS resolve hook for DNS64 client(v5.2)

See merge request espressif/esp-idf!35985
2024-12-27 10:32:20 +08:00
82c3a720ff Merge branch 'bugfix/uart_8_16_bit_access_v5.2' into 'release/v5.2'
fix(uart): fix 8/16-bit uart register access (v5.2)

See merge request espressif/esp-idf!35963
2024-12-27 10:20:20 +08:00
7ec010c1ae fix(ledc): fix ledc_get_freq calculation err due to overflow
Closes https://github.com/espressif/esp-idf/pull/14882
2024-12-26 18:51:12 +08:00
16101fd7f2 Merge branch 'feature/support_to_query_phy_rf_used_time_v5.2' into 'release/v5.2'
feat(phy): support to query phy used time

See merge request espressif/esp-idf!35876
2024-12-26 17:23:12 +08:00
7a1588ec7f fix(twai): currect twai type macro initialize definition 2024-12-26 15:58:36 +08:00
154587cd3d fix(driver_twai): fixed bus-off when twai_init due to wrong gpio config
Closes https://github.com/espressif/esp-idf/issues/14548
2024-12-26 15:58:26 +08:00
cedbdcd983 fix(nimble): Add ATT Tx queue cleanup during link disconnection 2024-12-26 13:04:36 +05:30
ce62b586e1 Merge branch 'refactor/optimize_ble_gatt_api_doc_v5.2' into 'release/v5.2'
refactor(bt/bluedroid): Optimize BLE GATT related APIs reference (v5.2)

See merge request espressif/esp-idf!35917
2024-12-26 14:25:00 +08:00
2d582e880f Merge branch 'feat/add_get_started_example_on_bluedroid_v5.2' into 'release/v5.2'
feat(bt/bluedroid): Added BLE get started examples for Bluedroid (v5.2)

See merge request espressif/esp-idf!35651
2024-12-26 14:24:47 +08:00
8557a2c529 fix(esp_pm): enable RTC_PERIPH domain once in esp_pm_trace_init 2024-12-26 14:11:01 +08:00
c9af36610d fix(esp_hw_support): fix FLASH leakage workaround kconfig dependcy 2024-12-26 11:40:58 +08:00
3c799b3f9f Merge branch 'bugfix/fixed_ble_issues_241220_v5.2' into 'release/v5.2'
Bugfix/fixed ble issues 241220 (v5.2)

See merge request espressif/esp-idf!35922
2024-12-26 11:30:23 +08:00
4010489aa2 Merge branch 'bugfix/fix_i2s_24b_buf_size_calc_v5.2' into 'release/v5.2'
fix(i2s): fixed some issues in I2S driver (v5.2)

See merge request espressif/esp-idf!35770
2024-12-26 11:14:24 +08:00
79014ccc1b Merge branch 'bugfix/reserve_mspi_pin_regarding_line_mode_v5.2' into 'release/v5.2'
fix(gpio_reserve): reserve the mspi pin regarding line mode (v5.2)

See merge request espressif/esp-idf!35907
2024-12-26 10:51:55 +08:00
2ef8f9e237 Merge branch 'fix/esp_hiram_heap_v5.2' into 'release/v5.2'
fix(esp_psram): fix a bug in PSRAM heap registration (backport v5.2)

See merge request espressif/esp-idf!35701
2024-12-26 10:51:18 +08:00
fa1ab35c66 Merge branch 'bugfix/rtc_clk_cpu_freq_set_xtal_behavior_v5.2' into 'release/v5.2'
fix(clk): rtc_clk_cpu_freq_set_xtal will always disable CPU's PLL (v5.2)

See merge request espressif/esp-idf!35945
2024-12-26 10:49:20 +08:00
b6a2beaf93 fix(openthread): Fix external DNS resolve hook for DNS64 client 2024-12-26 10:21:06 +08:00
526aef42cc feat(soc): increase c2 max supported version 2024-12-25 20:30:42 +08:00
47c9382cc2 fix(clk): add an inevitable kconfig option to be selected to use rc32k 2024-12-25 20:07:26 +08:00
0f9a4890aa fix(uart): fix 8/16-bit uart register access 2024-12-25 19:27:54 +08:00
5dd2f38eb4 fix(uart): eliminated potential glitch on TX at setup if TX signal is inversed
Closes https://github.com/espressif/esp-idf/issues/14285
2024-12-25 14:37:29 +08:00
610b334c26 Merge branch 'fix/fix_psram_mode_reg_wrong_timing_v5.2' into 'release/v5.2'
psram: fixed mode reg read bad timing on octal and hex psrams (v5.2)

See merge request espressif/esp-idf!35950
2024-12-25 14:13:13 +08:00
9d1b0c2df7 Merge branch 'feat/rmt_return_real_channel_resolution_v5.2' into 'release/v5.2'
feat(rmt): add API to return the real clock resolution of a channel (v5.2)

See merge request espressif/esp-idf!35903
2024-12-25 14:10:47 +08:00
607afec360 fix(gpio_reserve): reserve the mspi pin regarding line mode 2024-12-25 11:08:32 +08:00
137cee80d2 fix(psram): fixed mode reg read bad timing on octal and hex psrams 2024-12-25 11:05:53 +08:00
zwl
1e68d50840 feat(ble): add dtm configuration command in hci example 2024-12-25 09:57:29 +08:00
54ca0cf944 fix(clk): rtc_clk_cpu_freq_set_xtal will always disable CPU's PLL
Align C6/H2 rtc_clk_cpu_freq_set_xtal behavior to other chips
2024-12-24 22:29:14 +08:00
b600a2ef8b fix(gpio): patched esp_rom_gpio_connect_out_signal for esp32 and esp32s2
The original ROM function enabled output for the pad first, and then connected the signal
This could result in an undesired level change at the pad

Closes https://github.com/espressif/esp-idf/issues/12826
2024-12-24 20:17:40 +08:00
af7ce35ee6 Merge branch 'fix/add_macros_for_otbr_v5.2' into 'release/v5.2'
fix(openthread): add macros for ot_br (v5.2)

See merge request espressif/esp-idf!35894
2024-12-24 17:55:18 +08:00
cf11949a7b feat(ble): Support get ble controller free heap size on ESP32-C2
(cherry picked from commit 2cb7d2437b)

Co-authored-by: zwl <zhaoweiliang@espressif.com>
2024-12-24 15:21:21 +08:00
226d8d7c75 feat(ble): Support get ble controller free heap size on ESP32-H2
(cherry picked from commit 12f226be7d)

Co-authored-by: zwl <zhaoweiliang@espressif.com>
2024-12-24 15:21:19 +08:00
b77e07b891 feat(ble): Support get ble controller free heap size on ESP32-C6
(cherry picked from commit aa7feb9449)

Co-authored-by: zwl <zhaoweiliang@espressif.com>
2024-12-24 15:21:17 +08:00
46a0db10ac feat(ble): fixed some ble issues on ESP32-C2
(cherry picked from commit 5f9a3cdd1a)

Co-authored-by: zwl <zhaoweiliang@espressif.com>
2024-12-24 15:21:15 +08:00
918edefb19 feat(ble): adjust bt default scheme position
(cherry picked from commit 446239251c)

Co-authored-by: zwl <zhaoweiliang@espressif.com>
2024-12-24 15:21:13 +08:00
b0f857a0f8 Merge branch 'refactor/optimize_ble_gatt_api_doc' into 'master'
refactor(bt/bluedroid): Optimize BLE GATT related APIs reference

See merge request espressif/esp-idf!34650

(cherry picked from commit 19b5381c99)

7320c77d refactor(bt/bluedroid): Optimize BLE GATT related APIs reference
8a80617c refactor(bt/bluedroid): Optimize BLE GATT related APIs reference
0ac97e98 refactor(bt/bluedroid): Optimize BLE GATT related APIs reference
27b17c69 refactor(bt/bluedroid): Optimize BLE GATT related APIs reference
ea8d7686 docs: Update gattc & gatts api header files
f508772f Apply 3 suggestion(s) to 2 file(s)
03469b52 Apply 2 suggestion(s) to 1 file(s)
aa2cf7a5 docs: fix minor issue
46dc6e96 docs(ble): Replaced "closed" with "terminated" for physical connection.

Co-authored-by: Wei Yu Han <weiyuhan@espressif.com>
2024-12-24 15:19:53 +08:00
bc5f76a636 fix(i2s): add check for the tdm frame bits num 2024-12-24 14:47:01 +08:00
4c97aa404a change(esp32): undo forcing two slots in I2S
fix(i2s): fixed the issue in PR 14879

Closes https://github.com/espressif/esp-idf/pull/14879

[Kevin: Update to only remove the limitation for PCM short format]
2024-12-24 14:47:01 +08:00
1e5ba4282f refactor(i2s): refactor i2s examples common dependencies
Closes https://github.com/espressif/esp-idf/issues/14751

Make the common I2S dependencies as an example common component,
so that to avoid slash & backslash issue on windows
when use absolute include path.
2024-12-24 14:47:01 +08:00
848f92b02c fix(i2s): return error when mclk_div is smaller than 2 2024-12-24 14:46:47 +08:00
fb0b6e0987 fix(i2s): fixed incorrect buf size calculation 2024-12-24 12:32:07 +08:00
cf0dc7a202 feat(rmt): add API to return the real clock resolution of a channel
Closes https://github.com/espressif/esp-idf/pull/15074
2024-12-24 11:17:21 +08:00
1408102f63 Merge branch 'feature/add_rx_buff_statistic_v5.2' into 'release/v5.2'
feat(802.15.4): IEEE802.15.4 add rx buffer statistic (v5.2)

See merge request espressif/esp-idf!35641
2024-12-24 10:10:57 +08:00
89d56a9f7a fix(openthread): add macros for ot_br 2024-12-23 21:31:16 +08:00
baef4f239c Merge branch 'bugfix/ble_common_issues_v5.2' into 'release/v5.2'
Bugfix/ble common issues v5.2

See merge request espressif/esp-idf!35796
2024-12-23 20:05:40 +08:00
2511d77650 fix(nimble): fix memory leak issue in Blufi example 2024-12-23 11:59:59 +05:30
47a2725c34 feat(phy): support to query phy used time 2024-12-23 10:58:23 +08:00
9ad543cf85 Merge branch 'bugfix/fix_some_wifi_bugs_20241221_v5.2' into 'release/v5.2'
fix some wifi bugs 20241221(Backport v5.2)

See merge request espressif/esp-idf!35863
2024-12-23 10:45:32 +08:00
a6afd8cdfa fix(bt): Fixed some controller bugs
- Fix epr not being initiated after authentication is completed
- Fixed the issue HCI_READ_CLOCK returned parameter in slot
- Fixed the missmatching of CLKN and FCNT after clock update
2024-12-23 09:41:19 +08:00
957dd92013 fix(bt): Fix error code returned by create_conn_cancel_cmd at different status
- Closes https://github.com/espressif/esp-idf/issues/7763
2024-12-23 09:41:19 +08:00
ae21841454 Merge branch 'bugfix/solve_memory_prints_v5.2' into 'release/v5.2'
fix(nimble): Changing esp_rom_printf to ESP_LOGI when memory allocation fails (v5.2)

See merge request espressif/esp-idf!35837
2024-12-22 13:39:22 +08:00
14cf65eaf5 fix(nimble): Changing esp_rom_printf to ESP_LOGI when memory allocation fails 2024-12-21 17:11:03 +05:30
c7842486aa fix(ble): removed c5 sdk config 2024-12-21 18:45:16 +08:00
fc38b1f28a feat(bt/bluedroid): Added BLE get started examples for Bluedroid
(cherry picked from commit d051a2a39d)

Co-authored-by: xuzhekai <xuzhekai@espressif.com>
2024-12-21 18:28:33 +08:00
4d43c79d0d fix(esp_ringbuf): Fixed no-split ringbuf issue where acquire pointer wraps around
This commit fixes an issue with no-split ring buffers where in the the
buffer did not receive items correctly if the acquire pointer wraps
around before items are sent to it.
2024-12-21 12:08:01 +05:30
18225731a1 fix(wifi): fixed blufi connect wep or wpa ap fail issue 2024-12-21 09:58:34 +08:00
e1320471b5 fix(phy): fixed calibration warning infomation inaccurate issue
Closes https://github.com/espressif/esp-idf/issues/14963
2024-12-21 09:58:34 +08:00
c9787fe233 Merge branch 'bugfix/fix_link_estab_param_v5.2' into 'release/v5.2'
fix(nimble): Corrected link_estab event handling parameters (v5.2)

See merge request espressif/esp-idf!35809
2024-12-21 00:17:55 +08:00
4973c5f8f9 Merge branch 'fix/tools_pip_upgrade_v5.2' into 'release/v5.2'
fix(idf_tools.py): Upgrade pip and setuptools separately (v5.2)

See merge request espressif/esp-idf!35776
2024-12-20 20:07:10 +08:00
8187205d61 Merge branch 'fix/flash_noos_issues_v5.2' into 'release/v5.2'
flash: fixed some no_os API issues (v5.2)

See merge request espressif/esp-idf!35794
2024-12-20 14:40:42 +08:00
c74e96debf Merge branch 'fix/thread-lib-v52' into 'release/v5.2'
fix(openthread): update esp-thread-lib branch (v5.2)

See merge request espressif/esp-idf!35814
2024-12-20 13:32:08 +08:00
1910f71c7c fix(openthread): update esp-thread-lib branch 2024-12-20 12:29:02 +08:00
44f29fb208 Merge branch 'fix/fix_adc_cali_check_scheme_api_issue_v5.2' into 'release/v5.2'
adc: fixed adc_cali_check_scheme wrong return on c2/h2/c6 (v5.2)

See merge request espressif/esp-idf!35720
2024-12-20 10:19:12 +08:00
4a4849597e Merge branch 'fix/coredump_checksum_error_v5.2' into 'release/v5.2'
Fix/coredump checksum error (v5.2)

See merge request espressif/esp-idf!35764
2024-12-19 22:54:38 +08:00
1a95f45d3b ci: add build test for eco versions 2024-12-19 21:02:57 +08:00
30f9f9f0fd Merge branch 'bugfix/fix_set_perfer_ext_conn_param_v5.2' into 'release/v5.2'
fix(bt/bluedroid): Fixed setting perfer conn params complete event report (v5.2)

See merge request espressif/esp-idf!35746
2024-12-19 19:21:12 +08:00
21cebc7df9 fix(nimble): Corrected link_estab event handling parameters 2024-12-19 16:00:46 +05:30
80abc301bd fix(cache): fixed cache hal ctx not initialised in app issue 2024-12-19 15:16:05 +08:00
2236ec1491 fix(spi_flash): fixed no_os flash API not consider cache states issue on h2/p4/c6/c5/c61 2024-12-19 15:15:33 +08:00
d7fe977e0f fix(idf_tools.py): Upgrade pip and setuptools separately
This way the setuptools version dependency resolution will be done by
the upgraded pip.
2024-12-18 12:57:32 +01:00
f098b8f1f0 Merge branch 'feature/change_ot_ci_cases_wlan_to_ethernet_v5.2' into 'release/v5.2'
feat(openthread): change wlan to ethernet (Backport v5.2)

See merge request espressif/esp-idf!35740
2024-12-18 19:20:20 +08:00
6a7de95fa4 change(coredump): make sure consistency with written data and calculated checksum 2024-12-18 13:25:10 +03:00
fd33d4cfa7 fix(bt/bluedroid): Fixed LE channel selection algorithm event reporting 2024-12-18 11:50:24 +08:00
e1ed3b0fc9 fix(bt/bluedroid): Fixed setting perfer conn params complete event report
(cherry picked from commit 4b352d1c4f)

Co-authored-by: xuzhekai <xuzhekai@espressif.com>
2024-12-18 11:33:26 +08:00
8bd6d9a425 Merge branch 'bugfix/fix_blufi_prepare_write_v5.2' into 'release/v5.2'
fix(blufi): Fixed crash issue in Blufi example during prepare write operation (v5.2)

See merge request espressif/esp-idf!35715
2024-12-18 10:43:23 +08:00
455ea9541c Merge branch 'bugfix/fix_ble_aa_zero_c3_s3_v5.2' into 'release/v5.2'
fix(bt/ble): Update esp32c3/s3 libbtdm_app.a (555b0a2) (v5.2)

See merge request espressif/esp-idf!35690
2024-12-18 10:43:07 +08:00
8394e291fc Merge branch 'docs/add_ble_qualification_table_v5.2' into 'release/v5.2'
docs(ble): Added BLE Qualification Information to API Guides (v5.2)

See merge request espressif/esp-idf!35709
2024-12-18 10:41:21 +08:00
25021fcaad docs(ble): Added BLE Qualification Information to API Guides (v5.2) 2024-12-18 10:41:21 +08:00
431a4ff4d4 feat(openthread): change wlan to ethernet 2024-12-18 10:05:20 +08:00
2aeba7967f Merge branch 'ci/docs_master_build_v5.2' into 'release/v5.2'
ci(docs): revert d98e77a4a7 to simplify CI (v5.2)

See merge request espressif/esp-idf!35686
2024-12-18 09:49:14 +08:00
af6aa414b2 Merge branch 'change/bump_up_kconfcheck_version' into 'release/v5.2'
ci(pre-commit): bump kconfig checker pre-commit version to 1.5.0

See merge request espressif/esp-idf!35402
2024-12-18 01:31:27 +08:00
e82f6d2ce6 Merge branch 'fix/test_idf_gdb_v5.2' into 'release/v5.2'
test(system): mark gdb test runners properly (v5.2)

See merge request espressif/esp-idf!35588
2024-12-17 21:44:44 +08:00
cc902394ef ci(pre-commit): bump kconfig checker pre-commit version to 1.5.0 2024-12-17 14:33:28 +01:00
f8f9805fbc Merge branch 'feat/pts_changes_v5.2' into 'release/v5.2'
feat(nimble): BLE 5.4 PTS Related Features and Fixes (v5.2)

See merge request espressif/esp-idf!34973
2024-12-17 17:51:15 +08:00
1a64da07cf Merge branch 'feat/support_some_vendor_hci_for_qa_v5.2' into 'release/v5.2'
fix(ble): fixed the connect issue when rx error aa on ESP32-C2 (v5.2)

See merge request espressif/esp-idf!35645
2024-12-17 16:49:11 +08:00
a71b7550e3 fix(adc): fixed adc_cali_check_scheme wrong return on c2/h2/c6 2024-12-17 16:17:35 +08:00
c3c7f4a49f fix(blufi): Fixed crash issue in Blufi example during prepare write operation
(cherry picked from commit 5acb9c9b5f)

Co-authored-by: zhanghaipeng <zhanghaipeng@espressif.com>
2024-12-17 16:13:34 +08:00
74461ca835 docs(ble/bluedroid): Optimize BLE example documentation 2024-12-17 14:28:52 +08:00
9c38d1f29e feat(ble/bluedroid): Support create BLE static random address and NRPA 2024-12-17 14:28:12 +08:00
810ade0e22 Merge branch 'bugfix/rm_redefined_gpio_num_v5.2' into 'release/v5.2'
fix(ulp): remove redefinition and unify gpio enum in ulp (v5.2)

See merge request espressif/esp-idf!33473
2024-12-17 14:10:33 +08:00
410276dda0 fix(esp_psram): fix a bug in PSRAM heap registration
This commit fixes a bug in the PSRAM heap initialization that didn't take into
account the reserved himem area when registering the PSRAM virtual space as a heap.
2024-12-17 12:20:18 +08:00
556b7c96b2 fix(ci): Enlarge the pcap memory size in sniffer example 2024-12-17 11:11:27 +08:00
1ccbf7210b fix(wifi/mesh): Modify examples/mesh/internal_communication
Delete the secondary judgment of whether it is the root node in the sending task

Closes https://github.com/espressif/esp-idf/pull/14373

Signed-off-by: zhangyanjiao <zhangyanjiao@espressif.com>
2024-12-17 11:11:20 +08:00
34a69668a8 fix(ble): fixed that the resolvable private address does not change when light sleep is enabled 2024-12-17 10:51:04 +08:00
7ff64ac625 fix(bt): Update bt lib for ESP32-C3 and ESP32-S3(555b0a2)
- Check Access Address when receive connection request PDU
- Fix issue with BLE5.0 duplicate scan for chained packets
2024-12-17 10:51:00 +08:00
5d29851c9c ci(docs): revert d98e77a4a7 to simplify CI 2024-12-17 10:13:15 +08:00
9902d9aa7d fix(ulp): remove redefinition and unify gpio enum in ulp 2024-12-17 09:57:02 +08:00
eb5e602ab2 Merge branch 'feature/add_support_for_http_1.0_requests_v5.2' into 'release/v5.2'
feat(esp_http_server): add support to handle HTTP 1.0 requests (v5.2)

See merge request espressif/esp-idf!35661
2024-12-16 22:01:22 +08:00
8ee8cb11f6 fix(esp_netif): Prevent null deref when checking netif type
Most esp_netif public API check for invalid arguments, but when enabling
PPP the macros to check netif type could potentially dereference
esp_netif without any null-check.

Releted to https://github.com/espressif/esp-idf/issues/14816
2024-12-16 11:15:11 +01:00
184b55287b fix(tcp_transport): Fix websocket header read to handle overflow 2024-12-16 11:14:13 +01:00
9d5753edcc feat(nimble): Added PAwR support for nimble with IDF examples 2024-12-16 15:12:00 +05:30
a6f7fd52f2 fix(nimble): Added
1. Option to disable automatic discovery when receiving out-of-sync
2. Fixed bugs related to robust caching
2024-12-16 15:11:59 +05:30
a4a1be0cf9 feat(nimble): Added ways to enable/disable some menuconfig options at runtime 2024-12-16 15:11:59 +05:30
a4db5ad5fd feat(nimble): Added option to disable automatically sending extra credits to peer 2024-12-16 15:11:59 +05:30
3e793bdbc3 feat(nimble): Added support for persisting csf characteristic for bonded devices 2024-12-16 15:11:59 +05:30
ea1644649a feat(nimble): Added option in menuconfig to enable Secure Connections Only mode 2024-12-16 15:11:59 +05:30
0e15c4cf38 fix(nimble): fix and enable connection subrating 2024-12-16 15:11:59 +05:30
2f8b212c5a fix(nimble): Added option to enable code under Enhanced COC 2024-12-16 15:11:59 +05:30
95c0ecd42f fix(nimble): Fixed Device Information and Scan Parameters service 2024-12-16 15:11:59 +05:30
65b06bface fix(nimble): Fixed encrypted advertisement data example 2024-12-16 15:11:59 +05:30
03f1c497f3 feat(nimble): Added LE GATT Security Levels Characteristic 2024-12-16 15:11:59 +05:30
d6d361ff7f feat(nimble): Added support for EATT Credit Based Flow Control Mode 2024-12-16 15:11:58 +05:30
c8951df9b5 feat(esp_http_server): add support to handle HTTP 1.0 requests
This commit adds support to handle HTTP/1.0 requests alongside HTTP/1.1 for
legacy compliance purposes.
2024-12-16 14:11:03 +05:30
ed5f9badec feat(802.15.4): remove unnecessary includes in ieee802154 test case 2024-12-16 15:27:25 +08:00
91baeeb61c Merge branch 'bugfix/fix_vulnerability_v5.2' into 'release/v5.2'
fix(nimble): Fixes for security vulnerabilities reported in NimBLE (v5.2)

See merge request espressif/esp-idf!35501
2024-12-16 14:48:37 +08:00
e3ae161ac2 Merge branch 'feat/support_bleqabr24_1539_v5.2' into 'release/v5.2'
feat(bt/bluedroid): Added config for saving BLE bonding keys to NVS (v5.2)

See merge request espressif/esp-idf!35602
2024-12-16 14:25:42 +08:00
d3a05021be fix(ble): fixed the connect issue when rx error aa on ESP32-C2
(cherry picked from commit 6b01a56e09)

Co-authored-by: zwl <zhaoweiliang@espressif.com>
2024-12-16 11:03:34 +08:00
5fcf584127 feat(ble): support some vendor hci commands on ESP32-H2
(cherry picked from commit 15203f9f35)

Co-authored-by: zwl <zhaoweiliang@espressif.com>
2024-12-16 11:03:32 +08:00
9738ee55ca feat(ble): support some vendor hci commands on ESP32-C6
(cherry picked from commit 5bd66eaa57)

Co-authored-by: zwl <zhaoweiliang@espressif.com>
2024-12-16 11:03:30 +08:00
08b28212b7 Merge branch 'fix/fix_esp32c2_ld_issue_v52' into 'release/v5.2'
fix(wifi): fix esp32c2 ld issue v52

See merge request espressif/esp-idf!35607
2024-12-16 11:01:51 +08:00
14e2d6759e feat(802.15.4): add some documentation for txrx statistics and debug record 2024-12-16 10:53:34 +08:00
f1393f7687 feat(802.15.4): IEEE802.15.4 add documentation and refactor component structure 2024-12-16 10:53:32 +08:00
199b866187 feat(802.15.4): IEEE802.15.4 add some minor edits for readability 2024-12-16 10:51:49 +08:00
e457e0da34 feat(802.15.4): IEEE802.15.4 add rx buffer statistic 2024-12-16 10:51:46 +08:00
067d4dda38 Merge branch 'feat/allow_to_skip_legacy_driver_conflict_check_v5.2' into 'release/v5.2'
feat(legacy_driver): add kconfig to skip legacy confilct check (v5.2)

See merge request espressif/esp-idf!35618
2024-12-13 18:41:48 +08:00
119fa8f958 Merge branch 'fix/ble_mesh_enable_high_duty_itvl_on_nimble_v5.2' into 'release/v5.2'
feat(ble_mesh): select BT_NIMBLE_HIGH_DUTY_ADV_ITVL when using random adv itvl (v5.2)

See merge request espressif/esp-idf!35597
2024-12-13 16:21:56 +08:00
94d50d90e2 feat(legacy_driver): add kconfig to skip legacy confilct check 2024-12-12 19:33:59 +08:00
a41e39cd49 Merge branch 'bugfix/fixed-zigbee-dirty-backport' into 'release/v5.2'
fix(zigbee): fixed the dirty zigbee backport

See merge request espressif/esp-idf!35592
2024-12-12 15:46:22 +08:00
ef11490a6e fix(wifi): fix esp32c2 ld issue 2024-12-12 14:44:09 +08:00
a652985f9a fix(bt/bluedroid): Fixed failure to get host status when host is not enabled
(cherry picked from commit 23455ea9c2)

Co-authored-by: chenjianhua <chenjianhua@espressif.com>
2024-12-12 12:33:31 +08:00
d28072b4d5 feat(bt/bluedroid): Added config for saving BLE bonding keys to NVS
(cherry picked from commit 6d1160b2e6)

Co-authored-by: chenjianhua <chenjianhua@espressif.com>
2024-12-12 12:33:29 +08:00
bfdf50e787 feat(ble_mesh): select BT_NIMBLE_HIGH_DUTY_ADV_ITVL
(cherry picked from commit 6faf0a59fdcf063d40fc1000a209341318131185)

Co-authored-by: luoxu <luoxu@espressif.com>

(cherry picked from commit a7622efd0c)

Co-authored-by: Luo Xu <luoxu@espressif.com>
2024-12-12 12:23:27 +08:00
e18005cc12 fix(zigbee): fixed the dirty zigbee backport 2024-12-12 11:50:12 +08:00
24c98125dc Merge branch 'bugfix/fixed_rx_bar_from_null_bss_issue_v5.2' into 'release/v5.2'
fix(wifi): fixed softap rx bar from null bss issue(Backport v5.2)

See merge request espressif/esp-idf!35520
2024-12-12 10:27:12 +08:00
aabe255f89 Merge branch 'bugfix/fix_hid_crash_v5.2' into 'release/v5.2'
fix(ble): Fix crash issue during logging (v5.2)

See merge request espressif/esp-idf!35509
2024-12-12 09:06:11 +08:00
f4e6591a89 change(cmake): use board configuration file for ftdi interface 2024-12-11 18:47:43 +01:00
d1d42a9b48 test(system): mark gdb test runners properly 2024-12-11 18:47:43 +01:00
e746365100 fix(wifi): fixed softap rx bar from null bss issue 2024-12-11 19:12:43 +08:00
118ae2ae56 Merge branch 'feat/add_no_bss_deauth_protect_v52' into 'release/v5.2'
add protect for softap when sending mgmt frame to not connected station v52

See merge request espressif/esp-idf!35547
2024-12-11 14:00:50 +08:00
2ad3c78a55 Merge branch 'fix/disable_border_agent_default_v5_2' into 'release/v5.2'
fix(openthread): Disable Border Agent features by default(v5.2)

See merge request espressif/esp-idf!35552
2024-12-11 13:09:11 +08:00
219ae80d23 fix(openthread): Disable Border Agent features by default 2024-12-11 10:56:35 +08:00
7a750a55f8 change(esp_pm): change pm_slp_iram_opt dependence 2024-12-11 10:15:56 +08:00
f238830f0c Merge branch 'fix/coredump-gcc-analyzer-warnings_v5.2' into 'release/v5.2'
fix(system): fix GCC-14 analyzer warnings for coredump (v5.2)

See merge request espressif/esp-idf!35524
2024-12-10 21:54:48 +08:00
66b90652d3 feat(wifi): add protect for softap send no bss deauth releated code lib 2024-12-10 21:07:09 +08:00
2c3cfb9150 feat(wifi): add protect for softap send no bss deauth 2024-12-10 20:25:27 +08:00
c3d4270d79 fix(esp_wifi): Add some bugfixes and cleanup in softAP
1. Fix wrong reason code in 'WIFI_EVENT_AP_STADISCONNECTED' event
2. cleanup in softAP for disconnecting connected station
3. Update examples to display reason while processing WIFI_EVENT_AP_STADISCONNECTED event
2024-12-10 20:22:51 +08:00
1011ab5f6d fix(espcoredump): prevent null pointer dereference in panic reason handling 2024-12-09 15:19:43 +01:00
8e0d94987d fix(espcoredump): fix incorrect pointer usage in checksum update call 2024-12-09 15:18:28 +01:00
1f44c15157 fix(espcoredump): fix GCC-14 analyzer warnings for coredump 2024-12-09 15:18:21 +01:00
88ae97e8be feat(bt): Add support for converting BT HCI logs to btsnoop format 2024-12-09 17:54:20 +08:00
629c94b11e fix(blufi): Fixed blufi init fail after deinit
(cherry picked from commit 7addb57ccd)

Co-authored-by: zhanghaipeng <zhanghaipeng@espressif.com>
2024-12-09 17:45:27 +08:00
411385cf8c Merge branch 'fix/ws_transport_head_fragments_v5.2' into 'release/v5.2'
fix(ws_transport): Fix reading WS header in fragments (v5.2)

See merge request espressif/esp-idf!35090
2024-12-09 17:16:12 +08:00
e6793d4df9 fix(ble): Fixed crash in BLE HID host example during logging
(cherry picked from commit ab1e3c1ffd)

Co-authored-by: zhanghaipeng <zhanghaipeng@espressif.com>
2024-12-09 17:15:02 +08:00
d502127c10 fix(nimble): Fixes for security vulnerabilities reported in NimBLE 2024-12-08 22:06:27 +05:30
3f920b5abf Merge branch 'feature/move-gdb-options-to_project_description_json_v5.2' into 'release/v5.2'
feat(debugging): move gdbinit generation to CMake (v5.2)

See merge request espressif/esp-idf!35177
2024-12-07 08:20:18 +08:00
c19ac4685d Merge branch 'fix/hci_err_code_def_v5.2' into 'release/v5.2'
fix(nimble): Added a function for printing HCI error definition (v5.2)

See merge request espressif/esp-idf!35203
2024-12-07 00:02:43 +08:00
b7b6fff848 docs: Update CN translation for docs in jtag-degugging 2024-12-06 19:32:39 +07:00
080f1a0b0d feat(debugging): move gdbinit generation to CMake
This feature is useful for 3rd-party software to run GDB with predefined
options that described in project_description.json file

allow to pass custom options to "idf.py gdb":

  --gdb-commands: command line arguments for gdb. (without changes)
  -ex: pass command to gdb.
  -x: pass gdbinit file to gdb. Alias for old --gdbinit command
2024-12-06 19:32:34 +07:00
6047df10ff Merge branch 'bugfix/uart_vfs_read_behavior_v5.2' into 'release/v5.2'
fix(uart_vfs): read() now aligned to POSIX defined behavior (v5.2)

See merge request espressif/esp-idf!35395
2024-12-06 18:38:49 +08:00
71365083e6 Merge branch 'bugfix/fix_ble_creat_conn_fail_enh_v5.2' into 'release/v5.2'
fix(ble/bluedroid): Fixed BLE create connection fail because of invalid own address type (v5.2)

See merge request espressif/esp-idf!35017
2024-12-06 15:49:16 +08:00
e4a91596f2 Merge branch 'bugfix/access_null_in_hf_cb_v5.2' into 'release/v5.2'
fix(bt/bluedroid): fixed access NULL in HFP callback handler (v5.2)

See merge request espressif/esp-idf!35408
2024-12-06 14:27:23 +08:00
93ee80c625 Merge branch 'fix/add_delay_before_command_in_ot_ci_case_v5.2' into 'release/v5.2'
feat(openthread): add delay before execute wifi command in openthread ci cases (Backport v5.2)

See merge request espressif/esp-idf!35420
2024-12-06 11:15:49 +08:00
15c32509dd Merge branch 'bugfix/watchdog_timer_ap_sta_esp32c5_v5.2' into 'release/v5.2'
fix(wifi): Prevent overwriting of scan parameters in consecutive scans(Backport v5.2)

See merge request espressif/esp-idf!34456
2024-12-05 17:47:32 +08:00
7c56120be1 feat(hub): Added notification when hubs support is disabled 2024-12-05 10:32:52 +01:00
79ab50bc69 fix(wifi): Prevent overwriting of scan parameters in consecutive scans 2024-12-05 16:06:00 +08:00
233ab81bd1 fix(uart_vfs): read() now aligned to POSIX defined behavior
- For blocking mode, block until data available
- Return with the bytes available in the file at the time,
  it should not block until reaching the requested size

And read() should not realy return on the newline character
Closes https://github.com/espressif/esp-idf/issues/14155
2024-12-05 15:59:05 +08:00
9d7bf28e8e Merge branch 'bugfix/retry_count_when_sta_disconnect_v5.2' into 'release/v5.2'
fix(wifi): Do not attempt re-connection as per 'failure_retry_cnt' when sta itself issues disconnect in between of connection establishment (Backport v5.2)

See merge request espressif/esp-idf!34183
2024-12-05 14:00:10 +08:00
8328cf3dc3 fix(bt/bluedroid): fixed access NULL in HFP callback handler 2024-12-05 13:21:31 +08:00
2b328c0abe Merge branch 'fix/ble_mesh_bugs_fixed_v5.2' into 'release/v5.2'
fix(ble_mesh): Miscellaneous update (v5.2)

See merge request espressif/esp-idf!35425
2024-12-05 12:30:12 +08:00
566d04ecd9 Merge branch 'fix/unity_tester_v5.2' into 'release/v5.2'
refactor: changed logic of unity_tester (v5.2)

See merge request espressif/esp-idf!35394
2024-12-05 01:38:57 +08:00
90f076081a Merge branch 'bugfix/esp32c3_eco7_usj_console_v5.2' into 'release/v5.2'
fix(esp_rom): fix esp32c3 eco7 console rom function address (v5.2)

See merge request espressif/esp-idf!34740
2024-12-04 22:57:35 +08:00
501f4ab608 Merge branch 'bugfix/wps_ie_reset_v52' into 'release/v5.2'
fix(wifi): Remove WPS IEs once WPS succeeds(v5.2)

See merge request espressif/esp-idf!35079
2024-12-04 19:32:58 +08:00
902bef7ec5 feat(openthread): add delay before execute wifi command in openthread ci cases 2024-12-04 17:12:49 +08:00
80471c2165 fix(ble_mesh): Miscellaneous update
(cherry picked from commit 589ebfc1d6)

Co-authored-by: luoxu <luoxu@espressif.com>
2024-12-04 16:23:30 +08:00
7d1324807b fix(wifi): Do not try re-connection when sta disconnects with esp_wifi_disconnect()
Do not follow wifi_config::wifi_sta_config::failure_retry_cnt logic when
station itself issues a disconnect from AP/Router using
esp_wifi_disconnect()
2024-12-04 13:02:10 +05:30
176306214e Merge branch 'fix/fix_esp32_pico_v3_psram_not_ignored_issue_v5.2' into 'release/v5.2'
psram: fixed esp32p pico-v3 psram init not ignored issue (v5.2)

See merge request espressif/esp-idf!35379
2024-12-04 15:23:21 +08:00
ac2a70087e Merge branch 'fix/fix_regdma_wait_node_issue_v5.2' into 'release/v5.2'
fix(esp_hw_support): fix the issue of regdma wait node to immediately return to done (v5.2)

See merge request espressif/esp-idf!35359
2024-12-04 13:56:34 +08:00
d450c81766 Merge branch 'feat/support_esp32c2_eco4_wifi_v52' into 'release/v5.2'
Feat/support esp32c2 eco4 wifi v52

See merge request espressif/esp-idf!35382
2024-12-04 12:14:31 +08:00
b00f4a4610 Merge branch 'bugfix/fix_ble_ke_mem_267_assert_v5.2' into 'release/v5.2'
fix(bt/controller): Fixed BLE assert ke_mem.c line 267 on ESP32-C3 and ESP32-S3 (backport v5.2)

See merge request espressif/esp-idf!35339
2024-12-04 11:48:52 +08:00
1fc6ee6763 Merge branch 'bugfix/chip823_pll_bug_v5.2' into 'release/v5.2'
fix(H2):fix pll low temp bug(v5.2)

See merge request espressif/esp-idf!35240
2024-12-04 11:48:21 +08:00
1c5a84c369 fix(wifi): Remove WPS IEs once WPS succeeds 2024-12-04 11:47:37 +08:00
9c6952f7b4 Merge branch 'contrib/github_pr_14767_v5.2' into 'release/v5.2'
fix(gptimer): race on FSM state in gptimer_start() (GitHub PR) (v5.2)

See merge request espressif/esp-idf!35136
2024-12-04 10:13:51 +08:00
d39ffaf84c fix(esp_rom): fix esp32c3 eco7 console rom function address 2024-12-04 10:05:27 +08:00
119e7f41a9 Merge branch 'bugfix/test_esp_flash_write_v5.2' into 'release/v5.2'
fix(spi_flash): Fix Test esp_flash_write (v5.2)

See merge request espressif/esp-idf!35386
2024-12-04 10:03:34 +08:00
35d7c5a4ab feat(ble/bluedroid): Support setting connection params when creating connection 2024-12-03 18:02:37 +08:00
68991d317c fix(ble/bluedroid): Optimize BLE API "esp_ble_gattc_enh_open" 2024-12-03 18:01:04 +08:00
984c023ef4 fix(ble/bluedroid): Fixed BLE create connection fail because of invalid own address type 2024-12-03 18:01:04 +08:00
8c3304c6b0 fix(nimble): Added a function for printing HCI error definition 2024-12-03 14:52:50 +05:30
3edae05e39 fix: add count for wpa test 2024-12-03 09:43:15 +01:00
e09fd7fce4 refactor: changed logic of unity_tester, replaced threads by generators 2024-12-03 09:43:15 +01:00
465a51245d fix(spi_flash): Fix Test esp_flash_write 2024-12-03 09:55:45 +02:00
974ecd2eae fix(psram): fixed esp32p pico-v3 psram init not ignored issue
Closes https://github.com/espressif/esp-idf/issues/14970
2024-12-03 15:25:17 +08:00
ad3be2f362 feat(wifi): update support esp32c2eco4 wifi lib 2024-12-03 15:12:09 +08:00
4014565cd1 feat(wifi): support esp32c2 eco4 wifi bringup sync head 2024-12-03 15:08:00 +08:00
37db8f32f0 fix(wifi): fix esp32c2 eco4 ld issue 2024-12-03 14:57:24 +08:00
0519619e26 feat(wifi): support esp32c2 eco4 wifi bringup 2024-12-03 14:38:40 +08:00
0b2e6d68df Merge branch 'bugfix/sae_h2e_vulnerability_fix_v5.2' into 'release/v5.2'
fix(wifi): Sae check for invalid rejected group (v5.2)

See merge request espressif/esp-idf!33980
2024-12-03 14:33:29 +08:00
a87c6408ec fix(esp_hw_support): fix the issue of regdma wait node to immediately return to done 2024-12-03 10:35:43 +08:00
1c4a3106dc Merge branch 'bugfix/fix_esp_hid_host_compilation_v5.2' into 'release/v5.2'
fix(nimble): Fix compilation issue in esp_hid_host example (v5.2)

See merge request espressif/esp-idf!35309
2024-12-02 20:17:21 +08:00
0b4e4f6ea3 Merge branch 'bugfix/change_hci_cb_logging_v5.2' into 'release/v5.2'
fix(nimble): Replace ESP_LOG* with esp_rom_printf in controller context callback (v5.2)

See merge request espressif/esp-idf!35029
2024-12-02 18:22:33 +08:00
53b5379399 fix(bt/controller): Fixed BLE assert ke_mem.c line 267 on ESP32-C3 and ESP32-S3 2024-12-02 16:13:03 +08:00
f53cf30666 Merge branch 'fix/ble_mesh_heartbeat_bug_v5.2' into 'release/v5.2'
fix(ble_mesh): fixed heartbeat issue (v5.2)

See merge request espressif/esp-idf!34964
2024-12-02 11:29:49 +08:00
b2219fbdea Merge branch 'bugfix/sdp_get_uuid_error_v5.2' into 'release/v5.2'
fix(bt/bluedroid): fixed issues introduced by byte alignment(v5.2)

See merge request espressif/esp-idf!35252
2024-12-02 08:44:48 +08:00
420bf72242 Merge branch 'fix/duplicated_enc_restart_request_when_change_key_type_v5.2' into 'release/v5.2'
fix(bt): fixed some issues in esp32 bt controller(backport v5.2)

See merge request espressif/esp-idf!35296
2024-11-29 20:03:28 +08:00
f8ed8d8e25 fix(nimble): Fix compilation issue in esp_hid_host example 2024-11-29 15:24:12 +05:30
3341e73852 Merge branch 'docs/update_vscode_extension_link_v5.2' into 'release/v5.2'
docs: Update vscode extension link in get started (v5.2)

See merge request espressif/esp-idf!35304
2024-11-29 17:30:46 +08:00
b369dfe29d Merge branch 'bugfix/fix_build_failure_with_tls1_3_only_v5.2' into 'release/v5.2'
fix: Fixed build errors with TLS 1.3 only configuration (v5.2)

See merge request espressif/esp-idf!35261
2024-11-29 16:07:19 +08:00
2b1e4daed0 docs: Update vscode extension link in get started 2024-11-29 16:06:50 +08:00
aba91a5d2b fix(bt): fixed some issues in esp32 bt controller
1: fix duplicated lc_enc_restart_req when new lk type is semi-permanent
   key
2: reset PreventEncEvt flag at the end of restart encryption procedure
2024-11-29 14:11:17 +08:00
c209dbefe1 Merge branch 'fix/memprot-config-used-in-memory-layouts_v5.2' into 'release/v5.2'
fix(heap): Fix wrong config to enable MALLOC_CAP_EXEC in memory_layout.c (backport v5.2)

See merge request espressif/esp-idf!35217
2024-11-29 12:54:56 +08:00
dda2ba1f3b Merge branch 'bugfix/resolve_watchdog_crash_v5.2' into 'release/v5.2'
fix(nimble): Resolved watchdog due to memory exceed prints (v5.2)

See merge request espressif/esp-idf!35210
2024-11-28 14:59:01 +08:00
8d0c4ee711 fix(wpa_supplicant): Fix build errors for exclusive TLSv1.3 mbedtls config
Co-authored-by: Sarvesh Bodakhe <sarvesh.bodakhe@espressif.com>
2024-11-28 09:52:01 +05:30
5a0324ad89 fix: Fixed build errors with TLS 1.3 only configuration 2024-11-28 09:49:03 +05:30
cc237b5d4c Merge branch 'bugfix/add_aa_check_on_esp32c2_and_esp32c6_v5.2' into 'release/v5.2'
Bugfix/add aa check on esp32c2 and esp32c6 (v5.2)

See merge request espressif/esp-idf!35232
2024-11-28 11:02:42 +08:00
2a9a1f9100 Merge branch 'fix/enhance_wifi_connection_check_in_ot_ci_case_v5.2' into 'release/v5.2'
feat(openthread): enhance wifi connection check in openthread ci cases (Backport v5.2)

See merge request espressif/esp-idf!35161
2024-11-28 10:47:00 +08:00
84f95469eb fix(bt/bluedroid): fixed issues introduced by byte alignment
- esp_bt_uuid_t is byte aligned, tBT_UUID is 4-byte aligned.
2024-11-28 10:32:51 +08:00
d4f1920476 Merge branch 'change/sysview_test_config_v5.2' into 'release/v5.2'
change(sysview): run heap_log tracing tests on existing cores (v5.2)

See merge request espressif/esp-idf!35197
2024-11-27 19:00:15 +08:00
8d8da1d7ed fix(nimble): Resolved watchdog due to memory exceed prints 2024-11-27 18:04:01 +08:00
zlq
594feec0eb fix(H2):fix pll low temp bug 2024-11-27 17:50:08 +08:00
7f6cb15581 Merge branch 'backport/openthread_related_feature_v52_20241125' into 'release/v5.2'
Backport openthread related features to 5.2

See merge request espressif/esp-idf!35173
2024-11-27 16:38:22 +08:00
zwl
07181e5cc1 fix(ble): fixed the connect issue when rx error aa on ESP32-C6 2024-11-27 16:22:43 +08:00
df3b401129 fix(ble): fixed the connect issue when rx error aa on ESP32-H2
(cherry picked from commit 093b65e27c)

Co-authored-by: zwl <zhaoweiliang@espressif.com>
2024-11-27 16:03:39 +08:00
c3ddeabf35 feat(openthread): enhance wifi connection check in openthread ci cases 2024-11-27 15:45:48 +08:00
50f50903f2 Merge branch 'bugfix/fix_bleqabr24_1646_v5.2' into 'release/v5.2'
Fixed BLE creating connection when the connection already exists on ESP32 (v5.2)

See merge request espressif/esp-idf!35045
2024-11-27 15:44:36 +08:00
3cec09f32c Merge branch 'feat/optimize_cble50y24_110_v5.2' into 'release/v5.2'
feat(bt/bluedroid): Added BLE 5.0 throughput examples (v5.2)

See merge request espressif/esp-idf!35008
2024-11-27 15:36:50 +08:00
3016c2e324 Merge branch 'bugfix/sae_pk_transition_disable_v5.2' into 'release/v5.2'
fix(wifi): Fix bug in wrong profile checking of AP's RSNXE IE and other fixes (Backport v5.2)

See merge request espressif/esp-idf!34888
2024-11-27 13:41:43 +08:00
28e1524c7e feat(bt/bluedroid): Added BLE 5.0 throughput examples
(cherry picked from commit 6d3a82eecf)

Co-authored-by: zhangbowen <zhangbowen@espressif.com>
2024-11-27 11:50:39 +08:00
325ce1f8f9 fix(esp_wifi): Populate appropriate reason codes when softAP sends deauthentication
Populate appropriate reason for sending deauthentication when softAP receives
invalid RSN IE from association request
2024-11-26 23:37:35 +05:30
fca3fab225 fix(wifi): Fix wrong wifi reason codes reported on station and softAP
- Fix wrong reason code reported when softAP issues a disconnect for station
- Fix wrong reason code reported when association timeout happens at station
- Deprecate enums WIFI_REASON_ASSOC_EXPIRE, WIFI_REASON_NOT_AUTHED, WIFI_REASON_NOT_ASSOCED
  and use WIFI_REASON_DISASSOC_DUE_TO_INACTIVITY,
  WIFI_REASON_CLASS2_FRAME_FROM_NONAUTH_STA,
  WIFI_REASON_CLASS3_FRAME_FROM_NONASSOC_STA respectively
- Update wifi documentation related to reason codes
2024-11-26 23:36:54 +05:30
0bc704bb62 fix(wpa_supplicant): Fix debug print in wps_start_msg_timer() 2024-11-26 23:36:54 +05:30
79f13ab9d8 fix(wifi): Fix bug in wrong profile checking of AP's RSNXE IE 2024-11-26 23:36:52 +05:30
a5eb9f34e1 fix(heap): Fix wrong config to enable MALLOC_CAP_EXEC in memory_layout.c
In esp32c2 and esp32c61 memory_layout.c files, the config used to allow
MALLOC_CAP_EXEC was CONFIG_ESP_SYSTEM_MEMPROT_FEATURE when
CONFIG_ESP_SYSTEM_PMP_IDRAM_SPLIT should be used.

Closes https://github.com/espressif/esp-idf/issues/14836
2024-11-26 12:41:16 +01:00
6f82c51403 fix(sysview): add prefix to the module desc to avoid stuck in Segger SystemView app
Closes https://github.com/espressif/esp-idf/issues/10483
2024-11-26 11:02:31 +01:00
d73b92f61c change(sysview): support single/dual core targets in heap_trace_log test 2024-11-26 08:50:02 +01:00
aa07a85df2 Merge branch 'fix/suspend_ci_v5.2' into 'release/v5.2'
test(spi_flash): Fix some failing test related to spi flash (backport v5.2)

See merge request espressif/esp-idf!35156
2024-11-26 15:38:47 +08:00
18920261c8 fix(bt): Update bt lib for ESP32(c3082c4)
- Fixed BLE creating connection when the connection already exists
2024-11-26 15:30:56 +08:00
5107c17e3d Merge branch 'feat/add_profile_state_event_v5.2' into 'release/v5.2'
feat(bt/bluedroid): added events to indicate the profile states of HFP (v5.2)

See merge request espressif/esp-idf!35150
2024-11-26 15:01:58 +08:00
2facc4d374 Merge branch 'bugfix/disconn_sdp_upon_wrong_data_v5.2' into 'release/v5.2'
fix(bt/bluedroid): disconnect SDP connection on receiving incorrect response (v5.2)

See merge request espressif/esp-idf!35145
2024-11-26 14:59:56 +08:00
9a9a813774 Merge branch 'bugfix/fix_wifi_bugs_241122_v5.2' into 'release/v5.2'
bugfix: fix some wifi bugs 241122 v5.2

See merge request espressif/esp-idf!35130
2024-11-26 14:50:29 +08:00
6e07162da2 Merge branch 'bugfix/fix_c2_light_sleep_coex_v5.2' into 'release/v5.2'
fix(ble): fix ble light sleep error on esp32c2 (v5.2)

See merge request espressif/esp-idf!35054
2024-11-26 11:10:11 +08:00
cac1db625d Merge branch 'bugfix/fix_external_coex_build_fail_issue_v5.2' into 'release/v5.2'
fix external coex build fail issue

See merge request espressif/esp-idf!35179
2024-11-26 10:27:27 +08:00
e89948ddbe ci: increase test_wifi_power_save got ip timeout 2024-11-25 20:48:03 +08:00
a733df7d70 fix external coex build fail issue 2024-11-25 20:20:15 +08:00
c0c8335994 feat(openthread): adjusted the default macro configurations of openthread 2024-11-25 14:32:27 +08:00
c1288de7a1 test(spi_flash): Fix some failing test related to spi flash 2024-11-25 14:22:04 +08:00
3466f70e99 feat(openthread): support using custom header file 2024-11-25 12:34:00 +08:00
c38203e56e feat(bt/bluedroid): added events to indicate the profile states of HFP 2024-11-25 10:22:55 +08:00
b3f7427b1c fix(bt/bluedroid): disconnect SDP connection on receiving incorrect response 2024-11-25 10:20:04 +08:00
72c8dffe13 Merge branch 'bugfix/lmp_trans_collision_v5.2' into 'release/v5.2'
fix(bt/controller): Fixed some controller bugs on ESP32 (v5.2)

See merge request espressif/esp-idf!34946
2024-11-25 09:50:51 +08:00
b294d7d3e3 fix(gptimer): race condition between start and stop
Merges https://github.com/espressif/esp-idf/pull/14767
2024-11-22 18:24:35 +08:00
2719ebce3f fix(wifi): fix some wifi issues 241031
1. fix cant sleep if reconnect to connected ap
    2. clear pmk in internal reconnection
    3. update connect status for init-->auth
2024-11-22 16:51:12 +08:00
8626e5f400 fix(wifi): fix ampdu to normal cause free buffer twice issue 2024-11-22 16:49:41 +08:00
22074ee144 fix(bt/controller): Fixed some controller bugs on ESP32
- Fixed wrong logic in handling sniff transaction collision at slave
      side
    - Fixed the issue ACL is stopped too early before eSCO
2024-11-22 12:25:00 +08:00
9f809e11de fix(bt/bluedroid): AG should send OK or other error codes to HF client
when it is driven by HF to initiate a call.
2024-11-22 12:25:00 +08:00
61b29d8550 fix(ble): change ld for ble scan coex issue
(cherry picked from commit dd499d7b2e)

Co-authored-by: cjin <jinchen@espressif.com>
2024-11-22 10:42:44 +08:00
3186c881c0 fix(ble): fix ble light sleep error on esp32c2
(cherry picked from commit 23f7e33a97)

Co-authored-by: cjin <jinchen@espressif.com>
2024-11-22 10:42:44 +08:00
425722b5c0 Merge branch 'fix/import_error_msg_v5.2' into 'release/v5.2'
fix(tools): re-raise ImportError without module name (v5.2)

See merge request espressif/esp-idf!35075
2024-11-22 01:49:22 +08:00
316d63fef2 Merge branch 'bugfix/update_condition_to_verify_http_version_v5.2' into 'release/v5.2'
fix(esp_http_server): updated condition to verify http version (v5.2)

See merge request espressif/esp-idf!34636
2024-11-21 18:12:30 +08:00
84cce1f40a fix(ws_transport): Fix reading WS header bytes
Correct split header bytes

When the underlying transport returns header,
length, or mask bytes early, again call the
underlying transport.

This solves the WS parser getting offset when
the server sends a burst of frames where the
last WS header is split across packet boundaries,
so fewer than the needed bytes may be available.

Merges https://github.com/espressif/esp-idf/pull/14706
2024-11-21 10:43:54 +01:00
be05f8d4bd Merge branch 'backport/openthread_related_feature_v52_20241112' into 'release/v5.2'
Backport openthread related features to 5.2

See merge request espressif/esp-idf!34837
2024-11-21 17:32:55 +08:00
8113c1ab8c fix(tools): re-raise ImportError without module name
The ImportError or ModuleNotFoundError might be raised without
specifying a module name. In this not so common situation, re-raise the
exception to print all the information that could assist in identifying
the problem.

Signed-off-by: Frantisek Hrbata <frantisek.hrbata@espressif.com>
2024-11-21 09:47:06 +01:00
c19a00b35e Merge branch 'bugfix/ota_failed_with_openssl_3.0.2_v5.2' into 'release/v5.2'
fix(esp_http_client): Fix ota failure with openssl server (v5.2)

See merge request espressif/esp-idf!35067
2024-11-21 16:10:44 +08:00
cc73468f31 fix(esp_http_client): Fix ota failure with openssl server
If the TLS server (e.g., openssl) closes connection with encrypted close-notify alert
then `errno` is not explicitly set on the socket by LwIP stack.
For this scenario, we must rely only on `ERR_TCP_TRANSPORT_CONNECTION_CLOSED_BY_FIN`
return value as the connection close case and do the graceful connection closure.

Closes https://github.com/espressif/esp-idf/issues/14724
2024-11-21 12:36:27 +05:30
f42bc63e20 Merge branch 'bugfix/fix_some_wifi_bugs_1030_v5.2' into 'release/v5.2'
Bugfix/fix some wifi bugs 1030 v5.2(Backport v5.2)

See merge request espressif/esp-idf!34707
2024-11-21 14:08:51 +08:00
34625d3711 Merge branch 'fix/fix_top_domain_pd_v5.2' into 'release/v5.2'
fix(esp_pm): move clock module out of TOP_DOMAIN_PERIPHERALS_BM (v5.2)

See merge request espressif/esp-idf!34882
2024-11-20 19:54:15 +08:00
1fc1cc44c8 Merge branch 'fix/fix_modem_module_clock_missing_after_ota_v5.2' into 'release/v5.2'
fix(esp_system): deselect all modem modules lp clock source selection before clk initialization (v5.2)

See merge request espressif/esp-idf!34925
2024-11-20 19:51:37 +08:00
40aac77060 fix(wifi): fix some wifi bugs 2024-11-20 19:17:40 +08:00
8f324ba6ba feat(twt): twt add parameter to enable keep alive 2024-11-20 19:08:56 +08:00
e6967add69 fix(openthread): fix a naming error of esp radio spinel 2024-11-20 17:38:24 +08:00
zwx
000f9fe229 feat(openthread): support alloc nat64 session from psram 2024-11-20 17:38:24 +08:00
c7ace03ce4 enable openthread coap client for mtd 2024-11-20 17:38:24 +08:00
29cf8a64c7 fix(coex): fix 802.15.4 external coexistence 2024-11-20 17:38:22 +08:00
06f469f3ff feat(openthread): update openthread submodule and border router lib 2024-11-20 17:36:10 +08:00
1a49691899 Merge branch 'feature/usb_host_hub_support_collective_backport_p3_v5.2' into 'release/v5.2'
feat(usb_host): Hub Support Collective backport part 3/3 (v5.2)

See merge request espressif/esp-idf!33283
2024-11-20 10:40:09 +08:00
c16d6d7089 Merge branch 'fix/add_network_reconnectin_in_ot_ci_case_v5.2' into 'release/v5.2'
feat(openthread): flush ipv6 addr in openthread ci cases (Backport v5.2)

See merge request espressif/esp-idf!34673
2024-11-20 10:15:30 +08:00
34b2558ad2 Merge branch 'jtag_doc_update_v5.2' into 'release/v5.2'
docs(jtag): update OpenOCD related sections (v5.2)

See merge request espressif/esp-idf!34399
2024-11-19 21:16:15 +08:00
c2a34adc0f fix(nimble): Replace ESP_LOG* with esp_rom_printf in controller context callback 2024-11-19 17:41:21 +05:30
1291eadaad Merge branch 'fix/fix_deadlock_in_pm_mode_switching_v5.2' into 'release/v5.2'
fix(esp_pm): fix deadlock in pm_mode switching (v5.2)

See merge request espressif/esp-idf!34988
2024-11-19 19:05:05 +08:00
5945ee4fe9 Merge branch 'bugfix/fix_some_wifi_coexist_bugs_20241105_v5.2' into 'release/v5.2'
bugfix/fix some wifi coexist bugs 20241105 v5.2

See merge request espressif/esp-idf!34793
2024-11-19 18:41:25 +08:00
b0b139073c fix(ble_mesh): fixed heartbeat issue
(cherry picked from commit 167cd4762b)

Co-authored-by: luoxu <luoxu@espressif.com>
2024-11-19 18:03:27 +08:00
0f4b994bc2 Merge branch 'bugfix/memory_issue_v5.2' into 'release/v5.2'
fix(nimble): Nimble Error logs in case of memory overflow/failure (v5.2)

See merge request espressif/esp-idf!34999
2024-11-19 16:58:56 +08:00
b9bc6d9290 feat(openthread): flush ipv6 addr in openthread ci cases 2024-11-19 15:46:38 +08:00
8ada381d9e Merge branch 'bugfix/rx_invalid_cmd_err_code_v5.2' into 'release/v5.2'
fix(bt/bluedroid): Fixed the incorrect error code returned when receiving an invalid command(v5.2)

See merge request espressif/esp-idf!34992
2024-11-19 14:13:01 +08:00
0841034ab5 fix(esp_pm): fix deadlock in pm_mode switching 2024-11-18 19:24:27 +08:00
92393685b2 fix(nimble): Nimble Error logs in case of memory overflow/failure 2024-11-18 17:52:23 +08:00
4d3a59df68 fix(bt/bluedroid): Fixed the incorrect error code returned
when receiving an invalid command
2024-11-18 16:56:45 +08:00
0fd250216c fix(esp_pm): fix missed ccompare update when another core is already in do_switch 2024-11-18 16:50:11 +08:00
f926cd0007 fix(coex): fix esp32c2/esp32c5/esp32c61 coexist memory leakage issue 2024-11-18 14:20:31 +08:00
63b2e288f5 fix(coex): sync up coex head file 2024-11-18 14:17:51 +08:00
4dada8b3f7 fix(coex): fix esp32c5 coexist hw timer issue 2024-11-18 14:17:51 +08:00
e9dc27af7a fix(coex): fix some coexist debug issues 2024-11-18 14:17:51 +08:00
49e65e6983 fix(wifi): fix modem_clock_module_enable mismatch issue 2024-11-18 14:17:51 +08:00
85a68a9609 fix(wifi): fix esp32c5 enable external coex fail issue 2024-11-18 14:17:51 +08:00
87262e35c5 fix(wifi): esp32c5 esp32c61 support external coex 2024-11-18 14:17:51 +08:00
35e0bea829 feat(coex): optimize connectionless coexist pwr, optimize wifi pwr with bt idle 2024-11-18 14:17:51 +08:00
c8916f181f feat(coex): support GPIO debug 2024-11-18 14:17:51 +08:00
da635ecd9d Merge branch 'backport/2015_enhack_v52' into 'release/v5.2'
fix(802.15.4): add case for 2015 frame enh-ack (Backport v5.2)

See merge request espressif/esp-idf!34952
2024-11-18 12:53:30 +08:00
d4b7c38d79 Merge branch 'fix/wifi_netif_null_deref_v5.2' into 'release/v5.2'
esp_wifi: Add null pointer checks to WiFi-netif APIs (v5.2)

See merge request espressif/esp-idf!34159
2024-11-18 11:17:50 +08:00
a253ad8b8c Merge branch 'fix/ws_transport_mem_corrupt_v5.2' into 'release/v5.2'
fix(transport): Fix websocket mem-corruption while reading headers (v5.2)

See merge request espressif/esp-idf!34154
2024-11-18 11:17:33 +08:00
4360662325 Merge branch 'feat/lwip_more_sockets_v5.2' into 'release/v5.2'
change(lwip): bump max sockets in lwip Kconfig (GItHubPR) (v5.2)

See merge request espressif/esp-idf!34152
2024-11-18 11:17:08 +08:00
37d9e33d9b Merge branch 'fix/lwip_drop_ipv6_if_no_ll_v5.2' into 'release/v5.2'
fix(lwip): Add default IPv6 input filter to drop traffic if ipv6 not assigned (v5.2)

See merge request espressif/esp-idf!34149
2024-11-18 11:16:45 +08:00
ce2e5455e8 SAE: Check for invalid Rejected Groups element length explicitly on STA
Instead of practically ignoring an odd octet at the end of the element,
check for such invalid case explicitly. This is needed to avoid a
potential group downgrade attack.

Fixes: 444d76f74f65 ("SAE: Check that peer's rejected groups are not enabled")
Signed-off-by: Jouni Malinen <j@w1.fi>
2024-11-18 11:15:47 +08:00
9a6389978c SAE: Check that peer's rejected groups are not enabled
Signed-off-by: Jouni Malinen <jouni@codeaurora.org>
2024-11-18 11:15:47 +08:00
46f3eedcef SAE: Reject invalid Rejected Groups element in the parser
There is no need to depend on all uses (i.e., both hostapd and
wpa_supplicant) to verify that the length of the Rejected Groups field
in the Rejected Groups element is valid (i.e., a multiple of two octets)
since the common parser can reject the message when detecting this.

Signed-off-by: Jouni Malinen <j@w1.fi>
2024-11-18 11:15:47 +08:00
fbbd0e29e9 SAE: Check for invalid Rejected Groups element length explicitly
Instead of practically ignoring an odd octet at the end of the element,
check for such invalid case explicitly. This is needed to avoid a
potential group downgrade attack.

Signed-off-by: Jouni Malinen <j@w1.fi>
2024-11-18 11:15:47 +08:00
a04d277251 SAE: Check that peer's rejected groups are not enabled in AP
Signed-off-by: Jouni Malinen <jouni@codeaurora.org>
2024-11-18 11:15:47 +08:00
ac388268fd Merge branch 'fix/kconfig-option-orphan_sections_warning_v5.2' into 'release/v5.2'
fix(build): fix orphan sections warning kconfig variable (v5.2)

See merge request espressif/esp-idf!33942
2024-11-18 11:15:15 +08:00
57dbeb272a docs(jtag): update OpenOCD related sections 2024-11-17 08:31:01 +08:00
0ffca40125 Merge branch 'fix/thread_resolve_invalid_host_v5_2' into 'release/v5.2'
fix(openthread): Fix invalid host resolving for Thread end devices(v5.2)

See merge request espressif/esp-idf!34940
2024-11-15 19:15:51 +08:00
537190a5a6 Merge branch 'bugfix/fix_classic_bt_build_fail_v5.2' into 'release/v5.2'
fix(bt/bluedroid): Fixed classic bt build fail when enable dynamic memory and disable BLE (v5.2)

See merge request espressif/esp-idf!34929
2024-11-15 17:34:56 +08:00
d917fa42c9 Merge branch 'bugfix/chip823_pll_low_temp_bug_v5.2' into 'release/v5.2'
[H2]Fix cpu switch fail for bbpll cali fail bug in low temp (v5.2)

See merge request espressif/esp-idf!34600
2024-11-15 16:29:39 +08:00
986081303a Merge branch 'bugfix/fix_tbtt_interval_update_fail_v5.2' into 'release/v5.2'
fix(wifi): Optimization for wifi components (v5.2)

See merge request espressif/esp-idf!34894
2024-11-15 15:46:35 +08:00
5b0b23cfb3 Merge branch 'feature/add_compiler_no_merge_constants_v5.2' into 'release/v5.2'
feat: add compiler config for not merging const sections (v5.2)

See merge request espressif/esp-idf!34087
2024-11-15 15:32:51 +08:00
706c5cdc8a fix(802.15.4): add case for 2015 frame enh-ack 2024-11-15 14:58:39 +08:00
6e1c4f8971 fix(esp_system): deselect all modem modules clk source selection before clk init 2024-11-15 13:46:28 +08:00
7237893ba9 fix(openthread): Fix invalid host resolving for Thread end devices 2024-11-15 11:30:23 +08:00
1e24d8acac Merge branch 'contrib/github_pr_14859_v5.2' into 'release/v5.2'
fix(usb_host): return ESP_ERR_NO_MEM on failed alloc in client register (GitHub PR) (v5.2)

See merge request espressif/esp-idf!34877
2024-11-15 10:59:27 +08:00
c5a4698088 fix(bt/bluedroid): Fixed classic bt build fail when enable dynamic memory and disable BLE
(cherry picked from commit 59d20e80d3)

Co-authored-by: zhanghaipeng <zhanghaipeng@espressif.com>
2024-11-14 22:13:40 +08:00
6fbc454920 fix(littlefs): Allow LittleFS image generation on Windows + version bump
Closes https://github.com/espressif/esp-idf/issues/12900
2024-11-14 13:21:05 +01:00
c92f5db0e5 Merge branch 'feat/lwip_dns_external_resolve_hook_v5_2' into 'release/v5.2'
feat(lwip): Add DNS external hook in TCPIP context and replace netconn external resolve hook with dns external hook for OpenThread(v5.2)

See merge request espressif/esp-idf!33513
2024-11-14 19:29:43 +08:00
d866ac65cc Merge branch 'fix/find_and_close_service_in_ot_ci_case_v5.2' into 'release/v5.2'
fix(ci): optimize an openthread ci case (Backport v5.2)

See merge request espressif/esp-idf!34725
2024-11-14 11:59:15 +08:00
5a354837a8 fix(wifi): Optimization for wifi components
1. fix(wifi/pm): Fixed the tbtt interval update error when AP's beacon interval changed
   Closes https://github.com/espressif/esp-idf/issues/14720
2. fix(wifi/mesh): Enlarge the mesh TX task stack
3. fix(wifi/espnow): Added check for espnow type and length on v1.0
4. fix(wifi/mesh): Fixed delete group id error in wifi mesh
   Closes https://github.com/espressif/esp-idf/issues/14735
2024-11-14 10:42:42 +08:00
1fbd343ed5 fix(openthread): Add check for ip address in DNS external resolve hook 2024-11-14 10:29:43 +08:00
846de251c7 feat(openthread): Replace netconn external resolve hook with dns external hook 2024-11-14 10:29:43 +08:00
88198777f8 feat(lwip): Add DNS external hook in TCPIP context(v5.2) 2024-11-14 10:29:43 +08:00
f9ef78528e docs(wifi/espnow): Update the description for ESP-NOW frame 2024-11-14 10:25:56 +08:00
e186bba371 Merge branch 'feature/support_moving_code_to_flash_v5.2' into 'release/v5.2'
feat(ble): Support for putting code in flash on ESP32-C2 (v5.2)

See merge request espressif/esp-idf!34784
2024-11-14 10:09:31 +08:00
38e9c8dbdf fix(usb_host): return ESP_ERR_NO_MEM on failed alloc in client register
Fixes issue where ESP_ERR_NO_MEM was being silently discarded after
cleaning up after a failed malloc in usb_host_client_register.

Signed-off-by: Daniel Mangum <georgedanielmangum@gmail.com>
2024-11-13 10:03:08 +01:00
de107cf4f2 fix(esp_pm): move clock module out of TOP_DOMAIN_PERIPHERALS_BM 2024-11-13 16:44:45 +08:00
8f457cafa8 change: bump max sockets in lwip Kconfig
Tested under ESP32S3, running 50 tasks, each with a client, and a server
listening to one client, totalizing 150 sockets/files open, forwarding
data from PPP to Ethernet and vice versa.
Reasoning for 255 total sockets/files is VFS local_fd_t being a uint8_t.
Since FD_SETSIZE is defined at tool level, a CMakeLists user definition
is needed in cases above 64 (the default value).

Merges https://github.com/espressif/esp-idf/pull/13866
2024-11-13 15:20:42 +08:00
81c4470f7e Merge branch 'bugfix/fix_some_ble_bugs_240926_esp32_v5.2' into 'release/v5.2'
Fixed some BLE bugs 240926 on ESP32 (v5.2)

See merge request espressif/esp-idf!34552
2024-11-13 12:05:20 +08:00
60beb52dd8 Merge branch 'bugfix/support_random_iv_in_esptouch_v2_v5.2' into 'release/v5.2'
fix(wifi): Support AES IV with random value in esptouch v2 (v5.2)

See merge request espressif/esp-idf!34607
2024-11-13 11:27:40 +08:00
5c07af3ed7 Merge branch 'fix/fix_ota_slowclock_switching_v5.2' into 'release/v5.2'
fix(esp_hw_support): fix rtc slow clock missing after the OTA app changes the slow clock source (v5.2)

See merge request espressif/esp-idf!34472
2024-11-12 19:25:47 +08:00
458fb6e018 Merge branch 'fix/bypass_some_restore_process_if_sleep_rejected_v5.2' into 'release/v5.2'
fix(esp_hw_support): skip some wakeup steps if sleep is rejected (v5.2)

See merge request espressif/esp-idf!34620
2024-11-12 19:24:18 +08:00
2e80fd6236 Merge branch 'bugfix/osi_replace_free_v5.2' into 'release/v5.2'
fix(bt/bluedroid): Replace free/malloc with osi_free/malloc(v5.2)

See merge request espressif/esp-idf!34609
2024-11-12 19:22:26 +08:00
cbaf87af01 Merge branch 'bugfix/fix_avrc_absolute_volume_compatibility_v5.2' into 'release/v5.2'
bugfix/fix_avrc_absolute_volume_compatibility[backport v5.2]

See merge request espressif/esp-idf!34771
2024-11-12 17:54:47 +08:00
6c8c6cef70 Merge branch 'feat/support_controller_run_in_flash_only_v5.2' into 'release/v5.2'
feat(bt/controller): Support controller code run in flash only(backport v5.2)

See merge request espressif/esp-idf!34703
2024-11-12 09:54:36 +08:00
9a8025c609 fix(lwip): Add default IPv6 input filter to drop traffic if ipv6 not assigned
* Makes LWIP_HOOK_IP6_INPUT default to LWIP_HOOK_IP6_INPUT_DEFAULT
* Updated the stub hook implementation to actually filter out all IPv6
packets if the input netif has no link local address.
2024-11-11 23:56:07 +08:00
d1833499dc fix(transport): Fix websocket mem-corruption while reading headers
Closes https://github.com/espressif/esp-idf/issues/14473
2024-11-11 23:55:33 +08:00
d86c7ce118 fix(esp_wifi): Add null pointer checks to WiFi-netif APIs
Added null pointer checks to WiFi-netif API functions to prevent potential
crashes from invalid arguments, updated unit tests.

Closes https://github.com/espressif/esp-idf/issues/8702
2024-11-11 23:55:17 +08:00
a56d6f148f feat(ble): Support for putting code in flash on ESP32-C2 2024-11-11 17:49:23 +08:00
d47ed7d6f8 fix(wifi): Support AES IV with random value in esptouch v2 2024-11-11 15:37:32 +08:00
0587ac3766 Merge branch 'fix/c6_ble_no_adv_bug_v5.2' into 'release/v5.2'
fix: C6 ble does not send adv when coexistence with wifi

See merge request espressif/esp-idf!34575
2024-11-11 10:45:44 +08:00
97bf63adde Merge branch 'bugfix/gpio_set_level_atomic_v5.2' into 'release/v5.2'
fix(gpio): improve set level performance (v5.2)

See merge request espressif/esp-idf!34766
2024-11-11 10:41:15 +08:00
8cdca030e3 fix(esp_hw_support): skip some wakeup steps if sleep is rejected
1. Skip esp_timer time compensation to avoid introducing errors into rtc_timer
    2. Ignore sleep_time_overhead_out measurements when sleep is rejected
2024-11-11 10:21:30 +08:00
15a515b514 Merge branch 'feat/parlio_sleep_retention_v5.2' into 'release/v5.2'
fix(parlio): fix spelling error in reg_base.h (v5.2)

See merge request espressif/esp-idf!34734
2024-11-08 18:58:56 +08:00
cc855a0a9b Merge branch 'feat/mcpwm_dead_time_add_warning_v5.2' into 'release/v5.2'
fix(mcpwm): add warning about generator deadtime (v5.2)

See merge request espressif/esp-idf!34731
2024-11-08 16:48:23 +08:00
8ab19b4bac fix(bt/bluedroid): Fixed AVRCP compatibility issue on absolute volume synchronization 2024-11-08 14:49:55 +08:00
50170b643a fix(bt): fix some issues in bt controller
1: Store local device name into NVDS when handling hci_wr_local_name_cmd.
2: Set default device name during link manager initialization.
3: Set the QoS value to the minimum value if the calculated QoS is less
   than the minumum.
2024-11-08 14:31:34 +08:00
ba1830f3f4 fix(bt/ble): Update esp32 libbtdm_app.a (17db8bd)
- Added a verification step for the Access Address within the CONNECT_IND PDU
2024-11-08 14:31:19 +08:00
9133eda13c fix(bt): Update bt lib for ESP32(a2a7457)
- Fixed assert in ke_mem.c at line 409 when controller reset
- Added config for BLE instant passed workaround
- Fixed connection can't be established when initiating and advertising coexist
2024-11-08 14:30:29 +08:00
45bb984dcd fix: fix pll low temp bug 2024-11-08 12:02:38 +08:00
9fba786b47 fix(gpio): improve set level performance
by avoid "read-modify-write" operation. The registers designed to be
write only.

Related to https://github.com/espressif/esp-idf/issues/14674
2024-11-08 11:45:10 +08:00
c409db3b44 feat(bt/controller): Support controller code run in flash only 2024-11-07 16:51:56 +08:00
d9bc02607f fix(bt): Update bt lib for ESP32-C3 and ESP32-S3(52ee788)
- Fixed BLE vendor HCI set and get tx power
- Support BLE vendor HCI set adv aux offset command
- Support BLE vendor HCI set CSA support command
- Added config for BLE instant passed workaround
- Fixed btdm_sleep_clock_sync timeout workaround


(cherry picked from commit 1e3220b0b0)

Co-authored-by: chenjianhua <chenjianhua@espressif.com>
2024-11-07 16:51:56 +08:00
d5cbc525e8 fix(parlio): fix spelling error in reg_base.h 2024-11-07 15:00:05 +08:00
11ba71e96f Merge branch 'backport/linker_script_check_missing_function_v52' into 'release/v5.2'
fix(ieee802154): fix linker error due to static function being inlined(Backport v5.2)

See merge request espressif/esp-idf!34720
2024-11-07 12:14:32 +08:00
f1a28c56b1 Merge branch 'backport/upgrade-zigbee-examples-v5.2' into 'release/v5.2'
feat(zigbee): Upgrade the Zigbee lib to v1.6 for Zigbee examples(Backport v5.2)

See merge request espressif/esp-idf!34712
2024-11-07 11:39:36 +08:00
214910f8f8 Merge branch 'fix/esp_prov_ipv6_resolve_v5_2' into 'release/v5.2'
fix(tools/esp_prov): Fix hostname resolving for IPv6-only host(v5.2)

See merge request espressif/esp-idf!34677
2024-11-07 11:07:09 +08:00
26e719013f fix(mcpwm): add warning about generator deadtime
Closes https://github.com/espressif/esp-idf/issues/14773
2024-11-07 10:57:09 +08:00
70c0c5b2e1 feat(zigbee): Upgrade the Zigbee lib to v1.6 for Zigbee examples
- Optimize the Zigbee light, switch and gateway examples
- Remove the esp_zigbee_rcp example
2024-11-07 10:43:57 +08:00
34a8c96120 fix(ci): optimize an openthread ci case 2024-11-07 10:41:57 +08:00
zwx
0968f1ba97 fix(802.15.4): add no inline to some static function 2024-11-06 19:51:28 +08:00
f15a4bb961 fix(ieee802154): fix linker error due to static function being inlined
When the compiler decides to inline a static function, linker script
generator will complain about the missing function.
2024-11-06 19:51:23 +08:00
dda7514ba1 fix(bt/bluedroid): Replace free/malloc with osi_free/malloc 2024-11-06 19:13:32 +08:00
450d5378ff Merge branch 'contrib/github_pr_14196_v5.2' into 'release/v5.2'
fix(esp_http_server): prevent concurrent access to socket used in async http requests (GitHub PR) (v5.2)

See merge request espressif/esp-idf!34685
2024-11-06 17:43:00 +08:00
c233332f03 Merge branch 'bugfix/fix_ble_build_fail_v5.2' into 'release/v5.2'
fix(ble/bluedroid): Fixed BLE build fail when enable dynamic memory and BLE5.0 (v5.2)

See merge request espressif/esp-idf!34663
2024-11-06 16:36:53 +08:00
dfced636a4 Merge branch 'bugfix/fixed_h2_assert_master_1031_v5.2' into 'release/v5.2'
Bugfix/fixed h2 assert master 1031 (v5.2)

See merge request espressif/esp-idf!34539
2024-11-06 15:06:50 +08:00
83216d64e4 fix(esp_http_server): prevent concurrent access to socket used in async http requests 2024-11-06 08:05:59 +01:00
4951df6fcc fix: Allocate HTTP header space for async httpd_req_t objects
This resolves bug #13430 by allocating a new copy of resp_hdrs
when calling httpd_req_async_handler_begin(), thus preventing
invalid access to memory from async tasks.
2024-11-06 08:05:55 +01:00
f72433065d Merge branch 'feat/support_blecrt_90_v5.2' into 'release/v5.2'
feat(bt/bluedroid): Added API to set supported channel selection algorithm (v5.2)

See merge request espressif/esp-idf!34504
2024-11-06 11:50:19 +08:00
438fd1df62 fix(tools/esp_prov): Fix hostname resolving for IPv6-only host 2024-11-05 17:42:31 +08:00
3559e5702f Merge branch 'bugfix/wrong_return_type_v5.2' into 'release/v5.2'
fix(i2c_lcd): wrong return type for esp_lcd_new_panel_io_i2c (v5.2)

See merge request espressif/esp-idf!34655
2024-11-05 16:41:12 +08:00
36dffb8f25 Merge branch 'bugfix/fix_ble_adv_start_fail_v5.2' into 'release/v5.2'
fix(ble/bluedroid): Fixed crash issue in BLE SMP when a disconnection process is ongoing(v5.2)

See merge request espressif/esp-idf!34527
2024-11-05 16:37:02 +08:00
860399d1d2 fix(ble/bluedroid): Fixed BLE build fail when enable dynamic memory and BLE5.0
(cherry picked from commit 94d1a4f1c0)

Co-authored-by: zhanghaipeng <zhanghaipeng@espressif.com>
2024-11-05 16:13:40 +08:00
2506664f0a Merge branch 'bugfix/fix_memory_leak_in_sco_v5.2' into 'release/v5.2'
fix(bt/bluedroid): Fix memory leak in sco when bluedroid disable (v5.2)

See merge request espressif/esp-idf!34566
2024-11-05 14:08:38 +08:00
6def3c5644 fix(i2c_lcd): wrong return type for esp_lcd_new_panel_io_i2c
when build for C++ project
2024-11-05 13:47:46 +08:00
11888bed1b Merge branch 'backport/fix_energy_scan_api_para_mismatch_v52' into 'release/v5.2'
fix(openthread): set channel for energy scan(Backport v5.2)

See merge request espressif/esp-idf!34595
2024-11-05 12:54:04 +08:00
4e88543dd9 Merge branch 'feat/openthread_dataset_changed_event_v5_2' into 'release/v5.2'
feat(openthread): Add dataset changed event and post it in state change callback(v5.2)

See merge request espressif/esp-idf!34545
2024-11-05 12:47:17 +08:00
d90d20dd45 Merge branch 'ci/backport_i2s_ci_fix_to_v5.2' into 'release/v5.2'
ci(i2s): backport i2s ci fix (v5.2)

See merge request espressif/esp-idf!34588
2024-11-05 12:30:49 +08:00
231df7b006 fix(phy): Updated phylib to phy_version: 320, 348a293 2024-11-05 00:06:34 +08:00
2ca9b50231 Merge branch 'fix/fix_wifi_bugs_10_28_v5.2' into 'release/v5.2'
fix(wifi): fix some bss color issues (v5.2)

See merge request espressif/esp-idf!34486
2024-11-04 20:49:16 +08:00
779ac50b36 fix(esp_http_server): updated condition to verify http version
Closes https://github.com/espressif/esp-idf/issues/14723
2024-11-04 15:50:34 +05:30
zwl
b14d182238 fix(ble): fixed occasional crash issue in low memory scenarios on ESP32-C6 2024-11-04 12:04:45 +08:00
2d3216183c fix(ble): fixed occasional crash issue in low memory scenarios on ESP32-H2
(cherry picked from commit dbad6a0ca5)

Co-authored-by: zwl <zhaoweiliang@espressif.com>
2024-11-04 12:04:45 +08:00
402911dfae fix(wifi): fix some bss color issues 2024-11-04 11:52:17 +08:00
98618d7562 Merge branch 'bugfix/hfp_sniff_mng_v5.2' into 'release/v5.2'
bugfix/hf_and_ag_cannot_enter/exit sniff mode. (v5.2)

See merge request espressif/esp-idf!34468
2024-11-04 09:38:01 +08:00
470d405f13 Merge branch 'bugfix/update_btlib_v5.2' into 'release/v5.2'
fix(bt/controller): Fixed some controller bugs on ESP32 (v5.2)

See merge request espressif/esp-idf!34465
2024-11-04 09:37:24 +08:00
9f4d895143 fix(ble/bluedroid): Fixed crash issue in BLE SMP when a disconnection process is ongoing
(cherry picked from commit 76e1650161)

Co-authored-by: zhanghaipeng <zhanghaipeng@espressif.com>
2024-11-04 00:04:44 +08:00
65a1e6c272 fix(ble/bluedroid): Support enable BLE topology check by API
(cherry picked from commit dbc94c7056)

Co-authored-by: zhanghaipeng <zhanghaipeng@espressif.com>
2024-11-04 00:04:44 +08:00
ca86e7f32b Merge branch 'fix/ssdmmc_send_cmd_set_relative_addr_rca_v5.2' into 'release/v5.2'
fix(sdmmc): Retry to get another RCA if the previous response was 0 (v5.2)

See merge request espressif/esp-idf!34346
2024-11-01 18:23:40 +08:00
zwx
6bffe59503 fix(openthread): set channel for energy scan 2024-11-01 16:37:40 +08:00
13c2660b46 Merge branch 'bugfix/wifi_set_mode_error_propagation_v5.2' into 'release/v5.2'
Handle missing error propagation in esp_wifi_set_mode() API (Backport v5.2)

See merge request espressif/esp-idf!33880
2024-11-01 16:15:47 +08:00
59fd4f13e5 ci(i2s): fix i2s_multi_dev failed case 2024-11-01 11:22:02 +08:00
cc128d7355 feat(openthread): Add dataset changed event and post it in state change callback 2024-10-31 19:05:29 +08:00
1e8fded85c fix(bt/bluedroid): Fix memory leak in sco when bluedroid disable 2024-10-31 17:55:24 +08:00
4860b39964 Merge branch 'fix/fix_esp32c2_tx_shake_issue_v52' into 'release/v5.2'
fix(wifi): fix esp32c2 tx shake issue

See merge request espressif/esp-idf!34512
2024-10-31 14:43:25 +08:00
78cf301147 Merge branch 'bugfix/fix_miss_internal_wapi_deinit_issue_v5.2' into 'release/v5.2'
fix(wifi): fix miss internal wapi deinit issue(Backport v5.2)

See merge request espressif/esp-idf!34493
2024-10-31 13:55:01 +08:00
ade9d53fbb fix(esp_wifi): Handle missing error propagation in esp_wifi_set_mode 2024-10-30 12:48:04 +05:30
dee3aa95a6 fix(bt/bluedroid): Fixed error when memory debug enabled 2024-10-29 21:51:25 +08:00
690eb4c517 fix(bt/bluedroid): Fixed GATTC app status check when BT and BLE coexist 2024-10-29 21:50:39 +08:00
b0d70ba771 fix(bt/bluedroid): Update address type for BLE link when the connection is completed 2024-10-29 21:50:34 +08:00
9742b92a14 fix(wifi): fix esp32c2 tx shake issue 2024-10-29 19:55:52 +08:00
b3686c2f60 feat(bt/bluedroid): Added API to set supported channel selection algorithm
(cherry picked from commit 4ae7b4aecf)

Co-authored-by: chenjianhua <chenjianhua@espressif.com>
2024-10-29 17:35:20 +08:00
f72956a2b6 Merge branch 'feat/support_enable_ble_hci_log_by_api_v5.2' into 'release/v5.2'
feat(ble/bluedroid): Support enable BLE hci log by API (v5.2)

See merge request espressif/esp-idf!34423
2024-10-29 16:04:01 +08:00
288e8c6cc5 Merge branch 'feature/ftm_calibration_esp32c6_v5.2' into 'release/v5.2'
feat(ftm): Add ftm calibration values for esp32c6 (Backport v5.2)

See merge request espressif/esp-idf!34476
2024-10-29 15:17:55 +08:00
8763953601 Merge branch 'change/improve_some_wifi_releated_introduction_v52' into 'release/v5.2'
change(wifi):improve some wifi releated introduction v52

See merge request espressif/esp-idf!34278
2024-10-29 15:16:17 +08:00
200f6f4c78 fix(wifi): fix miss internal wapi deinit issue 2024-10-29 12:03:05 +08:00
b8e796cb67 fix(esp_hw_support): disable unused clock sources after rtc clock switching complete 2024-10-28 19:57:56 +08:00
1ed8e4b406 feat(ftm): Add ftm calibration values for esp32c6 2024-10-28 16:32:19 +05:30
cdd9996fa3 Merge branch 'bugfix/ftm_apsta_bw_issue_v5.2' into 'release/v5.2'
fix(esp_wifi): Fix FTM issues in AP-STA mode (Backport v5.2)

See merge request espressif/esp-idf!33701
2024-10-28 17:20:19 +08:00
5f9a6b3a66 Merge branch 'bugfix/wpa2_ent_fixes_v5.2' into 'release/v5.2'
Few fixes in wpa_supplicant(v5.2)

See merge request espressif/esp-idf!34445
2024-10-28 15:09:35 +08:00
e70684b3e6 Merge branch 'fix/freertos_race_cond_in_stream_buffers_send_v5.2' into 'release/v5.2'
fix(freertos): Fixed SMP race condition in xStreamBufferSend() (v5.2)

See merge request espressif/esp-idf!34336
2024-10-28 13:37:57 +08:00
98a65c0538 change(wifi):improve some wifi releated introduction 2024-10-28 13:37:32 +08:00
3ec3c12859 Merge branch 'docs/remove_user_guide_for_esp32-devkitm-1_migration_v5.2' into 'release/v5.2'
docs: Remove user guide for esp32-devkitm-1 migration (v5.2)

See merge request espressif/esp-idf!34321
2024-10-28 13:36:44 +08:00
582c5acf2d Merge branch 'bugfix/fix_h2_wrong_lslp_drvb_config_bug_v5.2' into 'release/v5.2'
fix(h2): fix lslp drvb config bug (v5.2)

See merge request espressif/esp-idf!34293
2024-10-28 13:36:17 +08:00
9ce3654357 Merge branch 'backport/openthread_154_related_feature_v52' into 'release/v5.2'
Backport some openthread and IEEE802154 related feature(Backport v5.2)

See merge request espressif/esp-idf!34273
2024-10-28 12:13:26 +08:00
9085e0737f fix(esp_hw_support): enable all supported slow clock at pmu_init 2024-10-28 12:09:12 +08:00
bf1630df65 Merge branch 'bugfix/fix_assert_if_ble_sleep_init_failed_v5.2' into 'release/v5.2'
fix(ble): do not assert if ble sleep init failed (v5.2)

See merge request espressif/esp-idf!34428
2024-10-28 11:55:21 +08:00
2ea33342b9 Merge branch 'feat/mbedtls_size_optimization_v5.2' into 'release/v5.2'
Fix the increase in build size of mbedtls while upgrading to v3.x (v5.2)

See merge request espressif/esp-idf!34253
2024-10-28 11:17:10 +08:00
13ad213984 Merge branch 'refactor/ble_example_print_on_bluedroid_v5.2' into 'release/v5.2'
refactor(bt/bluedroid): Refactor the print for BLE examples (v5.2)

See merge request espressif/esp-idf!34309
2024-10-28 10:52:47 +08:00
c28dfe28e9 fix(bt/bluedroid): fixed AG and HF client cannot enter/exit sniff mode 2024-10-28 10:40:46 +08:00
fe85ffa673 Revert "Disable sniff mode during (e)SCO connection."
This reverts commit 39a5eb84f3.
2024-10-28 10:40:46 +08:00
cfd077d403 fix(bt/controller): Fixed some controller bugs on ESP32
- Fixed access NULL in SCO frame end
      Closes https://jira.espressif.com:8443/browse/IDFGH-10796
    - Added LAP checking for Periodic Inquiry
    - Removed an inproper assertion in SCO module
    - Fixed wrong logic in key exchange when
      LMP transaction collision occurred
    - Fixed the using of wrong error code in
      the transaction collision of role switch
2024-10-28 10:37:32 +08:00
0f1c5b6f06 Merge branch 'feat/i2c_port_handle_func_v5.2' into 'release/v5.2'
feat(i2c_master): Add an api for retrieveing handle via port (backport v5.2)

See merge request espressif/esp-idf!34439
2024-10-28 10:33:02 +08:00
d8065ec3a3 Merge branch 'bugfix/workaround_of_i2s_half_sample_rate_issue_v5.2' into 'release/v5.2'
fix(i2s): fix i2s half sample rate issue (v5.2)

See merge request espressif/esp-idf!34354
2024-10-28 10:20:30 +08:00
1c9a9b085c Merge branch 'ci/temp_disable_sonarqube_v5.2' into 'release/v5.2'
ci: temp disable sonarqube check. keep it for migrating to codechecker (v5.2)

See merge request espressif/esp-idf!34451
2024-10-28 09:43:27 +08:00
ff4218773d Merge branch 'feat/support_32k_osc_ble_sleep_clk_v5.2' into 'release/v5.2'
feat(ble): Support using 32k oscillator as Bluetooth sleep clock(v5.2)

See merge request espressif/esp-idf!33997
2024-10-28 09:36:28 +08:00
643a1c2204 fix(esp_wifi): Fix FTM issues in AP-STA mode
Add AP-STA mode support in FTM example
Update wifi libs with below changes -
- Use ex-AP's bandwidth in FTM request when connected
- Allow Bandwidth downgrade in FTM negotiation
- Use separate calibration when Initiator performs 20MHz FTM
  while in-AP is in 40MHz
2024-10-27 19:26:46 +05:30
039b49fb78 Merge branch 'change/polish_wifi_sleep_current_desc_v52' into 'release/v5.2'
change(doc): add notes for sleep current data tested in shieled box

See merge request espressif/esp-idf!34437
2024-10-25 19:11:31 +08:00
0e2f30a253 Merge branch 'fix/ws_transport_linux_signed_promotions_v5.2' into 'release/v5.2'
fix(ws_transport): Fix incorrect packet-len on linux due to int promotions of char (GitHub PR) (v5.2)

See merge request espressif/esp-idf!34147
2024-10-25 19:04:08 +08:00
8875ada534 ci: disable sonarqube check 2024-10-25 13:03:44 +02:00
5572cc901c feat(ble): Support using 32k oscillator as Bluetooth sleep clock 2024-10-25 19:03:39 +08:00
1a389cc288 Merge branch 'feat/new_xmc_id_v5.2' into 'release/v5.2'
feat(spi_flash): Add new xmc chip id (backport v5.2)

See merge request espressif/esp-idf!34285
2024-10-25 18:34:58 +08:00
1618fd8a0f refactor(usb_host): Removed error in enum when stalled, added hcd_dwc no more free channels 2024-10-25 12:31:39 +02:00
bb23c18edd fix(ext_port): Added port recovery delay 2024-10-25 12:30:31 +02:00
4f3981a6e7 Merge branch 'bugfix/support_cert_test_v5.2' into 'release/v5.2'
fix(phy): Add cert_test support for ESP32, ESP32-C2, ESP32-C6, ESP32-H2 and ESP32-S2(Backport v5.2)

See merge request espressif/esp-idf!34205
2024-10-25 17:58:33 +08:00
0943aff2df fix(wpa_supplicant): Add few fixes in dpp task 2024-10-25 14:47:11 +05:30
2a4e413624 fix(wpa_supplicant): Add few fixes in btm_rrm task 2024-10-25 14:46:55 +05:30
158bd9119a fix(wpa_supplicant): Add few fixes in eloop task 2024-10-25 14:43:02 +05:30
7db5c50cc8 fix(wpa_supplicant): Add few fixes in WPS task 2024-10-25 14:42:56 +05:30
3c92d707bf fix(wpa_supplicant): Add few fixes in NAN task 2024-10-25 14:42:41 +05:30
c70a8a9ab4 fix(wpa_supplicant): Add few fixes in eap client code 2024-10-25 14:42:30 +05:30
bbf2908b54 fix(i2c_master): Fix the memory leak in the async transaction 2024-10-25 16:26:31 +08:00
cecfd7a4a0 feat(i2c_master): Add an api for retrieveing handle via port 2024-10-25 16:26:05 +08:00
fc6bb3ddcf change(doc): add notes for sleep current data tested in shieled box 2024-10-25 16:09:37 +08:00
32e0c7f3d1 docs(spi_flash): Add migration guide for removing XMC-C suspend support 2024-10-25 15:36:58 +08:00
4250272790 fix(ble): do not assert if ble sleep init failed 2024-10-25 10:52:51 +08:00
0cc06edead feat(ble/bluedroid): Support enable BLE hci log by API
(cherry picked from commit 15c895fc6a)

Co-authored-by: zhanghaipeng <zhanghaipeng@espressif.com>
2024-10-24 20:13:23 +08:00
e4afe18a61 feat(openthread): allow enabling trel before getting interface 2024-10-24 18:30:44 +08:00
9e3b0fc076 feat(openthread): support trel feature 2024-10-24 18:30:44 +08:00
zwx
938dab0a02 fix(802154): pass hardware abort reason into processing function 2024-10-24 18:30:44 +08:00
4bf58ea0c2 fix(ieee802154): fix a bug in the usage of a macro 2024-10-24 18:30:44 +08:00
zwx
d3a836d2b7 feat(ieee802154): add frame type checking for hw autoack feature 2024-10-24 18:30:44 +08:00
a22f37f20f fix(openthread): add macro for rcp init 2024-10-24 18:30:44 +08:00
ca9caf1fee feat(openthread): support vendor hook for rcp spi 2024-10-24 18:30:44 +08:00
d3e0764232 feat(openthread): update extension commands component for examples 2024-10-24 18:30:44 +08:00
216cf605d3 fix(bt/bluedroid): correct the readme links for BLE periodic examples 2024-10-24 18:04:02 +08:00
2c2253b7d3 refactor(bt/bluedroid): Refactor the print for BLE examples 2024-10-24 18:04:02 +08:00
8c6c9b7f0c refactor(bt/bluedroid): Refactor the print for gatt_server and gatt_client example 2024-10-24 18:04:02 +08:00
2b35c55820 Merge branch 'bugfix/load_access_fault_upon_auth_v5.2' into 'release/v5.2'
fix(wifi): Add a check on hostapd instance while handling an Auth frame (Backport v5.2)

See merge request espressif/esp-idf!34121
2024-10-24 16:53:32 +08:00
921133a133 Merge branch 'feature/update-openocd-to-v0.12.0-esp32-20241016_v5.2' into 'release/v5.2'
feat(tools): update openocd version to v0.12.0-esp32-20241016 (v5.2)

See merge request espressif/esp-idf!34394
2024-10-23 22:02:28 +08:00
d395f4d5d7 Merge branch 'fix/gdbgui_py3.13_v5.2' into 'release/v5.2'
fix(tools): Print message about GDBGUI being not supported with Python 3.13 (v5.2)

See merge request espressif/esp-idf!34378
2024-10-23 19:59:45 +08:00
745033e0c7 Merge branch 'docs/add_ble_get_started_eng_2024102310_v5.2' into 'release/v5.2'
Docs: Added BLE English version of BLE Get Started (v5.2)

See merge request espressif/esp-idf!34385
2024-10-23 18:55:28 +08:00
e8058df59f Merge branch 'fix/mbedtls_fs_io_dependency_on_vfs_v5.2' into 'release/v5.2'
fix(mbedtls): Fix the MBEDTLS_FS_IO dependency on vfs (v5.2)

See merge request espressif/esp-idf!34270
2024-10-23 17:34:51 +08:00
6735d9a9eb feat(tools): update openocd version to v0.12.0-esp32-20241016 2024-10-23 10:05:20 +02:00
f7b34f291b Merge branch 'feature/update_mbedtls_version_to_3.6.2_v5.2' into 'release/v5.2'
feat(mbedtls): update mbedtls version to 3.6.2 (v5.2)

See merge request espressif/esp-idf!34358
2024-10-23 14:35:19 +08:00
60a825e154 fix(mbedtls): Fix the MBEDTLS_FS_IO dependency on vfs
By default MBEDTLS_FS_IO option in mbedtls uses the filesystem supported
added by vfs component.
If the vfs support is disabled by user then mbedtls raises a warning
that the filesystem realted operation shall always fail
This commit fixes the behaviour by enabling respective depedency check for the
MBEDTLS_FS_IO option

Closes https://github.com/espressif/esp-idf/issues/14409
2024-10-23 11:04:13 +08:00
32dce28de0 Merge branch 'bugfix/fix_ble_robust_feature_v5.2' into 'release/v5.2'
fix(ble/bluedroid): Fixed error when writing Client Supported Features characteristic (v5.2)

See merge request espressif/esp-idf!34246
2024-10-23 10:51:34 +08:00
fc841f63fd Merge branch 'docs/add_ble_get_started_eng' into 'master'
Docs: Added BLE English version of BLE Get Started

See merge request espressif/esp-idf!34013

(cherry picked from commit 35fd041288)

42601a7a docs(ble): Added ENG version of ble-introduction.rst
615282c4 docs(ble): Added ENG version of ble-device-discovery.rst
645e68f5 docs(ble): Added initial ENG version of ble-device-discovery.rst
d2d95a52 docs(ble): Added ENG version of ble-data-exchange.rst
00ca4dc7 docs(ble):Updated Details table in ble-device-discovery.rst
8e03c200 fix(ble): Removed trailing white space, and fixed some format issues
5b304485 docs(ble):Fixed a indentation in ble-data-exchange.rst
b4c51e7b docs(ble): Deleted some chinese character in ble-data-exchange.rst ENG version
d01d7efe docs(ble):Revised some expression in ENG version of BLE Get Started
a24762c5 docs(ble): Removed a trailing whitespace in ble-introduction.rst
afbe5a1f Apply 44 suggestion(s) to 4 file(s)
4ddab725 docs(ble): Fixed a description in ble-introduction.rst
203dfa03 Apply 5 suggestion(s) to 3 file(s)

Co-authored-by: Island <island@espressif.com>
2024-10-23 10:16:56 +08:00
64452a7da3 fix(tools): Print message about GDBGUI being not supported with Python 3.13 2024-10-22 16:01:02 +02:00
d33041da73 fix(freertos): Fixed SMP race condition in xStreamBufferSend()
This commit fixes a race condition in dual-core SMP mode where in the
xStreamBufferSend() makes the xTaskWaitingToSend NULL but it may
have already been evaluated to not be NULL by xStreamBufferReceive()
running on another core and eventually leading to a crash in tasks.c.
2024-10-22 10:06:40 +02:00
fd63196561 Merge branch 'fix/freertos_race_cond_in_stream_buffers_v5.2' into 'release/v5.2'
fix(freertos): Fixed SMP race condition in stream_buffers.c (v5.2)

See merge request espressif/esp-idf!34224
2024-10-22 16:00:51 +08:00
52a694abb9 feat(mbedtls): update mbedtls version to 3.6.2 2024-10-22 13:23:59 +05:30
d444b5831b fix(i2s): fix multi-dev test failure 2024-10-22 14:52:37 +08:00
22e043e4ce fix(i2s): fix i2s half sample rate issue 2024-10-22 14:38:22 +08:00
416d80afc7 Merge branch 'docs/delete_user_guide_esp32_s2_and_s3_v5.2' into 'release/v5.2'
docs: Delete user guide esp32-s2-saola-1, esp32-s3-devkitc-1 and esp32-s3-devkitm-1 (v5.2)

See merge request espressif/esp-idf!34327
2024-10-22 10:41:37 +08:00
88d884d9e4 fix(sdmmc): Retry to get another RCA if the previous response was 0 2024-10-21 17:27:41 +02:00
b79d811666 Merge branch 'feat/core_components_v5.2' into 'release/v5.2'
feat: add `COMPONENT_SOURCE` property to component targets (v5.2)

See merge request espressif/esp-idf!34185
2024-10-21 22:03:03 +08:00
e9656ec84f Merge branch 'bugfix/nvs_entry_sanity_check_v5.2' into 'release/v5.2'
Bugfix/added nvs entry header sanity checks (v5.2)

See merge request espressif/esp-idf!34290
2024-10-21 21:40:00 +08:00
27645e20be docs: Delete user guide esp32-s2-saola-1, esp32-s3-devkitc-1 and esp32-s3-devkitm-1 2024-10-21 17:26:32 +08:00
05890e31b5 docs: Remove user guide for esp32-devkitm-1 migration 2024-10-21 15:36:54 +08:00
fa385dc938 Merge branch 'feat/move_crt_bundle_dummy_cert_to_rodata_v5.2' into 'release/v5.2'
Move cert bundle's dummy cert to .rodata to reduce RAM usage (v5.2)

See merge request espressif/esp-idf!34202
2024-10-21 12:42:08 +08:00
e297e16938 Merge branch 'bugfix/fix_retry_assoc_auth_timeout_issue_v5.2' into 'release/v5.2'
fix(wifi): fixed association refused temporarily lead auth timeout issue(Backport v5.2)

See merge request espressif/esp-idf!34243
2024-10-21 11:39:32 +08:00
b3a1af0211 Merge branch 'bugfix/fix_datalen_issue_v5.2' into 'release/v5.2'
fix(nimble): Adjust time parameter in set Data len API in case BLE 5.0 support is not present (v5.2)

See merge request espressif/esp-idf!34220
2024-10-18 18:26:25 +08:00
9c999628ba fix(h2): modify wrong lslp drvb config 2024-10-18 17:01:09 +08:00
03d0870430 fix(storage/nvs): Fixed hadling of inconsistent values in NVS entry header
feat(storage/nvs): Added test cases for damaged entries with correct CRC
2024-10-18 10:55:19 +02:00
4ceb7ccb80 fix(usb_host_lib): Returned task suspend 2024-10-18 10:46:53 +02:00
d83c477422 refactor(usb_host/examples): Enabled external Hub support feature 2024-10-18 10:46:53 +02:00
8046784118 feat(usb/host): Modifiy usb_host_lib example 2024-10-18 10:46:53 +02:00
e62df280e0 feat(ext_port): Added External Port driver 2024-10-18 10:46:51 +02:00
80565eed9b patch(spi_flash): cleanup XMC flash chip usage according to new information 2024-10-18 16:38:18 +08:00
5f36c048d8 feat(spi_flash): Add new xmc chip id 2024-10-18 16:20:02 +08:00
ff673e8016 Merge branch 'bugfix/pcnt_pm_lock_v5.2' into 'release/v5.2'
fix(pcnt): install the pm lock upon driver installation (v5.2)

See merge request espressif/esp-idf!34214
2024-10-18 10:34:18 +08:00
d43f3b936f Merge branch 'bugfix/fix_funcs_overriding_on_esp32c3_eco7_v5.2' into 'release/v5.2'
fix(bt/controller): Fixed BLE functions overriding on ESP32-C3 ECO7 (v5.2)

See merge request espressif/esp-idf!34199
2024-10-17 19:46:03 +08:00
db38b93c8d fix(mbedtls): Fix the increase in build size of mbedtls when upgrading to v3.x 2024-10-17 14:53:55 +05:30
dc45972144 Merge branch 'feat/usb_disconnect_api_backport_v5.2' into 'release/v5.2'
refactor(usb): Update HCD tests to use port power off for disconnections backport v5.2

See merge request espressif/esp-idf!33526
2024-10-17 17:00:59 +08:00
60c7aa85f7 fix(ble/bluedroid): Fixed error when writing Client Supported Features characteristic
(cherry picked from commit 5126742003)

Co-authored-by: zhanghaipeng <zhanghaipeng@espressif.com>
2024-10-17 16:13:27 +08:00
13946e1c52 fix(wifi): fixed association refused temporarily lead auth timeout issue 2024-10-17 15:13:29 +08:00
05aa79077d Merge branch 'mqtt_custom_outbox_ci_v5.2' into 'release/v5.2'
Set partition to large for c6 on custom outbox example (v5.2)

See merge request espressif/esp-idf!34171
2024-10-17 10:50:08 +08:00
b53eb889ba Merge branch 'fix/priority_inv_when_remove_from_unordered_event_list_v5.2' into 'release/v5.2'
fix(freertos): Fixed priority inversion when setting event group bits (v5.2)

See merge request espressif/esp-idf!34124
2024-10-17 10:49:44 +08:00
900cb976f9 Merge branch 'backport/add_thread_curl_https_ci_case_v5.2' into 'release/v5.2'
feat(openthread): add thread curl https ci case (Backport v5.2)

See merge request espressif/esp-idf!33588
2024-10-17 10:48:54 +08:00
b22f4cb3d1 Merge branch 'fix/spinlock-var-not-used-warning_v5.2' into 'release/v5.2'
fix(system): fixed warnings related to ununsed var in spinlock.h (backport v5.2)

See merge request espressif/esp-idf!33485
2024-10-17 10:48:29 +08:00
257f0316d6 Merge branch 'fix/sysview_example_tests_v5.2' into 'release/v5.2'
test(sysview): fix gdb no response error in sysview_heap_log tests (v5.2)

See merge request espressif/esp-idf!33458
2024-10-17 10:47:47 +08:00
0d12bbfdf0 Merge branch 'docs/update_startup_for_single_core_chip_v5.2' into 'release/v5.2'
docs: update startup.rst description for single-core chip support (v5.2)

See merge request espressif/esp-idf!33446
2024-10-17 10:47:11 +08:00
ad32630480 Merge branch 'fix/keep-got-sections-for-riscv_v5.2' into 'release/v5.2'
feat(esp_system): drop .got* sections and add hint (v5.2)

See merge request espressif/esp-idf!33371
2024-10-17 10:46:49 +08:00
e038e66620 Merge branch 'bugfix/fix_s3c3_wrong_ext32k_config_bug_v5.2' into 'release/v5.2'
fix(ext_32k): fix the external 32K issue on C3&S3 (v5.2)

See merge request espressif/esp-idf!33157
2024-10-17 10:46:10 +08:00
35d88960c0 Merge branch 'bugfix/riscv_task_wdt_cleanup_v5.2' into 'release/v5.2'
fix(wdt): changed register dump on task WDT to be more descriptive (v5.2)

See merge request espressif/esp-idf!33106
2024-10-17 10:44:23 +08:00
b5d25bd0b8 feat(mbedtls/esp_crt_bundle): Move dummy cert to .rodata to save 408B from dram
Co-authored-by: Hanno <h.binder@web.de>
2024-10-16 16:39:37 +05:30
1f437df493 fix(freertos): Fixed SMP race condition in stream_buffers.c
This commit fixes a race condition in dual-core SMP mode where in the
xStreamBufferReceive() makes the xTaskWaitingToReceive NULL but it may
have already been evaluated to not be NULL by xStreamBufferSend()
running on another core and eventually leading to a crash in tasks.c.
2024-10-16 09:27:34 +02:00
233eb67e06 fix(nimble): Adjust Data len time in case 5.0 support is not present 2024-10-16 11:59:04 +05:30
6280fbe8b6 fix(pcnt): install the pm lock upon driver installation 2024-10-16 11:33:40 +08:00
1a1e17a3df fix(phy): update cert_test docs 2024-10-15 15:57:41 +08:00
18b47c4143 Apply 1 suggestion(s) to 1 file(s)
Co-authored-by: Jiang Jiang Jian <jack@espressif.com>
2024-10-15 15:24:05 +08:00
d665d43d0a fix(phy): esp32s2 and esph2 support rf cert_test 2024-10-15 15:23:56 +08:00
45e31cc02b fix(phy): fix esp32 build fail issue
Closes https://github.com/espressif/esp-idf/issues/11972
2024-10-15 15:23:05 +08:00
80ef98d717 fix(phy): All chip support cert_test 2024-10-15 15:21:01 +08:00
da09d3391e Merge branch 'bug/ci_test_https_server_file_serving_v5.2' into 'release/v5.2'
fix(protocols): Erased the storage partition for http_server ci test (v5.2)

See merge request espressif/esp-idf!34165
2024-10-15 13:50:33 +08:00
99038783d5 fix(bt/controller): Fixed BLE functions overriding on ESP32-C3 ECO7
(cherry picked from commit 020f7a6297)

Co-authored-by: chenjianhua <chenjianhua@espressif.com>
2024-10-15 13:33:31 +08:00
b968b7aef5 Merge branch 'refactor/usb_host_add_func_ret_values_backport_5.2' into 'release/v5.2'
refactor(usb_host): USB Host add function return values description backport v5.2

See merge request espressif/esp-idf!34089
2024-10-15 10:24:16 +08:00
b00f88c701 Merge branch 'bugfix/xtensa_startup_stack_v5.2' into 'release/v5.2'
fix(system): fixed potential double exception when booting on xtensa (v5.2)

See merge request espressif/esp-idf!33903
2024-10-15 09:45:12 +08:00
4ea78b8882 fix(protocols): Erased the storage partition for http_server ci test
Added api to erase storage partition for http_server ci test
2024-10-14 15:47:22 +05:30
354233fc59 feat: add component_source property to component targets 2024-10-14 12:05:52 +02:00
bdcdd32bb7 Merge branch 'fix/ldgen_sort_v5.2' into 'release/v5.2'
fix(ldgen): enable default name SORT in linker fragment (v5.2)

See merge request espressif/esp-idf!34075
2024-10-14 15:20:41 +08:00
5b57212cfd ci(mqtt): Set partition to large for c6 on custom outbox example
Example failed to build on CI for c6 target due to partition size.
2024-10-14 09:17:50 +02:00
226fde9f91 fix(ws_transport): Fix crash when reading
When parsing WS framing protocol integer promotion would cause
invalid values to be read. Acting upon these values would eventually
cause a crash

Fixes esp-protocols#645
2024-10-14 07:24:23 +02:00
8218cdd7fb Merge branch 'bugfix/mbedtls_doc_update_v5.2' into 'release/v5.2'
docs: update mbedtls guide for TLS 1.3 supported change (v5.2)

See merge request espressif/esp-idf!33994
2024-10-14 10:47:30 +08:00
a9d3832514 Merge branch 'refactor/lcd_i80_gpio_config_v5.2' into 'release/v5.2'
Optimize RGB LCD IRAM usage (v5.2)

See merge request espressif/esp-idf!34126
2024-10-14 10:43:38 +08:00
43ec6b477c Merge branch 'bugfix/fix_ble_handle_check_v5.2' into 'release/v5.2'
fix(ble/bluedroid): Fixed BLE handle check for GATT API (v5.2)

See merge request espressif/esp-idf!34095
2024-10-14 10:41:48 +08:00
738a7f0ba6 Merge branch 'feature/set_hp_sleep_power_mode_with_clock_src_selection_v5.2' into 'release/v5.2'
change(esp_hw_support): switch lp_cpu power mode with clock src selection to save lp_cpu working power (v5.2)

See merge request espressif/esp-idf!34112
2024-10-14 10:39:41 +08:00
90b962997a Merge branch 'bugfix/backport_supplicant_fixes_v5.2' into 'release/v5.2'
fix(wifi): Backport some fixes(v5.2)

See merge request espressif/esp-idf!33976
2024-10-14 10:38:30 +08:00
d4d2448b66 Merge branch 'docs/update_ble_feature_support_status_v5.2' into 'release/v5.2'
docs(ble): Updated a feature name in feature status table v5.2

See merge request espressif/esp-idf!34063
2024-10-12 14:26:29 +08:00
7aa63a9c57 Merge branch 'docs/add_ble_get_started_docs_v5.2' into 'release/v5.2'
docs(ble): Added BLE Get Started (v5.2)

See merge request espressif/esp-idf!34020
2024-10-12 14:25:42 +08:00
5797e2b262 docs(ble): Added BLE Get Started (v5.2) 2024-10-12 14:25:42 +08:00
bfacecf739 Merge branch 'fix/mcpwm_pm_lock_memory_leak_v5.2' into 'release/v5.2'
fix(mcpwm): fix pm_lock memory issues (v5.2)

See merge request espressif/esp-idf!34059
2024-10-12 11:49:37 +08:00
14a1c1ac20 Merge branch 'ci/fix_macos_ccache_v5.2' into 'release/v5.2'
CI: Fix failing ccache and show ccache statistics for macOS tests (v5.2)

See merge request espressif/esp-idf!33938
2024-10-12 01:04:37 +08:00
383ac197f8 refactor(lcd): optimize rgb lcd iram usage
lcd_com_mount_dma_data() doesn't need to be placed in IRAM
2024-10-11 18:57:40 +08:00
e431eef577 test(freertos): Added unit test for event groups to test priority inversion
This commit adds a FreeRTOS unit test to verify that event groups do not
cause priority inversion when unblocking a higher priority task.
2024-10-11 11:53:47 +02:00
ea92cd650a fix(freertos): Fixed priority inversion when setting event group bits
This commit fixes a priority inversion when a lower priority task set
event group bits to unblock a higher priority task but the lower
priority task continued to run.
2024-10-11 11:53:47 +02:00
eccca0a6b0 fix(wifi): Add a check on hostapd instance while handling an Auth frame 2024-10-11 15:12:14 +05:30
6a35be4e47 change(esp_hw_support): switch hp_sys default power mode with clock src selection 2024-10-11 15:47:48 +08:00
2a43f1379d Merge branch 'docs/sync_psram_noinit_and_bss_description_v5.2' into 'release/v5.2'
docs(psram): sync psram noinit description (v5.2)

See merge request espressif/esp-idf!33463
2024-10-11 10:03:56 +08:00
2158eb68d0 fix(ble/bluedroid): Fixed BLE handle check for GATT API
(cherry picked from commit 514155de3b)

Co-authored-by: zhanghaipeng <zhanghaipeng@espressif.com>
2024-10-10 21:13:23 +08:00
7a20ceee6a Merge branch 'feat/ble_mesh_v1.1_feat_disable_support_v5.2' into 'release/v5.2'
feat(ble_mesh): esp ble mesh v1.1 features enable/disable supported (v5.2)

See merge request espressif/esp-idf!33778
2024-10-10 19:09:58 +08:00
7aece79530 fix(usb_host): Update log level and error poropagation 2024-10-10 12:51:06 +02:00
f02ee8ef5d refactor(usb_host): Fixed function return values in usb_host stack:
- updated doxygen for the whole usb_host stack
    - doxygen for test_apps is not updated
    - fixed error codes propagation problems in the usb_host stack
2024-10-10 12:51:06 +02:00
01333b3172 feat: add compiler config for not merging const sections
Probably GCC-13.x and on-wards uses "-fmerge-constants" to merge
the const section (string/floating-point) across compilation units.
This makes it difficult to properly analyze the size output of rodata
section across libraries, the merged section (big in size) is showed
across a single library.

The config option added here can help to disable this compiler behavior
and help to provide better size analysis. It can be used during
development phase only as it increases rodata section size.
2024-10-10 15:35:54 +05:30
8ba7c287b0 Merge branch 'task/add_ldgen_exception_for_freertos_v5.2' into 'release/v5.2'
fix(freertos): Added freertos and ringbuf fragments to the exception list of ldgen mapping checks (v5.2)

See merge request espressif/esp-idf!33216
2024-10-10 16:27:15 +08:00
532b2a0b98 Merge branch 'fix/ringbuf_receives_item_not_yet_sent_v5.2' into 'release/v5.2'
fix(esp_ringbuf): Fixed a bug where in a no-split buffer received items prematurely (v5.2)

See merge request espressif/esp-idf!33650
2024-10-10 16:27:05 +08:00
80c3e107c0 Merge branch 'fix/assert_fail_in_xtaskdeletewithcaps_v5.2' into 'release/v5.2'
Fixed occational assert failure in vTaskDeleteWithCaps() (v5.2)

See merge request espressif/esp-idf!33686
2024-10-10 16:26:45 +08:00
d414eacc86 fix(ldgen): enable default name SORT in linker fragment
Currently, the `SORT` flag mandates the inclusion of at least the
`sort_by_first` argument in the grammar, despite the documentation[1]
indicating that `SORT` can be utilized without any arguments, defaulting
to sorting input sections by name. Fix this by modifying the grammar
to allow a default `SORT` and update a test accordingly.

[1] https://docs.espressif.com/projects/esp-idf/en/stable/esp32/api-guides/
    linker-script-generation.html

Signed-off-by: Frantisek Hrbata <frantisek.hrbata@espressif.com>
2024-10-10 09:12:39 +02:00
be6e1d76e4 docs(psram): sync psram noinit description 2024-10-10 14:40:56 +08:00
b7d0eeb55a Merge branch 'ble_dev/esp32c2eco4_chip_20240903_v5.2' into 'release/v5.2'
change(ble): update c2 eco4 ld file (v5.2)

See merge request espressif/esp-idf!33668
2024-10-10 14:19:43 +08:00
c12e684a29 Merge branch 'feat/adapt_spi_lcd_to_lvgl_v5.2' into 'release/v5.2'
docs: update programming guide to also support quad spi lcd (v5.2)

See merge request espressif/esp-idf!34037
2024-10-10 10:31:52 +08:00
be7b5ae40b docs(ble): Updated a feature name in feature status table 2024-10-10 10:05:03 +08:00
13ae494d35 fix(mcpwm): fix pm_lock memory issues 2024-10-10 09:49:48 +08:00
95ac2b18e9 Merge branch 'bugfix/fix_bleqabr24_1282_v5.2' into 'release/v5.2'
Fixed BLE scanning and initiating coexist on ESP32 (v5.2)

See merge request espressif/esp-idf!33833
2024-10-09 17:19:45 +08:00
c842477479 Merge branch 'bugfix/fix_bci_443_v5.2' into 'release/v5.2'
fix(bt/controller): Fixed the timeout of wake up timer when using RC OSC (v5.2)

See merge request espressif/esp-idf!33892
2024-10-09 17:18:59 +08:00
d2a8b5e577 fix(usb/host): Correctly handle unpowered port in HUB 2024-10-09 11:16:17 +02:00
62a3b50c94 refactor(usb): Remove use of usb_phy_action() from unit tests
Currently, USB Host unit tests that require a software triggered disconnection/
reconnection rely on the 'usb_phy_action()' function.

This commit replaces those calls with 'hcd_port_command()' or
'usb_host_lib_set_root_port_power()'.

Note: Also removed 'test_usb_common.h/c' as it is no longer necessary are the
function call replacements.
2024-10-09 11:16:17 +02:00
dc838f6123 feat(usb): Add usb_host_lib_set_root_port_power()
This commit adds the usb_host_lib_set_root_port_power() function. This provides
a public API for users to power the root port OFF or ON at runtime, thus trigger
a disconnection or allow connections respectively.

In addition, the usb_host_config_t.root_port_unpowered install configuration is
provided to allow users to install the USB Host Library without automatically
powering ON the root port.
2024-10-09 11:16:17 +02:00
09f45cbd1e change(ble): update c2 eco4 ld file 2024-10-09 17:06:34 +08:00
6a56adcda1 Merge branch 'feature/usb_host_hub_support_collective_backport_p2_v5.2' into 'release/v5.2'
feat(usb_host): Hub Support Collective backport part 2/3 (v5.2)

See merge request espressif/esp-idf!31363
2024-10-09 17:03:38 +08:00
73302ca332 Merge branch 'bugfix/warn_rc32k_use_v5.2' into 'release/v5.2'
fix(clk): warn the users to avoid using RC32K clock (v5.2)

See merge request espressif/esp-idf!33502
2024-10-09 17:02:54 +08:00
bee297a2a5 Merge branch 'bugfix/esp_ringbuf_32_bit_alignment_v5.2' into 'release/v5.2'
fix(ringbuf): allow xRingbufferCreateWithCaps to pass in non-32-bit aligned size (v5.2)

See merge request espressif/esp-idf!33521
2024-10-09 17:02:01 +08:00
d32aa79b67 Merge branch 'modified_ble_multi_conn_example_readme_v5.2' into 'release/v5.2'
update(ble): Modified the ble multi_conn example's readme (v5.2)

See merge request espressif/esp-idf!33992
2024-10-09 15:16:16 +08:00
ad8f9706ac Merge branch 'bugfix/fix_ext_conn_adv_data_check_v5.2' into 'release/v5.2'
fix(bt): Update bt lib for ESP32-C3 and ESP32-S3(01cc408) (v5.2)

See merge request espressif/esp-idf!34002
2024-10-09 11:58:27 +08:00
941d389f28 docs(spi_lcd): update supported spi mode description
Closes https://github.com/espressif/esp-idf/issues/14605
2024-10-09 11:03:16 +08:00
24d39dea21 Merge branch 'bugfix/wifi_bt_coex_crash_v5.2' into 'release/v5.2'
fix(nimble): Fix the sequence of ll and host transport init (v5.2)

See merge request espressif/esp-idf!33962
2024-10-08 19:05:21 +08:00
2a19808dff Merge branch 'feat/ble_mesh_lib_flash_size_optimized_v5.2' into 'release/v5.2'
feat(ble_mesh): ble mesh lib flash size optimized (v5.2)

See merge request espressif/esp-idf!33478
2024-10-08 18:58:14 +08:00
f48b694fa2 fix(bt): Update bt lib for ESP32-C3 and ESP32-S3(01cc408)
- Fixed extended connectable advertising data length check


(cherry picked from commit 8a80675b7c)

Co-authored-by: zhanghaipeng <zhanghaipeng@espressif.com>
2024-10-08 15:13:33 +08:00
8413ad1f68 feat(ble_mesh): esp ble mesh v1.1 features enable/disable supported 2024-10-08 15:03:16 +08:00
6356e35763 docs: update mbedtls guide for TLS 1.3 supported change 2024-10-08 10:00:43 +05:30
d800b8403e update(ble): Modified the ble multi_conn example's readme
(cherry picked from commit 28ffd5fc04)

Co-authored-by: Shen Weilong <shenweilong@espressif.com>
2024-10-08 11:53:41 +08:00
6699f1a51c fix(esp_wifi): Prevent memory overflow in WPS 2024-10-07 11:12:35 +05:30
11ffeab864 fix(esp_wifi): Mask some error conditions in WPS
Mask some error conditions in WPS to increase the probability of
WPS success.
2024-10-07 11:12:35 +05:30
071585dd4d fix(esp_wifi): Disable WPS timers once WPS succeed 2024-10-07 11:12:35 +05:30
8fbd04f839 fix(esp_wifi): Allow connection with WPA mode in WPS 2024-10-07 11:12:05 +05:30
a4b226b7c1 fix(esp_wifi): Deinit WPS registrar during hostapd deinit 2024-10-07 10:24:21 +05:30
5beab45cfe fix(esp_wifi): Added prints in btm roam for error condition 2024-10-07 10:23:40 +05:30
dc6657cac4 Merge branch 'fix/host_based_security_workflows_v5.2' into 'release/v5.2'
fix(security): Fix host based security workflow doc

See merge request espressif/esp-idf!33959
2024-10-03 19:34:40 +08:00
0134202422 fix(nimble): Fix the sequence of ll and host transport init 2024-10-03 16:57:49 +08:00
b16c6f42e1 fix(security): Fix host based security workflow doc
Fix the secure boot digest burning command in
    the secure boot enablement workflow
2024-10-03 11:46:47 +05:30
2b1122a698 Merge branch 'fix/idfpy_uf2_fail_v5.2' into 'release/v5.2'
fix(uf2): Ignore ESPBAUD, ESPPORT when calling idf.py uf2[-app] (v5.2)

See merge request espressif/esp-idf!33949
2024-10-02 20:33:23 +08:00
f0ee29e4e1 Merge branch 'feat/newlib-add-sbom-exclude_cve-2024-30949_v5.2' into 'release/v5.2'
fix(newlib): sbom: add CVE-2024-30949 to cve-exclude-list (v5.2)

See merge request espressif/esp-idf!33682
2024-10-01 21:16:58 +08:00
431923f23c fix(uf2): Ignore ESPBAUD, ESPPORT when calling idf.py uf2[-app] 2024-10-01 13:47:19 +02:00
aba133e842 Merge branch 'feature/update_mbedtls_version_to_3.6.1_v5.2' into 'release/v5.2'
feat(mbedtls): updated mbedtls version to 3.6.1(v5.2)

See merge request espressif/esp-idf!33914
2024-10-01 18:03:51 +08:00
3d2c12dc0a Merge branch 'fix/coredump_sha_build_error_v5.2' into 'release/v5.2'
fix(esp-coredump): fix build error when mbedtls hardware sha disabled (v5.2)

See merge request espressif/esp-idf!33944
2024-10-01 18:02:34 +08:00
03e3c7c54b test(esp-coredump): add test for the soft sha config 2024-10-01 10:07:23 +02:00
a1287b1315 fix(esp-coredump): fix build error when mbedtls hardware sha disabled 2024-10-01 10:07:23 +02:00
12e18c4524 fix(build): fix orphan sections warning kconfig variable 2024-10-01 12:19:04 +07:00
ab0b7c6c29 fix(macos): ccache: re-enable, show stats, set CCACHE_DIR, limit CCACHE_MAXSIZE 2024-09-30 18:56:20 +02:00
6531fe94ca Merge branch 'bugfix/fix_esp32c2_rom_eco1_mbedtls_issues_v5.2' into 'release/v5.2'
fix(esp_rom): Fixed esp32c2 rom eco1 mbedtls issues (v5.2)

See merge request espressif/esp-idf!33918
2024-09-30 14:18:09 +08:00
f8ca72cfe1 fix(esp_rom): Fixed esp32c2 rom eco1 mbedtls issues 2024-09-30 09:26:22 +08:00
2bc43825eb feat(mbedtls): updated mbedtls version to 3.6.1 2024-09-29 22:37:58 +05:30
cae1491519 Merge branch 'feat/add_mode_chg_parem_v5.2' into 'release/v5.2'
feat(bt/bluedroid): Report sniff interval to application layer(v5.2)

See merge request espressif/esp-idf!33866
2024-09-29 14:03:27 +08:00
571ab51aa5 fix(system): fixed potential double exception when booting on xtensa
Due to old windows from the startup flow being present after
switching to running freertos tasks  windowoverflow exceptions
could potentially try to save windows to the startup stack.

During this overflow they also values previously saved on the
startup stack to find earlier frames' stacks.
Since the start up stack was already recycled these values were
invalid and would cause a crash.

Closes https://github.com/espressif/esp-idf/issues/14406Y
2024-09-29 10:57:56 +08:00
601e35c926 Merge branch 'feat/get_ble_resolve_address_status_v5.2' into 'release/v5.2'
feat(ble/bluedroid): Support resolve BLE address for interval usage (v5.2)

See merge request espressif/esp-idf!33807
2024-09-29 10:30:04 +08:00
fc1c79ebc1 Merge branch 'bugfix/fix_hid_cod_setting_v5.2' into 'release/v5.2'
Bugfix/fix hid cod setting[backport 5.2]

See merge request espressif/esp-idf!33338
2024-09-27 19:23:24 +08:00
c5c198584b Merge branch 'bugfix/fix_sdp_bugs_v5.2' into 'release/v5.2'
Bugfix/fix sdp bugs[backport 5.2]

See merge request espressif/esp-idf!33603
2024-09-27 19:22:48 +08:00
4219bb9ea1 fix(bt/controller): Fixed ble get tx power error
(cherry picked from commit 4108a5cc4c)

Co-authored-by: chenjianhua <chenjianhua@espressif.com>
2024-09-27 18:33:37 +08:00
6208b93dad fix(bt/controller): Fixed the timeout of wake up timer when using RC OSC
(cherry picked from commit 873708579c)

Co-authored-by: chenjianhua <chenjianhua@espressif.com>
2024-09-27 18:33:34 +08:00
73ff61bd47 fix(ble/bluedroid): Fixed BLE spelling error in word 2024-09-27 15:50:57 +08:00
a2124a0464 feat(ble/bluedroid): Add BLE memory allocation failure message 2024-09-27 15:50:46 +08:00
31f6b3536c feat(ble/controller): Display BLE controller init status for ESP32 and ESP32C3/S3 2024-09-27 15:50:37 +08:00
69eca1ff93 feat(ble/bluedroid): Optimize address resolution status for interval use 2024-09-27 14:47:44 +08:00
e5984120ac feat(bt/bluedroid): Report sniff interval to application layer 2024-09-27 14:14:02 +08:00
0a935f1c1b Merge branch 'feat/support_esp32c2_eco4_rom_systimer_hal_v5.2' into 'release/v5.2'
feat(esp_rom): support esp32c2 rev2.0(ECO4) rom systimer hal (backport v5.2)

See merge request espressif/esp-idf!33803
2024-09-27 12:16:21 +08:00
3f72cc5410 Merge branch 'feat/bringup_esp32c2_rom_mbedtls_to_formal_feature_v5.2' into 'release/v5.2'
feat(mbedtls): bringup rom mbedtls feature to formal (v5.2)

See merge request espressif/esp-idf!33801
2024-09-27 12:15:51 +08:00
609ab206a0 Merge branch 'fix/fix_clock_retention_link_context_v5.2' into 'release/v5.2'
fix(esp_hw_support): add clock retention contents for esp32c6 & esp32h2  (v5.2)

See merge request espressif/esp-idf!33607
2024-09-27 12:15:13 +08:00
4032d73c89 Merge branch 'change/support_pm_slp_iram_opt_in_normal_light_sleep_v5.2' into 'release/v5.2'
change(esp_pm): bypass cache access assertion when using ext0 or ext1(backport v5.2)

See merge request espressif/esp-idf!33146
2024-09-27 11:45:56 +08:00
a749b2340c Merge branch 'docs/freertos_stack_size_v5.2' into 'release/v5.2'
docs(freertos): update freertos comments to reflect that stack size is in bytes (v5.2)

See merge request espressif/esp-idf!33505
2024-09-27 09:22:07 +08:00
ba10acdeb0 Merge branch 'bugfix/fix_clang_compilation_issue_v5.2' into 'release/v5.2'
fix(nimble): Fix clang compilation issue (v5.2)

See merge request espressif/esp-idf!33764
2024-09-26 22:48:46 +08:00
3a3eecef02 fix(nimble): Fix clang compilation issue 2024-09-26 16:15:33 +05:30
ce5f2d1283 Merge branch 'feat/send_data_len_afer_conn_v5.2' into 'release/v5.2'
feat(nimble): Set data length after connection (v5.2)

See merge request espressif/esp-idf!33695
2024-09-26 18:42:48 +08:00
8f67dfdef0 Merge branch 'fix/fix_nimble_gatt_server_example_readme_v5.2' into 'release/v5.2'
docs(ble): Added BLE Get Started documentation link to README.md (v5.2)

See merge request espressif/esp-idf!33829
2024-09-26 15:47:24 +08:00
efa437d0ec Merge branch 'bugfix/fix_some_bugs_in_avrcp_v5.2' into 'release/v5.2'
fix(bt/bluedroid): Fixed some bugs in AVRCP (Backport v5.2)

See merge request espressif/esp-idf!33578
2024-09-26 15:14:13 +08:00
2aad80cd92 Merge branch 'fix/ecdsa_verify_check_hash_len_v5.2' into 'release/v5.2'
Wrap some mbedtls' ECDSA verification related APIs (v5.2)

See merge request espressif/esp-idf!33784
2024-09-26 15:13:28 +08:00
76f0060cab Merge branch 'bugfix/fixed_multi_conn_example_crash_issue_5.2' into 'release/v5.2'
fix(nimble): Fixed the crash issue of examples/bluetooth/nimble/ble_multi_conn

See merge request espressif/esp-idf!33493
2024-09-26 14:52:31 +08:00
5798ec62c5 feat(nimble): Set data length after connection 2024-09-26 09:57:00 +05:30
4fb04ce3aa Merge branch 'bugfix/add_notify_flag_for_wifi_prov_v5.2' into 'release/v5.2'
fix(wifi_prov): Add notify characteristic flag support (v5.2)

See merge request espressif/esp-idf!33184
2024-09-26 11:44:06 +08:00
b20225d06a Merge branch 'feat/support_esp32c2_eco4_rom_mbedtls_v3.6.0_lts_v5.2' into 'release/v5.2'
feat(mbedtls): support esp32c2 eco4 rom mbedtls v3.6.0 lts v5.2 (backport v5.2)

See merge request espressif/esp-idf!33421
2024-09-26 11:02:28 +08:00
1d4acf2617 fix(bt): Update bt lib for ESP32(3bf7ef0)
- Fixed BLE scanning and initiating coexist


(cherry picked from commit 241b90f3f0)

Co-authored-by: chenjianhua <chenjianhua@espressif.com>
2024-09-26 10:33:31 +08:00
8db992903a feat(ble/bluedroid): Support resolve BLE address for interval usage
(cherry picked from commit b88b511362)

Co-authored-by: zhanghaipeng <zhanghaipeng@espressif.com>
2024-09-26 10:27:35 +08:00
9b100a3527 Merge branch 'bugfix/fixed_c6_crash_c2_crash_issue_v5.2' into 'release/v5.2'
Bugfix/fixed c6 crash c2 crash issue (v5.2)

See merge request espressif/esp-idf!33598
2024-09-26 10:16:58 +08:00
7f297af892 fix(esp_hid): Fixed protocol mode mapping bug
Closes https://github.com/espressif/esp-idf/issues/14232
2024-09-26 09:57:21 +08:00
4459865257 feat(bt/bluedroid): Added definition of minor class of COD for peripheral major class
Closes https://github.com/espressif/esp-idf/issues/13622
2024-09-26 09:57:21 +08:00
10762295c4 fix(bt/bluedroid): Fixed not deep copy service_name and user1_ptr in RAW SDP search event 2024-09-26 09:55:28 +08:00
ec88dc9881 change(bt/bluedroid): Limited SDP service discovery operation 2024-09-26 09:55:28 +08:00
9a0f3619e8 change(bt/bluedroid): Release record data after SDP record created 2024-09-26 09:55:28 +08:00
f57dc4dec8 docs(ble): Added BLE Get Started documentation link to README.md
(cherry picked from commit 5f008828d3)

Co-authored-by: Yuhan Wei <weiyuhan@espressif.com>
2024-09-26 09:38:17 +08:00
d13e0419f0 fix(bt/bluedroid): Fixed some bugs in AVRCP 2024-09-26 09:31:06 +08:00
c467c8ed65 Merge branch 'bugfix/exit_sniff_immed_enter_sniff_v5.2' into 'release/v5.2'
fix(bt/bluedroid): Fix the protocol stack to exit sniff mode(v5.2)

See merge request espressif/esp-idf!33398
2024-09-26 09:30:10 +08:00
1c3176c1c0 Merge branch 'docs/remove_user_guide_for_esp32_pico_kit_related_migration_v5.2' into 'release/v5.2'
docs: remove user guide for esp32-pico-kit related docs after migration (v5.2)

See merge request espressif/esp-idf!32782
2024-09-26 06:27:27 +08:00
3827dd0bee Merge branch 'bugfix/add_dummy_cb_during_deinit_v5.2' into 'release/v5.2'
fix(nimble): De-register host cb in stack deinit (v5.2)

See merge request espressif/esp-idf!33374
2024-09-26 01:30:38 +08:00
zwl
3da56074c9 fix(ble): fixed occasional crash issue in multi-connect scenarios on ESP32-C6 2024-09-26 00:04:27 +08:00
981e6f93a4 fix(ble): fixed memory leak issue when using uart hci
(cherry picked from commit 4d2c44f511)

Co-authored-by: zwl <zhaoweiliang@espressif.com>
2024-09-26 00:04:27 +08:00
0974ae10dd fix(ble): fixed occasional assertion issue when enabling logging on ESP32-C2
(cherry picked from commit 0ef9ecb715)

Co-authored-by: zwl <zhaoweiliang@espressif.com>
2024-09-26 00:04:27 +08:00
8835ba03a6 fix(ble): fixed occasional acl data packet loss issue when using UHCI on ESP32-H2
(cherry picked from commit c929a01931)

Co-authored-by: zwl <zhaoweiliang@espressif.com>
2024-09-26 00:04:27 +08:00
466acf6571 Merge branch 'bugfix/fix_batch_of_i2c_issue_v5.2' into 'release/v5.2'
fix(i2c_master): Fix an I2C issue that slave streth happen but master timeout...etc.4MR (backport v5.2)

See merge request espressif/esp-idf!33480
2024-09-25 23:29:50 +08:00
255d045cd7 Merge branch 'feat/update_tools_in_tools_json_v5.2' into 'release/v5.2'
feat(tools): Update tools: cmake, ninja, ccache (v5.2)

See merge request espressif/esp-idf!33531
2024-09-25 22:15:43 +08:00
1c346ddf35 Merge branch 'contrib/github_pr_14469_v5.2' into 'release/v5.2'
fix(spinlock): comparison of integer expressions of different signedness (GitHub PR) (v5.2)

See merge request espressif/esp-idf!33544
2024-09-25 20:33:01 +08:00
856988110b feat(ble_mesh): ble mesh lib flash size optimized 2024-09-25 18:04:29 +08:00
34e8a4c7bd Merge branch 'docs/optimized_ble_gattc_multi_connect_example_v5.2' into 'release/v5.2'
docs(ble/bluedroid): Optimize BLE example documentation for getting characteristic (v5.2)

See merge request espressif/esp-idf!33195
2024-09-25 17:44:54 +08:00
087adbe844 Merge branch 'bugfix/fix_ble_scan_assert_1728_v5.2' into 'release/v5.2'
fix(bt): Update bt lib for ESP32-C3 and ESP32-S3(e9ae856) (v5.2)

See merge request espressif/esp-idf!33721
2024-09-25 17:44:44 +08:00
ffdd8cc7b9 Merge branch 'fix/fix_length_ble_get_started_example_v5.2' into 'release/v5.2'
fix(ble): Increased the length of addr_str in ble_get_started nimble examples (v5.2)

See merge request espressif/esp-idf!33210
2024-09-25 17:42:12 +08:00
b5af26ca63 Merge branch 'bugfix/fix_blufi_deinit_fail_v5.2' into 'release/v5.2'
fix(nimble): Fixed deinit sequence in blufi (v5.2)

See merge request espressif/esp-idf!33769
2024-09-25 17:40:43 +08:00
60bd1222fa Merge branch 'fix/added_a_change_to_print_address_of_advertising_instance_v5.2' into 'release/v5.2'
fix(nimble): Added a change to print address of an advertising instance (v5.2)

See merge request espressif/esp-idf!33562
2024-09-25 17:39:58 +08:00
4de20a9877 Merge branch 'bugfix/bidirectioanl_data_transfer_ble_spp_v5.2' into 'release/v5.2'
fix(nimble): Added support for bidirectional data trasfer (v5.2)

See merge request espressif/esp-idf!33413
2024-09-25 17:39:26 +08:00
07f668be14 fix(nimble): De-register host cb in stack deinit 2024-09-25 15:08:46 +05:30
afc8010c0a Merge branch 'bugfix/make_cccd_flags_configurable_v5.2' into 'release/v5.2'
fix(nimble): Make CCCD flags configurable (v5.2)

See merge request espressif/esp-idf!33354
2024-09-25 17:37:16 +08:00
02e71cc11c Merge branch 'bugfix/fixed_c5_ble_cache_error_240919_v5.2' into 'release/v5.2'
Bugfix/fixed c5 ble cache error 240919 (v5.2)

See merge request espressif/esp-idf!33760
2024-09-25 17:08:33 +08:00
beda0b5003 Merge branch 'feat/support_blecrt_242_v5.2' into 'release/v5.2'
fix(bt/bluedroid): Fixed access fault when reading BLE controller information fails (v5.2)

See merge request espressif/esp-idf!33633
2024-09-25 17:05:45 +08:00
a5d128b899 Merge branch 'bugfix/fix_ble_max_tx_power_on_esp32c3_v5.2' into 'release/v5.2'
fix(bt/controller): Change the max TX power to +20dBm on ESP32-C3 and ESP32-S3 (v5.2)

See merge request espressif/esp-idf!33616
2024-09-25 17:05:24 +08:00
5dbb1cfc4c Merge branch 'feat/support_ble_scan_and_init_coex_on_esp32_v5.2' into 'release/v5.2'
Support BLE scanning and initiating coexist on ESP32 (v5.2)

See merge request espressif/esp-idf!33386
2024-09-25 17:05:19 +08:00
f2f6a2685f Merge branch 'docs/remove_output_format_v5.2' into 'release/v5.2'
docs(size): remove -DOUTPUT_FORMAT output format option for idf.py size (v5.2)

See merge request espressif/esp-idf!33309
2024-09-25 16:53:22 +08:00
736e287c51 Merge branch 'feature/tools_fix_arm64_arm32_detection_v5.2' into 'release/v5.2'
fix(idf_tools): Fix platform detection - arm64 hardware but it's running in arm32 environment (v5.2)

See merge request espressif/esp-idf!33395
2024-09-25 16:52:58 +08:00
bb8f9993d4 feat(tools): Exclude modified folders by rebuild 2024-09-25 16:52:32 +08:00
87210c5610 feat(tools): Update tools: cmake, ninja, ccache
cmake  v3.24.0 -> v3.30.2
ninja  v1.11.1 -> v1.12.1
ccache v4.8    -> v4.10.2

Closes https://github.com/espressif/esp-idf/pull/14376
2024-09-25 16:52:32 +08:00
505625f6f7 Merge branch 'feature/add_api_to_get_last_status_code_logged_during_ota_v5.2' into 'release/v5.2'
feat(esp_https_ota): added API to get last status code logged from http resonse (v5.2)

See merge request espressif/esp-idf!33610
2024-09-25 15:38:22 +08:00
862ae0b8cd Merge branch 'bugfix/check_bootloader_size_with_sign_v5.2' into 'release/v5.2'
fix(esptool_py): Check the size of the bootloader + signature block (v5.2)

See merge request espressif/esp-idf!33591
2024-09-25 15:35:55 +08:00
2b2869aba4 Merge branch 'fix/add_countermeasure_for_ecdsa_peripheral_issue_v5.2' into 'release/v5.2'
feat(hal): Add countermeasure for ECDSA generate signature (v5.2)

See merge request espressif/esp-idf!33747
2024-09-25 15:35:37 +08:00
bed8016f1f Merge branch 'support_psram_noinit_segment_on_s3_v5.2' into 'release/v5.2'
feat(psram): add psram noinit  segment support on s2/s3/p4/c5 and bss segment on c5 (v5.2)

See merge request espressif/esp-idf!33257
2024-09-25 15:27:56 +08:00
f2482e7aed Merge branch 'feat/parlio_tx_support_psram_buffer_v5.2' into 'release/v5.2'
fix(parlio_tx): Fixed errors in the first transfer (v5.2)

See merge request espressif/esp-idf!33358
2024-09-25 15:25:01 +08:00
587a39ff1a Merge branch 'update/version_5_2_3' into 'release/v5.2'
Update version to 5.2.3

See merge request espressif/esp-idf!33744
2024-09-25 15:12:17 +08:00
0bed1796af feat(esp_rom): support esp32c2 rev2.0(ECO4) rom systimer hal 2024-09-25 12:02:02 +08:00
ab38da2e62 feat(esp_rom): add esp32c2.rom.eco4.ld 2024-09-25 12:01:26 +08:00
05caca8cdd feat(esp_hw_support): Support esp32c2 rev2.0 chip 2024-09-25 11:58:22 +08:00
3bfe43fb68 feat(mbedtls): bringup rom mbedtls feature to formal 2024-09-25 11:52:35 +08:00
52cf97ebd5 feat(mbedtls): Wrap mbedtls_ecdsa_read_signature to use ECDSA hardware when possible 2024-09-24 16:50:38 +05:30
a14ed03c11 fix(mbedtls/port): Check signature hash length before using ECDSA hardware 2024-09-24 16:50:28 +05:30
1b47d34c40 fix(nimble): Fixed deinit sequence in blufi 2024-09-24 12:20:41 +05:30
fd7802bae1 fix(ble): unified ble memory allocation method
(cherry picked from commit 8e4cc79a27)

Co-authored-by: zwl <zhaoweiliang@espressif.com>
2024-09-24 12:03:28 +08:00
5b6d8812d1 feat(hal): Add countermeasure for ECDSA generate signature
The ECDSA peripheral before ECO5 of esp32h2 does not perform the ECDSA
    sign operation in constant time. This allows an attacker to read the
    power signature of the ECDSA sign operation and then calculate the
    ECDSA key stored inside the eFuse. The commit adds a countermeasure
    for this attack. In this case the real ECDSA sign operation is
    masked under dummy ECDSA sign operations to hide its real power
    signature
2024-09-23 19:28:12 +05:30
7e31cdd75e fix(bt): Update bt lib for ESP32-C3 and ESP32-S3(63eb54d)
- Fixed issue where RPA is not updated after BLE RPA timeout
2024-09-23 13:32:57 +08:00
34771563b9 test(bt/bluedroid): Support to disable BLE address resolution 2024-09-23 13:32:57 +08:00
1437bb1206 fix(bt): Update bt lib for ESP32-C3 and ESP32-S3(e9ae856)
- Fixed BLE scan assert in lld_scan.c 1728


(cherry picked from commit 32c7694f56)

Co-authored-by: zhanghaipeng <zhanghaipeng@espressif.com>
2024-09-23 11:13:26 +08:00
eedc6d46c0 fix(freertos): Fixed assert failure in vTaskDeleteWithCaps
This commit fixes an assert failure in vTaskDeleteWithCaps() when
multiple un-pinned tasks are created with stack in the external memory
and such tasks delete themselves.

Closes https://github.com/espressif/esp-idf/issues/14222
2024-09-20 10:28:14 +02:00
4a5fb3e250 test(freertos): Added a test for vTaskDeleteWithCaps when stack is in ext RAM
This commit adds a stress tests for creating multiple tasks with
xTaskCreateWithCaps such that the stack is allocated in external SPIRAM.
Then the tasks self-delete. This is done iteratively as stress test.
2024-09-20 10:28:14 +02:00
bb5180f33f fix(newlib): sbom: add CVE-2024-30949 to cve-exclude-list 2024-09-20 14:55:19 +07:00
2e454af5e2 fix(esp_ringbuf): Fixed a bug where in a no-split buffer received items prematurely
This commit fixes a bug in the no-split buffer which could receive an
item prematurely if the space on the buffer is acquired until the buffer
is full. The commit also adds a unit test for this scenario.

Closes https://github.com/espressif/esp-idf/issues/14568
2024-09-19 15:59:46 +02:00
e9484c617d fix(bt/bluedroid): Fixed access fault when reading BLE controller information fails
(cherry picked from commit e4e23087ee)

Co-authored-by: chenjianhua <chenjianhua@espressif.com>
2024-09-19 09:12:34 +08:00
2c133cb1bc feat(bt/bluedroid): Add BLE connection id param for ESP_GATTS_RESPONSE_EVT
(cherry picked from commit e4a372ab76)

Co-authored-by: chenjianhua <chenjianhua@espressif.com>
2024-09-19 09:12:32 +08:00
3a8c97a1c9 fix(bt/controller): Change the max TX power to +20dBm on ESP32-C3 and ESP32-S3
(cherry picked from commit fe43c8f1b5)

Co-authored-by: chenjianhua <chenjianhua@espressif.com>
2024-09-18 17:34:27 +08:00
c9f92ef182 feat(esp_https_ota): added API to get last status code logged from http resonse
Closes https://github.com/espressif/esp-idf/issues/14302
2024-09-18 14:58:27 +05:30
f617e55e5e fix(esp_hw_support): add clock retention contents 2024-09-18 17:11:24 +08:00
d6f01e03d9 fix(examples): Increases partition table offset for SBV2+FE test 2024-09-18 09:58:29 +03:00
8cf1c45496 fix(esptool_py): Check the size of the bootloader + signature block 2024-09-18 09:58:29 +03:00
ca4eae5ab1 feat(openthread): add thread curl https ci case 2024-09-18 14:31:07 +08:00
51b80c4d16 fix(nimble): Added a change to print address of an advertising instance 2024-09-17 12:18:53 +05:30
bd62dfb21f fix(spinlock): comparison of integer expressions of different signedness 2024-09-14 10:36:23 +03:00
a6cce532f5 fix(wdt): changed register dump on non panic task WDT to be more descriptive
Closes https://github.com/espressif/esp-idf/issues/14400
2024-09-14 10:11:10 +08:00
582667d443 fix(ringbuf): allow xRingbufferCreateWithCaps to pass in non-32-bit aligned size 2024-09-13 17:24:53 +08:00
36ae66a5b7 docs(freertos): update freertos comments to reflect that stack size is in bytes
Closes https://github.com/espressif/esp-idf/issues/11600
2024-09-13 13:33:46 +08:00
6594e71d2d fix(clk): warn the users to avoid using RC32K clock 2024-09-13 11:59:58 +08:00
052d7ef6e9 fix(ble): Increased the length of addr_str in README.md 2024-09-13 09:39:29 +08:00
45bd7bcde9 fix(ble): Increased the length of addr_str in ble_get_started nimble examples 2024-09-13 09:39:29 +08:00
f8ca5da078 fix(ble): fiexed the crash issue of examples/bluetooth/nimble/ble_multi_conn 2024-09-12 20:56:29 +08:00
c341065ce4 fix(system): fixed warnings related to ununsed var in spinlock.h 2024-09-12 08:45:42 +02:00
1c5d32e57d fix(i2c): Fix the wrong return value of esp32,esp32s2,esp32s3 2024-09-12 11:56:51 +08:00
2e1928c31c fix(i2c): Fix the i2c sda/scl force out register value on some esp chips 2024-09-12 11:56:51 +08:00
fdc5fa2931 fix(i2c): Fix possible error state in clear the bus,
Closes https://github.com/espressif/esp-idf/issues/13647
2024-09-12 11:56:51 +08:00
6adee5052f fix(i2c_master): Fix an I2C issue that slave streth happen but master timeout set seems doesn't work
Closes https://github.com/espressif/esp-idf/issues/14129
Closes https://github.com/espressif/esp-idf/issues/14401
2024-09-12 11:56:51 +08:00
b5373984b1 test(sysview): fix gdb no response error in sysview_heap_log tests 2024-09-11 13:40:50 +03:00
49a0e85acd This is a combination of 2 commits.
docs: update startup.rst description for single-core chip support
2024-09-11 10:44:39 +08:00
3340050eae feat(mbedtls): support rom mbedtls threading layer 2024-09-10 10:20:29 +08:00
d4dea72f24 feat(mbedtls): select MBEDTLS_CMAC_C when MBEDTLS_USE_CRYPTO_ROM_IMPL enabled 2024-09-10 10:20:23 +08:00
4c567bd203 feat(mbedtls): support ROM mbedtls v3.6.0 on C2 rev2.0(ECO4) 2024-09-10 10:20:14 +08:00
82950845be feat(esp_rom): include rom.mbedtls.eco4.ld with C2 rev2.0(ECO4) select 2024-09-10 10:13:53 +08:00
2384b3ac33 feat(esp_rom): update esp32c2.rom.mbedtls.eco4.ld 2024-09-10 10:08:03 +08:00
d2e04a987b feat(esp_hw_support): Support esp32c2 rev2.0 chip 2024-09-10 10:07:31 +08:00
baa4021d2e fix(nimble): Added support for bidirectional data trasfer 2024-09-09 18:41:16 +05:30
804e140701 fix(bt/bluedroid): Fix the protocol stack to exit sniff mode
- Already in result mode but request change indication has not been cleared
2024-09-09 16:19:24 +08:00
e3792ff20f feat(bt): Update esp32 bt-lib(bc393dd)
- Fixed BLE vendor HCI set scan perfer address command
- Support BLE vendor HCI get controller compile version command
- Support BLE scanning and initiating coexist
2024-09-09 11:30:40 +08:00
e1feca0d48 refactor(hub): Cleaned up dev_tree_node debug output, moved node freeing 2024-09-06 22:53:50 +02:00
b746f6d6ef feat(esp_system): drop .got* sections and add hint
Closes https://github.com/espressif/esp-idf/issues/14296
2024-09-06 18:48:39 +07:00
76cfb388b3 fix(idf_tools): fix delimiter when the updater parsing, ' *' or ' ' 2024-09-06 17:13:01 +07:00
04b77f56f5 fix(idf_tools): Fix platform detection for arm64 machine but arm32 environment 2024-09-06 17:10:40 +07:00
3d2edb47bb refactor(ext_hub): Prerequisites for the Ext Port Driver 2024-09-06 10:37:01 +02:00
5b346ca9d8 fix(usb_host): The Enumeration Driver, cancellation on error 2024-09-06 10:37:01 +02:00
16c3c050be docs(ext_hub): Added description for External Hub Driver 2024-09-06 10:36:57 +02:00
ec6f52a717 feat(ext_hub): Added External Hub driver 2024-09-06 10:02:38 +02:00
59be21b763 fix(usb_host): Increased address map for clients and changed the uid member type 2024-09-06 10:02:37 +02:00
9f0ef05192 fix(enum): Returned usb_round_up_to_mps for control request of string descriptors 2024-09-06 10:02:37 +02:00
38bb90dd9a feat(hub): Added device tree nodes list and uid calculation logic 2024-09-06 10:02:37 +02:00
c5ee01dd0b fix(enum): Fixed STALL on descriptor request, removed unused value 2024-09-06 10:02:37 +02:00
d41dd420da docs(enum): Added description for Enumeration process (Enum Driver) 2024-09-06 10:02:37 +02:00
410a6a21c5 refactor(enum): Curved out Enumeration process from Hub Driver 2024-09-06 10:02:37 +02:00
284b978cb4 refactor(hub): Updated HUB api for ENUM driver 2024-09-06 10:02:37 +02:00
30681356d8 refactor(usbh): Updated USBH api for ENUM driver 2024-09-06 10:02:37 +02:00
d34a39e9a6 fix(parlio_tx): fix error in first transfer and 1 byte transfer
On p4, the clock was configured in the wrong order causing a dropped
count on the first transmission. And gdma eof event fails to trigger
parlio_tx eof event when transmitting single byte.
2024-09-06 14:10:15 +08:00
8ae2cf751c fix(nimble): Make CCCD flags configurable 2024-09-06 10:52:37 +05:30
75cec307f1 fix(nimble): Add notify characteristic flag support 2024-09-05 16:19:31 +05:30
b1c6f48c10 fix(pm): cancel cache_safe_assertion when using ext0 & ext1 2024-09-04 17:10:31 +08:00
0f18942d27 docs(size): remove -DOUTPUT_FORMAT output format option for idf.py size
Setting OUTPUT_FORMAT through the CMake variable probably never
functioned and seems to be a remnant (possibly a typo in the
documentation) from the time when the -DOUTPUT_JSON=1 CMake variable was
used to specify the JSON output format, prior to the introduction of the
--format option. This removes the note regarding the option to choose
the output format using -DOUTPUT_FORMAT.

Closes https://github.com/espressif/esp-idf/issues/14383

Signed-off-by: Frantisek Hrbata <frantisek.hrbata@espressif.com>
2024-09-04 09:57:52 +02:00
zlq
4d9aa7fd25 fix(ext_32k): fix the external 32K issue on C3&S3 (v5.2) 2024-09-04 14:57:55 +08:00
3efad30654 feat(psram): add psram noinit segment support on S2/S3/P4/C5
Closes https://github.com/espressif/esp-idf/issues/14253
2024-09-03 17:42:09 +08:00
e90bb54f8b test(freertos): Added build test for function in flash with -Os optimation
This commit adds a build test for when FreeRTOS and esp_ringbuf functions
are placed in flash and the compiler optimizes for code size.
2024-08-30 09:16:52 +02:00
3dc035d8d6 fix(freertos): Added freertos fragments to the exception list of ldgen mapping checks
This commit adds freertos and esp_ringbuf linker fragment sections
to the exception list of the ldgen mappings checker script.
2024-08-30 09:16:50 +02:00
243d6752ad fix(ble/bluedroid): Optimize BLE function 'esp_ble_resolve_adv_data_by_type' 2024-08-29 16:17:46 +08:00
fff9b4e779 docs(ble/bluedroid): Optimize BLE example documentation for getting characteristic 2024-08-29 16:17:46 +08:00
5295cfc696 fix(bt/bluedroid): Resolve warning: unused variable 'pp' 2024-08-29 16:17:46 +08:00
cfed0d27dc docs: Remove User Guide for ESP32-Pico-Kit related docs after migration 2024-08-28 14:37:01 +08:00
1286 changed files with 99143 additions and 287593 deletions

View File

@ -1,7 +1,7 @@
.build_template:
stage: build
extends:
- .after_script:build:ccache
- .after_script:build:ccache-show-stats
image: $ESP_ENV_IMAGE
tags:
- build
@ -16,7 +16,7 @@
extends:
- .build_template
- .before_script:build
- .after_script:build:ccache
- .after_script:build:ccache-show-stats
dependencies: # set dependencies to null to avoid missing artifacts issue
needs:
- job: fast_template_app
@ -541,7 +541,7 @@ pytest_build_system_macos:
extends:
- .test_build_system_template
- .before_script:build:macos
- .after_script:build:macos:upload-when-fail
- .after_script:build:macos:upload-failed-job-logs:ccache-show-stats
- .rules:build:macos
tags:
- macos_shell
@ -556,8 +556,9 @@ pytest_build_system_macos:
junit: XUNIT_RESULT.xml
variables:
PYENV_VERSION: "3.8"
CI_CCACHE_DISABLE: "1" # ccache: error: Read-only file system
# CCACHE_DIR: "/cache/idf_ccache". On macOS, you cannot write to this folder due to insufficient permissions.
CCACHE_DIR: "" # ccache will use "$HOME/Library/Caches/ccache".
CCACHE_MAXSIZE: "5G" # To preserve the limited Macbook storage. CCACHE automatically prunes old caches to fit the set limit.
build_docker:
extends:
- .before_script:minimal

View File

@ -6,20 +6,20 @@ stages:
- pre_check
- build
- assign_test
- build_doc
- target_test
- host_test
- build_doc
- test_deploy
- deploy
- post_deploy
variables:
# System environment
# System environment
# Common parameters for the 'make' during CI tests
MAKEFLAGS: "-j5 --no-keep-going"
# GitLab-CI environment
# GitLab-CI environment
# Thanks to pack-objects cache, clone strategy should behave faster than fetch
# so we pick "clone" as default git strategy
# Shiny runners by default remove the CI_PROJECT_DIR every time at the beginning of one job
@ -39,7 +39,7 @@ variables:
GIT_FETCH_EXTRA_FLAGS: "--no-recurse-submodules --prune --prune-tags"
# we're using .cache folder for caches
GIT_CLEAN_FLAGS: -ffdx -e .cache/
LATEST_GIT_TAG: v5.2.3
LATEST_GIT_TAG: v5.2.4
SUBMODULE_FETCH_TOOL: "tools/ci/ci_fetch_submodule.py"
# by default we will fetch all submodules
@ -207,13 +207,14 @@ variables:
- *setup_tools_and_idf_python_venv
- fetch_submodules
.after_script:build:macos:upload-when-fail:
.after_script:build:macos:upload-failed-job-logs:ccache-show-stats:
after_script:
# macos is running shell executor, which means it would use
# the system installed /usr/local/bin/python3 by default.
# Ensure pyenv and PYENV_VERSION installed
- eval "$(pyenv init -)"
- *upload_failed_job_log_artifacts
- *show_ccache_statistics
.before_script:build:
before_script:
@ -224,7 +225,7 @@ variables:
- export EXTRA_CFLAGS=${PEDANTIC_CFLAGS}
- export EXTRA_CXXFLAGS=${PEDANTIC_CXXFLAGS}
.after_script:build:ccache:
.after_script:build:ccache-show-stats:
after_script:
- *show_ccache_statistics
- *upload_failed_job_log_artifacts

View File

@ -37,25 +37,16 @@
.if-dev-push: &if-dev-push
if: '$CI_COMMIT_REF_NAME != "master" && $CI_COMMIT_BRANCH !~ /^release\/v/ && $CI_COMMIT_TAG !~ /^v\d+\.\d+(\.\d+)?($|-)/ && $CI_COMMIT_TAG !~ /^qa-test/ && ($CI_PIPELINE_SOURCE == "push" || $CI_PIPELINE_SOURCE == "merge_request_event")'
.if-schedule: &if-schedule
if: '$CI_PIPELINE_SOURCE == "schedule"'
.doc-rules:build:docs-full:
rules:
- <<: *if-qa-test-tag
when: never
- <<: *if-schedule
- <<: *if-protected
- <<: *if-label-build_docs
- <<: *if-label-docs_full
- <<: *if-dev-push
changes: *patterns-docs-full
.doc-rules:build:docs-full-prod:
rules:
- <<: *if-qa-test-tag
when: never
- <<: *if-protected-no_label
.doc-rules:build:docs-partial:
rules:
- <<: *if-qa-test-tag
@ -92,6 +83,10 @@ check_docs_lang_sync:
stage: build_doc
tags:
- build_docs
needs:
- job: fast_template_app
artifacts: false
optional: true
script:
- if [ -n "${BREATHE_ALT_INSTALL_URL}" ]; then pip uninstall -y breathe && pip install -U ${BREATHE_ALT_INSTALL_URL}; fi
- cd docs
@ -116,24 +111,6 @@ build_docs_html_full:
extends:
- .build_docs_template
- .doc-rules:build:docs-full
needs:
- job: fast_template_app
artifacts: false
optional: true
artifacts:
when: always
paths:
- docs/_build/*/*/*.txt
- docs/_build/*/*/html/*
expire_in: 4 days
variables:
DOC_BUILDERS: "html"
build_docs_html_full_prod:
extends:
- .build_docs_template
- .doc-rules:build:docs-full-prod
dependencies: [] # Stop build_docs jobs from downloading all previous job's artifacts
artifacts:
when: always
paths:
@ -147,10 +124,6 @@ build_docs_html_partial:
extends:
- .build_docs_template
- .doc-rules:build:docs-partial
needs:
- job: fast_template_app
artifacts: false
optional: true
artifacts:
when: always
paths:
@ -170,28 +143,12 @@ build_docs_pdf:
extends:
- .build_docs_template
- .doc-rules:build:docs-full
needs:
- job: fast_template_app
artifacts: false
optional: true
artifacts:
when: always
paths:
- docs/_build/*/*/latex/*
expire_in: 4 days
variables:
DOC_BUILDERS: "latex"
build_docs_pdf_prod:
extends:
- .build_docs_template
- .doc-rules:build:docs-full-prod
dependencies: [] # Stop build_docs jobs from downloading all previous job's artifacts
artifacts:
when: always
paths:
- docs/_build/*/*/latex/*
expire_in: 4 days
allow_failure: true # TODO IDFCI-2216
variables:
DOC_BUILDERS: "latex"
@ -239,12 +196,13 @@ deploy_docs_production:
# The DOCS_PROD_* variables used by this job are "Protected" so these branches must all be marked "Protected" in Gitlab settings
extends:
- .deploy_docs_template
- .doc-rules:build:docs-full-prod
rules:
- <<: *if-protected-no_label
stage: post_deploy
dependencies: # set dependencies to null to avoid missing artifacts issue
needs: # ensure runs after push_to_github succeeded
- build_docs_html_full_prod
- build_docs_pdf_prod
- build_docs_html_full
- build_docs_pdf
- job: push_to_github
artifacts: false
variables:
@ -259,7 +217,8 @@ deploy_docs_production:
check_doc_links:
extends:
- .build_docs_template
- .doc-rules:build:docs-full-prod
rules:
- <<: *if-protected-no_label
stage: post_deploy
needs:
- job: deploy_docs_production

View File

@ -435,15 +435,6 @@
- <<: *if-dev-push
changes: *patterns-python-files
.rules:patterns:static-code-analysis-preview:
rules:
- <<: *if-dev-push
changes: *patterns-c-files
- <<: *if-dev-push
changes: *patterns-python-files
- <<: *if-dev-push
changes: *patterns-sonarqube-files
# !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
# DO NOT place comments or maintain any code from this line
#

View File

@ -36,82 +36,3 @@ check_pylint:
fi
- if [ -z "$files" ]; then echo "No python files found"; exit 0; fi
- run_cmd pylint --exit-zero --load-plugins=pylint_gitlab --output-format=gitlab-codeclimate:pylint.json $files
# build stage
# Sonarqube related jobs put here for this reason:
# Here we have two jobs. code_quality_check and code_quality_report.
#
# code_quality_check will analyze the code changes between your MR and
# code repo stored in sonarqube server. The analysis result is only shown in
# the comments under this MR and won't be transferred to the server.
#
# code_quality_report will analyze and transfer both of the newly added code
# and the analysis result to the server.
#
# Put in the front to ensure that the newly merged code can be stored in
# sonarqube server ASAP, in order to avoid reporting unrelated code issues
.sonar_scan_template:
stage: build
extends: .pre_check_template
image:
name: $SONARQUBE_SCANNER_IMAGE
before_script:
- source tools/ci/utils.sh
- export PYTHONPATH="$CI_PROJECT_DIR/tools:$CI_PROJECT_DIR/tools/ci/python_packages:$PYTHONPATH"
- fetch_submodules
# Exclude the submodules, all paths ends with /**
- submodules=$(get_all_submodules)
# get all exclude paths specified in tools/ci/sonar_exclude_list.txt | ignore lines start with # | xargs | replace all <space> to <comma>
- custom_excludes=$(cat $CI_PROJECT_DIR/tools/ci/sonar_exclude_list.txt | grep -v '^#' | xargs | sed -e 's/ /,/g')
# Exclude the report dir as well
- export EXCLUSIONS="$custom_excludes,$submodules"
- export SONAR_SCANNER_OPTS="-Xmx2048m"
variables:
GIT_DEPTH: 0
REPORT_PATTERN: clang_tidy_reports/*.txt
artifacts:
when: always
paths:
- $REPORT_PATTERN
expire_in: 1 week
dependencies: # Here is not a hard dependency relationship, could be skipped when only python files changed. so we do not use "needs" here.
- clang_tidy_check
code_quality_check:
extends:
- .sonar_scan_template
- .rules:patterns:static-code-analysis-preview
allow_failure: true # since now it's using exit code to indicate the code analysis result,
# we don't want to block ci when critical issues founded
script:
- export CI_MERGE_REQUEST_COMMITS=$(python ${CI_PROJECT_DIR}/tools/ci/ci_get_mr_info.py commits --src-branch ${CI_COMMIT_REF_NAME} | tr '\n' ',')
# test if this branch have merge request, if not, exit 0
- test -n "$CI_MERGE_REQUEST_IID" || exit 0
- test -n "$CI_MERGE_REQUEST_COMMITS" || exit 0
- sonar-scanner
-Dsonar.analysis.mode=preview
-Dsonar.branch.name=$CI_MERGE_REQUEST_SOURCE_BRANCH_NAME
-Dsonar.cxx.clangtidy.reportPath=$REPORT_PATTERN
-Dsonar.exclusions=$EXCLUSIONS
-Dsonar.gitlab.ci_merge_request_iid=$CI_MERGE_REQUEST_IID
-Dsonar.gitlab.commit_sha=$CI_MERGE_REQUEST_COMMITS
-Dsonar.gitlab.merge_request_discussion=true
-Dsonar.gitlab.ref_name=$CI_MERGE_REQUEST_SOURCE_BRANCH_NAME
-Dsonar.host.url=$SONAR_HOST_URL
-Dsonar.login=$SONAR_LOGIN
code_quality_report:
extends:
- .sonar_scan_template
- .rules:protected
allow_failure: true # since now it's using exit code to indicate the code analysis result,
# we don't want to block ci when critical issues founded
script:
- sonar-scanner
-Dsonar.branch.name=$CI_COMMIT_REF_NAME
-Dsonar.cxx.clangtidy.reportPath=$REPORT_PATTERN
-Dsonar.exclusions=$EXCLUSIONS
-Dsonar.gitlab.commit_sha=$PIPELINE_COMMIT_SHA
-Dsonar.gitlab.ref_name=$CI_COMMIT_REF_NAME
-Dsonar.host.url=$SONAR_HOST_URL
-Dsonar.login=$SONAR_LOGIN

View File

@ -70,7 +70,7 @@ repos:
entry: tools/ci/check_kconfigs.py
language: python
additional_dependencies:
- esp-idf-kconfig>=1.4.2,<2.0.0
- esp-idf-kconfig>=1.5.0,<2.0.0
files: '^Kconfig$|Kconfig.*$'
- id: check-deprecated-kconfigs-options
name: Check if any Kconfig Options Deprecated

View File

@ -134,6 +134,10 @@ if(CONFIG_COMPILER_OPTIMIZATION_ASSERTIONS_DISABLE)
list(APPEND compile_definitions "-DNDEBUG")
endif()
if(CONFIG_COMPILER_NO_MERGE_CONSTANTS)
list(APPEND compile_options "-fno-merge-constants")
endif()
if(CONFIG_COMPILER_STACK_CHECK_MODE_NORM)
list(APPEND compile_options "-fstack-protector")
elseif(CONFIG_COMPILER_STACK_CHECK_MODE_STRONG)
@ -146,6 +150,10 @@ if(CONFIG_COMPILER_DUMP_RTL_FILES)
list(APPEND compile_options "-fdump-rtl-expand")
endif()
idf_build_set_property(GDBINIT_FILES_PREFIX_MAP "${BUILD_DIR}/gdbinit/prefix_map")
file(MAKE_DIRECTORY "${BUILD_DIR}/gdbinit")
file(WRITE "${BUILD_DIR}/gdbinit/prefix_map" "")
if(NOT ${CMAKE_C_COMPILER_VERSION} VERSION_LESS 8.0.0)
if(CONFIG_COMPILER_HIDE_PATHS_MACROS)
list(APPEND compile_options "-fmacro-prefix-map=${CMAKE_SOURCE_DIR}=.")

14
Kconfig
View File

@ -496,6 +496,15 @@ mainmenu "Espressif IoT Development Framework Configuration"
help
Stack smashing protection.
config COMPILER_NO_MERGE_CONSTANTS
bool "Disable merging const sections"
depends on IDF_TOOLCHAIN_GCC
help
Disable merging identical constants (string/floating-point) across compilation units.
This helps in better size analysis of the application binary as the rodata section
distribution is more uniform across libraries. On downside, it may increase
the binary size and hence should be used during development phase only.
config COMPILER_WARN_WRITE_STRINGS
bool "Enable -Wwrite-strings warning flag"
default "n"
@ -583,7 +592,7 @@ mainmenu "Espressif IoT Development Framework Configuration"
config COMPILER_ORPHAN_SECTIONS_WARNING
bool "Place with warning"
help
Places orphan sections without a warning message.
Places orphan sections with a warning message.
config COMPILER_ORPHAN_SECTIONS_PLACE
bool "Place silently"
@ -611,4 +620,5 @@ mainmenu "Espressif IoT Development Framework Configuration"
- CONFIG_ESPTOOLPY_FLASHFREQ_120M && CONFIG_ESPTOOLPY_FLASH_SAMPLE_MODE_DTR
- CONFIG_SPIRAM_SPEED_120M && CONFIG_SPIRAM_MODE_OCT
- CONFIG_BOOTLOADER_CACHE_32BIT_ADDR_QUAD_FLASH
- CONFIG_MBEDTLS_USE_CRYPTO_ROM_IMPL
- CONFIG_USB_HOST_EXT_PORT_SUPPORT_LS
- CONFIG_USB_HOST_EXT_PORT_RESET_ATTEMPTS

View File

@ -21,7 +21,7 @@ const static char *TAG = "sysview_heap_trace";
#endif
static SEGGER_SYSVIEW_MODULE s_esp_sysview_heap_module = {
.sModule = "ESP32 SystemView Heap Tracing Module",
.sModule = "M=ESP32 SystemView Heap Tracing Module",
.NumEvents = 2,
};

View File

@ -1,7 +0,0 @@
# Documentation: .gitlab/ci/README.md#manifest-file-to-control-the-buildtest-apps
components/app_update/test_apps:
disable:
- if: IDF_TARGET in ["esp32c6", "esp32h2", "esp32p4"]
temporary: true
reason: target esp32c6, esp32h2, esp32p4 is not supported yet # TODO: IDF-8068

View File

@ -1,32 +0,0 @@
# SPDX-FileCopyrightText: 2022-2023 Espressif Systems (Shanghai) CO LTD
# SPDX-License-Identifier: Unlicense OR CC0-1.0
import re
import pytest
from pytest_embedded import Dut
DEFAULT_TIMEOUT = 20
TEST_SUBMENU_PATTERN_PYTEST = re.compile(rb'\s+\((\d+)\)\s+"([^"]+)"\r?\n')
def run_multiple_stages(dut: Dut, test_case_num: int, stages: int) -> None:
for stage in range(1, stages + 1):
dut.write(str(test_case_num))
dut.expect(TEST_SUBMENU_PATTERN_PYTEST, timeout=DEFAULT_TIMEOUT)
dut.write(str(stage))
if stage != stages:
dut.expect_exact('Press ENTER to see the list of tests.')
@pytest.mark.supported_targets
@pytest.mark.temp_skip_ci(targets=['esp32c6', 'esp32h2'], reason='c6/h2 support TBD')
@pytest.mark.generic
def test_app_update(dut: Dut) -> None:
extra_data = dut.parse_test_menu()
for test_case in extra_data:
if test_case.type != 'multi_stage':
dut.write(str(test_case.index))
else:
run_multiple_stages(dut, test_case.index, len(test_case.subcases))
dut.expect_unity_test_output(timeout=90)
dut.expect_exact("Enter next test, or 'enter' to see menu")

View File

@ -0,0 +1,12 @@
# Documentation: .gitlab/ci/README.md#manifest-file-to-control-the-buildtest-apps
components/app_update/test_apps:
enable:
- if: CONFIG_NAME == "defaults" and IDF_TARGET != "linux"
- if: CONFIG_NAME == "xip_psram" and IDF_TARGET in ["esp32s2", "esp32s3"]
# S2 doesn't have ROM for flash
- if: CONFIG_NAME == "xip_psram_with_rom_impl" and IDF_TARGET in ["esp32s3"]
disable:
- if: IDF_TARGET in ["esp32c6", "esp32h2", "esp32p4"]
temporary: true
reason: target esp32c6, esp32h2 are not supported yet # TODO: IDF-8068

View File

@ -1,4 +1,4 @@
idf_component_register(SRC_DIRS "."
PRIV_INCLUDE_DIRS "."
PRIV_REQUIRES cmock test_utils app_update bootloader_support nvs_flash driver spi_flash
PRIV_REQUIRES cmock test_utils app_update bootloader_support nvs_flash driver spi_flash esp_psram
WHOLE_ARCHIVE)

View File

@ -6,6 +6,7 @@
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include "esp_log.h"
#include <freertos/FreeRTOS.h>
#include <freertos/task.h>
#include <freertos/semphr.h>
@ -113,3 +114,11 @@ TEST_CASE("esp_ota_get_partition_description", "[ota]")
};
TEST_ESP_ERR(ESP_ERR_NOT_FOUND, bootloader_common_get_partition_description(&not_app_pos, &app_desc1));
}
TEST_CASE("esp_ota_get_running_partition points to correct address", "[spi_flash]")
{
const esp_partition_t *factory = esp_partition_find_first(ESP_PARTITION_TYPE_APP, ESP_PARTITION_SUBTYPE_ANY, "factory");
const esp_partition_t* part = esp_ota_get_running_partition();
ESP_LOGI("running bin", "0x%p", (void*)part->address);
TEST_ASSERT_EQUAL_HEX32(factory->address, part->address);
}

View File

@ -842,7 +842,7 @@ static void test_flow6(void)
TEST_CASE_MULTIPLE_STAGES("Switching between factory, OTA0 using esp_ota_write_with_offset", "[app_update][timeout=90][reset=DEEPSLEEP_RESET, DEEPSLEEP_RESET]", start_test, test_flow6, test_flow6);
//IDF-5145
TEST_CASE("Test bootloader_common_get_sha256_of_partition returns ESP_ERR_IMAGE_INVALID when image is ivalid", "[partitions]")
TEST_CASE("Test bootloader_common_get_sha256_of_partition returns ESP_ERR_IMAGE_INVALID when image is invalid", "[partitions]")
{
const esp_partition_t *cur_app = esp_ota_get_running_partition();
ESP_LOGI(TAG, "copy current app to next part");

View File

@ -0,0 +1,51 @@
# SPDX-FileCopyrightText: 2022-2023 Espressif Systems (Shanghai) CO LTD
# SPDX-License-Identifier: Unlicense OR CC0-1.0
import re
import pytest
from pytest_embedded import Dut
DEFAULT_TIMEOUT = 20
TEST_SUBMENU_PATTERN_PYTEST = re.compile(rb'\s+\((\d+)\)\s+"([^"]+)"\r?\n')
@pytest.mark.supported_targets
@pytest.mark.temp_skip_ci(targets=['esp32c6', 'esp32h2'], reason='c6/h2 support TBD')
@pytest.mark.generic
@pytest.mark.parametrize(
'config',
[
'defaults',
],
indirect=True,
)
def test_app_update(dut: Dut) -> None:
dut.run_all_single_board_cases(timeout=90)
@pytest.mark.supported_targets
@pytest.mark.temp_skip_ci(targets=['esp32c6', 'esp32h2'], reason='c6/h2 support TBD')
@pytest.mark.generic
@pytest.mark.parametrize(
'config',
[
'xip_psram',
],
indirect=True,
)
def test_app_update_xip_psram(dut: Dut) -> None:
dut.run_all_single_board_cases(timeout=90)
@pytest.mark.supported_targets
@pytest.mark.temp_skip_ci(targets=['esp32c6', 'esp32h2'], reason='c6/h2 support TBD')
@pytest.mark.generic
@pytest.mark.parametrize(
'config',
[
'xip_psram_with_rom_impl',
],
indirect=True,
)
def test_app_update_xip_psram_rom_impl(dut: Dut) -> None:
dut.run_all_single_board_cases(timeout=90)

View File

@ -0,0 +1,2 @@
# don't delete.
# used for CI to compile a default config when 'sdkconfig.ci.xxxx' is exist

View File

@ -1,3 +1,3 @@
CONFIG_IDF_TARGET="esp32s3"
CONFIG_SPIRAM=y
CONFIG_SPIRAM_FETCH_INSTRUCTIONS=y
CONFIG_SPIRAM_RODATA=y

View File

@ -0,0 +1,4 @@
CONFIG_SPIRAM=y
CONFIG_SPIRAM_FETCH_INSTRUCTIONS=y
CONFIG_SPIRAM_RODATA=y
CONFIG_SPI_FLASH_ROM_IMPL=y

View File

@ -0,0 +1,2 @@
CONFIG_IDF_TARGET="esp32s3"
CONFIG_BOOTLOADER_NUM_PIN_APP_TEST=18

View File

@ -1115,6 +1115,44 @@ menu "Security features"
If not set, the app does not care if the flash encryption eFuse bit is set or not.
config SECURE_FLASH_PSEUDO_ROUND_FUNC
bool "Permanently enable XTS-AES's pseudo rounds function"
default y
depends on SECURE_FLASH_ENCRYPTION_MODE_RELEASE && SOC_FLASH_ENCRYPTION_XTS_AES_SUPPORT_PSEUDO_ROUND
help
If set (default), the bootloader will permanently enable the XTS-AES peripheral's pseudo rounds function.
Note: Enabling this config would burn an efuse.
choice SECURE_FLASH_PSEUDO_ROUND_FUNC_STRENGTH
prompt "Strength of the pseudo rounds function"
depends on SECURE_FLASH_PSEUDO_ROUND_FUNC
default SECURE_FLASH_PSEUDO_ROUND_FUNC_STRENGTH_LOW
help
The strength of the pseudo rounds functions can be configured to low, medium and high,
each denoting the values that would be stored in the efuses field.
By default the value to set to low.
You can configure the strength of the pseudo rounds functions according to your use cases,
for example, increasing the strength would provide higher security but would slow down the
flash encryption/decryption operations.
For more info regarding the performance impact, please checkout the pseudo round function section of the
security guide documentation.
config SECURE_FLASH_PSEUDO_ROUND_FUNC_STRENGTH_LOW
bool "Low"
config SECURE_FLASH_PSEUDO_ROUND_FUNC_STRENGTH_MEDIUM
bool "Medium"
config SECURE_FLASH_PSEUDO_ROUND_FUNC_STRENGTH_HIGH
bool "High"
endchoice
config SECURE_FLASH_PSEUDO_ROUND_FUNC_STRENGTH
int
default 1 if SECURE_FLASH_PSEUDO_ROUND_FUNC_STRENGTH_LOW
default 2 if SECURE_FLASH_PSEUDO_ROUND_FUNC_STRENGTH_MEDIUM
default 3 if SECURE_FLASH_PSEUDO_ROUND_FUNC_STRENGTH_HIGH
config SECURE_ROM_DL_MODE_ENABLED
bool
default y if SOC_SUPPORTS_SECURE_DL_MODE && !SECURE_FLASH_ENCRYPTION_MODE_DEVELOPMENT

View File

@ -1,5 +1,5 @@
/*
* SPDX-FileCopyrightText: 2015-2023 Espressif Systems (Shanghai) CO LTD
* SPDX-FileCopyrightText: 2015-2024 Espressif Systems (Shanghai) CO LTD
*
* SPDX-License-Identifier: Apache-2.0
*/
@ -685,7 +685,7 @@ void bootloader_spi_flash_reset(void)
******************************************************************************/
#define XMC_SUPPORT CONFIG_BOOTLOADER_FLASH_XMC_SUPPORT
#define XMC_VENDOR_ID 0x20
#define XMC_VENDOR_ID_1 0x20
#if BOOTLOADER_BUILD
#define BOOTLOADER_FLASH_LOG(level, ...) ESP_EARLY_LOG##level(TAG, ##__VA_ARGS__)
@ -702,7 +702,7 @@ static IRAM_ATTR bool is_xmc_chip_strict(uint32_t rdid)
uint32_t mfid = BYTESHIFT(rdid, 1);
uint32_t cpid = BYTESHIFT(rdid, 0);
if (vendor_id != XMC_VENDOR_ID) {
if (vendor_id != XMC_VENDOR_ID_1) {
return false;
}
@ -735,7 +735,7 @@ esp_err_t IRAM_ATTR bootloader_flash_xmc_startup(void)
// Check the Manufacturer ID in SFDP registers (JEDEC standard). If not XMC chip, no need to run the flow
const int sfdp_mfid_addr = 0x10;
uint8_t mf_id = (bootloader_flash_read_sfdp(sfdp_mfid_addr, 1) & 0xff);
if (mf_id != XMC_VENDOR_ID) {
if (mf_id != XMC_VENDOR_ID_1) {
BOOTLOADER_FLASH_LOG(D, "non-XMC chip detected by SFDP Read (%02X), skip.", mf_id);
return ESP_OK;
}
@ -767,7 +767,7 @@ esp_err_t IRAM_ATTR bootloader_flash_xmc_startup(void)
static IRAM_ATTR bool is_xmc_chip(uint32_t rdid)
{
uint32_t vendor_id = (rdid >> 16) & 0xFF;
return (vendor_id == XMC_VENDOR_ID);
return (vendor_id == XMC_VENDOR_ID_1);
}
esp_err_t IRAM_ATTR bootloader_flash_xmc_startup(void)

View File

@ -1,5 +1,5 @@
/*
* SPDX-FileCopyrightText: 2010-2023 Espressif Systems (Shanghai) CO LTD
* SPDX-FileCopyrightText: 2010-2025 Espressif Systems (Shanghai) CO LTD
*
* SPDX-License-Identifier: Apache-2.0
*/
@ -27,7 +27,12 @@ extern "C" {
*/
__attribute__((always_inline))
inline static bool esp_dram_match_iram(void) {
return (SOC_DRAM_LOW == SOC_IRAM_LOW && SOC_DRAM_HIGH == SOC_IRAM_HIGH);
bool dram_match_iram = (SOC_DRAM_LOW == SOC_IRAM_LOW) &&
(SOC_DRAM_HIGH == SOC_IRAM_HIGH);
#if SOC_RTC_FAST_MEM_SUPPORTED
dram_match_iram &= (SOC_RTC_IRAM_LOW == SOC_RTC_DRAM_LOW);
#endif
return dram_match_iram;
}
/**
@ -81,6 +86,7 @@ __attribute__((always_inline))
inline static bool esp_ptr_in_diram_iram(const void *p) {
// TODO: IDF-5980 esp32c6 D/I RAM share the same address
#if SOC_DIRAM_IRAM_LOW == SOC_DIRAM_DRAM_LOW
(void)p;
return false;
#else
return ((intptr_t)p >= SOC_DIRAM_IRAM_LOW && (intptr_t)p < SOC_DIRAM_IRAM_HIGH);
@ -96,9 +102,10 @@ inline static bool esp_ptr_in_diram_iram(const void *p) {
*/
__attribute__((always_inline))
inline static bool esp_ptr_in_rtc_iram_fast(const void *p) {
#if SOC_RTC_FAST_MEM_SUPPORTED
#if SOC_RTC_FAST_MEM_SUPPORTED && (SOC_RTC_IRAM_LOW != SOC_RTC_DRAM_LOW)
return ((intptr_t)p >= SOC_RTC_IRAM_LOW && (intptr_t)p < SOC_RTC_IRAM_HIGH);
#else
(void)p;
return false;
#endif
}
@ -115,6 +122,7 @@ inline static bool esp_ptr_in_rtc_dram_fast(const void *p) {
#if SOC_RTC_FAST_MEM_SUPPORTED
return ((intptr_t)p >= SOC_RTC_DRAM_LOW && (intptr_t)p < SOC_RTC_DRAM_HIGH);
#else
(void)p;
return false;
#endif
}
@ -150,6 +158,21 @@ inline static void * esp_ptr_diram_dram_to_iram(const void *p) {
#endif
}
/* Convert a RTC DRAM pointer to equivalent word address in RTC IRAM
- Address must be word aligned
- Address must pass esp_ptr_in_rtc_dram_fast() test, or result will be invalid pointer
*/
__attribute__((always_inline))
inline static void * esp_ptr_rtc_dram_to_iram(const void *p) {
intptr_t ptr = (intptr_t)p;
#if SOC_RTC_FAST_MEM_SUPPORTED && (SOC_RTC_IRAM_LOW != SOC_RTC_DRAM_LOW)
return (void *) ( SOC_RTC_IRAM_LOW + (ptr - SOC_RTC_DRAM_LOW) );
#else
return (void *) ptr;
#endif
}
/* Convert a D/IRAM IRAM pointer to equivalent word address in DRAM
- Address must be word aligned

View File

@ -89,6 +89,8 @@ static inline void bootloader_hardware_init(void)
{
/* Enable analog i2c master clock */
SET_PERI_REG_MASK(MODEM_LPCON_CLK_CONF_REG, MODEM_LPCON_CLK_I2C_MST_EN);
REGI2C_WRITE_MASK(I2C_BIAS, I2C_BIAS_DREG_0P8, 8); // fix low temp issue, need to increase this internal voltage
}
static inline void bootloader_ana_reset_config(void)

View File

@ -1,15 +1,18 @@
/*
* SPDX-FileCopyrightText: 2022-2023 Espressif Systems (Shanghai) CO LTD
* SPDX-FileCopyrightText: 2022-2025 Espressif Systems (Shanghai) CO LTD
*
* SPDX-License-Identifier: Apache-2.0
*/
#include <stdint.h>
#include <strings.h>
#include "esp_flash_encrypt.h"
#include "esp_secure_boot.h"
#include "esp_efuse.h"
#include "esp_efuse_table.h"
#include "esp_log.h"
#include "hal/spi_flash_encrypted_ll.h"
#include "soc/soc_caps.h"
#include "sdkconfig.h"
static __attribute__((unused)) const char *TAG = "flash_encrypt";
@ -33,6 +36,14 @@ esp_err_t esp_flash_encryption_enable_secure_features(void)
esp_efuse_write_field_bit(ESP_EFUSE_DIS_DIRECT_BOOT);
#if defined(CONFIG_SECURE_FLASH_ENCRYPTION_MODE_RELEASE) && defined(SOC_FLASH_ENCRYPTION_XTS_AES_SUPPORT_PSEUDO_ROUND)
if (spi_flash_encrypt_ll_is_pseudo_rounds_function_supported()) {
ESP_LOGI(TAG, "Enable XTS-AES pseudo rounds function...");
uint8_t xts_pseudo_level = CONFIG_SECURE_FLASH_PSEUDO_ROUND_FUNC_STRENGTH;
esp_efuse_write_field_blob(ESP_EFUSE_XTS_DPA_PSEUDO_LEVEL, &xts_pseudo_level, ESP_EFUSE_XTS_DPA_PSEUDO_LEVEL[0]->bit_count);
}
#endif
#if defined(CONFIG_SECURE_BOOT_V2_ENABLED) && !defined(CONFIG_SECURE_BOOT_V2_ALLOW_EFUSE_RD_DIS)
// This bit is set when enabling Secure Boot V2, but we can't enable it until this later point in the first boot
// otherwise the Flash Encryption key cannot be read protected

View File

@ -1,5 +1,5 @@
/*
* SPDX-FileCopyrightText: 2015-2023 Espressif Systems (Shanghai) CO LTD
* SPDX-FileCopyrightText: 2015-2025 Espressif Systems (Shanghai) CO LTD
*
* SPDX-License-Identifier: Apache-2.0
*/
@ -12,6 +12,9 @@
#include "esp_flash_encrypt.h"
#include "esp_secure_boot.h"
#include "hal/efuse_hal.h"
#include "hal/spi_flash_encrypted_ll.h"
#include "hal/spi_flash_encrypt_hal.h"
#include "soc/soc_caps.h"
#if CONFIG_IDF_TARGET_ESP32
#define CRYPT_CNT ESP_EFUSE_FLASH_CRYPT_CNT
@ -211,6 +214,13 @@ void esp_flash_encryption_set_release_mode(void)
#endif // CONFIG_SOC_FLASH_ENCRYPTION_XTS_AES_128_DERIVED
#endif // !CONFIG_IDF_TARGET_ESP32
#ifdef SOC_FLASH_ENCRYPTION_XTS_AES_SUPPORT_PSEUDO_ROUND
if (spi_flash_encrypt_ll_is_pseudo_rounds_function_supported()) {
uint8_t xts_pseudo_level = ESP_XTS_AES_PSEUDO_ROUNDS_LOW;
esp_efuse_write_field_blob(ESP_EFUSE_XTS_DPA_PSEUDO_LEVEL, &xts_pseudo_level, ESP_EFUSE_XTS_DPA_PSEUDO_LEVEL[0]->bit_count);
}
#endif
#ifdef CONFIG_IDF_TARGET_ESP32
esp_efuse_write_field_bit(ESP_EFUSE_WR_DIS_DIS_CACHE);
#else
@ -457,6 +467,17 @@ bool esp_flash_encryption_cfg_verify_release_mode(void)
}
result &= secure;
#if SOC_FLASH_ENCRYPTION_XTS_AES_SUPPORT_PSEUDO_ROUND
if (spi_flash_encrypt_ll_is_pseudo_rounds_function_supported()) {
uint8_t xts_pseudo_level = 0;
esp_efuse_read_field_blob(ESP_EFUSE_XTS_DPA_PSEUDO_LEVEL, &xts_pseudo_level, ESP_EFUSE_XTS_DPA_PSEUDO_LEVEL[0]->bit_count);
if (!xts_pseudo_level) {
result &= false;
ESP_LOGW(TAG, "Not enabled XTS-AES pseudo rounds function (set XTS_DPA_PSEUDO_LEVEL->1 or more)");
}
}
#endif
return result;
}
#endif // not CONFIG_IDF_TARGET_ESP32

View File

@ -46,12 +46,20 @@ set(ble_mesh_include_dirs
"esp_ble_mesh/api/core/include"
"esp_ble_mesh/api/models/include"
"esp_ble_mesh/api"
)
set(ble_mesh_v11_include_dirs
"esp_ble_mesh/lib/include"
"esp_ble_mesh/v1.1/api/core/include"
"esp_ble_mesh/v1.1/api/models/include"
"esp_ble_mesh/v1.1/btc/include"
)
if(CONFIG_IDF_DOC_BUILD)
list(APPEND ble_mesh_include_dirs
${ble_mesh_v11_include_dirs})
endif()
set(bluedroid_include_dirs host/bluedroid/api/include/api)
if(CONFIG_BT_CONTROLLER_ENABLED OR CONFIG_IDF_DOC_BUILD)
@ -89,6 +97,9 @@ if(CONFIG_BT_ENABLED)
elseif(CONFIG_IDF_TARGET_ESP32C2)
list(APPEND srcs "controller/esp32c2/bt.c")
if(CONFIG_BT_CTRL_RUN_IN_FLASH_ONLY)
list(APPEND srcs "controller/esp32c2/dummy.c")
endif()
set(ldscripts "linker_esp32c2.lf")
elseif(CONFIG_IDF_TARGET_ESP32C6)
@ -533,34 +544,41 @@ if(CONFIG_BT_ENABLED)
"esp_ble_mesh/models/server/server_common.c"
"esp_ble_mesh/models/server/state_binding.c"
"esp_ble_mesh/models/server/state_transition.c"
"esp_ble_mesh/models/server/time_scene_server.c"
"esp_ble_mesh/v1.1/api/core/esp_ble_mesh_agg_model_api.c"
"esp_ble_mesh/v1.1/api/core/esp_ble_mesh_brc_model_api.c"
"esp_ble_mesh/v1.1/api/core/esp_ble_mesh_cm_data_api.c"
"esp_ble_mesh/v1.1/api/core/esp_ble_mesh_df_model_api.c"
"esp_ble_mesh/v1.1/api/core/esp_ble_mesh_lcd_model_api.c"
"esp_ble_mesh/v1.1/api/core/esp_ble_mesh_odp_model_api.c"
"esp_ble_mesh/v1.1/api/core/esp_ble_mesh_prb_model_api.c"
"esp_ble_mesh/v1.1/api/core/esp_ble_mesh_rpr_model_api.c"
"esp_ble_mesh/v1.1/api/core/esp_ble_mesh_sar_model_api.c"
"esp_ble_mesh/v1.1/api/core/esp_ble_mesh_srpl_model_api.c"
"esp_ble_mesh/v1.1/api/models/esp_ble_mesh_mbt_model_api.c"
"esp_ble_mesh/v1.1/btc/btc_ble_mesh_agg_model.c"
"esp_ble_mesh/v1.1/btc/btc_ble_mesh_brc_model.c"
"esp_ble_mesh/v1.1/btc/btc_ble_mesh_df_model.c"
"esp_ble_mesh/v1.1/btc/btc_ble_mesh_lcd_model.c"
"esp_ble_mesh/v1.1/btc/btc_ble_mesh_mbt_model.c"
"esp_ble_mesh/v1.1/btc/btc_ble_mesh_odp_model.c"
"esp_ble_mesh/v1.1/btc/btc_ble_mesh_prb_model.c"
"esp_ble_mesh/v1.1/btc/btc_ble_mesh_rpr_model.c"
"esp_ble_mesh/v1.1/btc/btc_ble_mesh_sar_model.c"
"esp_ble_mesh/v1.1/btc/btc_ble_mesh_srpl_model.c"
"esp_ble_mesh/lib/ext.c")
"esp_ble_mesh/models/server/time_scene_server.c")
if(CONFIG_BLE_MESH_V11_SUPPORT)
list(APPEND include_dirs ${ble_mesh_v11_include_dirs})
if(CONFIG_BLE_MESH_SAR_ENHANCEMENT)
list(APPEND srcs "esp_ble_mesh/core/transport.enh.c")
list(APPEND srcs
"esp_ble_mesh/v1.1/api/core/esp_ble_mesh_agg_model_api.c"
"esp_ble_mesh/v1.1/api/core/esp_ble_mesh_brc_model_api.c"
"esp_ble_mesh/v1.1/api/core/esp_ble_mesh_cm_data_api.c"
"esp_ble_mesh/v1.1/api/core/esp_ble_mesh_df_model_api.c"
"esp_ble_mesh/v1.1/api/core/esp_ble_mesh_lcd_model_api.c"
"esp_ble_mesh/v1.1/api/core/esp_ble_mesh_odp_model_api.c"
"esp_ble_mesh/v1.1/api/core/esp_ble_mesh_prb_model_api.c"
"esp_ble_mesh/v1.1/api/core/esp_ble_mesh_rpr_model_api.c"
"esp_ble_mesh/v1.1/api/core/esp_ble_mesh_sar_model_api.c"
"esp_ble_mesh/v1.1/api/core/esp_ble_mesh_srpl_model_api.c"
"esp_ble_mesh/v1.1/api/models/esp_ble_mesh_mbt_model_api.c"
"esp_ble_mesh/v1.1/btc/btc_ble_mesh_agg_model.c"
"esp_ble_mesh/v1.1/btc/btc_ble_mesh_brc_model.c"
"esp_ble_mesh/v1.1/btc/btc_ble_mesh_df_model.c"
"esp_ble_mesh/v1.1/btc/btc_ble_mesh_lcd_model.c"
"esp_ble_mesh/v1.1/btc/btc_ble_mesh_mbt_model.c"
"esp_ble_mesh/v1.1/btc/btc_ble_mesh_odp_model.c"
"esp_ble_mesh/v1.1/btc/btc_ble_mesh_prb_model.c"
"esp_ble_mesh/v1.1/btc/btc_ble_mesh_rpr_model.c"
"esp_ble_mesh/v1.1/btc/btc_ble_mesh_sar_model.c"
"esp_ble_mesh/v1.1/btc/btc_ble_mesh_srpl_model.c"
"esp_ble_mesh/lib/ext.c")
if(CONFIG_BLE_MESH_SAR_ENHANCEMENT)
list(APPEND srcs "esp_ble_mesh/core/transport.enh.c")
else()
list(APPEND srcs "esp_ble_mesh/core/transport.c")
endif()
else()
list(APPEND srcs "esp_ble_mesh/core/transport.c")
list(APPEND srcs
"esp_ble_mesh/core/transport.c")
endif()
endif()
@ -726,6 +744,7 @@ if(CONFIG_BT_ENABLED)
"host/nimble/nimble/nimble/host/store/config/src/ble_store_nvs.c"
"host/nimble/nimble/nimble/host/src/ble_gattc_cache.c"
"host/nimble/nimble/nimble/host/src/ble_gattc_cache_conn.c"
"host/nimble/nimble/nimble/host/src/ble_eatt.c"
)
if(CONFIG_BT_CONTROLLER_DISABLED AND CONFIG_BT_NIMBLE_TRANSPORT_UART)
@ -857,13 +876,29 @@ if(CONFIG_BT_ENABLED)
elseif(CONFIG_IDF_TARGET_ESP32C3)
target_link_directories(${COMPONENT_LIB} INTERFACE
"${CMAKE_CURRENT_LIST_DIR}/controller/lib_esp32c3_family/esp32c3")
target_link_libraries(${COMPONENT_LIB} PUBLIC btdm_app)
if(CONFIG_BT_CTRL_RUN_IN_FLASH_ONLY)
target_link_libraries(${COMPONENT_LIB} PUBLIC btdm_app_flash)
else()
target_link_libraries(${COMPONENT_LIB} PUBLIC btdm_app)
endif()
elseif(CONFIG_IDF_TARGET_ESP32S3)
target_link_directories(${COMPONENT_LIB} INTERFACE
"${CMAKE_CURRENT_LIST_DIR}/controller/lib_esp32c3_family/esp32s3")
target_link_libraries(${COMPONENT_LIB} PUBLIC btdm_app)
if(CONFIG_BT_CTRL_RUN_IN_FLASH_ONLY)
target_link_libraries(${COMPONENT_LIB} PUBLIC btdm_app_flash)
else()
target_link_libraries(${COMPONENT_LIB} PUBLIC btdm_app)
endif()
elseif(CONFIG_BT_CONTROLLER_ENABLED)
add_prebuilt_library(libble_app "controller/lib_${target}/${target}-bt-lib/libble_app.a")
if(CONFIG_IDF_TARGET_ESP32C6)
add_prebuilt_library(libble_app "controller/lib_${target}/${target}-bt-lib/esp32c6/libble_app.a")
else()
if(CONFIG_BT_CTRL_RUN_IN_FLASH_ONLY AND CONFIG_IDF_TARGET_ESP32C2)
add_prebuilt_library(libble_app "controller/lib_${target}/${target}-bt-lib/libble_app_flash.a")
else()
add_prebuilt_library(libble_app "controller/lib_${target}/${target}-bt-lib/libble_app.a")
endif()
endif()
target_link_libraries(${COMPONENT_LIB} PRIVATE libble_app)
endif()
@ -877,7 +912,7 @@ if(CONFIG_BT_ENABLED)
target_compile_options(${COMPONENT_LIB} PRIVATE "-Wno-format")
endif()
if(CONFIG_BLE_MESH)
if(CONFIG_BLE_MESH_V11_SUPPORT)
if(CONFIG_IDF_TARGET_ESP32)
add_prebuilt_library(ble_mesh "esp_ble_mesh/lib/lib/esp32/libble_mesh.a")
target_link_libraries(${COMPONENT_LIB} PRIVATE ble_mesh)

View File

@ -69,6 +69,12 @@
#include "btc_ble_mesh_prov.h"
#include "btc_ble_mesh_health_model.h"
#include "btc_ble_mesh_config_model.h"
#include "btc_ble_mesh_generic_model.h"
#include "btc_ble_mesh_lighting_model.h"
#include "btc_ble_mesh_sensor_model.h"
#include "btc_ble_mesh_time_scene_model.h"
#if CONFIG_BLE_MESH_V11_SUPPORT
#include "btc_ble_mesh_mbt_model.h"
#include "btc_ble_mesh_agg_model.h"
#include "btc_ble_mesh_brc_model.h"
#include "btc_ble_mesh_df_model.h"
@ -78,11 +84,7 @@
#include "btc_ble_mesh_rpr_model.h"
#include "btc_ble_mesh_sar_model.h"
#include "btc_ble_mesh_srpl_model.h"
#include "btc_ble_mesh_generic_model.h"
#include "btc_ble_mesh_lighting_model.h"
#include "btc_ble_mesh_sensor_model.h"
#include "btc_ble_mesh_time_scene_model.h"
#include "btc_ble_mesh_mbt_model.h"
#endif /* CONFIG_BLE_MESH_V11_SUPPORT */
#endif /* #if CONFIG_BLE_MESH */
#define BTC_TASK_PINNED_TO_CORE (TASK_PINNED_TO_CORE)
@ -295,8 +297,8 @@ static bt_status_t btc_task_post(btc_msg_t *msg, uint32_t timeout)
/**
* transfer an message to another module in the different task.
* @param msg message
* @param arg paramter
* @param arg_len length of paramter
* @param arg parameter
* @param arg_len length of parameter
* @param copy_func deep copy function
* @param free_func deep free function
* @return BT_STATUS_SUCCESS: success
@ -342,7 +344,7 @@ bt_status_t btc_transfer_context(btc_msg_t *msg, void *arg, int arg_len, btc_arg
}
/**
* transfer an message to another module in tha same task.
* transfer an message to another module in the same task.
* @param msg message
* @return BT_STATUS_SUCCESS: success
* others: fail
@ -380,7 +382,7 @@ static void btc_deinit_mem(void) {
btc_profile_cb_tab = NULL;
}
#if (BLE_INCLUDED == TRUE)
#if (BLE_42_FEATURE_SUPPORT == TRUE)
if (gl_bta_adv_data_ptr) {
osi_free(gl_bta_adv_data_ptr);
gl_bta_adv_data_ptr = NULL;
@ -390,7 +392,7 @@ static void btc_deinit_mem(void) {
osi_free(gl_bta_scan_rsp_data_ptr);
gl_bta_scan_rsp_data_ptr = NULL;
}
#endif ///BLE_INCLUDED == TRUE
#endif // BLE_42_FEATURE_SUPPORT
#if GATTS_INCLUDED == TRUE && GATT_DYNAMIC_MEMORY == TRUE
if (btc_creat_tab_env_ptr) {
@ -442,7 +444,8 @@ static bt_status_t btc_init_mem(void) {
}
memset((void *)btc_profile_cb_tab, 0, sizeof(void *) * BTC_PID_NUM);
#if (BLE_INCLUDED == TRUE)
#if BTC_DYNAMIC_MEMORY == TRUE
#if (BLE_42_FEATURE_SUPPORT == TRUE)
if ((gl_bta_adv_data_ptr = (tBTA_BLE_ADV_DATA *)osi_malloc(sizeof(tBTA_BLE_ADV_DATA))) == NULL) {
goto error_exit;
}
@ -452,7 +455,8 @@ static bt_status_t btc_init_mem(void) {
goto error_exit;
}
memset((void *)gl_bta_scan_rsp_data_ptr, 0, sizeof(tBTA_BLE_ADV_DATA));
#endif ///BLE_INCLUDED == TRUE
#endif // (BLE_42_FEATURE_SUPPORT == TRUE)
#endif // BTC_DYNAMIC_MEMORY == TRUE
#if GATTS_INCLUDED == TRUE && GATT_DYNAMIC_MEMORY == TRUE
if ((btc_creat_tab_env_ptr = (esp_btc_creat_tab_t *)osi_malloc(sizeof(esp_btc_creat_tab_t))) == NULL) {

View File

@ -1,5 +1,5 @@
/*
* SPDX-FileCopyrightText: 2015-2022 Espressif Systems (Shanghai) CO LTD
* SPDX-FileCopyrightText: 2015-2024 Espressif Systems (Shanghai) CO LTD
*
* SPDX-License-Identifier: Apache-2.0
*/
@ -160,20 +160,31 @@ static void blufi_profile_cb(tBTA_GATTS_EVT event, tBTA_GATTS *p_data)
if (p_data->req_data.p_data->write_req.is_prep) {
tBTA_GATT_STATUS status = GATT_SUCCESS;
if (blufi_env.prepare_buf == NULL) {
blufi_env.prepare_buf = osi_malloc(BLUFI_PREPAIR_BUF_MAX_SIZE);
blufi_env.prepare_len = 0;
do {
if (p_data->req_data.p_data->write_req.offset > BLUFI_PREPARE_BUF_MAX_SIZE) {
status = ESP_GATT_INVALID_OFFSET;
break;
}
if ((p_data->req_data.p_data->write_req.offset + p_data->req_data.p_data->write_req.len) > BLUFI_PREPARE_BUF_MAX_SIZE) {
status = ESP_GATT_INVALID_ATTR_LEN;
break;
}
if (blufi_env.prepare_buf == NULL) {
BLUFI_TRACE_ERROR("Blufi prep no mem\n");
status = GATT_NO_RESOURCES;
if (p_data->req_data.p_data->write_req.offset != 0) {
status = GATT_INVALID_OFFSET;
break;
}
blufi_env.prepare_buf = osi_malloc(BLUFI_PREPARE_BUF_MAX_SIZE);
blufi_env.prepare_len = 0;
if (blufi_env.prepare_buf == NULL) {
BLUFI_TRACE_ERROR("Blufi prep no mem\n");
status = GATT_NO_RESOURCES;
break;
}
}
} else {
if (p_data->req_data.p_data->write_req.offset > BLUFI_PREPAIR_BUF_MAX_SIZE) {
status = GATT_INVALID_OFFSET;
} else if ((p_data->req_data.p_data->write_req.offset + p_data->req_data.p_data->write_req.len) > BLUFI_PREPAIR_BUF_MAX_SIZE) {
status = GATT_INVALID_ATTR_LEN;
}
}
} while (0);
memset(&rsp, 0, sizeof(tGATTS_RSP));
rsp.attr_value.handle = p_data->req_data.p_data->write_req.handle;

View File

@ -1,5 +1,5 @@
/*
* SPDX-FileCopyrightText: 2015-2021 Espressif Systems (Shanghai) CO LTD
* SPDX-FileCopyrightText: 2015-2024 Espressif Systems (Shanghai) CO LTD
*
* SPDX-License-Identifier: Apache-2.0
*/
@ -95,7 +95,29 @@ void btc_blufi_report_error(esp_blufi_error_state_t state)
void btc_blufi_recv_handler(uint8_t *data, int len)
{
if (len < sizeof(struct blufi_hdr)) {
BTC_TRACE_ERROR("%s invalid data length: %d", __func__, len);
btc_blufi_report_error(ESP_BLUFI_DATA_FORMAT_ERROR);
return;
}
struct blufi_hdr *hdr = (struct blufi_hdr *)data;
// Verify if the received data length matches the expected length based on the BLUFI protocol
int target_data_len;
if (BLUFI_FC_IS_CHECK(hdr->fc)) {
target_data_len = hdr->data_len + 4 + 2; // Data + (Type + Frame Control + Sequence Number + Data Length) + Checksum
} else {
target_data_len = hdr->data_len + 4; // Data + (Type + Frame Control + Sequence Number + Data Length)
}
if (len != target_data_len) {
BTC_TRACE_ERROR("%s: Invalid data length: %d, expected: %d", __func__, len, target_data_len);
btc_blufi_report_error(ESP_BLUFI_DATA_FORMAT_ERROR);
return;
}
uint16_t checksum, checksum_pkt;
int ret;

View File

@ -36,7 +36,9 @@ typedef struct {
UINT32 trans_id;
UINT8 congest;
UINT16 frag_size;
// Deprecated: This macro will be removed in the future
#define BLUFI_PREPAIR_BUF_MAX_SIZE 1024
#define BLUFI_PREPARE_BUF_MAX_SIZE 1024
uint8_t *prepare_buf;
int prepare_len;
/* Control reference */

View File

@ -44,6 +44,7 @@ void esp_blufi_gatt_svr_register_cb(struct ble_gatt_register_ctxt *ctxt, void *a
/* Initialise gatt server */
int esp_blufi_gatt_svr_init(void);
int esp_blufi_gatt_svr_deinit(void);
void esp_blufi_btc_init(void);
void esp_blufi_btc_deinit(void);
#endif

View File

@ -240,6 +240,32 @@ static void init_gatt_values(void)
}
static void deinit_gatt_values(void)
{
int i = 0;
const struct ble_gatt_svc_def *svc;
const struct ble_gatt_chr_def *chr;
const struct ble_gatt_dsc_def *dsc;
for (svc = gatt_svr_svcs; svc && svc->uuid; svc++) {
for (chr = svc->characteristics; chr && chr->uuid; chr++) {
if (i < SERVER_MAX_VALUES && gatt_values[i].buf != NULL) {
os_mbuf_free(gatt_values[i].buf); /* Free the buffer */
gatt_values[i].buf = NULL; /* Nullify the pointer to avoid dangling references */
}
++i;
for (dsc = chr->descriptors; dsc && dsc->uuid; dsc++) {
if (i < SERVER_MAX_VALUES && gatt_values[i].buf != NULL) {
os_mbuf_free(gatt_values[i].buf); /* Free the buffer */
gatt_values[i].buf = NULL; /* Nullify the pointer to avoid dangling references */
}
++i;
}
}
}
}
int esp_blufi_gatt_svr_init(void)
{
int rc;
@ -260,6 +286,18 @@ int esp_blufi_gatt_svr_init(void)
return 0;
}
int esp_blufi_gatt_svr_deinit(void)
{
deinit_gatt_values();
ble_gatts_free_svcs();
/* Deinitialize BLE GATT and GAP services */
ble_svc_gatt_deinit();
ble_svc_gap_deinit();
return 0;
}
static int
esp_blufi_gap_event(struct ble_gap_event *event, void *arg)
{
@ -442,8 +480,10 @@ uint8_t esp_blufi_init(void)
void esp_blufi_deinit(void)
{
blufi_env.enabled = false;
btc_msg_t msg;
esp_blufi_cb_param_t param;
btc_msg_t msg;
memset (&msg, 0x0, sizeof (msg));
msg.sig = BTC_SIG_API_CB;
msg.pid = BTC_PID_BLUFI;
msg.act = ESP_BLUFI_EVENT_DEINIT_FINISH;
param.deinit_finish.state = ESP_BLUFI_DEINIT_OK;

View File

@ -305,19 +305,27 @@ void bt_hci_log_data_show(bt_hci_log_t *p_hci_log_ctl)
osi_mutex_unlock(&mutex_lock);
}
static bool enable_hci_log_flag = true;
void bt_hci_log_record_hci_enable(bool enable)
{
enable_hci_log_flag = enable;
}
esp_err_t IRAM_ATTR bt_hci_log_record_hci_data(uint8_t data_type, uint8_t *data, uint8_t data_len)
{
if (!enable_hci_log_flag) return ESP_OK;
return bt_hci_log_record_data(&g_bt_hci_log_data_ctl, NULL, data_type, data, data_len);
}
esp_err_t IRAM_ATTR bt_hci_log_record_custom_data(char *string, uint8_t *data, uint8_t data_len)
{
if (!enable_hci_log_flag) return ESP_OK;
return bt_hci_log_record_data(&g_bt_hci_log_data_ctl, string, HCI_LOG_DATA_TYPE_SELF_DEFINE, data, data_len);
}
esp_err_t IRAM_ATTR bt_hci_log_record_hci_adv(uint8_t data_type, uint8_t *data, uint8_t data_len)
{
if (!enable_hci_log_flag) return ESP_OK;
return bt_hci_log_record_data(&g_bt_hci_log_adv_ctl, NULL, data_type, data, data_len);
}

View File

@ -241,5 +241,8 @@ void *osi_calloc_func(size_t size)
void osi_free_func(void *ptr)
{
#if HEAP_MEMORY_DEBUG
osi_mem_dbg_clean(ptr, __func__, __LINE__);
#endif
free(ptr);
}

View File

@ -29,6 +29,15 @@ void *osi_malloc_func(size_t size);
void *osi_calloc_func(size_t size);
void osi_free_func(void *ptr);
// Memory alloc function without print and assertion
#if HEAP_ALLOCATION_FROM_SPIRAM_FIRST
#define osi_malloc_base(size) heap_caps_malloc_prefer(size, 2, MALLOC_CAP_DEFAULT|MALLOC_CAP_SPIRAM, MALLOC_CAP_DEFAULT|MALLOC_CAP_INTERNAL)
#define osi_calloc_base(size) heap_caps_calloc_prefer(1, size, 2, MALLOC_CAP_DEFAULT|MALLOC_CAP_SPIRAM, MALLOC_CAP_DEFAULT|MALLOC_CAP_INTERNAL)
#else
#define osi_malloc_base(size) malloc((size))
#define osi_calloc_base(size) calloc(1, (size))
#endif /* #if HEAP_ALLOCATION_FROM_SPIRAM_FIRST */
#if HEAP_MEMORY_DEBUG
void osi_mem_dbg_init(void);
@ -41,13 +50,10 @@ void osi_men_dbg_set_section_start(uint8_t index);
void osi_men_dbg_set_section_end(uint8_t index);
uint32_t osi_mem_dbg_get_max_size_section(uint8_t index);
#if HEAP_ALLOCATION_FROM_SPIRAM_FIRST
#define osi_malloc(size) \
({ \
void *p; \
p = heap_caps_malloc_prefer(size, 2, \
MALLOC_CAP_DEFAULT|MALLOC_CAP_SPIRAM, \
MALLOC_CAP_DEFAULT|MALLOC_CAP_INTERNAL); \
p = osi_malloc_base(size); \
osi_mem_dbg_record(p, size, __func__, __LINE__); \
(void *)p; \
})
@ -55,34 +61,11 @@ uint32_t osi_mem_dbg_get_max_size_section(uint8_t index);
#define osi_calloc(size) \
({ \
void *p; \
p = heap_caps_calloc_prefer(1, size, 2, \
MALLOC_CAP_DEFAULT|MALLOC_CAP_SPIRAM, \
MALLOC_CAP_DEFAULT|MALLOC_CAP_INTERNAL); \
p = osi_calloc_base(size); \
osi_mem_dbg_record(p, size, __func__, __LINE__); \
(void *)p; \
})
#else
#define osi_malloc(size) \
({ \
void *p; \
p = malloc((size)); \
osi_mem_dbg_record(p, size, __func__, __LINE__); \
(void *)p; \
})
#define osi_calloc(size) \
({ \
void *p; \
p = calloc(1, (size)); \
osi_mem_dbg_record(p, size, __func__, __LINE__); \
(void *)p; \
})
#endif /* #if HEAP_ALLOCATION_FROM_SPIRAM_FIRST */
#if 0
#define osi_malloc(size) \
do { \
@ -122,15 +105,6 @@ do { \
#else
// Memory alloc function without print and assertion
#if HEAP_ALLOCATION_FROM_SPIRAM_FIRST
#define osi_malloc_base(size) heap_caps_malloc_prefer(size, 2, MALLOC_CAP_DEFAULT|MALLOC_CAP_SPIRAM, MALLOC_CAP_DEFAULT|MALLOC_CAP_INTERNAL)
#define osi_calloc_base(size) heap_caps_calloc_prefer(1, size, 2, MALLOC_CAP_DEFAULT|MALLOC_CAP_SPIRAM, MALLOC_CAP_DEFAULT|MALLOC_CAP_INTERNAL)
#else
#define osi_malloc_base(size) malloc((size))
#define osi_calloc_base(size) calloc(1, (size))
#endif /* #if HEAP_ALLOCATION_FROM_SPIRAM_FIRST */
// Memory alloc function with print and assertion when fails
#define osi_malloc(size) osi_malloc_func((size))
#define osi_calloc(size) osi_calloc_func((size))

View File

@ -262,10 +262,10 @@ menu "MODEM SLEEP Options"
the bluetooth low power clock source.
config BTDM_CTRL_LPCLK_SEL_EXT_32K_XTAL
bool "External 32kHz crystal"
depends on RTC_CLK_SRC_EXT_CRYS
bool "External 32kHz crystal/oscillator"
depends on RTC_CLK_SRC_EXT_CRYS || RTC_CLK_SRC_EXT_OSC
help
External 32kHz crystal has a nominal frequency of 32.768kHz and provides good frequency
External 32kHz crystal/oscillator has a nominal frequency of 32.768kHz and provides good frequency
stability. If used as Bluetooth low power clock, External 32kHz can support Bluetooth
modem sleep to be used with both DFS and light sleep.
endchoice
@ -406,6 +406,15 @@ config BTDM_CTRL_SCAN_BACKOFF_UPPERLIMITMAX
minimize collision of scan request PDUs from nultiple scanners. If scan backoff is disabled, in active
scanning, scan request PDU will be sent every time when HW receives scannable ADV PDU.
config BTDM_CTRL_CHECK_CONNECT_IND_ACCESS_ADDRESS
bool "Enable enhanced Access Address check in CONNECT_IND"
default n
help
Enabling this option will add stricter verification of the Access Address in the CONNECT_IND PDU.
This improves security by ensuring that only connection requests with valid Access Addresses are accepted.
If disabled, only basic checks are applied, improving compatibility.
config BTDM_BLE_ADV_REPORT_FLOW_CTRL_SUPP
bool "BLE adv report flow control supported"
depends on (BTDM_CTRL_MODE_BTDM || BTDM_CTRL_MODE_BLE_ONLY)
@ -440,6 +449,46 @@ config BTDM_BLE_ADV_REPORT_DISCARD_THRSHOLD
If you set `BTDM_BLE_ADV_REPORT_DISCARD_THRSHOLD` to a small value or printf every adv lost event, it
may cause adv packets lost more.
menu "BLE disconnect when instant passed"
config BTDM_BLE_LLCP_CONN_UPDATE
bool "BLE ACL connection update procedure"
depends on (BTDM_CTRL_MODE_BLE_ONLY || BTDM_CTRL_MODE_BTDM)
default n
help
If this option is enabled, Controller will terminate the connection
when instant passed during connection update procedure.
config BTDM_BLE_LLCP_CHAN_MAP_UPDATE
bool "BLE ACL channel map update procedure"
depends on (BTDM_CTRL_MODE_BLE_ONLY || BTDM_CTRL_MODE_BTDM)
default n
help
If this option is enabled, Controller will terminate the connection
when instant passed in channel map update procedure.
endmenu
config BTDM_BLE_CHAN_ASS_EN
bool "Enable channel assessment"
depends on (BTDM_CTRL_MODE_BLE_ONLY || BTDM_CTRL_MODE_BTDM)
default y
help
If this option is enabled, The Controller will records the communication quality
for each channel and then start a timer to check and update the channel map every 4 seconds.
config BTDM_BLE_PING_EN
bool "Enable LE Ping procedure"
depends on (BTDM_CTRL_MODE_BTDM || BTDM_CTRL_MODE_BLE_ONLY)
default y
help
If this option is disabled, The Controller will not start the LE authenticated payload timer.
This option is used for some compatibility problems related to LE ping procedure.
config BTDM_BLE_VS_QA_SUPPORT
bool "BLE vendor HCI QA support"
depends on (BTDM_CTRL_MODE_BTDM || BTDM_CTRL_MODE_BLE_ONLY)
default n
help
This enables BLE vendor HCI command and event for QA.
config BTDM_RESERVE_DRAM
hex

View File

@ -244,6 +244,7 @@ extern uint32_t _bt_controller_data_end;
extern void config_bt_funcs_reset(void);
extern void config_ble_funcs_reset(void);
extern void config_btdm_funcs_reset(void);
extern void config_ble_vs_qa_funcs_reset(void);
/* Local Function Declare
*********************************************************************
@ -1341,7 +1342,8 @@ static esp_err_t esp_bt_controller_rom_mem_release(esp_bt_mode_t mode)
//already released
if (!(mode & btdm_dram_available_region[0].mode)) {
return ESP_ERR_INVALID_STATE;
ESP_LOGW(BTDM_LOG_TAG, "%s already released, mode %d",__func__, mode);
return ESP_OK;
}
for (int i = 0; i < sizeof(btdm_dram_available_region)/sizeof(btdm_dram_available_region_t); i++) {
@ -1548,6 +1550,7 @@ esp_err_t esp_bt_controller_init(esp_bt_controller_config_t *cfg)
btdm_controller_mem_init();
periph_module_enable(PERIPH_BT_MODULE);
periph_module_reset(PERIPH_BT_MODULE);
#ifdef CONFIG_PM_ENABLE
s_btdm_allow_light_sleep = false;
@ -1634,7 +1637,10 @@ esp_err_t esp_bt_controller_init(esp_bt_controller_config_t *cfg)
btdm_cfg_mask = btdm_config_mask_load();
if (btdm_controller_init(btdm_cfg_mask, cfg) != 0) {
err = btdm_controller_init(btdm_cfg_mask, cfg);
if (err != 0) {
ESP_LOGE(BTDM_LOG_TAG, "%s %d\n",__func__,err);
err = ESP_ERR_NO_MEM;
goto error;
}
@ -1738,6 +1744,10 @@ static void patch_apply(void)
#ifndef CONFIG_BTDM_CTRL_MODE_BR_EDR_ONLY
config_ble_funcs_reset();
#endif
#ifdef CONFIG_BTDM_BLE_VS_QA_SUPPORT
config_ble_vs_qa_funcs_reset();
#endif
}
esp_err_t esp_bt_controller_enable(esp_bt_mode_t mode)
@ -1924,7 +1934,7 @@ esp_err_t esp_bredr_sco_datapath_set(esp_sco_data_path_t data_path)
return ESP_OK;
}
esp_err_t esp_ble_scan_dupilcate_list_flush(void)
esp_err_t esp_ble_scan_duplicate_list_flush(void)
{
if (btdm_controller_status != ESP_BT_CONTROLLER_STATUS_ENABLED) {
return ESP_ERR_INVALID_STATE;
@ -1933,6 +1943,11 @@ esp_err_t esp_ble_scan_dupilcate_list_flush(void)
return ESP_OK;
}
esp_err_t esp_ble_scan_dupilcate_list_flush(void)
{
return esp_ble_scan_duplicate_list_flush();
}
/**
* This function re-write controller's function,
* As coredump can not show parameters in function which is in a .a file.

View File

@ -109,86 +109,100 @@ menuconfig BT_LE_50_FEATURE_SUPPORT
help
Enable BLE 5 feature
config BT_LE_LL_CFG_FEAT_LE_2M_PHY
bool "Enable 2M Phy"
depends on BT_LE_50_FEATURE_SUPPORT
default y
help
Enable 2M-PHY
config BT_LE_LL_CFG_FEAT_LE_CODED_PHY
bool "Enable coded Phy"
depends on BT_LE_50_FEATURE_SUPPORT
default y
help
Enable coded-PHY
config BT_LE_EXT_ADV
bool "Enable extended advertising"
depends on BT_LE_50_FEATURE_SUPPORT
default y
help
Enable this option to do extended advertising. Extended advertising
will be supported from BLE 5.0 onwards.
if BT_LE_EXT_ADV
config BT_LE_MAX_EXT_ADV_INSTANCES
int "Maximum number of extended advertising instances."
range 0 4
default 1
depends on BT_LE_EXT_ADV
help
Change this option to set maximum number of extended advertising
instances. Minimum there is always one instance of
advertising. Enter how many more advertising instances you
want.
Each extended advertising instance will take about 0.5k DRAM.
config BT_LE_EXT_ADV_MAX_SIZE
int "Maximum length of the advertising data."
range 0 1650
default 1650
depends on BT_LE_EXT_ADV
help
Defines the length of the extended adv data. The value should not
exceed 1650.
config BT_LE_ENABLE_PERIODIC_ADV
bool "Enable periodic advertisement."
default y
depends on BT_LE_EXT_ADV
help
Enable this option to start periodic advertisement.
config BT_LE_PERIODIC_ADV_SYNC_TRANSFER
bool "Enable Transfer Sync Events"
depends on BT_LE_ENABLE_PERIODIC_ADV
if BT_LE_50_FEATURE_SUPPORT
config BT_LE_LL_CFG_FEAT_LE_2M_PHY
bool "Enable 2M Phy"
depends on BT_LE_50_FEATURE_SUPPORT
default y
help
This enables controller transfer periodic sync events to host
Enable 2M-PHY
config BT_LE_LL_CFG_FEAT_LE_CODED_PHY
bool "Enable coded Phy"
depends on BT_LE_50_FEATURE_SUPPORT
default y
help
Enable coded-PHY
config BT_LE_EXT_ADV
bool "Enable extended advertising"
depends on BT_LE_50_FEATURE_SUPPORT
default y
help
Enable this option to do extended advertising. Extended advertising
will be supported from BLE 5.0 onwards.
if BT_LE_EXT_ADV
config BT_LE_MAX_EXT_ADV_INSTANCES
int "Maximum number of extended advertising instances."
range 0 4
default 1
depends on BT_LE_EXT_ADV
help
Change this option to set maximum number of extended advertising
instances. Minimum there is always one instance of
advertising. Enter how many more advertising instances you
want.
Each extended advertising instance will take about 0.5k DRAM.
config BT_LE_EXT_ADV_MAX_SIZE
int "Maximum length of the advertising data."
range 0 1650
default 1650
depends on BT_LE_EXT_ADV
help
Defines the length of the extended adv data. The value should not
exceed 1650.
config BT_LE_ENABLE_PERIODIC_ADV
bool "Enable periodic advertisement."
default y
depends on BT_LE_EXT_ADV
help
Enable this option to start periodic advertisement.
config BT_LE_PERIODIC_ADV_SYNC_TRANSFER
bool "Enable Transfer Sync Events"
depends on BT_LE_ENABLE_PERIODIC_ADV
default y
help
This enables controller transfer periodic sync events to host
endif
config BT_LE_EXT_SCAN
bool "Enable extended scanning"
depends on BT_LE_50_FEATURE_SUPPORT && BT_LE_ROLE_OBSERVER_ENABLE
default y
help
Enable this option to do extended scanning.
config BT_LE_ENABLE_PERIODIC_SYNC
bool "Enable periodic sync"
default y
depends on BT_LE_EXT_SCAN
help
Enable this option to receive periodic advertisement.
if BT_LE_ENABLE_PERIODIC_SYNC
config BT_LE_MAX_PERIODIC_SYNCS
int "Maximum number of periodic advertising syncs"
range 0 3
default 1 if BT_LE_ENABLE_PERIODIC_ADV
default 0
help
Set this option to set the upper limit for number of periodic sync
connections. This should be less than maximum connections allowed by
controller.
config BT_LE_MAX_PERIODIC_ADVERTISER_LIST
int "Maximum number of periodic advertiser list"
range 1 5
default 5
help
Set this option to set the upper limit for number of periodic advertiser list.
endif
endif
config BT_LE_MAX_PERIODIC_SYNCS
int "Maximum number of periodic advertising syncs"
depends on BT_LE_50_FEATURE_SUPPORT && !BT_NIMBLE_ENABLED
range 0 3
default 1 if BT_LE_ENABLE_PERIODIC_ADV
default 0
help
Set this option to set the upper limit for number of periodic sync
connections. This should be less than maximum connections allowed by
controller.
config BT_LE_MAX_PERIODIC_ADVERTISER_LIST
int "Maximum number of periodic advertiser list"
depends on BT_LE_50_FEATURE_SUPPORT && !BT_NIMBLE_ENABLED
range 1 5
default 5
help
Set this option to set the upper limit for number of periodic advertiser list.
menu "Memory Settings"
depends on !BT_NIMBLE_ENABLED
@ -523,6 +537,10 @@ config BT_LE_TX_CCA_ENABLED
help
Enable CCA feature to cancel sending the packet if the signal power is stronger than CCA threshold.
config BT_LE_DTM_ENABLED
bool "Enable Direct Test Mode (DTM) feature"
default n
config BT_LE_CCA_RSSI_THRESH
int "CCA RSSI threshold value"
depends on BT_LE_TX_CCA_ENABLED
@ -531,6 +549,10 @@ config BT_LE_CCA_RSSI_THRESH
help
Power threshold of CCA in unit of -1 dBm.
config BT_LE_FEAT_LL_ENCRYPTION
bool "Enable controller ACL encryption"
default y
config BT_LE_ROLE_CENTROL_ENABLE
bool "Enable BLE Centrol role function"
depends on !BT_NIMBLE_ENABLED
@ -617,3 +639,31 @@ config BT_LE_DFT_TX_POWER_LEVEL_DBM_EFF
default 18 if BT_LE_DFT_TX_POWER_LEVEL_P18
default 20 if BT_LE_DFT_TX_POWER_LEVEL_P20
default 0
config BT_CTRL_RUN_IN_FLASH_ONLY
bool "Reduce BLE IRAM usage (READ DOCS FIRST) (EXPERIMENTAL)"
default n
help
Move most IRAM into flash. This will increase the usage of flash and reduce ble performance.
Because the code is moved to the flash, the execution speed of the code is reduced.
To have a small impact on performance, you need to enable flash suspend (SPI_FLASH_AUTO_SUSPEND).
- Only one Tx-Rx can be performed in each connection interval. Therefore, reduce the connection interval
as much as possible to improve the throughput. If you want higher connection performance, you can
enable BT_LE_PLACE_CONN_RELATED_INTO_IRAM to put the connection-related code into iram.
- For HCI_LE_Extended_Create_Connection command, only 1M phy's connection parameters will be applied.
Other phys' will be ignored.
- For extended scanning, we may be unable to receive the extended adv with 300us MAFS.
config BT_LE_PLACE_CONN_RELATED_INTO_IRAM
bool "Place the connection-related code into IRAM"
depends on BT_CTRL_RUN_IN_FLASH_ONLY
default n
config BT_LE_CTRL_CHECK_CONNECT_IND_ACCESS_ADDRESS
bool "Enable enhanced Access Address check in CONNECT_IND"
default n
help
Enabling this option will add stricter verification of the Access Address in the CONNECT_IND PDU.
This improves security by ensuring that only connection requests with valid Access Addresses are accepted.
If disabled, only basic checks are applied, improving compatibility.

View File

@ -1,5 +1,5 @@
/*
* SPDX-FileCopyrightText: 2015-2024 Espressif Systems (Shanghai) CO LTD
* SPDX-FileCopyrightText: 2015-2025 Espressif Systems (Shanghai) CO LTD
*
* SPDX-License-Identifier: Apache-2.0
*/
@ -154,6 +154,10 @@ extern int ble_get_npl_element_info(esp_bt_controller_config_t *cfg, ble_npl_cou
extern void bt_track_pll_cap(void);
extern char *ble_controller_get_compile_version(void);
extern const char *r_ble_controller_get_rom_compile_version(void);
#if CONFIG_BT_CTRL_RUN_IN_FLASH_ONLY
extern void ble_ll_supported_features_init(void);
#endif //CONFIG_BT_CTRL_RUN_IN_FLASH_ONLY
#if CONFIG_BT_RELEASE_IRAM
extern uint32_t _iram_bt_text_start;
extern uint32_t _bss_bt_end;
@ -193,6 +197,9 @@ static void esp_bt_ctrl_log_partition_get_and_erase_first_block(void);
/* Local variable definition
***************************************************************************
*/
#if (CONFIG_ESP32C2_REV_MIN_FULL < 200) && (!CONFIG_BT_CTRL_RUN_IN_FLASH_ONLY)
void *g_ble_lll_rfmgmt_env_p;
#endif
/* Static variable declare */
static DRAM_ATTR esp_bt_controller_status_t ble_controller_status = ESP_BT_CONTROLLER_STATUS_IDLE;
#if CONFIG_BT_LE_CONTROLLER_LOG_ENABLED
@ -440,6 +447,17 @@ static DRAM_ATTR modem_clock_lpclk_src_t s_bt_lpclk_src = MODEM_CLOCK_LPCLK_SRC_
#define BLE_RTC_DELAY_US (1800)
#define BLE_CONTROLLER_MALLOC_CAPS (MALLOC_CAP_INTERNAL|MALLOC_CAP_8BIT|MALLOC_CAP_DMA)
void *malloc_ble_controller_mem(size_t size)
{
return heap_caps_malloc(size, BLE_CONTROLLER_MALLOC_CAPS);
}
uint32_t get_ble_controller_free_heap_size(void)
{
return heap_caps_get_free_size(BLE_CONTROLLER_MALLOC_CAPS);
}
static const struct osi_coex_funcs_t s_osi_coex_funcs_ro = {
._magic = OSI_COEX_MAGIC_VALUE,
._version = OSI_COEX_VERSION,
@ -532,7 +550,12 @@ static int esp_ecc_gen_dh_key(const uint8_t *peer_pub_key_x, const uint8_t *peer
static int esp_intr_alloc_wrapper(int source, int flags, intr_handler_t handler, void *arg, void **ret_handle_in)
{
#if CONFIG_BT_CTRL_RUN_IN_FLASH_ONLY
int rc = esp_intr_alloc(source, flags, handler, arg, (intr_handle_t *)ret_handle_in);
#else
int rc = esp_intr_alloc(source, flags | ESP_INTR_FLAG_IRAM, handler, arg, (intr_handle_t *)ret_handle_in);
#endif
return rc;
}
@ -741,6 +764,8 @@ esp_err_t esp_bt_controller_init(esp_bt_controller_config_t *cfg)
return ret;
}
/* If we place the ble code into flash, don't need to initialize ROM. */
#if !CONFIG_BT_CTRL_RUN_IN_FLASH_ONLY
#if DEFAULT_BT_LE_50_FEATURE_SUPPORT || DEFAULT_BT_LE_ROLE_CENTROL || DEFAULT_BT_LE_ROLE_OBSERVER
extern int esp_ble_rom_func_ptr_init_all(void);
esp_ble_rom_func_ptr_init_all();
@ -749,6 +774,7 @@ esp_err_t esp_bt_controller_init(esp_bt_controller_config_t *cfg)
extern int esp_ble_rom_func_ptr_init_legacy_adv_and_slave(void);
esp_ble_rom_func_ptr_init_legacy_adv_and_slave();
#endif
#endif //!CONFIG_BT_CTRL_RUN_IN_FLASH_ONLY
/* Initialize the function pointers for OS porting */
npl_freertos_funcs_init();
@ -798,6 +824,11 @@ esp_err_t esp_bt_controller_init(esp_bt_controller_config_t *cfg)
#if CONFIG_SW_COEXIST_ENABLE
coex_init();
#endif
#if CONFIG_BT_CTRL_RUN_IN_FLASH_ONLY
ble_ll_supported_features_init();
#endif //CONFIG_BT_CTRL_RUN_IN_FLASH_ONLY
ret = ble_controller_init(cfg);
if (ret != ESP_OK) {
ESP_LOGW(NIMBLE_PORT_LOG_TAG, "ble_controller_init failed %d", ret);
@ -1114,12 +1145,20 @@ esp_err_t esp_ble_tx_power_set(esp_ble_power_type_t power_type, esp_power_level_
switch (power_type) {
case ESP_BLE_PWR_TYPE_DEFAULT:
case ESP_BLE_PWR_TYPE_ADV:
case ESP_BLE_PWR_TYPE_SCAN:
if (ble_txpwr_set(ESP_BLE_ENHANCED_PWR_TYPE_DEFAULT, 0, power_level) == 0) {
stat = ESP_OK;
}
break;
case ESP_BLE_PWR_TYPE_ADV:
if (ble_txpwr_set(ESP_BLE_ENHANCED_PWR_TYPE_ADV, 0xFF, power_level) == 0) {
stat = ESP_OK;
}
break;
case ESP_BLE_PWR_TYPE_SCAN:
if (ble_txpwr_set(ESP_BLE_ENHANCED_PWR_TYPE_SCAN, 0, power_level) == 0) {
stat = ESP_OK;
}
break;
case ESP_BLE_PWR_TYPE_CONN_HDL0:
case ESP_BLE_PWR_TYPE_CONN_HDL1:
case ESP_BLE_PWR_TYPE_CONN_HDL2:
@ -1146,9 +1185,13 @@ esp_err_t esp_ble_tx_power_set_enhanced(esp_ble_enhanced_power_type_t power_type
esp_err_t stat = ESP_FAIL;
switch (power_type) {
case ESP_BLE_ENHANCED_PWR_TYPE_DEFAULT:
if (ble_txpwr_set(ESP_BLE_ENHANCED_PWR_TYPE_DEFAULT, 0, power_level) == 0) {
stat = ESP_OK;
}
break;
case ESP_BLE_ENHANCED_PWR_TYPE_SCAN:
case ESP_BLE_ENHANCED_PWR_TYPE_INIT:
if (ble_txpwr_set(ESP_BLE_ENHANCED_PWR_TYPE_DEFAULT, 0, power_level) == 0) {
if (ble_txpwr_set(ESP_BLE_ENHANCED_PWR_TYPE_SCAN, 0, power_level) == 0) {
stat = ESP_OK;
}
break;
@ -1171,11 +1214,15 @@ esp_power_level_t esp_ble_tx_power_get(esp_ble_power_type_t power_type)
int tx_level = 0;
switch (power_type) {
case ESP_BLE_PWR_TYPE_ADV:
case ESP_BLE_PWR_TYPE_SCAN:
case ESP_BLE_PWR_TYPE_DEFAULT:
tx_level = ble_txpwr_get(ESP_BLE_ENHANCED_PWR_TYPE_DEFAULT, 0);
break;
case ESP_BLE_PWR_TYPE_ADV:
tx_level = ble_txpwr_get(ESP_BLE_ENHANCED_PWR_TYPE_ADV, 0);
break;
case ESP_BLE_PWR_TYPE_SCAN:
tx_level = ble_txpwr_get(ESP_BLE_ENHANCED_PWR_TYPE_SCAN, 0);
break;
case ESP_BLE_PWR_TYPE_CONN_HDL0:
case ESP_BLE_PWR_TYPE_CONN_HDL1:
case ESP_BLE_PWR_TYPE_CONN_HDL2:
@ -1204,9 +1251,11 @@ esp_power_level_t esp_ble_tx_power_get_enhanced(esp_ble_enhanced_power_type_t po
switch (power_type) {
case ESP_BLE_ENHANCED_PWR_TYPE_DEFAULT:
tx_level = ble_txpwr_get(ESP_BLE_ENHANCED_PWR_TYPE_DEFAULT, 0);
break;
case ESP_BLE_ENHANCED_PWR_TYPE_SCAN:
case ESP_BLE_ENHANCED_PWR_TYPE_INIT:
tx_level = ble_txpwr_get(ESP_BLE_ENHANCED_PWR_TYPE_DEFAULT, 0);
tx_level = ble_txpwr_get(ESP_BLE_ENHANCED_PWR_TYPE_SCAN, 0);
break;
case ESP_BLE_ENHANCED_PWR_TYPE_ADV:
case ESP_BLE_ENHANCED_PWR_TYPE_CONN:

View File

@ -0,0 +1,320 @@
/*
* SPDX-FileCopyrightText: 2024 Espressif Systems (Shanghai) CO LTD
*
* SPDX-License-Identifier: Apache-2.0
*/
#include "esp_bt_cfg.h"
#define BLE_ERR_UNKNOWN_HCI_CMD (0x01)
/* LL Features */
#define BLE_LL_FEAT_LE_ENCRYPTION (0x0000000001)
#define BLE_LL_FEAT_CONN_PARM_REQ (0x0000000002)
#define BLE_LL_FEAT_EXTENDED_REJ (0x0000000004)
#define BLE_LL_FEAT_PERIPH_INIT (0x0000000008)
#define BLE_LL_FEAT_LE_PING (0x0000000010)
#define BLE_LL_FEAT_DATA_LEN_EXT (0x0000000020)
#define BLE_LL_FEAT_LL_PRIVACY (0x0000000040)
#define BLE_LL_FEAT_EXT_SCAN_FILT (0x0000000080)
#define BLE_LL_FEAT_LE_2M_PHY (0x0000000100)
#define BLE_LL_FEAT_STABLE_MOD_ID_TX (0x0000000200)
#define BLE_LL_FEAT_STABLE_MOD_ID_RX (0x0000000400)
#define BLE_LL_FEAT_LE_CODED_PHY (0x0000000800)
#define BLE_LL_FEAT_EXT_ADV (0x0000001000)
#define BLE_LL_FEAT_PERIODIC_ADV (0x0000002000)
#define BLE_LL_FEAT_CSA2 (0x0000004000)
#define BLE_LL_FEAT_LE_POWER_CLASS_1 (0x0000008000)
#define BLE_LL_FEAT_MIN_USED_CHAN (0x0000010000)
#define BLE_LL_FEAT_CTE_REQ (0x0000020000)
#define BLE_LL_FEAT_CTE_RSP (0x0000040000)
#define BLE_LL_FEAT_CTE_TX (0x0000080000)
#define BLE_LL_FEAT_CTE_RX (0x0000100000)
#define BLE_LL_FEAT_CTE_AOD (0x0000200000)
#define BLE_LL_FEAT_CTE_AOA (0x0000400000)
#define BLE_LL_FEAT_CTE_RECV (0x0000800000)
#define BLE_LL_FEAT_SYNC_TRANS_SEND (0x0001000000)
#define BLE_LL_FEAT_SYNC_TRANS_RECV (0x0002000000)
#define BLE_LL_FEAT_SCA_UPDATE (0x0004000000)
#define BLE_LL_FEAT_REM_PKEY (0x0008000000)
#define BLE_LL_FEAT_CIS_CENTRAL (0x0010000000)
#define BLE_LL_FEAT_CIS_PERIPH (0x0020000000)
#define BLE_LL_FEAT_ISO_BROADCASTER (0x0040000000)
#define BLE_LL_FEAT_SYNC_RECV (0x0080000000)
#define BLE_LL_FEAT_CIS_HOST (0x0100000000)
#define BLE_LL_FEAT_POWER_CTRL_REQ (0x0200000000)
#define BLE_LL_FEAT_POWER_CHANGE_IND (0x0400000000)
#define BLE_LL_FEAT_PATH_LOSS_MON (0x0800000000)
#define BLE_LL_FEAT_PERIODIC_ADV_ADI (0x1000000000)
#define BLE_LL_FEAT_CONN_SUBRATING (0x2000000000)
#define BLE_LL_FEAT_CONN_SUBRATING_HOST (0x4000000000)
#define BLE_LL_FEAT_CHANNEL_CLASS (0x8000000000)
uint64_t ble_ll_supported_features;
void
ble_ll_supported_features_init(void)
{
ble_ll_supported_features = BLE_LL_FEAT_EXTENDED_REJ;
ble_ll_supported_features |= BLE_LL_FEAT_DATA_LEN_EXT;
#if DEFAULT_BT_LE_ROLE_CENTROL || DEFAULT_BT_LE_ROLE_PERIPHERAL
ble_ll_supported_features |= BLE_LL_FEAT_PERIPH_INIT;
ble_ll_supported_features |= BLE_LL_FEAT_CONN_PARM_REQ;
#endif
#if CONFIG_BT_LE_FEAT_LL_ENCRYPTION
ble_ll_supported_features |= BLE_LL_FEAT_LE_ENCRYPTION;
#endif
ble_ll_supported_features |= (BLE_LL_FEAT_LL_PRIVACY | BLE_LL_FEAT_EXT_SCAN_FILT);
ble_ll_supported_features |= BLE_LL_FEAT_LE_PING;
#if DEFAULT_BT_LE_EXT_ADV
ble_ll_supported_features |= BLE_LL_FEAT_EXT_ADV;
#endif
#if DEFAULT_BT_LE_PERIODIC_ADV
ble_ll_supported_features |= BLE_LL_FEAT_PERIODIC_ADV;
ble_ll_supported_features |= BLE_LL_FEAT_PERIODIC_ADV_ADI;
#endif
#if DEFAULT_BT_LE_PAST
ble_ll_supported_features |= BLE_LL_FEAT_SYNC_TRANS_RECV;
ble_ll_supported_features |= BLE_LL_FEAT_SYNC_TRANS_SEND;
#endif
#if DEGAULT_BT_LE_2M_PHY
ble_ll_supported_features |= BLE_LL_FEAT_LE_2M_PHY;
#endif
#if DEGAULT_BT_LE_CODED_PHY
ble_ll_supported_features |= BLE_LL_FEAT_LE_CODED_PHY;
#endif
#if DEFAULT_BT_LE_50_FEATURE_SUPPORT
ble_ll_supported_features |= BLE_LL_FEAT_CSA2;
ble_ll_supported_features |= BLE_LL_FEAT_SCA_UPDATE;
ble_ll_supported_features |= BLE_LL_FEAT_REM_PKEY;
ble_ll_supported_features |= BLE_LL_FEAT_CHANNEL_CLASS;
#endif
}
#if !DEFAULT_BT_LE_ROLE_BROADCASTER
void r_ble_ll_adv_rpa_timeout(void) { }
void r_ble_lll_adv_halt(void) { }
void r_ble_lll_adv_event_rmvd_from_sched(void) { }
void r_ble_lll_adv_ext_event_rmvd_from_sched(void) { }
int r_ble_ll_adv_enabled(void) { return 0; }
int r_ble_ll_adv_can_chg_whitelist(void) { return 1; }
int r_ble_ll_adv_set_random_addr(void) { return BLE_ERR_UNKNOWN_HCI_CMD; }
void r_ble_ll_adv_reset(void) { }
void r_ble_ll_adv_init(void) { }
void r_ble_ll_adv_deinit(void) { }
int r_ble_ll_adv_env_init(void) { return 0; }
void r_ble_ll_adv_env_deinit(void) { }
int r_ble_lll_adv_rx_pkt_isr(void) { return -1; }
void r_ble_ll_adv_rx_pkt_in(void) { }
int r_ble_ll_adv_set_adv_params(void) { return BLE_ERR_UNKNOWN_HCI_CMD; }
int r_ble_ll_adv_read_txpwr(void) { return BLE_ERR_UNKNOWN_HCI_CMD; }
int r_ble_ll_hci_set_adv_data(void) { return BLE_ERR_UNKNOWN_HCI_CMD; }
int r_ble_ll_hci_set_scan_rsp_data(void) { return BLE_ERR_UNKNOWN_HCI_CMD; }
int r_ble_ll_hci_adv_set_enable(void) { return BLE_ERR_UNKNOWN_HCI_CMD; }
int r_ble_ll_adv_vendor_hci_legacy_adv_clear(void) { return BLE_ERR_UNKNOWN_HCI_CMD; }
int r_ble_ll_adv_set_data_related_addr_change(void) { return BLE_ERR_UNKNOWN_HCI_CMD; }
#endif // !DEFAULT_BT_LE_ROLE_BROADCASTER
#if !DEFAULT_BT_LE_EXT_ADV
bool r_ble_ll_adv_ext_check_data_itvl(void) { return true; }
void r_ble_lll_adv_coex_dpc_update_on_aux_scheduled(void) { }
void r_ble_lll_adv_coex_dpc_calc_pti_update_itvl(void) { }
void r_ble_lll_adv_sec_done(void) { }
int r_ble_lll_adv_sec_schedule_next_aux(void) { return 0; }
void r_ble_lll_adv_sec_event_done(void) { }
int r_ble_lll_adv_secondary_tx_start_cb(void) { return 0; }
void r_ble_lll_adv_aux_schedule(void) { }
void r_ble_lll_adv_update_rsp_offset(void) { }
int r_ble_ll_adv_hci_set_random_addr(void) { return BLE_ERR_UNKNOWN_HCI_CMD; }
int r_ble_ll_adv_ext_set_param(void) { return BLE_ERR_UNKNOWN_HCI_CMD; }
int r_ble_ll_adv_ext_set_adv_data(void) { return BLE_ERR_UNKNOWN_HCI_CMD; }
int r_ble_ll_adv_ext_set_scan_rsp(void) { return BLE_ERR_UNKNOWN_HCI_CMD; }
int r_ble_ll_adv_ext_set_enable(void) { return BLE_ERR_UNKNOWN_HCI_CMD; }
int r_ble_ll_adv_rd_max_adv_data_len(void) { return BLE_ERR_UNKNOWN_HCI_CMD; }
int r_ble_ll_adv_rd_sup_adv_sets(void) { return BLE_ERR_UNKNOWN_HCI_CMD; }
int r_ble_ll_adv_remove(void) { return BLE_ERR_UNKNOWN_HCI_CMD; }
int r_ble_ll_adv_clear_all(void) { return BLE_ERR_UNKNOWN_HCI_CMD; }
#endif //!DEFAULT_BT_LE_EXT_ADV
#if !DEFAULT_BT_LE_PERIODIC_ADV
void r_ble_ll_adv_sm_stop_periodic(void) { }
void r_ble_lll_adv_periodic_event_done(void) { }
int r_ble_lll_adv_sync_tx_start_cb(void) { return 0; }
void r_ble_lll_adv_sync_tx_end(void) { }
int r_ble_lll_adv_periodic_start(void) { return 0; }
void r_ble_lll_adv_periodic_rmvd_from_sched(void) { }
int r_ble_ll_adv_periodic_set_param(void) { return BLE_ERR_UNKNOWN_HCI_CMD; }
int r_ble_ll_adv_periodic_set_data(void) { return BLE_ERR_UNKNOWN_HCI_CMD; }
int r_ble_ll_adv_periodic_enable(void) { return BLE_ERR_UNKNOWN_HCI_CMD; }
#endif //!DEFAULT_BT_LE_PERIODIC_ADV
#if !DEFAULT_BT_LE_ROLE_OBSERVER
void r_ble_lll_scan_halt(void) { }
void r_ble_ll_scan_end_adv_evt(void) { }
void r_ble_ll_scan_rx_pkt_in(void) { }
int r_ble_lll_scan_rx_pkt_isr(void) { return -1; }
int r_ble_ll_scan_env_init(void) { return 0; }
void r_ble_ll_scan_env_deinit(void) { }
void r_ble_ll_scan_init(void) { }
void r_ble_ll_scan_deinit(void) { }
void r_ble_ll_scan_reset(void) { }
int r_ble_ll_scan_can_chg_whitelist(void) { return 1; }
int r_ble_ll_scan_enabled(void) { return false; }
int r_ble_lll_scan_chk_resume(void) { return -1; }
int r_ble_ll_scan_set_scan_params(void) { return BLE_ERR_UNKNOWN_HCI_CMD; }
int r_ble_ll_hci_scan_set_enable(void) { return BLE_ERR_UNKNOWN_HCI_CMD; }
int r_ble_ll_scan_hci_update_adv_report_flow_ctrl(void) { return BLE_ERR_UNKNOWN_HCI_CMD; }
int r_ble_ll_scan_hci_set_adv_report_flow_ctrl(void) { return BLE_ERR_UNKNOWN_HCI_CMD; }
#endif //!DEFAULT_BT_LE_ROLE_OBSERVER
#if !DEFAULT_BT_LE_EXT_SCAN
void r_ble_lll_scan_duration_period_timers_restart(void) { }
void r_ble_lll_scan_duration_period_timers_stop(void) { }
int r_ble_ll_hci_send_legacy_ext_adv_report(void) { return -1; }
void r_ble_lll_sched_rmv_elem_type(void) { }
void r_ble_ll_scan_send_truncated(void) { }
void r_ble_ll_scan_aux_data_unref(void) { }
void r_ble_lll_scan_sched_remove(void) { }
void r_ble_lll_scan_aux_data_free(void) { }
void r_ble_lll_aux_scan_drop(void) { }
int r_ble_lll_sched_aux_scan(void) { return -1; }
int r_ble_lll_scan_rx_isr_on_aux(void) { return -1; }
void r_ble_lll_scan_period_timer_cb(void) { }
void r_ble_lll_scan_duration_timer_cb(void) { }
void r_ble_ll_scan_rx_pkt_in_on_aux(void) { }
int r_ble_ll_set_ext_scan_params(void) { return BLE_ERR_UNKNOWN_HCI_CMD; }
int r_ble_ll_hci_ext_scan_set_enable(void) { return BLE_ERR_UNKNOWN_HCI_CMD; }
#endif //!DEFAULT_BT_LE_EXT_SCAN
#if !DEFAULT_BT_LE_ROLE_CENTROL
void r_ble_ll_init_rx_pkt_in(void) { }
int r_ble_lll_init_rx_pkt_isr(void) { return -1; }
int r_ble_ll_conn_create(void) { return BLE_ERR_UNKNOWN_HCI_CMD; }
int r_ble_ll_conn_create_cancel(void) { return BLE_ERR_UNKNOWN_HCI_CMD; }
#endif //!DEFAULT_BT_LE_ROLE_CENTROL
#if !DEFAULT_BT_LE_ROLE_CENTROL || !DEFAULT_BT_LE_EXT_SCAN
int r_ble_ll_ext_conn_create(void) { return BLE_ERR_UNKNOWN_HCI_CMD; }
#endif //!DEFAULT_BT_LE_ROLE_CENTROL || !DEFAULT_BT_LE_EXT_SCAN
#if !DEFAULT_BT_LE_ROLE_PERIPHERAL
int r_ble_ll_conn_slave_start(void) { return 0; }
#endif //!DEFAULT_BT_LE_ROLE_PERIPHERAL
#if !DEFAULT_BT_LE_ROLE_CENTROL && !DEFAULT_BT_LE_ROLE_PERIPHERAL
void r_ble_ll_conn_rx_data_pdu(void) { }
int r_ble_lll_conn_rx_pkt_isr(void) { return -1; }
int r_ble_ll_hci_disconnect(void) { return BLE_ERR_UNKNOWN_HCI_CMD; }
int r_ble_ll_conn_hci_rd_rem_ver_cmd(void) { return BLE_ERR_UNKNOWN_HCI_CMD; }
int r_ble_ll_conn_hci_update(void) { return BLE_ERR_UNKNOWN_HCI_CMD; }
int r_ble_ll_conn_hci_rd_chan_map(void) { return BLE_ERR_UNKNOWN_HCI_CMD; }
int r_ble_ll_conn_hci_read_rem_features(void) { return BLE_ERR_UNKNOWN_HCI_CMD; }
int r_ble_ll_conn_hci_param_rr(void) { return BLE_ERR_UNKNOWN_HCI_CMD; }
int r_ble_ll_conn_hci_param_nrr(void) { return BLE_ERR_UNKNOWN_HCI_CMD; }
#endif //!DEFAULT_BT_LE_ROLE_CENTROL && !DEFAULT_BT_LE_ROLE_PERIPHERAL
#if !CONFIG_BT_LE_FEAT_LL_ENCRYPTION
int r_ble_ll_conn_chk_phy_upd_start(void) { return -1; }
void r_ble_ll_hci_ev_encrypt_chg(void) { }
int r_ble_ll_ctrl_enc_allowed_pdu_rx(void) { return 1; }
int r_ble_ll_ctrl_enc_allowed_pdu_tx(void) { return 1; }
uint8_t r_ble_ll_ctrl_rx_start_enc_rsp(void) { return 0x07; }
uint8_t r_ble_ll_ctrl_rx_pause_enc_rsp(void) { return 0x07; }
int r_ble_ll_hci_le_encrypt(void) { return BLE_ERR_UNKNOWN_HCI_CMD; }
#endif //!CONFIG_BT_LE_FEAT_LL_ENCRYPTION
#if !DEFAULT_BT_LE_ROLE_PERIPHERAL || !CONFIG_BT_LE_FEAT_LL_ENCRYPTION
uint8_t r_ble_ll_ctrl_rx_pause_enc_req(void) { return 0x07; }
uint8_t r_ble_ll_ctrl_rx_enc_req(void) { return 0x07; }
int r_ble_ll_conn_hci_le_ltk_reply(void) { return BLE_ERR_UNKNOWN_HCI_CMD; }
int r_ble_ll_conn_hci_le_ltk_neg_reply(void) { return BLE_ERR_UNKNOWN_HCI_CMD; }
#endif //!DEFAULT_BT_LE_ROLE_PERIPHERAL || !CONFIG_BT_LE_FEAT_LL_ENCRYPTION
#if !DEFAULT_BT_LE_ROLE_CENTROL || !CONFIG_BT_LE_FEAT_LL_ENCRYPTION
uint8_t r_ble_ll_ctrl_rx_start_enc_req(void) { return 0x07; }
void r_ble_ll_ctrl_rx_enc_rsp(void) { }
void r_ble_ll_ctrl_enc_req_make(void) { }
int r_ble_ll_conn_hci_le_start_encrypt(void) { return BLE_ERR_UNKNOWN_HCI_CMD; }
#endif //!DEFAULT_BT_LE_ROLE_CENTROL || !CONFIG_BT_LE_FEAT_LL_ENCRYPTION
#if !DEGAULT_BT_LE_2M_PHY && !DEGAULT_BT_LE_CODED_PHY
void r_ble_ll_ctrl_phy_update_proc_complete(void) { }
void r_ble_ll_ctrl_phy_update_cancel(void) { }
uint8_t r_ble_ll_ctrl_rx_phy_update_ind(void) { return 0x07; }
uint8_t r_ble_ll_ctrl_rx_phy_rsp(void) { return 0x07; }
uint8_t r_ble_ll_ctrl_rx_phy_req(void) { return 0x07; }
void r_ble_ll_ctrl_phy_req_rsp_make(void) { }
#endif //DEGAULT_BT_LE_2M_PHY && DEGAULT_BT_LE_CODED_PHY
#if !DEFAULT_BT_LE_PERIODIC_SYNC
void r_ble_lll_sync_halt(void) { }
void r_ble_lll_sync_rmvd_from_sched(void) { }
int r_ble_ll_sync_list_search(void) { return -1; }
uint8_t r_ble_ll_ctrl_rx_periodic_sync_ind(void) { return 0x07; }
void r_ble_ll_sync_rx_pkt_in(void) { }
int r_ble_lll_sync_rx_pkt_isr(void) { return -1; }
int r_ble_ll_sync_env_init(void) { return 0; }
void r_ble_ll_sync_env_deinit(void) { }
void r_ble_ll_sync_init(void) { }
void r_ble_ll_sync_deinit(void) { }
void r_ble_ll_sync_reset(void) { }
bool r_ble_ll_sync_enabled(void) { return false; }
int r_ble_ll_sync_create(void) { return BLE_ERR_UNKNOWN_HCI_CMD; }
int r_ble_ll_sync_cancel(void) { return BLE_ERR_UNKNOWN_HCI_CMD; }
int r_ble_ll_sync_terminate(void) { return BLE_ERR_UNKNOWN_HCI_CMD; }
int r_ble_ll_sync_list_add(void) { return BLE_ERR_UNKNOWN_HCI_CMD; }
int r_ble_ll_sync_list_remove(void) { return BLE_ERR_UNKNOWN_HCI_CMD; }
int r_ble_ll_sync_list_clear(void) { return BLE_ERR_UNKNOWN_HCI_CMD; }
int r_ble_ll_sync_list_size(void) { return BLE_ERR_UNKNOWN_HCI_CMD; }
int r_ble_ll_sync_receive_enable(void) { return BLE_ERR_UNKNOWN_HCI_CMD; }
#endif //!DEFAULT_BT_LE_PERIODIC_SYNC
#if !DEFAULT_BT_LE_PAST || !DEFAULT_BT_LE_PERIODIC_ADV
int r_ble_ll_adv_periodic_set_info_transfer(void) { return BLE_ERR_UNKNOWN_HCI_CMD; }
#endif //!DEFAULT_BT_LE_PAST || !DEFAULT_BT_LE_PERIODIC_ADV
#if !DEFAULT_BT_LE_PAST || !DEFAULT_BT_LE_PERIODIC_SYNC
int r_ble_ll_sync_transfer(void) { return BLE_ERR_UNKNOWN_HCI_CMD; }
int r_ble_ll_set_sync_transfer_params(void) { return BLE_ERR_UNKNOWN_HCI_CMD; }
int r_ble_ll_set_default_sync_transfer_params(void) { return BLE_ERR_UNKNOWN_HCI_CMD; }
#endif //!DEFAULT_BT_LE_PAST || !DEFAULT_BT_LE_PERIODIC_SYNC
#if !DEFAULT_BT_LE_50_FEATURE_SUPPORT
uint8_t r_ble_ll_ctrl_rx_channel_reporting_ind(void) { return 0x07; }
uint8_t r_ble_ll_ctrl_rx_channel_status_ind(void) { return 0x07; }
uint8_t r_ble_ll_ctrl_rx_sca_req(void) { return 0x07; }
uint8_t r_ble_ll_ctrl_rx_sca_rsp(void) { return 0x07; }
void r_ble_ll_ctrl_channel_class_reporting_make(void) { }
void r_ble_ll_ctrl_channel_class_enable_make(void) { }
void r_ble_ll_ctrl_sca_req_rsp_make(void) { }
int r_ble_ll_modify_sca(void) { return BLE_ERR_UNKNOWN_HCI_CMD; }
int r_ble_ll_conn_req_peer_sca(void) { return BLE_ERR_UNKNOWN_HCI_CMD; }
#endif //!DEFAULT_BT_LE_50_FEATURE_SUPPORT
#if !DEFAULT_BT_LE_50_FEATURE_SUPPORT
int r_ble_ll_conn_hci_le_rd_phy(void) { return BLE_ERR_UNKNOWN_HCI_CMD; }
int r_ble_ll_hci_le_set_def_phy(void) { return BLE_ERR_UNKNOWN_HCI_CMD; }
int r_ble_ll_conn_hci_le_set_phy(void) { return BLE_ERR_UNKNOWN_HCI_CMD; }
#endif //!DEFAULT_BT_LE_50_FEATURE_SUPPORT
#if !CONFIG_BT_LE_DTM_ENABLED
void r_ble_lll_dtm_rx_pkt_in(void) { }
int r_ble_lll_dtm_rx_isr_end(void) { return -1; }
void r_ble_lll_dtm_reset(void) { }
void r_ble_lll_dtm_init(void) { }
void r_ble_lll_dtm_deinit(void) { }
int r_ble_lll_dtm_env_init(void) { return 0; }
void r_ble_lll_dtm_env_deinit(void) { }
int r_ble_lll_hci_dtm_tx_test(void) { return BLE_ERR_UNKNOWN_HCI_CMD; }
int r_ble_lll_hci_dtm_rx_test(void) { return BLE_ERR_UNKNOWN_HCI_CMD; }
int r_ble_lll_dtm_end_test(void) { return BLE_ERR_UNKNOWN_HCI_CMD; }
int r_ble_lll_hci_dtm_rx_test_v2(void) { return BLE_ERR_UNKNOWN_HCI_CMD; }
int r_ble_lll_hci_dtm_tx_test_v2(void) { return BLE_ERR_UNKNOWN_HCI_CMD; }
#endif //!CONFIG_BT_LE_DTM_ENABLED

View File

@ -45,6 +45,14 @@ extern "C" {
#define DEFAULT_BT_LE_50_FEATURE_SUPPORT (0)
#endif
#define DEGAULT_BT_LE_2M_PHY (CONFIG_BT_NIMBLE_LL_CFG_FEAT_LE_2M_PHY)
#define DEGAULT_BT_LE_CODED_PHY (CONFIG_BT_NIMBLE_LL_CFG_FEAT_LE_CODED_PHY)
#define DEFAULT_BT_LE_EXT_ADV (CONFIG_BT_NIMBLE_EXT_ADV)
#define DEFAULT_BT_LE_PERIODIC_ADV (CONFIG_BT_NIMBLE_ENABLE_PERIODIC_ADV)
#define DEFAULT_BT_LE_EXT_SCAN (CONFIG_BT_NIMBLE_EXT_SCAN)
#define DEFAULT_BT_LE_PERIODIC_SYNC (CONFIG_BT_NIMBLE_ENABLE_PERIODIC_SYNC)
#define DEFAULT_BT_LE_PAST (CONFIG_BT_NIMBLE_PERIODIC_ADV_SYNC_TRANSFER)
#define DEFAULT_BT_LE_ROLE_OBSERVER MYNEWT_VAL(BLE_ROLE_OBSERVER)
#define DEFAULT_BT_LE_ROLE_CENTROL MYNEWT_VAL(BLE_ROLE_CENTRAL)
#define DEFAULT_BT_LE_ROLE_PERIPHERAL MYNEWT_VAL(BLE_ROLE_PERIPHERAL)
@ -122,12 +130,55 @@ extern "C" {
#else
#define DEFAULT_BT_LE_HCI_EVT_LO_BUF_COUNT (8)
#endif
#if defined(CONFIG_BT_LE_50_FEATURE_SUPPORT)
#define DEFAULT_BT_LE_50_FEATURE_SUPPORT (1)
#else
#define DEFAULT_BT_LE_50_FEATURE_SUPPORT (0)
#endif
#if defined(CONFIG_BT_LE_LL_CFG_FEAT_LE_2M_PHY)
#define DEGAULT_BT_LE_2M_PHY (CONFIG_BT_LE_LL_CFG_FEAT_LE_2M_PHY)
#else
#define DEGAULT_BT_LE_2M_PHY (0)
#endif
#if defined(CONFIG_BT_LE_LL_CFG_FEAT_LE_CODED_PHY)
#define DEGAULT_BT_LE_CODED_PHY (CONFIG_BT_LE_LL_CFG_FEAT_LE_CODED_PHY)
#else
#define DEGAULT_BT_LE_CODED_PHY (0)
#endif
#if defined(CONFIG_BT_LE_EXT_ADV)
#define DEFAULT_BT_LE_EXT_ADV (CONFIG_BT_LE_EXT_ADV)
#else
#define DEFAULT_BT_LE_EXT_ADV (0)
#endif
#if defined(CONFIG_BT_LE_ENABLE_PERIODIC_ADV)
#define DEFAULT_BT_LE_PERIODIC_ADV (CONFIG_BT_LE_ENABLE_PERIODIC_ADV)
#else
#define DEFAULT_BT_LE_PERIODIC_ADV (0)
#endif
#if defined(CONFIG_BT_LE_EXT_SCAN)
#define DEFAULT_BT_LE_EXT_SCAN (CONFIG_BT_LE_EXT_SCAN)
#else
#define DEFAULT_BT_LE_EXT_SCAN (0)
#endif
#if defined(CONFIG_BT_LE_ENABLE_PERIODIC_SYNC)
#define DEFAULT_BT_LE_PERIODIC_SYNC (CONFIG_BT_LE_ENABLE_PERIODIC_SYNC)
#else
#define DEFAULT_BT_LE_PERIODIC_SYNC (0)
#endif
#if defined(BT_LE_PERIODIC_ADV_SYNC_TRANSFER)
#define DEFAULT_BT_LE_PAST (BT_LE_PERIODIC_ADV_SYNC_TRANSFER)
#else
#define DEFAULT_BT_LE_PAST (0)
#endif
#if defined(CONFIG_BT_LE_ROLE_CENTROL_ENABLE)
#define DEFAULT_BT_LE_ROLE_CENTROL (1)
#else
@ -169,6 +220,12 @@ extern "C" {
#define DEFAULT_BT_LE_COEX_PHY_CODED_TX_RX_TLIM_EFF CONFIG_BT_LE_COEX_PHY_CODED_TX_RX_TLIM_EFF
#ifdef CONFIG_BT_LE_CTRL_CHECK_CONNECT_IND_ACCESS_ADDRESS
#define DEFAULT_BT_LE_CTRL_CHECK_CONNECT_IND_ACCESS_ADDRESS (CONFIG_BT_LE_CTRL_CHECK_CONNECT_IND_ACCESS_ADDRESS)
#else
#define DEFAULT_BT_LE_CTRL_CHECK_CONNECT_IND_ACCESS_ADDRESS (0)
#endif
#ifdef CONFIG_BT_LE_HCI_INTERFACE_USE_UART
#define HCI_UART_EN CONFIG_BT_LE_HCI_INTERFACE_USE_UART
#else

View File

@ -200,8 +200,8 @@ choice BT_CTRL_DFT_TX_POWER_LEVEL
bool "+15dBm"
config BT_CTRL_DFT_TX_POWER_LEVEL_P18
bool "+18dBm"
config BT_CTRL_DFT_TX_POWER_LEVEL_P21
bool "+21dBm"
config BT_CTRL_DFT_TX_POWER_LEVEL_P20
bool "+20dBm"
endchoice
config BT_CTRL_DFT_TX_POWER_LEVEL_EFF
@ -221,11 +221,12 @@ config BT_CTRL_DFT_TX_POWER_LEVEL_EFF
default 12 if BT_CTRL_DFT_TX_POWER_LEVEL_P12
default 13 if BT_CTRL_DFT_TX_POWER_LEVEL_P15
default 14 if BT_CTRL_DFT_TX_POWER_LEVEL_P18
default 15 if BT_CTRL_DFT_TX_POWER_LEVEL_P21
default 15 if BT_CTRL_DFT_TX_POWER_LEVEL_P20
default 0
config BT_CTRL_BLE_ADV_REPORT_FLOW_CTRL_SUPP
bool "BLE adv report flow control supported"
depends on (!BT_CTRL_RUN_IN_FLASH_ONLY) || (BT_CTRL_RUN_IN_FLASH_ONLY && BT_CTRL_BLE_SCAN)
default y
help
The function is mainly used to enable flow control for advertising reports. When it is enabled,
@ -402,10 +403,10 @@ menu "MODEM SLEEP Options"
bluetooth can work under light sleep enabled. Main crystal has a relatively better performance
than other bluetooth low power clock sources.
config BT_CTRL_LPCLK_SEL_EXT_32K_XTAL
bool "External 32kHz crystal"
depends on RTC_CLK_SRC_EXT_CRYS
bool "External 32kHz crystal/oscillator"
depends on RTC_CLK_SRC_EXT_CRYS || RTC_CLK_SRC_EXT_OSC
help
External 32kHz crystal has a nominal frequency of 32.768kHz and provides good frequency
External 32kHz crystal/oscillator has a nominal frequency of 32.768kHz and provides good frequency
stability. If used as Bluetooth low power clock, External 32kHz can support Bluetooth
modem sleep to be used with both DFS and light sleep.
@ -489,3 +490,63 @@ config BT_CTRL_LE_PING_EN
help
If this option is disabled, The Controller will not start the LE authenticated payload timer.
This option is used for some compatibility problems related to LE ping procedure.
menu "BLE disconnect when instant passed"
config BT_CTRL_BLE_LLCP_CONN_UPDATE
bool "BLE ACL connection update procedure"
default n
help
If this option is enabled, Controller will terminate the connection
when instant passed during connection update procedure.
config BT_CTRL_BLE_LLCP_CHAN_MAP_UPDATE
bool "BLE ACL channel map update procedure"
default n
help
If this option is enabled, Controller will terminate the connection
when instant passed in channel map update procedure.
config BT_CTRL_BLE_LLCP_PHY_UPDATE
bool "BLE ACL PHY update procedure"
default n
help
If this option is enabled, Controller will terminate the connection
when instant passed in PHY update procedure.
endmenu
config BT_CTRL_RUN_IN_FLASH_ONLY
bool "Put all BLE Controller code in flash"
default n
help
If this option is enabled, all code for the Bluetooth controller will be moved from ROM and IRAM
to flash, saving over 20K bytes of memory. However, it will require more flash resources and the
performance of Bluetooth will decrease If this option is enabled, Bluetooth may not work properly
during erasing flash. It is recommended to turn on the auto suspend function of flash. After auto
suspend is turned on, Bluetooth interrupts can be executed normally during erasing flash, with less
impact on Bluetooth performance.
config BT_CTRL_DTM_ENABLE
depends on BT_CTRL_RUN_IN_FLASH_ONLY
bool "Enable direct test mode feature"
default n
config BT_CTRL_BLE_MASTER
depends on BT_CTRL_RUN_IN_FLASH_ONLY
bool "Enable BLE master role feature"
default y
config BT_CTRL_BLE_TEST
depends on BT_CTRL_RUN_IN_FLASH_ONLY
bool "Enable BLE QA test feature"
default n
config BT_CTRL_BLE_SCAN
depends on BT_CTRL_RUN_IN_FLASH_ONLY
bool "Enable BLE scan feature"
default y
config BT_CTRL_CHECK_CONNECT_IND_ACCESS_ADDRESS
bool "Enable enhanced Access Address check in CONNECT_IND"
default n
help
Enabling this option will add stricter verification of the Access Address in the CONNECT_IND PDU.
This improves security by ensuring that only connection requests with valid Access Addresses are accepted.
If disabled, only basic checks are applied, improving compatibility.

View File

@ -256,7 +256,6 @@ extern int API_vhci_host_register_callback(const vhci_host_callback_t *callback)
extern int ble_txpwr_set(int power_type, uint16_t handle, int power_level);
extern int ble_txpwr_get(int power_type, uint16_t handle);
extern uint16_t l2c_ble_link_get_tx_buf_num(void);
extern void coex_pti_v2(void);
extern bool btdm_deep_sleep_mem_init(void);
@ -272,6 +271,7 @@ extern void ets_backup_dma_copy(uint32_t reg, uint32_t mem_addr, uint32_t num, b
#endif
extern void btdm_cca_feature_enable(void);
extern void btdm_aa_check_enhance_enable(void);
extern uint32_t _bt_bss_start;
extern uint32_t _bt_bss_end;
@ -495,7 +495,11 @@ static int interrupt_alloc_wrapper(int cpu_id, int source, intr_handler_t handle
{
btdm_isr_alloc_t p;
p.source = source;
#if CONFIG_BT_CTRL_RUN_IN_FLASH_ONLY
p.flags = ESP_INTR_FLAG_LEVEL3;
#else
p.flags = ESP_INTR_FLAG_LEVEL3 | ESP_INTR_FLAG_IRAM;
#endif
p.fn = handler;
p.arg = arg;
p.handle = (intr_handle_t *)ret_handle;
@ -777,7 +781,8 @@ static void btdm_sleep_enter_phase1_wrapper(uint32_t lpcycles)
// allow a maximum time uncertainty to be about 488ppm(1/2048) at least as clock drift
// and set the timer in advance
uint32_t uncertainty = (us_to_sleep >> 11);
#if CONFIG_FREERTOS_USE_TICKLESS_IDLE
#if CONFIG_BT_CTRL_MAIN_XTAL_PU_DURING_LIGHT_SLEEP
// recalculate clock drift when Bluetooth using main XTAL during light sleep
if (rtc_clk_slow_src_get() == SOC_RTC_SLOW_CLK_SRC_RC_SLOW) {
uncertainty = us_to_sleep * BTDM_RTC_SLOW_CLK_RC_DRIFT_PERCENT / 100;
}
@ -956,6 +961,9 @@ static void btdm_funcs_table_ready_wrapper(void)
#if BT_BLE_CCA_MODE == 2
btdm_cca_feature_enable();
#endif
#if BLE_CTRL_CHECK_CONNECT_IND_ACCESS_ADDRESS_ENABLED
btdm_aa_check_enhance_enable();
#endif
}
bool bt_async_wakeup_request(void)
@ -1421,6 +1429,10 @@ esp_err_t esp_bt_controller_init(esp_bt_controller_config_t *cfg)
ESP_LOGI(BT_LOG_TAG, "BT controller compile version [%s]", btdm_controller_get_compile_version());
#if (CONFIG_BT_CTRL_RUN_IN_FLASH_ONLY)
ESP_LOGI(BT_LOG_TAG,"Put all controller code in flash");
#endif
if ((err = btdm_low_power_mode_init(cfg)) != ESP_OK) {
ESP_LOGE(BT_LOG_TAG, "Low power module initialization failed");
goto error;
@ -1433,7 +1445,10 @@ esp_err_t esp_bt_controller_init(esp_bt_controller_config_t *cfg)
periph_module_enable(PERIPH_BT_MODULE);
periph_module_reset(PERIPH_BT_MODULE);
if (btdm_controller_init(cfg) != 0) {
err = btdm_controller_init(cfg);
if (err != 0) {
ESP_LOGE(BT_LOG_TAG, "%s %d\n",__func__,err);
err = ESP_ERR_NO_MEM;
goto error;
}
@ -1749,7 +1764,7 @@ esp_power_level_t esp_ble_tx_power_get(esp_ble_power_type_t power_type)
handle = power_type;
}
lvl = (esp_power_level_t)ble_txpwr_get(power_type, handle);
lvl = (esp_power_level_t)ble_txpwr_get(enh_pwr_type, handle);
return lvl;
}
@ -1861,11 +1876,6 @@ int IRAM_ATTR esp_bt_h4tl_eif_io_event_notify(int event)
return btdm_hci_tl_io_event_post(event);
}
uint16_t esp_bt_get_tx_buf_num(void)
{
return l2c_ble_link_get_tx_buf_num();
}
static void coex_wifi_sleep_set_hook(bool sleep)
{

View File

@ -689,3 +689,19 @@ config BT_LE_DFT_TX_POWER_LEVEL_DBM_EFF
default 18 if BT_LE_DFT_TX_POWER_LEVEL_P18
default 20 if BT_LE_DFT_TX_POWER_LEVEL_P20
default 0
config BT_LE_CTRL_CHECK_CONNECT_IND_ACCESS_ADDRESS
bool "Enable enhanced Access Address check in CONNECT_IND"
default n
help
Enabling this option will add stricter verification of the Access Address in the CONNECT_IND PDU.
This improves security by ensuring that only connection requests with valid Access Addresses are accepted.
If disabled, only basic checks are applied, improving compatibility.
config BT_CTRL_RUN_IN_FLASH_ONLY
bool "Reduce BLE IRAM usage (READ DOCS FIRST) (EXPERIMENTAL)"
default n
help
Move most IRAM into flash. This will increase the usage of flash and reduce ble performance.
Because the code is moved to the flash, the execution speed of the code is reduced.
To have a small impact on performance, you need to enable flash suspend (SPI_FLASH_AUTO_SUSPEND).

View File

@ -1,5 +1,5 @@
/*
* SPDX-FileCopyrightText: 2015-2024 Espressif Systems (Shanghai) CO LTD
* SPDX-FileCopyrightText: 2015-2025 Espressif Systems (Shanghai) CO LTD
*
* SPDX-License-Identifier: Apache-2.0
*/
@ -131,6 +131,10 @@ extern void r_ble_lll_rfmgmt_set_sleep_cb(void *s_cb, void *w_cb, void *s_arg,
extern void r_ble_rtc_wake_up_state_clr(void);
extern int os_msys_init(void);
extern void os_msys_deinit(void);
#if CONFIG_BT_CTRL_RUN_IN_FLASH_ONLY
extern void r_ble_ll_scan_start_time_init_compensation(uint32_t init_compensation);
extern void r_priv_sdk_config_insert_proc_time_set(uint16_t insert_proc_time);
#endif // CONFIG_BT_CTRL_RUN_IN_FLASH_ONLY
#if CONFIG_FREERTOS_USE_TICKLESS_IDLE
extern sleep_retention_entries_config_t *r_esp_ble_mac_retention_link_get(uint8_t *size, uint8_t extra);
extern void r_esp_ble_set_wakeup_overhead(uint32_t overhead);
@ -389,13 +393,22 @@ void esp_bt_read_ctrl_log_from_flash(bool output)
static bool s_ble_active = false;
#ifdef CONFIG_PM_ENABLE
static DRAM_ATTR esp_pm_lock_handle_t s_pm_lock = NULL;
#define BTDM_MIN_TIMER_UNCERTAINTY_US (200)
#endif // CONFIG_PM_ENABLE
static DRAM_ATTR modem_clock_lpclk_src_t s_bt_lpclk_src = MODEM_CLOCK_LPCLK_SRC_INVALID;
#define BLE_RTC_DELAY_US_LIGHT_SLEEP (2500)
#define BLE_RTC_DELAY_US_MODEM_SLEEP (500)
#define BLE_CONTROLLER_MALLOC_CAPS (MALLOC_CAP_INTERNAL|MALLOC_CAP_8BIT|MALLOC_CAP_DMA)
void *malloc_ble_controller_mem(size_t size)
{
return heap_caps_malloc(size, BLE_CONTROLLER_MALLOC_CAPS);
}
uint32_t get_ble_controller_free_heap_size(void)
{
return heap_caps_get_free_size(BLE_CONTROLLER_MALLOC_CAPS);
}
static const struct osi_coex_funcs_t s_osi_coex_funcs_ro = {
._magic = OSI_COEX_MAGIC_VALUE,
._version = OSI_COEX_VERSION,
@ -486,11 +499,13 @@ static int esp_ecc_gen_dh_key(const uint8_t *peer_pub_key_x, const uint8_t *peer
return rc;
}
static int esp_intr_alloc_wrapper(int source, int flags, intr_handler_t handler,
void *arg, void **ret_handle_in)
static int esp_intr_alloc_wrapper(int source, int flags, intr_handler_t handler, void *arg, void **ret_handle_in)
{
int rc = esp_intr_alloc(source, flags | ESP_INTR_FLAG_IRAM, handler,
arg, (intr_handle_t *)ret_handle_in);
#if CONFIG_BT_CTRL_RUN_IN_FLASH_ONLY
int rc = esp_intr_alloc(source, flags, handler, arg, (intr_handle_t *)ret_handle_in);
#else
int rc = esp_intr_alloc(source, flags | ESP_INTR_FLAG_IRAM, handler, arg, (intr_handle_t *)ret_handle_in);
#endif
return rc;
}
@ -613,7 +628,7 @@ static void sleep_modem_ble_mac_modem_state_deinit(void)
}
}
void sleep_modem_light_sleep_overhead_set(uint32_t overhead)
void IRAM_ATTR sleep_modem_light_sleep_overhead_set(uint32_t overhead)
{
r_esp_ble_set_wakeup_overhead(overhead);
}
@ -640,13 +655,16 @@ esp_err_t controller_sleep_init(void)
if (rc != ESP_OK) {
goto error;
}
#if CONFIG_FREERTOS_USE_TICKLESS_IDLE
#if CONFIG_BT_LE_SLEEP_ENABLE && !CONFIG_MAC_BB_PD
#endif // CONFIG_PM_ENABLE
#if CONFIG_BT_LE_SLEEP_ENABLE && CONFIG_FREERTOS_USE_TICKLESS_IDLE
#if SOC_PM_RETENTION_HAS_CLOCK_BUG && !CONFIG_MAC_BB_PD
#error "CONFIG_MAC_BB_PD required for BLE light sleep to run properly"
#endif // CONFIG_BT_LE_SLEEP_ENABLE && !CONFIG_MAC_BB_PD
#endif // SOC_PM_RETENTION_HAS_CLOCK_BUG && !CONFIG_MAC_BB_PD
/* Create a new regdma link for BLE related register restoration */
rc = sleep_modem_ble_mac_modem_state_init(1);
assert(rc == 0);
if (rc != ESP_OK) {
goto error;
}
esp_sleep_enable_bt_wakeup();
ESP_LOGW(NIMBLE_PORT_LOG_TAG, "Enable light sleep, the wake up source is BLE timer");
@ -659,19 +677,21 @@ esp_err_t controller_sleep_init(void)
sleep_modem_register_mac_bb_module_prepare_callback(sleep_modem_mac_bb_power_down_prepare,
sleep_modem_mac_bb_power_up_prepare);
#endif // SOC_PM_RETENTION_HAS_CLOCK_BUG && CONFIG_MAC_BB_PD
#endif /* CONFIG_FREERTOS_USE_TICKLESS_IDLE */
#endif /* CONFIG_BT_LE_SLEEP_ENABLE && CONFIG_FREERTOS_USE_TICKLESS_IDLE */
return rc;
#ifdef CONFIG_PM_ENABLE
error:
#if CONFIG_FREERTOS_USE_TICKLESS_IDLE
#endif // CONFIG_PM_ENABLE
#if CONFIG_BT_LE_SLEEP_ENABLE && CONFIG_FREERTOS_USE_TICKLESS_IDLE
#if SOC_PM_RETENTION_HAS_CLOCK_BUG && CONFIG_MAC_BB_PD
sleep_modem_unregister_mac_bb_module_prepare_callback(sleep_modem_mac_bb_power_down_prepare,
sleep_modem_mac_bb_power_up_prepare);
#endif // SOC_PM_RETENTION_HAS_CLOCK_BUG && CONFIG_MAC_BB_PD
esp_sleep_disable_bt_wakeup();
esp_pm_unregister_inform_out_light_sleep_overhead_callback(sleep_modem_light_sleep_overhead_set);
#endif /* CONFIG_FREERTOS_USE_TICKLESS_IDLE */
#endif /* CONFIG_BT_LE_SLEEP_ENABLE && CONFIG_FREERTOS_USE_TICKLESS_IDLE */
#ifdef CONFIG_PM_ENABLE
/*lock should release first and then delete*/
if (s_pm_lock != NULL) {
esp_pm_lock_delete(s_pm_lock);
@ -684,7 +704,7 @@ error:
void controller_sleep_deinit(void)
{
#if CONFIG_FREERTOS_USE_TICKLESS_IDLE
#if CONFIG_BT_LE_SLEEP_ENABLE && CONFIG_FREERTOS_USE_TICKLESS_IDLE
#if SOC_PM_RETENTION_HAS_CLOCK_BUG && CONFIG_MAC_BB_PD
sleep_modem_unregister_mac_bb_module_prepare_callback(sleep_modem_mac_bb_power_down_prepare,
sleep_modem_mac_bb_power_up_prepare);
@ -693,7 +713,7 @@ void controller_sleep_deinit(void)
esp_sleep_disable_bt_wakeup();
sleep_modem_ble_mac_modem_state_deinit();
esp_pm_unregister_inform_out_light_sleep_overhead_callback(sleep_modem_light_sleep_overhead_set);
#endif /* CONFIG_FREERTOS_USE_TICKLESS_IDLE */
#endif /* CONFIG_BT_LE_SLEEP_ENABLE && CONFIG_FREERTOS_USE_TICKLESS_IDLE */
#ifdef CONFIG_PM_ENABLE
/* lock should be released first */
esp_pm_lock_delete(s_pm_lock);
@ -1029,6 +1049,10 @@ esp_err_t esp_bt_controller_enable(esp_bt_mode_t mode)
coex_enable();
#endif // CONFIG_SW_COEXIST_ENABLE
#if CONFIG_BT_CTRL_RUN_IN_FLASH_ONLY
r_ble_ll_scan_start_time_init_compensation(500);
r_priv_sdk_config_insert_proc_time_set(500);
#endif // CONFIG_BT_CTRL_RUN_IN_FLASH_ONLY
if (r_ble_controller_enable(mode) != 0) {
ret = ESP_FAIL;
goto error;
@ -1189,12 +1213,20 @@ esp_err_t esp_ble_tx_power_set(esp_ble_power_type_t power_type, esp_power_level_
switch (power_type) {
case ESP_BLE_PWR_TYPE_DEFAULT:
case ESP_BLE_PWR_TYPE_ADV:
case ESP_BLE_PWR_TYPE_SCAN:
if (r_ble_txpwr_set(ESP_BLE_ENHANCED_PWR_TYPE_DEFAULT, 0, power_level) == 0) {
stat = ESP_OK;
}
break;
case ESP_BLE_PWR_TYPE_ADV:
if (r_ble_txpwr_set(ESP_BLE_ENHANCED_PWR_TYPE_ADV, 0xFF, power_level) == 0) {
stat = ESP_OK;
}
break;
case ESP_BLE_PWR_TYPE_SCAN:
if (r_ble_txpwr_set(ESP_BLE_ENHANCED_PWR_TYPE_SCAN, 0, power_level) == 0) {
stat = ESP_OK;
}
break;
case ESP_BLE_PWR_TYPE_CONN_HDL0:
case ESP_BLE_PWR_TYPE_CONN_HDL1:
case ESP_BLE_PWR_TYPE_CONN_HDL2:
@ -1222,9 +1254,13 @@ esp_err_t esp_ble_tx_power_set_enhanced(esp_ble_enhanced_power_type_t power_type
esp_err_t stat = ESP_FAIL;
switch (power_type) {
case ESP_BLE_ENHANCED_PWR_TYPE_DEFAULT:
if (r_ble_txpwr_set(ESP_BLE_ENHANCED_PWR_TYPE_DEFAULT, 0, power_level) == 0) {
stat = ESP_OK;
}
break;
case ESP_BLE_ENHANCED_PWR_TYPE_SCAN:
case ESP_BLE_ENHANCED_PWR_TYPE_INIT:
if (r_ble_txpwr_set(ESP_BLE_ENHANCED_PWR_TYPE_DEFAULT, 0, power_level) == 0) {
if (r_ble_txpwr_set(ESP_BLE_ENHANCED_PWR_TYPE_SCAN, 0, power_level) == 0) {
stat = ESP_OK;
}
break;
@ -1247,11 +1283,15 @@ esp_power_level_t esp_ble_tx_power_get(esp_ble_power_type_t power_type)
int tx_level = 0;
switch (power_type) {
case ESP_BLE_PWR_TYPE_ADV:
case ESP_BLE_PWR_TYPE_SCAN:
case ESP_BLE_PWR_TYPE_DEFAULT:
tx_level = r_ble_txpwr_get(ESP_BLE_ENHANCED_PWR_TYPE_DEFAULT, 0);
break;
case ESP_BLE_PWR_TYPE_ADV:
tx_level = r_ble_txpwr_get(ESP_BLE_ENHANCED_PWR_TYPE_ADV, 0);
break;
case ESP_BLE_PWR_TYPE_SCAN:
tx_level = r_ble_txpwr_get(ESP_BLE_ENHANCED_PWR_TYPE_SCAN, 0);
break;
case ESP_BLE_PWR_TYPE_CONN_HDL0:
case ESP_BLE_PWR_TYPE_CONN_HDL1:
case ESP_BLE_PWR_TYPE_CONN_HDL2:
@ -1281,9 +1321,11 @@ esp_power_level_t esp_ble_tx_power_get_enhanced(esp_ble_enhanced_power_type_t po
switch (power_type) {
case ESP_BLE_ENHANCED_PWR_TYPE_DEFAULT:
tx_level = r_ble_txpwr_get(ESP_BLE_ENHANCED_PWR_TYPE_DEFAULT, 0);
break;
case ESP_BLE_ENHANCED_PWR_TYPE_SCAN:
case ESP_BLE_ENHANCED_PWR_TYPE_INIT:
tx_level = r_ble_txpwr_get(ESP_BLE_ENHANCED_PWR_TYPE_DEFAULT, 0);
tx_level = r_ble_txpwr_get(ESP_BLE_ENHANCED_PWR_TYPE_SCAN, 0);
break;
case ESP_BLE_ENHANCED_PWR_TYPE_ADV:
case ESP_BLE_ENHANCED_PWR_TYPE_CONN:

View File

@ -148,6 +148,12 @@ extern "C" {
#define DEFAULT_BT_LE_COEX_PHY_CODED_TX_RX_TLIM_EFF CONFIG_BT_LE_COEX_PHY_CODED_TX_RX_TLIM_EFF
#ifdef CONFIG_BT_LE_CTRL_CHECK_CONNECT_IND_ACCESS_ADDRESS
#define DEFAULT_BT_LE_CTRL_CHECK_CONNECT_IND_ACCESS_ADDRESS (CONFIG_BT_LE_CTRL_CHECK_CONNECT_IND_ACCESS_ADDRESS)
#else
#define DEFAULT_BT_LE_CTRL_CHECK_CONNECT_IND_ACCESS_ADDRESS (0)
#endif
#ifdef CONFIG_BT_LE_HCI_INTERFACE_USE_UART
#define HCI_UART_EN CONFIG_BT_LE_HCI_INTERFACE_USE_UART
#else
@ -218,7 +224,6 @@ extern "C" {
#define BLE_LL_TX_PWR_DBM_N (CONFIG_BT_LE_DFT_TX_POWER_LEVEL_DBM_EFF)
#define RUN_BQB_TEST (0)
#define RUN_QA_TEST (0)
#define NIMBLE_DISABLE_SCAN_BACKOFF (0)

View File

@ -690,3 +690,19 @@ config BT_LE_DFT_TX_POWER_LEVEL_DBM_EFF
default 18 if BT_LE_DFT_TX_POWER_LEVEL_P18
default 20 if BT_LE_DFT_TX_POWER_LEVEL_P20
default 0
config BT_LE_CTRL_CHECK_CONNECT_IND_ACCESS_ADDRESS
bool "Enable enhanced Access Address check in CONNECT_IND"
default n
help
Enabling this option will add stricter verification of the Access Address in the CONNECT_IND PDU.
This improves security by ensuring that only connection requests with valid Access Addresses are accepted.
If disabled, only basic checks are applied, improving compatibility.
config BT_CTRL_RUN_IN_FLASH_ONLY
bool "Reduce BLE IRAM usage (READ DOCS FIRST) (EXPERIMENTAL)"
default n
help
Move most IRAM into flash. This will increase the usage of flash and reduce ble performance.
Because the code is moved to the flash, the execution speed of the code is reduced.
To have a small impact on performance, you need to enable flash suspend (SPI_FLASH_AUTO_SUSPEND).

View File

@ -1,5 +1,5 @@
/*
* SPDX-FileCopyrightText: 2015-2024 Espressif Systems (Shanghai) CO LTD
* SPDX-FileCopyrightText: 2015-2025 Espressif Systems (Shanghai) CO LTD
*
* SPDX-License-Identifier: Apache-2.0
*/
@ -125,6 +125,10 @@ extern void r_ble_lll_rfmgmt_set_sleep_cb(void *s_cb, void *w_cb, void *s_arg,
extern void r_ble_rtc_wake_up_state_clr(void);
extern int os_msys_init(void);
extern void os_msys_deinit(void);
#if CONFIG_BT_CTRL_RUN_IN_FLASH_ONLY
extern void r_ble_ll_scan_start_time_init_compensation(uint32_t init_compensation);
extern void r_priv_sdk_config_insert_proc_time_set(uint16_t insert_proc_time);
#endif // CONFIG_BT_CTRL_RUN_IN_FLASH_ONLY
#if CONFIG_FREERTOS_USE_TICKLESS_IDLE
extern sleep_retention_entries_config_t *r_esp_ble_mac_retention_link_get(uint8_t *size, uint8_t extra);
extern void r_esp_ble_set_wakeup_overhead(uint32_t overhead);
@ -385,10 +389,20 @@ void esp_bt_read_ctrl_log_from_flash(bool output)
static bool s_ble_active = false;
#ifdef CONFIG_PM_ENABLE
static DRAM_ATTR esp_pm_lock_handle_t s_pm_lock = NULL;
#define BTDM_MIN_TIMER_UNCERTAINTY_US (200)
#endif // CONFIG_PM_ENABLE
static DRAM_ATTR modem_clock_lpclk_src_t s_bt_lpclk_src = MODEM_CLOCK_LPCLK_SRC_INVALID;
#define BLE_CONTROLLER_MALLOC_CAPS (MALLOC_CAP_INTERNAL|MALLOC_CAP_8BIT|MALLOC_CAP_DMA)
void *malloc_ble_controller_mem(size_t size)
{
return heap_caps_malloc(size, BLE_CONTROLLER_MALLOC_CAPS);
}
uint32_t get_ble_controller_free_heap_size(void)
{
return heap_caps_get_free_size(BLE_CONTROLLER_MALLOC_CAPS);
}
#define BLE_RTC_DELAY_US_LIGHT_SLEEP (5100)
#define BLE_RTC_DELAY_US_MODEM_SLEEP (1500)
@ -485,8 +499,11 @@ static int esp_ecc_gen_dh_key(const uint8_t *peer_pub_key_x, const uint8_t *peer
static int esp_intr_alloc_wrapper(int source, int flags, intr_handler_t handler,
void *arg, void **ret_handle_in)
{
int rc = esp_intr_alloc(source, flags | ESP_INTR_FLAG_IRAM, handler,
arg, (intr_handle_t *)ret_handle_in);
#if CONFIG_BT_CTRL_RUN_IN_FLASH_ONLY
int rc = esp_intr_alloc(source, flags, handler, arg, (intr_handle_t *)ret_handle_in);
#else
int rc = esp_intr_alloc(source, flags | ESP_INTR_FLAG_IRAM, handler, arg, (intr_handle_t *)ret_handle_in);
#endif
return rc;
}
@ -604,7 +621,7 @@ static void sleep_modem_ble_mac_modem_state_deinit(void)
}
}
void sleep_modem_light_sleep_overhead_set(uint32_t overhead)
void IRAM_ATTR sleep_modem_light_sleep_overhead_set(uint32_t overhead)
{
r_esp_ble_set_wakeup_overhead(overhead);
}
@ -631,13 +648,17 @@ esp_err_t controller_sleep_init(void)
if (rc != ESP_OK) {
goto error;
}
rc = esp_deep_sleep_register_hook(&r_esp_ble_stop_wakeup_timing);
assert(rc == 0);
#if CONFIG_FREERTOS_USE_TICKLESS_IDLE
if (rc != ESP_OK) {
goto error;
}
#endif //CONFIG_PM_ENABLE
#if CONFIG_BT_LE_SLEEP_ENABLE && CONFIG_FREERTOS_USE_TICKLESS_IDLE
/* Create a new regdma link for BLE related register restoration */
rc = sleep_modem_ble_mac_modem_state_init(0);
assert(rc == 0);
if (rc != ESP_OK) {
goto error;
}
esp_sleep_enable_bt_wakeup();
ESP_LOGW(NIMBLE_PORT_LOG_TAG, "Enable light sleep, the wake up source is BLE timer");
@ -645,15 +666,17 @@ esp_err_t controller_sleep_init(void)
if (rc != ESP_OK) {
goto error;
}
#endif /* CONFIG_FREERTOS_USE_TICKLESS_IDLE */
#endif /* CONFIG_BT_LE_SLEEP_ENABLE && CONFIG_FREERTOS_USE_TICKLESS_IDLE */
return rc;
#ifdef CONFIG_PM_ENABLE
error:
#if CONFIG_FREERTOS_USE_TICKLESS_IDLE
#endif // CONFIG_PM_ENABLE
#if CONFIG_BT_LE_SLEEP_ENABLE && CONFIG_FREERTOS_USE_TICKLESS_IDLE
esp_sleep_disable_bt_wakeup();
esp_pm_unregister_inform_out_light_sleep_overhead_callback(sleep_modem_light_sleep_overhead_set);
#endif /* CONFIG_FREERTOS_USE_TICKLESS_IDLE */
#endif /* CONFIG_BT_LE_SLEEP_ENABLE && CONFIG_FREERTOS_USE_TICKLESS_IDLE */
#ifdef CONFIG_PM_ENABLE
esp_deep_sleep_deregister_hook(&r_esp_ble_stop_wakeup_timing);
/*lock should release first and then delete*/
if (s_pm_lock != NULL) {
@ -667,12 +690,12 @@ error:
void controller_sleep_deinit(void)
{
#if CONFIG_FREERTOS_USE_TICKLESS_IDLE
#if CONFIG_BT_LE_SLEEP_ENABLE && CONFIG_FREERTOS_USE_TICKLESS_IDLE
r_ble_rtc_wake_up_state_clr();
esp_sleep_disable_bt_wakeup();
sleep_modem_ble_mac_modem_state_deinit();
esp_pm_unregister_inform_out_light_sleep_overhead_callback(sleep_modem_light_sleep_overhead_set);
#endif /* CONFIG_FREERTOS_USE_TICKLESS_IDLE */
#endif /* CONFIG_BT_LE_SLEEP_ENABLE && CONFIG_FREERTOS_USE_TICKLESS_IDLE */
#ifdef CONFIG_PM_ENABLE
esp_deep_sleep_deregister_hook(&r_esp_ble_stop_wakeup_timing);
/* lock should be released first */
@ -1004,7 +1027,10 @@ esp_err_t esp_bt_controller_enable(esp_bt_mode_t mode)
#if CONFIG_SW_COEXIST_ENABLE
coex_enable();
#endif // CONFIG_SW_COEXIST_ENABLE
#if CONFIG_BT_CTRL_RUN_IN_FLASH_ONLY
r_ble_ll_scan_start_time_init_compensation(500);
r_priv_sdk_config_insert_proc_time_set(500);
#endif // CONFIG_BT_CTRL_RUN_IN_FLASH_ONLY
if (r_ble_controller_enable(mode) != 0) {
ret = ESP_FAIL;
goto error;
@ -1165,12 +1191,20 @@ esp_err_t esp_ble_tx_power_set(esp_ble_power_type_t power_type, esp_power_level_
switch (power_type) {
case ESP_BLE_PWR_TYPE_DEFAULT:
case ESP_BLE_PWR_TYPE_ADV:
case ESP_BLE_PWR_TYPE_SCAN:
if (r_ble_txpwr_set(ESP_BLE_ENHANCED_PWR_TYPE_DEFAULT, 0, power_level) == 0) {
stat = ESP_OK;
}
break;
case ESP_BLE_PWR_TYPE_ADV:
if (r_ble_txpwr_set(ESP_BLE_ENHANCED_PWR_TYPE_ADV, 0xFF, power_level) == 0) {
stat = ESP_OK;
}
break;
case ESP_BLE_PWR_TYPE_SCAN:
if (r_ble_txpwr_set(ESP_BLE_ENHANCED_PWR_TYPE_SCAN, 0, power_level) == 0) {
stat = ESP_OK;
}
break;
case ESP_BLE_PWR_TYPE_CONN_HDL0:
case ESP_BLE_PWR_TYPE_CONN_HDL1:
case ESP_BLE_PWR_TYPE_CONN_HDL2:
@ -1198,9 +1232,13 @@ esp_err_t esp_ble_tx_power_set_enhanced(esp_ble_enhanced_power_type_t power_type
esp_err_t stat = ESP_FAIL;
switch (power_type) {
case ESP_BLE_ENHANCED_PWR_TYPE_DEFAULT:
if (r_ble_txpwr_set(ESP_BLE_ENHANCED_PWR_TYPE_DEFAULT, 0, power_level) == 0) {
stat = ESP_OK;
}
break;
case ESP_BLE_ENHANCED_PWR_TYPE_SCAN:
case ESP_BLE_ENHANCED_PWR_TYPE_INIT:
if (r_ble_txpwr_set(ESP_BLE_ENHANCED_PWR_TYPE_DEFAULT, 0, power_level) == 0) {
if (r_ble_txpwr_set(ESP_BLE_ENHANCED_PWR_TYPE_SCAN, 0, power_level) == 0) {
stat = ESP_OK;
}
break;
@ -1223,11 +1261,15 @@ esp_power_level_t esp_ble_tx_power_get(esp_ble_power_type_t power_type)
int tx_level = 0;
switch (power_type) {
case ESP_BLE_PWR_TYPE_ADV:
case ESP_BLE_PWR_TYPE_SCAN:
case ESP_BLE_PWR_TYPE_DEFAULT:
tx_level = r_ble_txpwr_get(ESP_BLE_ENHANCED_PWR_TYPE_DEFAULT, 0);
break;
case ESP_BLE_PWR_TYPE_ADV:
tx_level = r_ble_txpwr_get(ESP_BLE_ENHANCED_PWR_TYPE_ADV, 0);
break;
case ESP_BLE_PWR_TYPE_SCAN:
tx_level = r_ble_txpwr_get(ESP_BLE_ENHANCED_PWR_TYPE_SCAN, 0);
break;
case ESP_BLE_PWR_TYPE_CONN_HDL0:
case ESP_BLE_PWR_TYPE_CONN_HDL1:
case ESP_BLE_PWR_TYPE_CONN_HDL2:
@ -1257,9 +1299,11 @@ esp_power_level_t esp_ble_tx_power_get_enhanced(esp_ble_enhanced_power_type_t po
switch (power_type) {
case ESP_BLE_ENHANCED_PWR_TYPE_DEFAULT:
tx_level = r_ble_txpwr_get(ESP_BLE_ENHANCED_PWR_TYPE_DEFAULT, 0);
break;
case ESP_BLE_ENHANCED_PWR_TYPE_SCAN:
case ESP_BLE_ENHANCED_PWR_TYPE_INIT:
tx_level = r_ble_txpwr_get(ESP_BLE_ENHANCED_PWR_TYPE_DEFAULT, 0);
tx_level = r_ble_txpwr_get(ESP_BLE_ENHANCED_PWR_TYPE_SCAN, 0);
break;
case ESP_BLE_ENHANCED_PWR_TYPE_ADV:
case ESP_BLE_ENHANCED_PWR_TYPE_CONN:

View File

@ -148,6 +148,12 @@ extern "C" {
#define DEFAULT_BT_LE_COEX_PHY_CODED_TX_RX_TLIM_EFF CONFIG_BT_LE_COEX_PHY_CODED_TX_RX_TLIM_EFF
#ifdef CONFIG_BT_LE_CTRL_CHECK_CONNECT_IND_ACCESS_ADDRESS
#define DEFAULT_BT_LE_CTRL_CHECK_CONNECT_IND_ACCESS_ADDRESS (CONFIG_BT_LE_CTRL_CHECK_CONNECT_IND_ACCESS_ADDRESS)
#else
#define DEFAULT_BT_LE_CTRL_CHECK_CONNECT_IND_ACCESS_ADDRESS (0)
#endif
#ifdef CONFIG_BT_LE_HCI_INTERFACE_USE_UART
#define HCI_UART_EN CONFIG_BT_LE_HCI_INTERFACE_USE_UART
#else

View File

@ -6,9 +6,16 @@ if BLE_MESH
help
It is a temporary solution and needs further modifications.
config BLE_MESH_V11_SUPPORT
bool "Support ESP BLE Mesh v1.1 features (Preview)"
default y
help
Support BLE Mesh v1.1 features
config BLE_MESH_RANDOM_ADV_INTERVAL
bool "Support using random adv interval for mesh packets"
select BT_BLE_HIGH_DUTY_ADV_INTERVAL if BT_BLUEDROID_ENABLED
select BT_NIMBLE_HIGH_DUTY_ADV_ITVL if BT_NIMBLE_ENABLED
default n
help
Enable this option to allow using random advertising interval
@ -33,6 +40,7 @@ if BLE_MESH
config BLE_MESH_ACTIVE_SCAN
bool "Support Active Scan in BLE Mesh"
depends on BLE_MESH_V11_SUPPORT
help
Enable this option to allow using BLE Active Scan for BLE Mesh.
@ -282,6 +290,7 @@ if BLE_MESH
config BLE_MESH_PROV_EPA
bool "BLE Mesh enhanced provisioning authentication"
depends on BLE_MESH_PROV
depends on BLE_MESH_V11_SUPPORT
default y
help
Enable this option to support BLE Mesh enhanced provisioning authentication
@ -291,6 +300,7 @@ if BLE_MESH
config BLE_MESH_CERT_BASED_PROV
bool "Support Certificate-based provisioning"
depends on BLE_MESH_PROV
depends on BLE_MESH_V11_SUPPORT
default n
help
Enable this option to support BLE Mesh Certificate-Based Provisioning.
@ -391,6 +401,7 @@ if BLE_MESH
config BLE_MESH_PROXY_SOLIC_PDU_RX
bool "Support receiving Proxy Solicitation PDU"
depends on BLE_MESH_GATT_PROXY_SERVER
depends on BLE_MESH_V11_SUPPORT
help
Enable this option to support receiving Proxy Solicitation PDU.
@ -418,6 +429,7 @@ if BLE_MESH
config BLE_MESH_PROXY_SOLIC_PDU_TX
bool "Support sending Proxy Solicitation PDU"
depends on BLE_MESH_GATT_PROXY_CLIENT
depends on BLE_MESH_V11_SUPPORT
help
Enable this option to support sending Proxy Solicitation PDU.
@ -704,6 +716,7 @@ if BLE_MESH
to perform the IV index recovery procedure.
config BLE_MESH_SAR_ENHANCEMENT
depends on BLE_MESH_V11_SUPPORT
bool "Segmentation and reassembly enhancement"
default n
help
@ -1103,253 +1116,257 @@ if BLE_MESH
help
Enable support for Health Server model.
config BLE_MESH_BRC_CLI
bool "Bridge Configuration Client model"
help
Enable support for Bridge Configuration Client model.
if BLE_MESH_V11_SUPPORT
config BLE_MESH_BRC_SRV
bool "Bridge Configuration Server model"
default n
help
Enable support for Bridge Configuration Server model.
if BLE_MESH_BRC_SRV
config BLE_MESH_MAX_BRIDGING_TABLE_ENTRY_COUNT
int "Maximum number of Bridging Table entries"
range 16 65535
default 16
config BLE_MESH_BRC_CLI
bool "Bridge Configuration Client model"
help
Maximum number of Bridging Table entries that the Bridge Configuration Server can support.
Enable support for Bridge Configuration Client model.
config BLE_MESH_BRIDGE_CRPL
int "Maximum capacity of bridge replay protection list"
default 5
range 1 255
help
This option specifies the maximum capacity of the bridge replay
protection list. The bridge replay protection list is used to
prevent a bridged subnet from replay attack, which will store the
source address and sequence number of the received bridge messages.
endif #BLE_MESH_BRC_SRV
config BLE_MESH_PRB_CLI
bool "Mesh Private Beacon Client model"
help
Enable support for Mesh Private Beacon Client model.
config BLE_MESH_PRB_SRV
bool "Mesh Private Beacon Server model"
help
Enable support for Mesh Private Beacon Server model.
config BLE_MESH_ODP_CLI
bool "On-Demand Private Proxy Client model"
help
Enable support for On-Demand Private Proxy Client model.
config BLE_MESH_ODP_SRV
bool "On-Demand Private Proxy Server model"
depends on BLE_MESH_PROXY_SOLIC_PDU_RX
select BLE_MESH_SRPL_SRV
help
Enable support for On-Demand Private Proxy Server model.
config BLE_MESH_SRPL_CLI
bool "Solicitation PDU RPL Configuration Client model"
help
Enable support for Solicitation PDU RPL Configuration Client model.
config BLE_MESH_SRPL_SRV
bool "Solicitation PDU RPL Configuration Server model"
depends on BLE_MESH_PROXY_SOLIC_PDU_RX
help
Enable support for Solicitation PDU RPL Configuration Server model.
Note:
This option depends on the functionality of receiving Solicitation
PDU. If the device doesn't support receiving Solicitation PDU, then
there is no need to enable this server model.
config BLE_MESH_AGG_CLI
bool "Opcodes Aggregator Client model"
help
Enable support for Opcodes Aggregator Client model.
config BLE_MESH_AGG_SRV
bool "Opcodes Aggregator Server model"
help
Enable support for Opcodes Aggregator Server model.
config BLE_MESH_SAR_CLI
bool "SAR Configuration Client model"
help
Enable support for SAR Configuration Client model.
config BLE_MESH_SAR_SRV
bool "SAR Configuration Server model"
help
Enable support for SAR Configuration Server model.
config BLE_MESH_COMP_DATA_1
bool "Support Composition Data Page 1"
help
Composition Data Page 1 contains information about the relationships
among models.
Each model either can be a root model or can extend other models.
config BLE_MESH_COMP_DATA_128
bool "Support Composition Data Page 128"
help
Composition Data Page 128 is used to indicate the structure of
elements, features, and models of a node after the successful
execution of the Node Address Refresh procedure or the Node
Composition Refresh procedure, or after the execution of the
Node Removal procedure followed by the provisioning process.
Composition Data Page 128 shall be present if the node supports
the Remote Provisioning Server model; otherwise it is optional.
config BLE_MESH_MODELS_METADATA_0
bool "Support Models Metadata Page 0"
help
The Models Metadata state contains metadata of a nodes models.
The Models Metadata state is composed of a number of pages of
information.
Models Metadata Page 0 shall be present if the node supports
the Large Composition Data Server model.
config BLE_MESH_MODELS_METADATA_128
bool "Support Models Metadata Page 128"
depends on BLE_MESH_MODELS_METADATA_0
help
The Models Metadata state contains metadata of a nodes models.
The Models Metadata state is composed of a number of pages of
information.
Models Metadata Page 128 contains metadata for the nodes models
after the successful execution of the Node Address Refresh
procedure or the Node Composition Refresh procedure, or after
the execution of the Node Removal procedure followed by the
provisioning process.
Models Metadata Page 128 shall be present if the node supports
the Remote Provisioning Server model and the node supports the
Large Composition Data Server model.
config BLE_MESH_LCD_CLI
bool "Large Composition Data Client model"
help
Enable support for Large Composition Data Client model.
config BLE_MESH_LCD_SRV
bool "Large Composition Data Server model"
select BLE_MESH_MODELS_METADATA_0
help
Enable support for Large Composition Data Server model.
config BLE_MESH_RPR_CLI
bool "Remote Provisioning Client model"
depends on BLE_MESH_PROVISIONER
select BLE_MESH_PROV
help
Enable support for Remote Provisioning Client model
if BLE_MESH_RPR_CLI
config BLE_MESH_RPR_CLI_PROV_SAME_TIME
int "Maximum number of PB-Remote running at the same time by Provisioner"
range 1 5
default 2
help
This option specifies how many devices can be provisioned at the same time
using PB-REMOTE. For example, if the value is 2, it means a Provisioner can
provision two unprovisioned devices with PB-REMOTE at the same time.
endif # BLE_MESH_RPR_CLI
config BLE_MESH_RPR_SRV
bool "Remote Provisioning Server model"
depends on BLE_MESH_NODE
select BLE_MESH_PB_ADV
help
Enable support for Remote Provisioning Server model
if BLE_MESH_RPR_SRV
config BLE_MESH_RPR_SRV_MAX_SCANNED_ITEMS
int "Maximum number of device information can be scanned"
range 4 255
default 10
help
This option specifies how many device information can a Remote
Provisioning Server store each time while scanning.
config BLE_MESH_RPR_SRV_ACTIVE_SCAN
bool "Support Active Scan for remote provisioning"
select BLE_MESH_ACTIVE_SCAN
help
Enable this option to support Active Scan for remote provisioning.
config BLE_MESH_RPR_SRV_MAX_EXT_SCAN
int "Maximum number of extended scan procedures"
range 1 10
default 1
help
This option specifies how many extended scan procedures can be
started by the Remote Provisioning Server.
endif # BLE_MESH_RPR_SRV
config BLE_MESH_DF_CLI
bool "Directed Forwarding Configuration Client model"
help
Enable support for Directed Forwarding Configuration Client model.
config BLE_MESH_DF_SRV
bool "Directed Forwarding Configuration Server model"
help
Enable support for Directed Forwarding Configuration Server model.
if BLE_MESH_DF_SRV
config BLE_MESH_MAX_DISC_TABLE_ENTRY_COUNT
int "Maximum number of discovery table entries in a given subnet"
range 2 255
default 2
help
Maximum number of Discovery Table entries supported by the node in a given subnet.
config BLE_MESH_MAX_FORWARD_TABLE_ENTRY_COUNT
int "Maximum number of forward table entries in a given subnet"
range 2 64
default 2
help
Maximum number of Forward Table entries supported by the node in a given subnet.
config BLE_MESH_MAX_DEPS_NODES_PER_PATH
int "Maximum number of dependent nodes per path"
range 2 64
default 2
help
Maximum size of dependent nodes list supported by each forward table entry.
config BLE_MESH_PATH_MONITOR_TEST
bool "Enable Path Monitoring test mode"
config BLE_MESH_BRC_SRV
bool "Bridge Configuration Server model"
default n
help
The option only removes the Path Use timer; all other behavior of the
device is not changed.
If Path Monitoring test mode is going to be used, this option should
be enabled.
Enable support for Bridge Configuration Server model.
if BLE_MESH_GATT_PROXY_SERVER
config BLE_MESH_SUPPORT_DIRECTED_PROXY
bool "Enable Directed Proxy functionality"
default y
if BLE_MESH_BRC_SRV
config BLE_MESH_MAX_BRIDGING_TABLE_ENTRY_COUNT
int "Maximum number of Bridging Table entries"
range 16 65535
default 16
help
Support Directed Proxy functionality.
endif
Maximum number of Bridging Table entries that the Bridge Configuration Server can support.
endif # BLE_MESH_DF_SRV
config BLE_MESH_BRIDGE_CRPL
int "Maximum capacity of bridge replay protection list"
default 5
range 1 255
help
This option specifies the maximum capacity of the bridge replay
protection list. The bridge replay protection list is used to
prevent a bridged subnet from replay attack, which will store the
source address and sequence number of the received bridge messages.
endif #BLE_MESH_BRC_SRV
config BLE_MESH_PRB_CLI
bool "Mesh Private Beacon Client model"
help
Enable support for Mesh Private Beacon Client model.
config BLE_MESH_PRB_SRV
bool "Mesh Private Beacon Server model"
help
Enable support for Mesh Private Beacon Server model.
config BLE_MESH_ODP_CLI
bool "On-Demand Private Proxy Client model"
help
Enable support for On-Demand Private Proxy Client model.
config BLE_MESH_ODP_SRV
bool "On-Demand Private Proxy Server model"
depends on BLE_MESH_PROXY_SOLIC_PDU_RX
select BLE_MESH_SRPL_SRV
help
Enable support for On-Demand Private Proxy Server model.
config BLE_MESH_SRPL_CLI
bool "Solicitation PDU RPL Configuration Client model"
help
Enable support for Solicitation PDU RPL Configuration Client model.
config BLE_MESH_SRPL_SRV
bool "Solicitation PDU RPL Configuration Server model"
depends on BLE_MESH_PROXY_SOLIC_PDU_RX
help
Enable support for Solicitation PDU RPL Configuration Server model.
Note:
This option depends on the functionality of receiving Solicitation
PDU. If the device doesn't support receiving Solicitation PDU, then
there is no need to enable this server model.
config BLE_MESH_AGG_CLI
bool "Opcodes Aggregator Client model"
help
Enable support for Opcodes Aggregator Client model.
config BLE_MESH_AGG_SRV
bool "Opcodes Aggregator Server model"
help
Enable support for Opcodes Aggregator Server model.
config BLE_MESH_SAR_CLI
bool "SAR Configuration Client model"
help
Enable support for SAR Configuration Client model.
config BLE_MESH_SAR_SRV
bool "SAR Configuration Server model"
help
Enable support for SAR Configuration Server model.
config BLE_MESH_COMP_DATA_1
bool "Support Composition Data Page 1"
help
Composition Data Page 1 contains information about the relationships
among models.
Each model either can be a root model or can extend other models.
config BLE_MESH_COMP_DATA_128
bool "Support Composition Data Page 128"
help
Composition Data Page 128 is used to indicate the structure of
elements, features, and models of a node after the successful
execution of the Node Address Refresh procedure or the Node
Composition Refresh procedure, or after the execution of the
Node Removal procedure followed by the provisioning process.
Composition Data Page 128 shall be present if the node supports
the Remote Provisioning Server model; otherwise it is optional.
config BLE_MESH_MODELS_METADATA_0
bool "Support Models Metadata Page 0"
help
The Models Metadata state contains metadata of a nodes models.
The Models Metadata state is composed of a number of pages of
information.
Models Metadata Page 0 shall be present if the node supports
the Large Composition Data Server model.
config BLE_MESH_MODELS_METADATA_128
bool "Support Models Metadata Page 128"
depends on BLE_MESH_MODELS_METADATA_0
help
The Models Metadata state contains metadata of a nodes models.
The Models Metadata state is composed of a number of pages of
information.
Models Metadata Page 128 contains metadata for the nodes models
after the successful execution of the Node Address Refresh
procedure or the Node Composition Refresh procedure, or after
the execution of the Node Removal procedure followed by the
provisioning process.
Models Metadata Page 128 shall be present if the node supports
the Remote Provisioning Server model and the node supports the
Large Composition Data Server model.
config BLE_MESH_LCD_CLI
bool "Large Composition Data Client model"
help
Enable support for Large Composition Data Client model.
config BLE_MESH_LCD_SRV
bool "Large Composition Data Server model"
select BLE_MESH_MODELS_METADATA_0
help
Enable support for Large Composition Data Server model.
config BLE_MESH_RPR_CLI
bool "Remote Provisioning Client model"
depends on BLE_MESH_PROVISIONER
select BLE_MESH_PROV
help
Enable support for Remote Provisioning Client model
if BLE_MESH_RPR_CLI
config BLE_MESH_RPR_CLI_PROV_SAME_TIME
int "Maximum number of PB-Remote running at the same time by Provisioner"
range 1 5
default 2
help
This option specifies how many devices can be provisioned at the same time
using PB-REMOTE. For example, if the value is 2, it means a Provisioner can
provision two unprovisioned devices with PB-REMOTE at the same time.
endif # BLE_MESH_RPR_CLI
config BLE_MESH_RPR_SRV
bool "Remote Provisioning Server model"
depends on BLE_MESH_NODE
select BLE_MESH_PB_ADV
help
Enable support for Remote Provisioning Server model
if BLE_MESH_RPR_SRV
config BLE_MESH_RPR_SRV_MAX_SCANNED_ITEMS
int "Maximum number of device information can be scanned"
range 4 255
default 10
help
This option specifies how many device information can a Remote
Provisioning Server store each time while scanning.
config BLE_MESH_RPR_SRV_ACTIVE_SCAN
bool "Support Active Scan for remote provisioning"
select BLE_MESH_ACTIVE_SCAN
help
Enable this option to support Active Scan for remote provisioning.
config BLE_MESH_RPR_SRV_MAX_EXT_SCAN
int "Maximum number of extended scan procedures"
range 1 10
default 1
help
This option specifies how many extended scan procedures can be
started by the Remote Provisioning Server.
endif # BLE_MESH_RPR_SRV
config BLE_MESH_DF_CLI
bool "Directed Forwarding Configuration Client model"
help
Enable support for Directed Forwarding Configuration Client model.
config BLE_MESH_DF_SRV
bool "Directed Forwarding Configuration Server model"
help
Enable support for Directed Forwarding Configuration Server model.
if BLE_MESH_DF_SRV
config BLE_MESH_MAX_DISC_TABLE_ENTRY_COUNT
int "Maximum number of discovery table entries in a given subnet"
range 2 255
default 2
help
Maximum number of Discovery Table entries supported by the node in a given subnet.
config BLE_MESH_MAX_FORWARD_TABLE_ENTRY_COUNT
int "Maximum number of forward table entries in a given subnet"
range 2 64
default 2
help
Maximum number of Forward Table entries supported by the node in a given subnet.
config BLE_MESH_MAX_DEPS_NODES_PER_PATH
int "Maximum number of dependent nodes per path"
range 2 64
default 2
help
Maximum size of dependent nodes list supported by each forward table entry.
config BLE_MESH_PATH_MONITOR_TEST
bool "Enable Path Monitoring test mode"
default n
help
The option only removes the Path Use timer; all other behavior of the
device is not changed.
If Path Monitoring test mode is going to be used, this option should
be enabled.
if BLE_MESH_GATT_PROXY_SERVER
config BLE_MESH_SUPPORT_DIRECTED_PROXY
bool "Enable Directed Proxy functionality"
default y
help
Support Directed Proxy functionality.
endif
endif # BLE_MESH_DF_SRV
endif # BLE_MESH_V11_SUPPORT
endmenu #Support for BLE Mesh Foundation models
@ -1466,6 +1483,7 @@ if BLE_MESH
config BLE_MESH_MBT_CLI
bool "BLOB Transfer Client model"
depends on BLE_MESH_V11_SUPPORT
default n
help
Enable support for BLOB Transfer Client model.
@ -1484,6 +1502,7 @@ if BLE_MESH
config BLE_MESH_MBT_SRV
bool "BLOB Transfer Server model"
depends on BLE_MESH_V11_SUPPORT
default n
help
Enable support for BLOB Transfer Server model.

View File

@ -10,11 +10,13 @@
#include "btc_ble_mesh_prov.h"
#include "btc_ble_mesh_config_model.h"
#include "btc_ble_mesh_health_model.h"
#include "btc_ble_mesh_prb_model.h"
#include "btc_ble_mesh_generic_model.h"
#include "btc_ble_mesh_time_scene_model.h"
#include "btc_ble_mesh_sensor_model.h"
#include "btc_ble_mesh_lighting_model.h"
#if CONFIG_BLE_MESH_V11_SUPPORT
#include "btc_ble_mesh_prb_model.h"
#include "btc_ble_mesh_brc_model.h"
#include "btc_ble_mesh_odp_model.h"
#include "btc_ble_mesh_srpl_model.h"
@ -24,6 +26,8 @@
#include "btc_ble_mesh_rpr_model.h"
#include "btc_ble_mesh_df_model.h"
#include "btc_ble_mesh_mbt_model.h"
#include "mesh_v1.1/utils.h"
#endif /* CONFIG_BLE_MESH_V11_SUPPORT */
#include "adv.h"
#include "mesh/kernel.h"
@ -65,8 +69,6 @@
#include "mesh/state_binding.h"
#include "local.h"
#include "mesh_v1.1/utils.h"
#include "esp_ble_mesh_common_api.h"
#include "esp_ble_mesh_provisioning_api.h"
#include "esp_ble_mesh_networking_api.h"

View File

@ -2,7 +2,7 @@
/*
* SPDX-FileCopyrightText: 2017 Intel Corporation
* SPDX-FileContributor: 2018-2021 Espressif Systems (Shanghai) CO LTD
* SPDX-FileContributor: 2018-2024 Espressif Systems (Shanghai) CO LTD
*
* SPDX-License-Identifier: Apache-2.0
*/
@ -11,6 +11,7 @@
#include <errno.h>
#include "mesh.h"
#include "tag.h"
#include "adv.h"
#include "lpn.h"
#include "friend.h"
@ -22,7 +23,9 @@
#include "fast_prov.h"
#include "pvnr_mgmt.h"
#if CONFIG_BLE_MESH_V11_SUPPORT
#include "mesh_v1.1/utils.h"
#endif
#define BLE_MESH_SDU_MAX_LEN 384
@ -814,6 +817,135 @@ static bool ready_to_send(uint16_t dst)
return false;
}
#if !CONFIG_BLE_MESH_V11_SUPPORT
static bool use_friend_cred(uint16_t net_idx, uint16_t dst)
{
/* Currently LPN only supports using NetKey in bt_mesh.sub[0] */
if (IS_ENABLED(CONFIG_BLE_MESH_LOW_POWER) &&
net_idx == 0 &&
bt_mesh_lpn_match(dst)) {
return true;
}
if (IS_ENABLED(CONFIG_BLE_MESH_FRIEND) &&
bt_mesh_friend_match(net_idx, dst)) {
return true;
}
return false;
}
bool bt_mesh_valid_security_cred(struct bt_mesh_net_tx *tx)
{
/* If the message is tagged with immutable-credentials,
* then the security credentials shall not be changed
* in lower layers.
* If not, later a better security credentials could be
* chosen for the message.
*/
if (!bt_mesh_tag_immutable_cred(tx->ctx->send_tag)) {
return true;
}
if (tx->ctx->send_cred > BLE_MESH_FRIENDSHIP_CRED) {
return false;
}
if (tx->ctx->send_cred == BLE_MESH_FRIENDSHIP_CRED &&
!use_friend_cred(tx->ctx->net_idx, tx->ctx->addr)) {
return false;
}
return true;
}
void bt_mesh_choose_better_security_cred(struct bt_mesh_net_tx *tx)
{
uint8_t send_cred = 0U;
uint8_t send_tag = 0U;
uint16_t net_idx = 0U;
uint16_t addr = 0U;
send_cred = tx->ctx->send_cred;
send_tag = tx->ctx->send_tag;
net_idx = tx->ctx->net_idx;
addr = tx->ctx->addr;
/* If the message is tagged with immutable-credentials,
* then the security credentials shall not be changed.
*/
if (bt_mesh_tag_immutable_cred(send_tag)) {
return;
}
if (send_cred > BLE_MESH_FRIENDSHIP_CRED) {
BT_INFO("Use managed flooding security credentials");
tx->ctx->send_cred = BLE_MESH_FLOODING_CRED;
return;
}
if (send_cred == BLE_MESH_FRIENDSHIP_CRED) {
if (!use_friend_cred(net_idx, addr)) {
BT_INFO("Use managed flooding security credentials");
tx->ctx->send_cred = BLE_MESH_FLOODING_CRED;
tx->ctx->send_tag = send_tag | BLE_MESH_TAG_IMMUTABLE_CRED;
} else {
/* TODO:
* For LPN, do we need to change the friendship security
* credentials to managed flooding credentials?
* If changed, this could increase the possibility that
* the corresponding Friend node receives this message.
*/
}
return;
}
/* If the message is destinated to a LPN, the following could be
* introduced to send the message with the friendship credentials.
*
* For LPN, this optimization should not be introduced, since it
* may cause the message failed to received by the Friend node,
* using friendship credentials will make the message can not be
* relayed by other mesh nodes.
*/
if (IS_ENABLED(CONFIG_BLE_MESH_FRIEND) &&
BLE_MESH_ADDR_IS_UNICAST(addr) &&
bt_mesh_friend_match(net_idx, addr)) {
BT_INFO("Use friendship security credentials");
tx->ctx->send_cred = BLE_MESH_FRIENDSHIP_CRED;
tx->ctx->send_tag = send_tag | BLE_MESH_TAG_IMMUTABLE_CRED;
return;
}
/**
* Spec 3.7.3.1
* The Low power node in friendship should use friendship security
* material.
*
* But in Spec 3.6.6.2
* Depending on the value of the Publish Friendship Credentials Flag
* (see Section 4.2.3.4), the Low Power node model publishes messages
* using either the friendship security credentials or the managed
* flooding security credentials (see Section 3.9.6.3.1).
*
* So use the BLE_MESH_TAG_IMMUTABLE_CRED to indicate that the
* credentials of the message should not be changed when the
* message is sent by model publishing, even though the spec
* didn't require this flag to be set when model publishing.
*/
#if CONFIG_BLE_MESH_LOW_POWER
if (BLE_MESH_ADDR_IS_UNICAST(addr) &&
bt_mesh.lpn.frnd == addr &&
!bt_mesh_tag_immutable_cred(send_tag)) {
tx->ctx->send_cred = BLE_MESH_FRIENDSHIP_CRED;
tx->ctx->send_tag = send_tag | BLE_MESH_TAG_IMMUTABLE_CRED;
return;
}
#endif
}
#endif /* !CONFIG_BLE_MESH_V11_SUPPORT */
static int model_send(struct bt_mesh_model *model,
struct bt_mesh_net_tx *tx, bool implicit_bind,
struct net_buf_simple *msg,
@ -1108,11 +1240,13 @@ size_t bt_mesh_rx_devkey_size(void)
#if CONFIG_BLE_MESH_NODE && !CONFIG_BLE_MESH_PROVISIONER
if (bt_mesh_is_provisioned()) {
size = 1;
#if CONFIG_BLE_MESH_RPR_SRV
if (bt_mesh_dev_key_ca_valid()) {
size += 1;
}
#endif /* CONFIG_BLE_MESH_RPR_SRV */
}
#endif
#endif /* CONFIG_BLE_MESH_NODE && !CONFIG_BLE_MESH_PROVISIONER */
#if !CONFIG_BLE_MESH_NODE && CONFIG_BLE_MESH_PROVISIONER
if (bt_mesh_is_provisioner_en()) {
@ -1122,9 +1256,11 @@ size_t bt_mesh_rx_devkey_size(void)
#if CONFIG_BLE_MESH_NODE && CONFIG_BLE_MESH_PROVISIONER
size = 1;
#if CONFIG_BLE_MESH_RPR_SRV
if (bt_mesh_dev_key_ca_valid()) {
size += 1;
}
#endif /* CONFIG_BLE_MESH_RPR_SRV */
if (bt_mesh_is_provisioner_en()) {
size += 1;
}
@ -1156,7 +1292,9 @@ const uint8_t *bt_mesh_rx_devkey_get(size_t index, uint16_t src)
#if CONFIG_BLE_MESH_NODE && CONFIG_BLE_MESH_PROVISIONER
if (index == 0) {
key = bt_mesh.dev_key;
} else if (index == 1 && bt_mesh_dev_key_ca_valid()) {
} else
#if CONFIG_BLE_MESH_RPR_SRV
if (index == 1 && bt_mesh_dev_key_ca_valid()) {
/* If index == 1, there are two cases.
* 1. bt_mesh_dev_key_ca_valid() is true, it should be return bt_mesh.dev_key_ca.
* 2. bt_mesh_is_provisioner_en() is true, it should be return bt_mesh_provisioner_dev_key_get(src).
@ -1166,7 +1304,9 @@ const uint8_t *bt_mesh_rx_devkey_get(size_t index, uint16_t src)
* Then this round of function bt_mesh_rx_devkey_get(2, src) will return bt_mesh_provisioner_dev_key_get(src).
*/
key = bt_mesh.dev_key_ca;
} else {
} else
#endif
{
key = bt_mesh_provisioner_dev_key_get(src);
}
#endif

View File

@ -2,7 +2,7 @@
/*
* SPDX-FileCopyrightText: 2017 Intel Corporation
* SPDX-FileContributor: 2018-2021 Espressif Systems (Shanghai) CO LTD
* SPDX-FileContributor: 2018-2024 Espressif Systems (Shanghai) CO LTD
*
* SPDX-License-Identifier: Apache-2.0
*/
@ -25,7 +25,9 @@
#include "pvnr_mgmt.h"
#include "mesh/common.h"
#if CONFIG_BLE_MESH_V11_SUPPORT
#include "mesh_v1.1/utils.h"
#endif
#if defined(CONFIG_BLE_MESH_UNPROVISIONED_BEACON_INTERVAL)
#define UNPROV_BEACON_INTERVAL K_SECONDS(CONFIG_BLE_MESH_UNPROVISIONED_BEACON_INTERVAL)
@ -33,7 +35,11 @@
#define UNPROV_BEACON_INTERVAL K_SECONDS(5)
#endif
#if CONFIG_BLE_MESH_BQB_TEST
#define SECURE_BEACON_INTERVAL K_SECONDS(3)
#else
#define SECURE_BEACON_INTERVAL K_SECONDS(10)
#endif
/* 3 transmissions, 20ms interval */
#define UNPROV_XMIT BLE_MESH_TRANSMIT(2, 20)
@ -472,12 +478,13 @@ void bt_mesh_beacon_recv(struct net_buf_simple *buf, int8_t rssi)
bt_mesh_provisioner_unprov_beacon_recv(buf, rssi);
}
if (IS_ENABLED(CONFIG_BLE_MESH_RPR_SRV) &&
bt_mesh_is_provisioned()) {
#if CONFIG_BLE_MESH_RPR_SRV
if (bt_mesh_is_provisioned()) {
const bt_mesh_addr_t *addr = bt_mesh_get_unprov_dev_addr();
bt_mesh_unprov_dev_fifo_enqueue(buf->data, addr->val, bt_mesh_get_adv_type());
bt_mesh_rpr_srv_unprov_beacon_recv(buf, bt_mesh_get_adv_type(), addr, rssi);
}
#endif
break;
case BEACON_TYPE_SECURE:
secure_beacon_recv(buf);

View File

@ -32,7 +32,9 @@
#include "net.h"
#include "beacon.h"
#if CONFIG_BLE_MESH_V11_SUPPORT
#include "mesh_v1.1/utils.h"
#endif
struct bt_mesh_dev bt_mesh_dev;
@ -1196,6 +1198,7 @@ uint16_t bt_mesh_gattc_get_service_uuid(struct bt_mesh_conn *conn)
int bt_mesh_gattc_conn_create(const bt_mesh_addr_t *addr, uint16_t service_uuid)
{
tBTA_BLE_CONN_PARAMS conn_1m_param = {0};
uint8_t zero[6] = {0};
int i;
@ -1249,10 +1252,14 @@ int bt_mesh_gattc_conn_create(const bt_mesh_addr_t *addr, uint16_t service_uuid)
* Slave_latency: 0x0
* Supervision_timeout: 1s
*/
BTA_DmSetBlePrefConnParams(bt_mesh_gattc_info[i].addr.val, 0x18, 0x18, 0x00, 0x64);
conn_1m_param.interval_min = 0x18;
conn_1m_param.interval_max = 0x18;
conn_1m_param.latency = 0;
conn_1m_param.supervision_timeout = 0x64;
BTA_GATTC_Open(bt_mesh_gattc_if, bt_mesh_gattc_info[i].addr.val,
bt_mesh_gattc_info[i].addr.type, true, BTA_GATT_TRANSPORT_LE, FALSE);
BTA_GATTC_Enh_Open(bt_mesh_gattc_if, bt_mesh_gattc_info[i].addr.val,
bt_mesh_gattc_info[i].addr.type, true, BTA_GATT_TRANSPORT_LE, FALSE, BLE_ADDR_UNKNOWN_TYPE,
BTA_BLE_PHY_1M_MASK, &conn_1m_param, NULL, NULL);
return 0;
}

View File

@ -2,7 +2,7 @@
/*
* SPDX-FileCopyrightText: 2017 Intel Corporation
* SPDX-FileContributor: 2018-2023 Espressif Systems (Shanghai) CO LTD
* SPDX-FileContributor: 2018-2024 Espressif Systems (Shanghai) CO LTD
*
* SPDX-License-Identifier: Apache-2.0
*/
@ -30,7 +30,9 @@
#include "mesh/common.h"
#include "heartbeat.h"
#if CONFIG_BLE_MESH_V11_SUPPORT
#include "mesh_v1.1/utils.h"
#endif
#define DEFAULT_TTL 7
@ -38,6 +40,158 @@ static struct bt_mesh_cfg_srv *conf;
static struct label labels[CONFIG_BLE_MESH_LABEL_COUNT];
#if !CONFIG_BLE_MESH_V11_SUPPORT
const void *comp_0;
static uint8_t bt_mesh_comp_page_check(uint8_t page, bool largest)
{
/* If the page doesn't exist, TWO situations currently:
* 1. For Composition Data Get:
* With the Page field set to the largest page number of
* the Composition Data that the node supports and that is
* less than the Page field value of the received Config
* Composition Data Get message;
* 2. For Large Composition Data Get:
* The Page field shall be set to the largest page number
* of the Composition Data that the node supports.
*/
ARG_UNUSED(largest);
if (page != 0) {
BT_WARN("Composition Data Page %d not exists", page);
}
return 0;
}
static inline uint16_t get_comp_elem_size(struct bt_mesh_elem *elem)
{
return (4 + elem->model_count * 2 + elem->vnd_model_count * 4);
}
static uint16_t get_comp_data_size(const struct bt_mesh_comp *comp)
{
uint16_t size = 10; /* CID + PID + VID + CRPL + Features */
for (int i = 0; i < comp->elem_count; i++) {
size += get_comp_elem_size(&(comp->elem[i]));
}
return size;
}
static void get_comp_data(struct net_buf_simple *buf,
const struct bt_mesh_comp *comp,
bool full_element)
{
struct bt_mesh_model *model = NULL;
struct bt_mesh_elem *elem = NULL;
uint16_t feat = 0;
if (IS_ENABLED(CONFIG_BLE_MESH_RELAY)) {
feat |= BLE_MESH_FEAT_RELAY;
}
if (IS_ENABLED(CONFIG_BLE_MESH_GATT_PROXY_SERVER)) {
feat |= BLE_MESH_FEAT_PROXY;
}
if (IS_ENABLED(CONFIG_BLE_MESH_FRIEND)) {
feat |= BLE_MESH_FEAT_FRIEND;
}
if (IS_ENABLED(CONFIG_BLE_MESH_LOW_POWER)) {
feat |= BLE_MESH_FEAT_LOW_POWER;
}
net_buf_simple_add_le16(buf, comp->cid);
net_buf_simple_add_le16(buf, comp->pid);
net_buf_simple_add_le16(buf, comp->vid);
net_buf_simple_add_le16(buf, CONFIG_BLE_MESH_CRPL);
net_buf_simple_add_le16(buf, feat);
for (size_t i = 0; i < comp->elem_count; i++) {
elem = &(comp->elem[i]);
/* If "full_element" is true, which means the complete list
* of models within the element needs to fit in the data,
* otherwise the element shall not be reported.
*/
if (full_element &&
net_buf_simple_tailroom(buf) < get_comp_elem_size(elem)) {
return;
}
net_buf_simple_add_le16(buf, elem->loc);
net_buf_simple_add_u8(buf, elem->model_count);
net_buf_simple_add_u8(buf, elem->vnd_model_count);
for (size_t j = 0; j < elem->model_count; j++) {
model = &(elem->models[j]);
net_buf_simple_add_le16(buf, model->id);
}
for (size_t j = 0; j < elem->vnd_model_count; j++) {
model = &(elem->vnd_models[j]);
net_buf_simple_add_le16(buf, model->vnd.company);
net_buf_simple_add_le16(buf, model->vnd.id);
}
}
}
static int fetch_comp_data(struct net_buf_simple *buf,
const struct bt_mesh_comp *comp,
uint8_t page, uint16_t offset,
bool full_element)
{
uint16_t size = get_comp_data_size(comp);
if (offset >= size) {
BT_WARN("Too large offset %d for comp data %d, size %d",
page, offset, size);
return 0;
}
if (net_buf_simple_tailroom(buf) < 10 ||
size - offset > net_buf_simple_tailroom(buf)) {
BT_ERR("Too small buffer for comp data %d, %d, expected %d",
page, buf->size, size - offset);
return -EINVAL;
}
if (offset) {
struct net_buf_simple *pdu = bt_mesh_alloc_buf(size);
if (pdu == NULL) {
BT_ERR("%s, Out of memory", __func__);
return -ENOMEM;
}
get_comp_data(pdu, comp, false);
/* Get part of Composition Data Page 0/128 */
net_buf_simple_add_mem(buf, pdu->data + offset, pdu->len - offset);
bt_mesh_free_buf(pdu);
} else {
get_comp_data(buf, comp, full_element);
}
return 0;
}
static int bt_mesh_get_comp_data(struct net_buf_simple *buf,
uint8_t page, uint16_t offset,
bool full_element)
{
if (page == 0) {
return fetch_comp_data(buf, comp_0, page, offset, full_element);
}
BT_ERR("Invalid Composition Data Page %d", page);
return -EINVAL;
}
#endif /* !CONFIG_BLE_MESH_V11_SUPPORT */
static void comp_data_get(struct bt_mesh_model *model,
struct bt_mesh_msg_ctx *ctx,
struct net_buf_simple *buf)
@ -1133,7 +1287,7 @@ static struct label *va_find(const uint8_t *label_uuid,
return match;
}
static uint8_t va_add(uint8_t *label_uuid, uint16_t *addr)
uint8_t va_add(uint8_t *label_uuid, uint16_t *addr)
{
struct label *update = NULL, *free_slot = NULL;
@ -1141,6 +1295,9 @@ static uint8_t va_add(uint8_t *label_uuid, uint16_t *addr)
if (update) {
update->ref++;
va_store(update);
if (addr) {
*addr = update->addr;
}
return STATUS_SUCCESS;
}
@ -1160,7 +1317,7 @@ static uint8_t va_add(uint8_t *label_uuid, uint16_t *addr)
return STATUS_SUCCESS;
}
static uint8_t va_del(uint8_t *label_uuid, uint16_t *addr)
uint8_t va_del(uint8_t *label_uuid, uint16_t *addr)
{
struct label *update = NULL;
@ -2758,7 +2915,7 @@ static void node_reset(struct bt_mesh_model *model,
bt_mesh_model_msg_init(&msg, OP_NODE_RESET_STATUS);
/* Send the response first since we wont have any keys left to
/* Send the response first since we won't have any keys left to
* send it later.
*/
if (bt_mesh_model_send(model, ctx, &msg, NULL, NULL)) {

View File

@ -22,7 +22,9 @@
#include "mesh/common.h"
#include "mesh/adapter.h"
#if CONFIG_BLE_MESH_V11_SUPPORT
#include "mesh_v1.1/utils.h"
#endif
#define NET_MIC_LEN(pdu) (((pdu)[1] & 0x80) ? 8 : 4)
#define APP_MIC_LEN(aszmic) ((aszmic) ? 8 : 4)

View File

@ -21,7 +21,9 @@
#include "mesh/common.h"
#include "pvnr_mgmt.h"
#if CONFIG_BLE_MESH_V11_SUPPORT
#include "mesh_v1.1/utils.h"
#endif
#ifdef CONFIG_BLE_MESH_FRIEND

View File

@ -10,6 +10,7 @@
#include <errno.h>
#include "crypto.h"
#include "tag.h"
#include "adv.h"
#include "scan.h"
#include "mesh.h"
@ -23,7 +24,9 @@
#include "mesh/cfg_srv.h"
#include "heartbeat.h"
#if CONFIG_BLE_MESH_V11_SUPPORT
#include "mesh_v1.1/utils.h"
#endif
#ifdef CONFIG_BLE_MESH_LOW_POWER

View File

@ -2,7 +2,7 @@
/*
* SPDX-FileCopyrightText: 2017 Intel Corporation
* SPDX-FileContributor: 2018-2021 Espressif Systems (Shanghai) CO LTD
* SPDX-FileContributor: 2018-2024 Espressif Systems (Shanghai) CO LTD
*
* SPDX-License-Identifier: Apache-2.0
*/
@ -30,7 +30,9 @@
#include "prov_pvnr.h"
#include "pvnr_mgmt.h"
#if CONFIG_BLE_MESH_V11_SUPPORT
#include "mesh_v1.1/utils.h"
#endif
static bool mesh_init = false;
@ -161,9 +163,9 @@ void bt_mesh_node_reset(void)
bt_mesh_clear_seq();
bt_mesh_clear_dkca();
bt_mesh_clear_role();
if (IS_ENABLED(CONFIG_BLE_MESH_DF_SRV)) {
bt_mesh_clear_all_directed_forwarding_table_data();
}
#if CONFIG_BLE_MESH_DF_SRV
bt_mesh_clear_all_directed_forwarding_table_data();
#endif
}
memset(bt_mesh.flags, 0, sizeof(bt_mesh.flags));
@ -405,12 +407,14 @@ int bt_mesh_init(const struct bt_mesh_prov *prov,
return -EALREADY;
}
#if CONFIG_BLE_MESH_V11_SUPPORT
extern int bt_mesh_v11_ext_init(void);
err = bt_mesh_v11_ext_init();
if (err) {
BT_ERR("Bluetooth Mesh v1.1 init failed");
return err;
}
#endif
bt_mesh_mutex_init();

View File

@ -11,6 +11,7 @@
#define _MESH_H_
#include "net.h"
#include "tag.h"
#ifdef __cplusplus
extern "C" {

View File

@ -31,7 +31,9 @@
#include "proxy_server.h"
#include "pvnr_mgmt.h"
#if CONFIG_BLE_MESH_V11_SUPPORT
#include "mesh_v1.1/utils.h"
#endif
/* Minimum valid Mesh Network PDU length. The Network headers
* themselves take up 9 bytes. After that there is a minumum of 1 byte
@ -1019,6 +1021,33 @@ int bt_mesh_net_encode(struct bt_mesh_net_tx *tx, struct net_buf_simple *buf,
return bt_mesh_net_obfuscate(buf->data, BLE_MESH_NET_IVI_TX, priv);
}
#if !CONFIG_BLE_MESH_V11_SUPPORT
static void bt_mesh_net_adv_xmit_update(struct bt_mesh_net_tx *tx)
{
/* When transmitting a Network PDU that is tagged as friendship,
* the Advertising Bearer Network Interface shall transmit the
* Network PDU over the advertising bearer only once.
*
* Note: Currently when transmitting a packet with the friendship
* credentials used, the message flow will not reach here. It
* will be enqueued into the friend queue in transport.c, and
* waited to be sent.
*/
if (bt_mesh_tag_friendship(tx->ctx->send_tag)) {
tx->xmit = BLE_MESH_TRANSMIT(0, BLE_MESH_TRANSMIT_INT(bt_mesh_net_transmit_get()));
return;
}
if (bt_mesh_tag_relay(tx->ctx->send_tag)) {
tx->xmit = bt_mesh_relay_retransmit_get();
} else {
tx->xmit = bt_mesh_net_transmit_get();
}
return;
}
#endif /* !CONFIG_BLE_MESH_V11_SUPPORT */
int bt_mesh_net_send(struct bt_mesh_net_tx *tx, struct net_buf *buf,
const struct bt_mesh_send_cb *cb, void *cb_data)
{
@ -1418,13 +1447,94 @@ static bool relay_to_adv(enum bt_mesh_net_if net_if)
case BLE_MESH_NET_IF_ADV:
return (bt_mesh_relay_get() == BLE_MESH_RELAY_ENABLED);
case BLE_MESH_NET_IF_PROXY:
return (bt_mesh_gatt_proxy_get() == BLE_MESH_GATT_PROXY_ENABLED ||
bt_mesh_private_gatt_proxy_state_get() == BLE_MESH_PRIVATE_GATT_PROXY_ENABLED);
return (bt_mesh_gatt_proxy_get() == BLE_MESH_GATT_PROXY_ENABLED
#if CONFIG_BLE_MESH_PRB_SRV
|| bt_mesh_private_gatt_proxy_state_get() == BLE_MESH_PRIVATE_GATT_PROXY_ENABLED
#endif
);
default:
return false;
}
}
#if !CONFIG_BLE_MESH_V11_SUPPORT
static uint8_t net_retransmission_adv(struct bt_mesh_net_rx *rx,
uint8_t *cred, uint8_t *tag)
{
if (rx->ctx.recv_cred == BLE_MESH_FLOODING_CRED) {
uint8_t bearer = BLE_MESH_NONE_BEARER;
/* Inbound bearer: ADV;
* Inbound Security Material: managed flooding;
*/
/* Condition: Relay is enabled. */
if (IS_ENABLED(CONFIG_BLE_MESH_RELAY) &&
bt_mesh_relay_get() == BLE_MESH_RELAY_ENABLED) {
bearer |= BLE_MESH_ADV_BEARER;
*cred = BLE_MESH_FLOODING_CRED;
/* Additional action: Tag as relay */
*tag |= BLE_MESH_TAG_RELAY;
}
/* Condition: Proxy is enabled. */
if (IS_ENABLED(CONFIG_BLE_MESH_GATT_PROXY_SERVER) &&
bt_mesh_gatt_proxy_get() == BLE_MESH_GATT_PROXY_ENABLED) {
bearer |= BLE_MESH_GATT_BEARER;
*cred = BLE_MESH_FLOODING_CRED;
}
return bearer;
}
if (rx->ctx.recv_cred == BLE_MESH_FRIENDSHIP_CRED &&
IS_ENABLED(CONFIG_BLE_MESH_FRIEND) &&
bt_mesh_friend_get() == BLE_MESH_FRIEND_ENABLED) {
/* Condition: Directed friend is disabled. */
*cred = BLE_MESH_FLOODING_CRED;
return BLE_MESH_ALL_BEARERS;
}
return BLE_MESH_NONE_BEARER;
}
static uint8_t net_retransmission_gatt(struct bt_mesh_net_rx *rx,
uint8_t *cred, uint8_t *tag)
{
if (rx->ctx.recv_cred == BLE_MESH_FLOODING_CRED) {
/* Inbound bearer: GATT;
* Inbound Security Material: managed flooding;
* Condition: Proxy is enabled;
*/
if (IS_ENABLED(CONFIG_BLE_MESH_GATT_PROXY_SERVER) &&
bt_mesh_gatt_proxy_get() == BLE_MESH_GATT_PROXY_ENABLED) {
/* Condition: Directed proxy is disabled. */
*cred = BLE_MESH_FLOODING_CRED;
return BLE_MESH_ALL_BEARERS;
}
return BLE_MESH_NONE_BEARER;
}
return BLE_MESH_NONE_BEARER;
}
static uint8_t bt_mesh_net_retrans_match(struct bt_mesh_net_rx *rx,
uint8_t *cred, uint8_t *tag)
{
if (rx->net_if == BLE_MESH_NET_IF_ADV) {
return net_retransmission_adv(rx, cred, tag);
}
if (rx->net_if == BLE_MESH_NET_IF_PROXY) {
return net_retransmission_gatt(rx, cred, tag);
}
return BLE_MESH_NONE_BEARER;
}
#endif /* !CONFIG_BLE_MESH_V11_SUPPORT */
static void bt_mesh_net_relay(struct net_buf_simple *sbuf,
struct bt_mesh_net_rx *rx)
{
@ -1621,7 +1731,9 @@ static void bt_mesh_net_relay(struct net_buf_simple *sbuf,
(bearer & BLE_MESH_GATT_BEARER) &&
((bt_mesh_gatt_proxy_get() == BLE_MESH_GATT_PROXY_ENABLED &&
cred != BLE_MESH_FRIENDSHIP_CRED) ||
#if CONFIG_BLE_MESH_PRB_SRV
bt_mesh_private_gatt_proxy_state_get() == BLE_MESH_PRIVATE_GATT_PROXY_ENABLED ||
#endif
rx->net_if == BLE_MESH_NET_IF_LOCAL ||
rx->ctx.recv_cred == BLE_MESH_FRIENDSHIP_CRED)) {
if (bt_mesh_proxy_server_relay(&buf->b, rx->ctx.recv_dst) &&
@ -1819,7 +1931,9 @@ 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) &&
#if CONFIG_BLE_MESH_PRB_SRV
bt_mesh_private_gatt_proxy_state_get() != BLE_MESH_PRIVATE_GATT_PROXY_ENABLED &&
#endif
net_if == BLE_MESH_NET_IF_PROXY) {
bt_mesh_proxy_server_addr_add(data, rx.ctx.addr);

View File

@ -143,7 +143,7 @@ bool bt_mesh_prov_pdu_check(uint8_t type, uint16_t length, uint8_t *reason)
static uint8_t bt_mesh_prov_buf_type_get(struct net_buf_simple *buf)
{
return buf->data[PROV_BUF_HEADROOM];
return buf->__buf[PROV_BUF_HEADROOM];
}
uint8_t node_next_xact_id(struct bt_mesh_prov_link *link)

View File

@ -17,7 +17,9 @@
#include "mesh/timer.h"
#include "mesh/adapter.h"
#if CONFIG_BLE_MESH_V11_SUPPORT
#include "mesh_v1.1/utils.h"
#endif
#ifdef __cplusplus
extern "C" {

View File

@ -22,7 +22,9 @@
#include "prov_common.h"
#include "prov_node.h"
#if CONFIG_BLE_MESH_V11_SUPPORT
#include "mesh_v1.1/utils.h"
#endif
#if CONFIG_BLE_MESH_NODE

View File

@ -1,5 +1,5 @@
/*
* SPDX-FileCopyrightText: 2017-2021 Espressif Systems (Shanghai) CO LTD
* SPDX-FileCopyrightText: 2017-2024 Espressif Systems (Shanghai) CO LTD
*
* SPDX-License-Identifier: Apache-2.0
*/
@ -22,7 +22,9 @@
#include "prov_pvnr.h"
#include "pvnr_mgmt.h"
#if CONFIG_BLE_MESH_V11_SUPPORT
#include "mesh_v1.1/utils.h"
#endif
#if CONFIG_BLE_MESH_PROVISIONER
@ -1413,7 +1415,7 @@ static int prov_auth(struct bt_mesh_prov_link *link,
return -EINVAL;
}
/* Provisioner ouput number/string and wait for device's Provisioning Input Complete PDU */
/* Provisioner output number/string and wait for device's Provisioning Input Complete PDU */
link->expect = PROV_INPUT_COMPLETE;
/* NOTE: The Bluetooth SIG recommends that mesh implementations enforce a randomly

View File

@ -21,7 +21,9 @@
#include "pvnr_mgmt.h"
#include "mesh/adapter.h"
#if CONFIG_BLE_MESH_V11_SUPPORT
#include "mesh_v1.1/utils.h"
#endif
#if (CONFIG_BLE_MESH_PROVISIONER && CONFIG_BLE_MESH_PB_GATT) || \
CONFIG_BLE_MESH_GATT_PROXY_CLIENT

View File

@ -11,7 +11,9 @@
#include "mesh/adapter.h"
#include "prov_common.h"
#if CONFIG_BLE_MESH_V11_SUPPORT
#include "mesh_v1.1/utils.h"
#endif
#ifdef __cplusplus
extern "C" {

View File

@ -22,7 +22,9 @@
#include "prov_common.h"
#include "prov_node.h"
#if CONFIG_BLE_MESH_V11_SUPPORT
#include "mesh_v1.1/utils.h"
#endif
#if (CONFIG_BLE_MESH_NODE && CONFIG_BLE_MESH_PB_GATT) || \
CONFIG_BLE_MESH_GATT_PROXY_SERVER

View File

@ -22,7 +22,9 @@
#include "prov_pvnr.h"
#include "pvnr_mgmt.h"
#if CONFIG_BLE_MESH_V11_SUPPORT
#include "mesh_v1.1/utils.h"
#endif
#if CONFIG_BLE_MESH_PROVISIONER

View File

@ -2,7 +2,7 @@
/*
* SPDX-FileCopyrightText: 2017 Intel Corporation
* SPDX-FileContributor: 2020-2021 Espressif Systems (Shanghai) CO LTD
* SPDX-FileContributor: 2020-2024 Espressif Systems (Shanghai) CO LTD
*
* SPDX-License-Identifier: Apache-2.0
*/
@ -27,7 +27,9 @@
#include "prov_pvnr.h"
#include "mesh/adapter.h"
#if CONFIG_BLE_MESH_V11_SUPPORT
#include "mesh_v1.1/utils.h"
#endif
/* Scan Window and Interval are equal for continuous scanning */
#define SCAN_INTERVAL 0x20
@ -263,12 +265,13 @@ static void handle_adv_service_data(struct net_buf_simple *buf,
bt_mesh_provisioner_prov_adv_recv(buf, addr, rssi);
}
if (IS_ENABLED(CONFIG_BLE_MESH_RPR_SRV) &&
bt_mesh_is_provisioned()) {
#if CONFIG_BLE_MESH_RPR_SRV
if (bt_mesh_is_provisioned()) {
const bt_mesh_addr_t *addr = bt_mesh_get_unprov_dev_addr();
bt_mesh_unprov_dev_fifo_enqueue(buf->data, addr->val, bt_mesh_get_adv_type());
bt_mesh_rpr_srv_unprov_beacon_recv(buf, bt_mesh_get_adv_type(), addr, rssi);
}
#endif
break;
#endif
#if CONFIG_BLE_MESH_GATT_PROXY_CLIENT

View File

@ -22,7 +22,9 @@
#include "pvnr_mgmt.h"
#include "prov_pvnr.h"
#if CONFIG_BLE_MESH_V11_SUPPORT
#include "mesh_v1.1/utils.h"
#endif
/* BLE Mesh NVS Key and corresponding data struct.
* Note: The length of nvs key must be <= 15.
@ -1481,6 +1483,8 @@ int settings_core_commit(void)
struct bt_mesh_hb_pub *hb_pub = NULL;
struct bt_mesh_cfg_srv *cfg = NULL;
bt_mesh_atomic_set_bit(bt_mesh.flags, BLE_MESH_VALID);
hb_pub = bt_mesh_hb_pub_get();
if (hb_pub && hb_pub->dst != BLE_MESH_ADDR_UNASSIGNED &&
hb_pub->count && hb_pub->period) {
@ -1499,7 +1503,6 @@ int settings_core_commit(void)
cfg->default_ttl = stored_cfg.cfg.default_ttl;
}
bt_mesh_atomic_set_bit(bt_mesh.flags, BLE_MESH_VALID);
bt_mesh_net_start();
}
#endif /* CONFIG_BLE_MESH_NODE */

View File

@ -0,0 +1,53 @@
/*
* SPDX-FileCopyrightText: 2020-2024 Espressif Systems (Shanghai) CO LTD
*
* SPDX-License-Identifier: Apache-2.0
*/
#ifndef _BLE_MESH_v11_TAG_H_
#define _BLE_MESH_v11_TAG_H_
#include <stdint.h>
#include <stdbool.h>
#include "mesh.h"
#ifdef __cplusplus
extern "C" {
#endif
#if !CONFIG_BLE_MESH_V11_SUPPORT
/* TAG - additional metadata */
#define BLE_MESH_TAG_SEND_SEGMENTED BIT(0)
#define BLE_MESH_TAG_IMMUTABLE_CRED BIT(1)
#define BLE_MESH_TAG_RELAY BIT(3)
#define BLE_MESH_TAG_FRIENDSHIP BIT(4)
static inline bool bt_mesh_tag_send_segmented(uint8_t tag)
{
return (tag & BLE_MESH_TAG_SEND_SEGMENTED);
}
static inline bool bt_mesh_tag_immutable_cred(uint8_t tag)
{
return (tag & BLE_MESH_TAG_IMMUTABLE_CRED);
}
static inline bool bt_mesh_tag_relay(uint8_t tag)
{
return (tag & BLE_MESH_TAG_RELAY);
}
static inline bool bt_mesh_tag_friendship(uint8_t tag)
{
return (tag & BLE_MESH_TAG_FRIENDSHIP);
}
#endif /* !CONFIG_BLE_MESH_V11_SUPPORT */
#ifdef __cplusplus
}
#endif
#endif /* _BLE_MESH_v11_TAG_H_ */

View File

@ -11,6 +11,7 @@
#include <errno.h>
#include "crypto.h"
#include "tag.h"
#include "adv.h"
#include "mesh.h"
#include "lpn.h"
@ -26,7 +27,9 @@
#include "mesh/cfg_srv.h"
#include "heartbeat.h"
#if CONFIG_BLE_MESH_V11_SUPPORT
#include "mesh_v1.1/utils.h"
#endif
/* The transport layer needs at least three buffers for itself to avoid
* deadlocks. Ensure that there are a sufficient number of advertising
@ -1039,18 +1042,18 @@ static int ctl_recv(struct bt_mesh_net_rx *rx, uint8_t hdr,
return 0;
}
if (IS_ENABLED(CONFIG_BLE_MESH_DF_SRV)) {
switch (ctl_op) {
case TRANS_CTL_OP_PATH_REQ:
case TRANS_CTL_OP_PATH_REPLY:
case TRANS_CTL_OP_PATH_CFM:
case TRANS_CTL_OP_PATH_ECHO_REQ:
case TRANS_CTL_OP_PATH_ECHO_REPLY:
case TRANS_CTL_OP_DEP_NODE_UPDATE:
case TRANS_CTL_OP_PATH_REQ_SOLIC:
return bt_mesh_directed_forwarding_ctl_recv(ctl_op, rx, buf);
}
#if CONFIG_BLE_MESH_DF_SRV
switch (ctl_op) {
case TRANS_CTL_OP_PATH_REQ:
case TRANS_CTL_OP_PATH_REPLY:
case TRANS_CTL_OP_PATH_CFM:
case TRANS_CTL_OP_PATH_ECHO_REQ:
case TRANS_CTL_OP_PATH_ECHO_REPLY:
case TRANS_CTL_OP_DEP_NODE_UPDATE:
case TRANS_CTL_OP_PATH_REQ_SOLIC:
return bt_mesh_directed_forwarding_ctl_recv(ctl_op, rx, buf);
}
#endif
if (IS_ENABLED(CONFIG_BLE_MESH_FRIEND) && !bt_mesh_lpn_established()) {
switch (ctl_op) {
@ -1759,8 +1762,6 @@ void bt_mesh_trans_init(void)
{
int i;
bt_mesh_sar_init();
for (i = 0; i < ARRAY_SIZE(seg_tx); i++) {
k_delayed_work_init(&seg_tx[i].rtx_timer, seg_retransmit);
}

View File

@ -1,5 +1,5 @@
/*
* SPDX-FileCopyrightText: 2023 Espressif Systems (Shanghai) CO LTD
* SPDX-FileCopyrightText: 2023-2024 Espressif Systems (Shanghai) CO LTD
*
* SPDX-License-Identifier: Apache-2.0
*/
@ -8,6 +8,8 @@
#include <string.h>
#include <assert.h>
#include "esp_log.h"
#if CONFIG_BT_BLUEDROID_ENABLED
#include "bta/bta_api.h"
#endif
@ -190,6 +192,11 @@ void bt_mesh_ext_mem_swap(void *buf, size_t length)
sys_mem_swap(buf, length);
}
uint32_t bt_mesh_ext_log_timestamp(void)
{
return esp_log_timestamp();
}
/* Net buf */
void bt_mesh_ext_buf_simple_init(struct net_buf_simple *buf, size_t reserve_head)
{
@ -498,6 +505,11 @@ float bt_mesh_ext_log2(float num)
return bt_mesh_log2(num);
}
const char *bt_mesh_ext_hex(const void *buf, size_t len)
{
return bt_hex(buf, len);
}
/* Crypto */
bool bt_mesh_ext_s1(const char *m, uint8_t salt[16])
{
@ -3954,6 +3966,8 @@ void bt_mesh_ext_mbt_server_cb_evt_to_btc(uint8_t event, void *model, void *ctx)
}
typedef struct {
uint64_t config_ble_mesh_stack_trace_level : 3;
uint64_t config_ble_mesh_use_duplicate_scan : 1;
uint64_t config_ble_mesh_pb_adv : 1;
uint64_t config_ble_mesh_pb_gatt : 1;
@ -4116,6 +4130,8 @@ typedef struct {
} bt_mesh_ext_config_t;
static const bt_mesh_ext_config_t bt_mesh_ext_cfg = {
.config_ble_mesh_stack_trace_level = BLE_MESH_LOG_LEVEL,
.config_ble_mesh_use_duplicate_scan = IS_ENABLED(CONFIG_BLE_MESH_USE_DUPLICATE_SCAN),
.config_ble_mesh_pb_adv = IS_ENABLED(CONFIG_BLE_MESH_PB_ADV),
.config_ble_mesh_pb_gatt = IS_ENABLED(CONFIG_BLE_MESH_PB_GATT),

View File

@ -1,5 +1,5 @@
/*
* SPDX-FileCopyrightText: 2023 Espressif Systems (Shanghai) CO LTD
* SPDX-FileCopyrightText: 2023-2024 Espressif Systems (Shanghai) CO LTD
*
* SPDX-License-Identifier: Apache-2.0
*/

View File

@ -14,7 +14,9 @@
#include "mesh/client_common.h"
#include "mesh/common.h"
#if CONFIG_BLE_MESH_V11_SUPPORT
#include "mesh_v1.1/utils.h"
#endif
#define HCI_TIME_FOR_START_ADV K_MSEC(5) /* Three adv related hci commands may take 4 ~ 5ms */

View File

@ -66,7 +66,7 @@ config BT_A2DP_ENABLE
depends on BT_CLASSIC_ENABLED
default n
help
Advanced Audio Distrubution Profile
Advanced Audio Distribution Profile
config BT_SPP_ENABLED
bool "SPP"
@ -121,7 +121,7 @@ config BT_HFP_WBS_ENABLE
default y
help
This enables Wide Band Speech. Should disable it when SCO data path is PCM.
Otherwise there will be no data transmited via GPIOs.
Otherwise there will be no data transmitted via GPIOs.
menuconfig BT_HID_ENABLED
@ -304,6 +304,13 @@ config BT_BLE_SMP_ID_RESET_ENABLE
of a previously paired peer to be used to determine whether a device
with which it previously shared an IRK is within range.
config BT_BLE_SMP_BOND_NVS_FLASH
bool "Save SMP bonding keys to nvs flash"
depends on BT_BLE_SMP_ENABLE
default y
help
This select can save SMP bonding keys to nvs flash
config BT_STACK_NO_LOG
bool "Disable BT debug logs (minimize bin size)"
depends on BT_BLUEDROID_ENABLED
@ -1064,7 +1071,7 @@ config BT_ACL_CONNECTIONS
is used.
config BT_MULTI_CONNECTION_ENBALE
bool "Enable BLE multi-conections"
bool "Enable BLE multi-connections"
depends on BT_BLE_ENABLED
default y
help
@ -1163,19 +1170,23 @@ config BT_BLE_RPA_TIMEOUT
Default is 900 s (15 minutes). Range is 1 s to 1 hour (3600 s).
config BT_BLE_50_FEATURES_SUPPORTED
bool "Enable BLE 5.0 features"
bool "Enable BLE 5.0 features(please disable BLE 4.2 if enable BLE 5.0)"
depends on (BT_BLE_ENABLED && ((BT_CONTROLLER_ENABLED && SOC_BLE_50_SUPPORTED) || BT_CONTROLLER_DISABLED))
default y
help
Enabling this option activates BLE 5.0 features.
This option is universally supported in chips that support BLE, except for ESP32.
BLE 4.2 and BLE 5.0 cannot be used simultaneously.
config BT_BLE_42_FEATURES_SUPPORTED
bool "Enable BLE 4.2 features"
depends on (BT_BLE_ENABLED && ((BT_CONTROLLER_ENABLED && SOC_BLE_SUPPORTED) || BT_CONTROLLER_DISABLED))
bool "Enable BLE 4.2 features(please disable BLE 5.0 if enable BLE 4.2)"
depends on (BT_BLE_ENABLED && ((BT_CONTROLLER_ENABLED && SOC_BLE_50_SUPPORTED) || BT_CONTROLLER_DISABLED))
default n
help
This enables BLE 4.2 features.
This option is universally supported by all ESP chips with BLE capabilities.
BLE 4.2 and BLE 5.0 cannot be used simultaneously.
config BT_BLE_FEAT_PERIODIC_ADV_SYNC_TRANSFER
bool "Enable BLE periodic advertising sync transfer feature"

View File

@ -238,3 +238,14 @@ esp_err_t esp_bluedroid_deinit(void)
return ESP_OK;
}
#if defined(CONFIG_EXAMPLE_CI_ID) && defined(CONFIG_EXAMPLE_CI_PIPELINE_ID)
char *esp_bluedroid_get_example_name(void)
{
static char example_name[ESP_BLE_ADV_NAME_LEN_MAX];
memset(example_name, 0, sizeof(example_name));
sprintf(example_name, "BE%02X_%05X_%02X", CONFIG_EXAMPLE_CI_ID & 0xFF,
CONFIG_EXAMPLE_CI_PIPELINE_ID & 0xFFFFF, CONFIG_IDF_FIRMWARE_CHIP_ID & 0xFF);
return example_name;
}
#endif

View File

@ -13,7 +13,7 @@
#include "btc/btc_manage.h"
#include "btc_gap_ble.h"
#include "btc/btc_ble_storage.h"
#include "esp_random.h"
esp_err_t esp_ble_gap_register_callback(esp_gap_ble_cb_t callback)
{
@ -188,6 +188,25 @@ esp_err_t esp_ble_gap_set_pkt_data_len(esp_bd_addr_t remote_device, uint16_t tx_
return (btc_transfer_context(&msg, &arg, sizeof(btc_ble_gap_args_t), NULL, NULL) == BT_STATUS_SUCCESS ? ESP_OK : ESP_FAIL);
}
esp_err_t esp_ble_gap_addr_create_static(esp_bd_addr_t rand_addr)
{
// Static device address: First two bits are '11', rest is random
rand_addr[0] = 0xC0 | (esp_random() & 0x3F);
for (int i = 1; i < 6; i++) {
rand_addr[i] = esp_random() & 0xFF; // Randomize remaining bits
}
return ESP_OK;
}
esp_err_t esp_ble_gap_addr_create_nrpa(esp_bd_addr_t rand_addr)
{
// Non-resolvable private address: First two bits are '00', rest is random
rand_addr[0] = (esp_random() & 0x3F);
for (int i = 1; i < 6; i++) {
rand_addr[i] = esp_random() & 0xFF; // Randomize remaining bits
}
return ESP_OK;
}
esp_err_t esp_ble_gap_set_rand_addr(esp_bd_addr_t rand_addr)
{
@ -493,13 +512,17 @@ uint8_t *esp_ble_resolve_adv_data_by_type( uint8_t *adv_data, uint16_t adv_data_
if (((type < ESP_BLE_AD_TYPE_FLAG) || (type > ESP_BLE_AD_TYPE_128SERVICE_DATA)) &&
(type != ESP_BLE_AD_MANUFACTURER_SPECIFIC_TYPE)) {
LOG_ERROR("the eir type not define, type = %x\n", type);
LOG_ERROR("The advertising data type is not defined, type = %x", type);
*length = 0;
return NULL;
}
if (adv_data == NULL || adv_data_len == 0) {
LOG_ERROR("Invalid advertising data.\n");
if (adv_data_len == 0) {
*length = 0;
return NULL;
}
if (adv_data == NULL) {
LOG_ERROR("Invalid advertising data.");
*length = 0;
return NULL;
}
@ -1026,6 +1049,23 @@ esp_err_t esp_ble_gap_set_privacy_mode(esp_ble_addr_type_t addr_type, esp_bd_add
== BT_STATUS_SUCCESS ? ESP_OK : ESP_FAIL);
}
esp_err_t esp_ble_gap_set_csa_support(uint8_t csa_select)
{
btc_msg_t msg;
btc_ble_gap_args_t arg;
ESP_BLUEDROID_STATUS_CHECK(ESP_BLUEDROID_STATUS_ENABLED);
msg.sig = BTC_SIG_API_CALL;
msg.pid = BTC_PID_GAP_BLE;
msg.act = BTC_GAP_BLE_SET_CSA_SUPPORT;
arg.set_csa_support.csa_select = csa_select;
return (btc_transfer_context(&msg, &arg, sizeof(btc_ble_gap_args_t), NULL, NULL)
== BT_STATUS_SUCCESS ? ESP_OK : ESP_FAIL);
}
#if (BLE_50_FEATURE_SUPPORT == TRUE)
esp_err_t esp_ble_gap_read_phy(esp_bd_addr_t bd_addr)

View File

@ -67,46 +67,134 @@ esp_err_t esp_ble_gattc_app_unregister(esp_gatt_if_t gattc_if)
return (btc_transfer_context(&msg, &arg, sizeof(btc_ble_gattc_args_t), NULL, NULL) == BT_STATUS_SUCCESS ? ESP_OK : ESP_FAIL);
}
#if (BLE_42_FEATURE_SUPPORT == TRUE)
esp_err_t esp_ble_gattc_open(esp_gatt_if_t gattc_if, esp_bd_addr_t remote_bda, esp_ble_addr_type_t remote_addr_type, bool is_direct)
esp_err_t esp_ble_gattc_enh_open(esp_gatt_if_t gattc_if, esp_ble_gatt_creat_conn_params_t *creat_conn_params)
{
btc_msg_t msg = {0};
btc_ble_gattc_args_t arg;
const esp_ble_conn_params_t *conn_params;
ESP_BLUEDROID_STATUS_CHECK(ESP_BLUEDROID_STATUS_ENABLED);
if (!creat_conn_params) {
return ESP_ERR_INVALID_ARG;
}
msg.sig = BTC_SIG_API_CALL;
msg.pid = BTC_PID_GATTC;
msg.act = BTC_GATTC_ACT_OPEN;
arg.open.gattc_if = gattc_if;
memcpy(arg.open.remote_bda, remote_bda, ESP_BD_ADDR_LEN);
arg.open.remote_addr_type = remote_addr_type;
arg.open.is_direct = is_direct;
arg.open.is_aux = false;
memcpy(arg.open.remote_bda, creat_conn_params->remote_bda, ESP_BD_ADDR_LEN);
arg.open.remote_addr_type = creat_conn_params->remote_addr_type;
arg.open.is_direct = creat_conn_params->is_direct;
arg.open.is_aux= creat_conn_params->is_aux;
arg.open.own_addr_type = creat_conn_params->own_addr_type;
arg.open.phy_mask = creat_conn_params->phy_mask;
// If not aux open, shouldn't set 2M and coded PHY connection params
if (!creat_conn_params->is_aux &&
((creat_conn_params->phy_mask & ESP_BLE_PHY_2M_PREF_MASK) ||
(creat_conn_params->phy_mask & ESP_BLE_PHY_CODED_PREF_MASK))) {
return ESP_ERR_INVALID_ARG;
}
if (creat_conn_params->phy_mask & ESP_BLE_PHY_1M_PREF_MASK) {
if (!creat_conn_params->phy_1m_conn_params) {
return ESP_ERR_INVALID_ARG;
}
conn_params = creat_conn_params->phy_1m_conn_params;
if (ESP_BLE_IS_VALID_PARAM(conn_params->interval_min, ESP_BLE_CONN_INT_MIN, ESP_BLE_CONN_INT_MAX) &&
ESP_BLE_IS_VALID_PARAM(conn_params->interval_max, ESP_BLE_CONN_INT_MIN, ESP_BLE_CONN_INT_MAX) &&
ESP_BLE_IS_VALID_PARAM(conn_params->supervision_timeout, ESP_BLE_CONN_SUP_TOUT_MIN, ESP_BLE_CONN_SUP_TOUT_MAX) &&
(conn_params->latency <= ESP_BLE_CONN_LATENCY_MAX) &&
((conn_params->supervision_timeout * 10) >= ((1 + conn_params->latency) * ((conn_params->interval_max * 5) >> 1))) &&
(conn_params->interval_min <= conn_params->interval_max)) {
memcpy(&arg.open.phy_1m_conn_params, conn_params, sizeof(esp_ble_conn_params_t));
} else {
LOG_ERROR("%s, invalid 1M PHY connection params: min_int = %d, max_int = %d, latency = %d, timeout = %d", __func__,
conn_params->interval_min,
conn_params->interval_max,
conn_params->latency,
conn_params->supervision_timeout);
return ESP_ERR_INVALID_ARG;
}
}
if (creat_conn_params->phy_mask & ESP_BLE_PHY_2M_PREF_MASK) {
if (!creat_conn_params->phy_2m_conn_params) {
return ESP_ERR_INVALID_ARG;
}
conn_params = creat_conn_params->phy_2m_conn_params;
if (ESP_BLE_IS_VALID_PARAM(conn_params->interval_min, ESP_BLE_CONN_INT_MIN, ESP_BLE_CONN_INT_MAX) &&
ESP_BLE_IS_VALID_PARAM(conn_params->interval_max, ESP_BLE_CONN_INT_MIN, ESP_BLE_CONN_INT_MAX) &&
ESP_BLE_IS_VALID_PARAM(conn_params->supervision_timeout, ESP_BLE_CONN_SUP_TOUT_MIN, ESP_BLE_CONN_SUP_TOUT_MAX) &&
(conn_params->latency <= ESP_BLE_CONN_LATENCY_MAX) &&
((conn_params->supervision_timeout * 10) >= ((1 + conn_params->latency) * ((conn_params->interval_max * 5) >> 1))) &&
(conn_params->interval_min <= conn_params->interval_max)) {
memcpy(&arg.open.phy_2m_conn_params, conn_params, sizeof(esp_ble_conn_params_t));
} else {
LOG_ERROR("%s, invalid 2M PHY connection params: min_int = %d, max_int = %d, latency = %d, timeout = %d", __func__,
conn_params->interval_min,
conn_params->interval_max,
conn_params->latency,
conn_params->supervision_timeout);
return ESP_ERR_INVALID_ARG;
}
}
if (creat_conn_params->phy_mask & ESP_BLE_PHY_CODED_PREF_MASK) {
if (!creat_conn_params->phy_coded_conn_params) {
return ESP_ERR_INVALID_ARG;
}
conn_params = creat_conn_params->phy_coded_conn_params;
if (ESP_BLE_IS_VALID_PARAM(conn_params->interval_min, ESP_BLE_CONN_INT_MIN, ESP_BLE_CONN_INT_MAX) &&
ESP_BLE_IS_VALID_PARAM(conn_params->interval_max, ESP_BLE_CONN_INT_MIN, ESP_BLE_CONN_INT_MAX) &&
ESP_BLE_IS_VALID_PARAM(conn_params->supervision_timeout, ESP_BLE_CONN_SUP_TOUT_MIN, ESP_BLE_CONN_SUP_TOUT_MAX) &&
(conn_params->latency <= ESP_BLE_CONN_LATENCY_MAX) &&
((conn_params->supervision_timeout * 10) >= ((1 + conn_params->latency) * ((conn_params->interval_max * 5) >> 1))) &&
(conn_params->interval_min <= conn_params->interval_max)) {
memcpy(&arg.open.phy_coded_conn_params, conn_params, sizeof(esp_ble_conn_params_t));
} else {
LOG_ERROR("%s, invalid Coded PHY connection params: min_int = %d, max_int = %d, latency = %d, timeout = %d", __func__,
conn_params->interval_min,
conn_params->interval_max,
conn_params->latency,
conn_params->supervision_timeout);
return ESP_ERR_INVALID_ARG;
}
}
return (btc_transfer_context(&msg, &arg, sizeof(btc_ble_gattc_args_t), NULL, NULL) == BT_STATUS_SUCCESS ? ESP_OK : ESP_FAIL);
}
#if (BLE_42_FEATURE_SUPPORT == TRUE)
esp_err_t esp_ble_gattc_open(esp_gatt_if_t gattc_if, esp_bd_addr_t remote_bda, esp_ble_addr_type_t remote_addr_type, bool is_direct)
{
esp_ble_gatt_creat_conn_params_t creat_conn_params = {0};
memcpy(creat_conn_params.remote_bda, remote_bda, ESP_BD_ADDR_LEN);
creat_conn_params.remote_addr_type = remote_addr_type;
creat_conn_params.is_direct = is_direct;
creat_conn_params.is_aux = false;
creat_conn_params.own_addr_type = 0xff; //undefined, will use local value
creat_conn_params.phy_mask = 0x0;
return esp_ble_gattc_enh_open(gattc_if, &creat_conn_params);
}
#endif // #if (BLE_42_FEATURE_SUPPORT == TRUE)
#if (BLE_50_FEATURE_SUPPORT == TRUE)
esp_err_t esp_ble_gattc_aux_open(esp_gatt_if_t gattc_if, esp_bd_addr_t remote_bda, esp_ble_addr_type_t remote_addr_type, bool is_direct)
{
btc_msg_t msg;
btc_ble_gattc_args_t arg;
ESP_BLUEDROID_STATUS_CHECK(ESP_BLUEDROID_STATUS_ENABLED);
msg.sig = BTC_SIG_API_CALL;
msg.pid = BTC_PID_GATTC;
msg.act = BTC_GATTC_ACT_AUX_OPEN;
arg.open.gattc_if = gattc_if;
memcpy(arg.open.remote_bda, remote_bda, ESP_BD_ADDR_LEN);
arg.open.remote_addr_type = remote_addr_type;
arg.open.is_direct = is_direct;
arg.open.is_aux = true;
return (btc_transfer_context(&msg, &arg, sizeof(btc_ble_gattc_args_t), NULL, NULL) == BT_STATUS_SUCCESS ? ESP_OK : ESP_FAIL);
esp_ble_gatt_creat_conn_params_t creat_conn_params = {0};
memcpy(creat_conn_params.remote_bda, remote_bda, ESP_BD_ADDR_LEN);
creat_conn_params.remote_addr_type = remote_addr_type;
creat_conn_params.is_direct = is_direct;
creat_conn_params.is_aux = true;
creat_conn_params.own_addr_type = 0xff; //undefined, will use local value
creat_conn_params.phy_mask = 0x0;
return esp_ble_gattc_enh_open(gattc_if, &creat_conn_params);
}
#endif // #if (BLE_50_FEATURE_SUPPORT == TRUE)
@ -363,10 +451,14 @@ esp_err_t esp_ble_gattc_read_char (esp_gatt_if_t gattc_if,
}
if (L2CA_CheckIsCongest(L2CAP_ATT_CID, p_tcb->peer_bda)) {
LOG_DEBUG("%s, the l2cap chanel is congest.", __func__);
LOG_DEBUG("%s, the l2cap channel is congest.", __func__);
return ESP_FAIL;
}
if (handle == 0) {
return ESP_GATT_INVALID_HANDLE;
}
msg.sig = BTC_SIG_API_CALL;
msg.pid = BTC_PID_GATTC;
msg.act = BTC_GATTC_ACT_READ_CHAR;
@ -400,10 +492,14 @@ esp_err_t esp_ble_gattc_read_by_type (esp_gatt_if_t gattc_if,
}
if (L2CA_CheckIsCongest(L2CAP_ATT_CID, p_tcb->peer_bda)) {
LOG_DEBUG("%s, the l2cap chanel is congest.", __func__);
LOG_DEBUG("%s, the l2cap channel is congest.", __func__);
return ESP_FAIL;
}
if (start_handle == 0 || end_handle == 0) {
return ESP_GATT_INVALID_HANDLE;
}
msg.sig = BTC_SIG_API_CALL;
msg.pid = BTC_PID_GATTC;
msg.act = BTC_GATTC_ACT_READ_BY_TYPE;
@ -432,7 +528,7 @@ esp_err_t esp_ble_gattc_read_multiple(esp_gatt_if_t gattc_if,
}
if (L2CA_CheckIsCongest(L2CAP_ATT_CID, p_tcb->peer_bda)) {
LOG_DEBUG("%s, the l2cap chanel is congest.", __func__);
LOG_DEBUG("%s, the l2cap channel is congest.", __func__);
return ESP_FAIL;
}
@ -468,7 +564,7 @@ esp_err_t esp_ble_gattc_read_multiple_variable(esp_gatt_if_t gattc_if,
}
if (L2CA_CheckIsCongest(L2CAP_ATT_CID, p_tcb->peer_bda)) {
LOG_DEBUG("%s, the l2cap chanel is congest.", __func__);
LOG_DEBUG("%s, the l2cap channel is congest.", __func__);
return ESP_FAIL;
}
@ -504,10 +600,14 @@ esp_err_t esp_ble_gattc_read_char_descr (esp_gatt_if_t gattc_if,
}
if (L2CA_CheckIsCongest(L2CAP_ATT_CID, p_tcb->peer_bda)) {
LOG_DEBUG("%s, the l2cap chanel is congest.", __func__);
LOG_DEBUG("%s, the l2cap channel is congest.", __func__);
return ESP_FAIL;
}
if (handle == 0) {
return ESP_GATT_INVALID_HANDLE;
}
msg.sig = BTC_SIG_API_CALL;
msg.pid = BTC_PID_GATTC;
msg.act = BTC_GATTC_ACT_READ_CHAR_DESCR;
@ -537,10 +637,14 @@ esp_err_t esp_ble_gattc_write_char(esp_gatt_if_t gattc_if,
}
if (L2CA_CheckIsCongest(L2CAP_ATT_CID, p_tcb->peer_bda)) {
LOG_DEBUG("%s, the l2cap chanel is congest.", __func__);
LOG_DEBUG("%s, the l2cap channel is congest.", __func__);
return ESP_FAIL;
}
if (handle == 0) {
return ESP_GATT_INVALID_HANDLE;
}
msg.sig = BTC_SIG_API_CALL;
msg.pid = BTC_PID_GATTC;
msg.act = BTC_GATTC_ACT_WRITE_CHAR;
@ -576,10 +680,14 @@ esp_err_t esp_ble_gattc_write_char_descr (esp_gatt_if_t gattc_if,
}
if (L2CA_CheckIsCongest(L2CAP_ATT_CID, p_tcb->peer_bda)) {
LOG_DEBUG("%s, the l2cap chanel is congest.", __func__);
LOG_DEBUG("%s, the l2cap channel is congest.", __func__);
return ESP_FAIL;
}
if (handle == 0) {
return ESP_GATT_INVALID_HANDLE;
}
msg.sig = BTC_SIG_API_CALL;
msg.pid = BTC_PID_GATTC;
msg.act = BTC_GATTC_ACT_WRITE_CHAR_DESCR;
@ -615,10 +723,14 @@ esp_err_t esp_ble_gattc_prepare_write(esp_gatt_if_t gattc_if,
}
if (L2CA_CheckIsCongest(L2CAP_ATT_CID, p_tcb->peer_bda)) {
LOG_DEBUG("%s, the l2cap chanel is congest.", __func__);
LOG_DEBUG("%s, the l2cap channel is congest.", __func__);
return ESP_FAIL;
}
if (handle == 0) {
return ESP_GATT_INVALID_HANDLE;
}
msg.sig = BTC_SIG_API_CALL;
msg.pid = BTC_PID_GATTC;
msg.act = BTC_GATTC_ACT_PREPARE_WRITE;
@ -652,10 +764,14 @@ esp_err_t esp_ble_gattc_prepare_write_char_descr(esp_gatt_if_t gattc_if,
}
if (L2CA_CheckIsCongest(L2CAP_ATT_CID, p_tcb->peer_bda)) {
LOG_DEBUG("%s, the l2cap chanel is congest.", __func__);
LOG_DEBUG("%s, the l2cap channel is congest.", __func__);
return ESP_FAIL;
}
if (handle == 0) {
return ESP_GATT_INVALID_HANDLE;
}
msg.sig = BTC_SIG_API_CALL;
msg.pid = BTC_PID_GATTC;
msg.act = BTC_GATTC_ACT_PREPARE_WRITE_CHAR_DESCR;
@ -694,6 +810,10 @@ esp_err_t esp_ble_gattc_register_for_notify (esp_gatt_if_t gattc_if,
ESP_BLUEDROID_STATUS_CHECK(ESP_BLUEDROID_STATUS_ENABLED);
if (handle == 0) {
return ESP_GATT_INVALID_HANDLE;
}
msg.sig = BTC_SIG_API_CALL;
msg.pid = BTC_PID_GATTC;
msg.act = BTC_GATTC_ACT_REG_FOR_NOTIFY;
@ -712,6 +832,10 @@ esp_err_t esp_ble_gattc_unregister_for_notify (esp_gatt_if_t gattc_if,
ESP_BLUEDROID_STATUS_CHECK(ESP_BLUEDROID_STATUS_ENABLED);
if (handle == 0) {
return ESP_GATT_INVALID_HANDLE;
}
msg.sig = BTC_SIG_API_CALL;
msg.pid = BTC_PID_GATTC;
msg.act = BTC_GATTC_ACT_UNREG_FOR_NOTIFY;

View File

@ -1,5 +1,5 @@
/*
* SPDX-FileCopyrightText: 2015-2022 Espressif Systems (Shanghai) CO LTD
* SPDX-FileCopyrightText: 2015-2024 Espressif Systems (Shanghai) CO LTD
*
* SPDX-License-Identifier: Apache-2.0
*/
@ -15,6 +15,24 @@
#if (defined BTC_SDP_INCLUDED && BTC_SDP_INCLUDED == TRUE)
static bool esp_sdp_record_integrity_check(esp_bluetooth_sdp_record_t *record)
{
bool ret = true;
if (record != NULL) {
if (record->hdr.service_name_length > ESP_SDP_SERVER_NAME_MAX ||
strlen(record->hdr.service_name) + 1 != record->hdr.service_name_length) {
LOG_ERROR("Invalid server name!\n");
ret = false;
}
} else {
LOG_ERROR("record is NULL!\n");
ret = false;
}
return ret;
}
esp_err_t esp_sdp_register_callback(esp_sdp_cb_t callback)
{
ESP_BLUEDROID_STATUS_CHECK(ESP_BLUEDROID_STATUS_ENABLED);
@ -85,9 +103,7 @@ esp_err_t esp_sdp_create_record(esp_bluetooth_sdp_record_t *record)
{
ESP_BLUEDROID_STATUS_CHECK(ESP_BLUEDROID_STATUS_ENABLED);
if (record == NULL || record->hdr.service_name_length > ESP_SDP_SERVER_NAME_MAX
|| strlen(record->hdr.service_name)+1 != record->hdr.service_name_length) {
LOG_ERROR("Invalid server name!\n");
if (!esp_sdp_record_integrity_check(record)) {
return ESP_ERR_INVALID_ARG;
}
@ -100,7 +116,7 @@ esp_err_t esp_sdp_create_record(esp_bluetooth_sdp_record_t *record)
msg.act = BTC_SDP_ACT_CREATE_RECORD;
memset(&arg, 0, sizeof(btc_sdp_args_t));
arg.creat_record.record = (bluetooth_sdp_record *)record;
arg.create_record.record = (bluetooth_sdp_record *)record;
/* Switch to BTC context */
stat = btc_transfer_context(&msg, &arg, sizeof(btc_sdp_args_t),

View File

@ -145,6 +145,25 @@ typedef uint8_t esp_link_key[ESP_BT_OCTET16_LEN]; /* Link Key */
#define ESP_BLE_CONN_SUP_TOUT_MIN 0x000A /*!< relate to BTM_BLE_CONN_SUP_TOUT_MIN in stack/btm_ble_api.h */
#define ESP_BLE_CONN_SUP_TOUT_MAX 0x0C80 /*!< relate to ESP_BLE_CONN_SUP_TOUT_MAX in stack/btm_ble_api.h */
#define ESP_BLE_PHY_1M_PREF_MASK (1 << 0) /*!< The Host prefers use the LE1M transmitter or receiver PHY */
#define ESP_BLE_PHY_2M_PREF_MASK (1 << 1) /*!< The Host prefers use the LE2M transmitter or receiver PHY */
#define ESP_BLE_PHY_CODED_PREF_MASK (1 << 2) /*!< The Host prefers use the LE CODED transmitter or receiver PHY */
typedef uint8_t esp_ble_phy_mask_t;
/**
* @brief create connection parameters
*/
typedef struct {
uint16_t scan_interval; /*!< Initial scan interval, in units of 0.625ms, the range is 0x0004(2.5ms) to 0xFFFF(10.24s). */
uint16_t scan_window; /*!< Initial scan window, in units of 0.625ms, the range is 0x0004(2.5ms) to 0xFFFF(10.24s). */
uint16_t interval_min; /*!< Minimum connection interval, in units of 1.25ms, the range is 0x0006(7.5ms) to 0x0C80(4s). */
uint16_t interval_max; /*!< Maximum connection interval, in units of 1.25ms, the range is 0x0006(7.5ms) to 0x0C80(4s). */
uint16_t latency; /*!< Connection latency, the range is 0x0000(0) to 0x01F3(499). */
uint16_t supervision_timeout; /*!< Connection supervision timeout, in units of 10ms, the range is from 0x000A(100ms) to 0x0C80(32s). */
uint16_t min_ce_len; /*!< Minimum connection event length, in units of 0.625ms, setting to 0 for no preferred parameters. */
uint16_t max_ce_len; /*!< Maximum connection event length, in units of 0.625ms, setting to 0 for no preferred parameters. */
} esp_ble_conn_params_t;
/// Check the param is valid or not
#define ESP_BLE_IS_VALID_PARAM(x, min, max) (((x) >= (min) && (x) <= (max)) )
@ -209,6 +228,8 @@ typedef uint8_t esp_ble_key_mask_t; /* the key mask type */
#define ESP_BD_ADDR_STR "%02x:%02x:%02x:%02x:%02x:%02x"
#define ESP_BD_ADDR_HEX(addr) addr[0], addr[1], addr[2], addr[3], addr[4], addr[5]
#define ESP_BLE_ADV_NAME_LEN_MAX 29
#ifdef __cplusplus
}
#endif

View File

@ -95,6 +95,11 @@ esp_err_t esp_bluedroid_init_with_cfg(esp_bluedroid_config_t *cfg);
*/
esp_err_t esp_bluedroid_deinit(void);
#if defined(CONFIG_EXAMPLE_CI_ID) && defined(CONFIG_EXAMPLE_CI_PIPELINE_ID)
// Only for internal used (CI example test)
char *esp_bluedroid_get_example_name(void);
#endif
#ifdef __cplusplus
}
#endif

Some files were not shown because too many files have changed in this diff Show More