diff --git a/components/bt/controller/esp32c3/Kconfig.in b/components/bt/controller/esp32c3/Kconfig.in index 0f5f29ec8f..17f02e6be5 100644 --- a/components/bt/controller/esp32c3/Kconfig.in +++ b/components/bt/controller/esp32c3/Kconfig.in @@ -547,6 +547,11 @@ config BT_CTRL_BLE_SCAN bool "Enable BLE scan feature" default y +config BT_CTRL_BLE_SECURITY_ENABLE + depends on BT_CTRL_RUN_IN_FLASH_ONLY + bool "Enable BLE security feature" + default y + config BT_CTRL_CHECK_CONNECT_IND_ACCESS_ADDRESS bool "Enable enhanced Access Address check in CONNECT_IND" default n diff --git a/components/bt/host/bluedroid/api/include/api/esp_gap_ble_api.h b/components/bt/host/bluedroid/api/include/api/esp_gap_ble_api.h index 1812d4946a..de2e029113 100644 --- a/components/bt/host/bluedroid/api/include/api/esp_gap_ble_api.h +++ b/components/bt/host/bluedroid/api/include/api/esp_gap_ble_api.h @@ -1025,6 +1025,13 @@ typedef struct { uint16_t sync_handle; /*!< periodic advertising train handle */ uint8_t tx_power; /*!< periodic advertising tx power*/ int8_t rssi; /*!< periodic advertising rssi */ +#if (CONFIG_BT_BLE_FEAT_CTE_EN) // #if (BLE_FEAT_CTE_EN == TRUE) + uint8_t cte_type; /*!< The type of Constant Tone Extension + 0x00: AoA Constant Tone Extension + 0x01: AoD Constant Tone Extension with 1 μs slots + 0x02: AoD Constant Tone Extension with 2 μs slots + 0xFF: No Constant Tone Extension */ +#endif // BT_BLE_FEAT_CTE_EN esp_ble_gap_ext_adv_data_status_t data_status; /*!< periodic advertising data type*/ uint8_t data_length; /*!< periodic advertising data length */ uint8_t data[251]; /*!< periodic advertising data */ diff --git a/components/bt/host/bluedroid/btc/profile/std/gap/btc_gap_ble.c b/components/bt/host/bluedroid/btc/profile/std/gap/btc_gap_ble.c index f77bd8a965..1a80df50b1 100644 --- a/components/bt/host/bluedroid/btc/profile/std/gap/btc_gap_ble.c +++ b/components/bt/host/bluedroid/btc/profile/std/gap/btc_gap_ble.c @@ -1144,8 +1144,14 @@ static void btc_ble_5_gap_callback(tBTA_DM_BLE_5_GAP_EVENT event, #if (BLE_50_EXTEND_SYNC_EN == TRUE) case BTA_DM_BLE_5_GAP_PERIODIC_ADV_REPORT_EVT: { msg.act = ESP_GAP_BLE_PERIODIC_ADV_REPORT_EVT; - memcpy(¶m.period_adv_report, ¶ms->period_adv_report, - sizeof(esp_ble_gap_periodic_adv_report_t)); + param.period_adv_report.params.sync_handle = params->period_adv_report.sync_handle; + param.period_adv_report.params.tx_power = params->period_adv_report.tx_power; + param.period_adv_report.params.rssi = params->period_adv_report.rssi; + #if (BLE_FEAT_CTE_EN == TRUE) + param.period_adv_report.params.cte_type = params->period_adv_report.cte_type; + #endif // #if (BLE_FEAT_CTE_EN == TRUE) + param.period_adv_report.params.data_status = params->period_adv_report.data_status; + param.period_adv_report.params.data_length = params->period_adv_report.data_length; if (params->period_adv_report.data) { memcpy(param.period_adv_report.params.data, params->period_adv_report.data, params->period_adv_report.data_length); diff --git a/components/bt/host/bluedroid/stack/btu/btu_hcif.c b/components/bt/host/bluedroid/stack/btu/btu_hcif.c index c6cfd75017..fa2193bec4 100644 --- a/components/bt/host/bluedroid/stack/btu/btu_hcif.c +++ b/components/bt/host/bluedroid/stack/btu/btu_hcif.c @@ -2566,7 +2566,7 @@ static void btu_ble_periodic_adv_report_evt(UINT8 *p, UINT8 evt_len) STREAM_TO_UINT16(adv_report.sync_handle, p); STREAM_TO_UINT8(adv_report.tx_power, p); STREAM_TO_UINT8(adv_report.rssi, p); - STREAM_TO_UINT8(unused, p); + STREAM_TO_UINT8(adv_report.cte_type, p); STREAM_TO_UINT8(adv_report.data_status, p); STREAM_TO_UINT8(adv_report.data_length, p); diff --git a/components/bt/host/bluedroid/stack/include/stack/btm_ble_api.h b/components/bt/host/bluedroid/stack/include/stack/btm_ble_api.h index a236c4db99..fbad343cfb 100644 --- a/components/bt/host/bluedroid/stack/include/stack/btm_ble_api.h +++ b/components/bt/host/bluedroid/stack/include/stack/btm_ble_api.h @@ -1330,6 +1330,7 @@ typedef struct { UINT16 sync_handle; UINT8 tx_power; INT8 rssi; + UINT8 cte_type; tBTM_BLE_EXT_ADV_DATA_STATUS data_status; UINT8 data_length; UINT8 *data; diff --git a/components/esp_rom/CMakeLists.txt b/components/esp_rom/CMakeLists.txt index d01c6f8221..97468d121e 100644 --- a/components/esp_rom/CMakeLists.txt +++ b/components/esp_rom/CMakeLists.txt @@ -205,17 +205,19 @@ else() # Regular app build rom_linker_script("newlib") rom_linker_script("version") - if(CONFIG_BT_CTRL_RUN_IN_FLASH_ONLY) + if(CONFIG_BT_CTRL_RUN_IN_FLASH_ONLY AND NOT CONFIG_BT_CTRL_HCI_MODE_UART_H4) if(NOT CONFIG_BT_CTRL_BLE_MASTER) rom_linker_script("ble_master") endif() - if(NOT CONFIG_BT_NIMBLE_50_FEATURE_SUPPORT AND NOT CONFIG_BT_BLE_50_FEATURES_SUPPORTED) - rom_linker_script("ble_50") + if(NOT CONFIG_BT_CONTROLLER_ONLY) + if(NOT CONFIG_BT_NIMBLE_50_FEATURE_SUPPORT AND NOT CONFIG_BT_BLE_50_FEATURES_SUPPORTED) + rom_linker_script("ble_50") + endif() endif() if(CONFIG_BT_BLE_CCA_MODE_NONE) rom_linker_script("ble_cca") endif() - if(NOT CONFIG_BT_NIMBLE_SECURITY_ENABLE AND NOT CONFIG_BT_BLE_SMP_ENABLE) + if(NOT CONFIG_BT_CTRL_BLE_SECURITY_ENABLE) rom_linker_script("ble_smp") endif() if(NOT CONFIG_BT_CTRL_DTM_ENABLE) @@ -245,17 +247,19 @@ else() # Regular app build rom_linker_script("newlib") rom_linker_script("version") - if(CONFIG_BT_CTRL_RUN_IN_FLASH_ONLY) + if(CONFIG_BT_CTRL_RUN_IN_FLASH_ONLY AND NOT CONFIG_BT_CTRL_HCI_MODE_UART_H4) if(NOT CONFIG_BT_CTRL_BLE_MASTER) rom_linker_script("ble_master") endif() - if(NOT CONFIG_BT_NIMBLE_50_FEATURE_SUPPORT AND NOT CONFIG_BT_BLE_50_FEATURES_SUPPORTED) - rom_linker_script("ble_50") + if(NOT CONFIG_BT_CONTROLLER_ONLY) + if(NOT CONFIG_BT_NIMBLE_50_FEATURE_SUPPORT AND NOT CONFIG_BT_BLE_50_FEATURES_SUPPORTED) + rom_linker_script("ble_50") + endif() endif() if(CONFIG_BT_BLE_CCA_MODE_NONE) rom_linker_script("ble_cca") endif() - if(NOT CONFIG_BT_NIMBLE_SECURITY_ENABLE AND NOT CONFIG_BT_BLE_SMP_ENABLE) + if(NOT CONFIG_BT_CTRL_BLE_SECURITY_ENABLE) rom_linker_script("ble_smp") endif() if(NOT CONFIG_BT_CTRL_DTM_ENABLE)