From 66970ed0d11bd3fc4f3bbc68c0018a11d53d0df8 Mon Sep 17 00:00:00 2001 From: Zhou Xiao Date: Fri, 16 Jan 2026 17:13:22 +0800 Subject: [PATCH] feat(ble): add config to enable sid filter feat (cherry picked from commit 3bf230435cb091546deabe661713a3156f3ca780) Co-authored-by: cjin --- components/bt/host/nimble/Kconfig.in | 18 ++++++++++++++++++ components/bt/host/nimble/nimble | 2 +- .../host/nimble/port/include/esp_nimble_cfg.h | 18 +++++++++++++++++- 3 files changed, 36 insertions(+), 2 deletions(-) diff --git a/components/bt/host/nimble/Kconfig.in b/components/bt/host/nimble/Kconfig.in index 7f30034648c..b189fa5c612 100644 --- a/components/bt/host/nimble/Kconfig.in +++ b/components/bt/host/nimble/Kconfig.in @@ -1621,6 +1621,24 @@ menu "Vendor / Optimization" depends on BT_NIMBLE_ENABLED help This enable BLE high duty advertising interval feature + + config BT_NIMBLE_ADV_SEND_CONSTANT_DID + bool "Enable BLE Ext Adv to Send with Specific DID" + depends on SOC_ESP_NIMBLE_CONTROLLER && BT_NIMBLE_50_FEATURE_SUPPORT && !(IDF_TARGET_ESP32C2) + select BT_NIMBLE_VS_SUPPORT + help + This enable vendor-specific APIs to send specific DID for different advertising data in extended + advertising. + + config BT_NIMBLE_SCAN_ALLOW_ENH_ADI_FILTER + bool "Enable BLE Ext Scan to Receive Packet with Specific ADI" + depends on SOC_ESP_NIMBLE_CONTROLLER && BT_NIMBLE_50_FEATURE_SUPPORT && !(IDF_TARGET_ESP32C2) + select BT_NIMBLE_VS_SUPPORT + help + This enables vendor-specific APIs to only receive specific groups of ADIs, and implements DIDs + duplicate filtering for extended scanning. Enabling this can reduce the unnecessary reception of + secondary channel PDUs carrying non-targeted ADIs. + endmenu #Vendor menu "Helper Utils" diff --git a/components/bt/host/nimble/nimble b/components/bt/host/nimble/nimble index d9a6fa86301..886039b39b9 160000 --- a/components/bt/host/nimble/nimble +++ b/components/bt/host/nimble/nimble @@ -1 +1 @@ -Subproject commit d9a6fa863017fd6d8486c50d244acfbbb898a590 +Subproject commit 886039b39b9b3605f7a07ca0fb344d3df99f96b4 diff --git a/components/bt/host/nimble/port/include/esp_nimble_cfg.h b/components/bt/host/nimble/port/include/esp_nimble_cfg.h index 8155a2a6d06..cf36dec2566 100644 --- a/components/bt/host/nimble/port/include/esp_nimble_cfg.h +++ b/components/bt/host/nimble/port/include/esp_nimble_cfg.h @@ -1,5 +1,5 @@ /* - * SPDX-FileCopyrightText: 2015-2025 Espressif Systems (Shanghai) CO LTD + * SPDX-FileCopyrightText: 2015-2026 Espressif Systems (Shanghai) CO LTD * * SPDX-License-Identifier: Apache-2.0 */ @@ -2356,4 +2356,20 @@ #endif #endif +#ifndef MYNEWT_VAL_BLE_ADV_SEND_CONSTANT_DID +#ifdef CONFIG_BT_NIMBLE_ADV_SEND_CONSTANT_DID +#define MYNEWT_VAL_BLE_ADV_SEND_CONSTANT_DID (CONFIG_BT_NIMBLE_ADV_SEND_CONSTANT_DID) +#else +#define MYNEWT_VAL_BLE_ADV_SEND_CONSTANT_DID (0) +#endif +#endif + +#ifndef MYNEWT_VAL_BLE_SCAN_ALLOW_ENH_ADI_FILTER +#ifdef CONFIG_BT_NIMBLE_SCAN_ALLOW_ENH_ADI_FILTER +#define MYNEWT_VAL_BLE_SCAN_ALLOW_ENH_ADI_FILTER (CONFIG_BT_NIMBLE_SCAN_ALLOW_ENH_ADI_FILTER) +#else +#define MYNEWT_VAL_BLE_SCAN_ALLOW_ENH_ADI_FILTER (0) +#endif +#endif + #endif