mirror of
https://github.com/espressif/esp-idf.git
synced 2025-07-30 10:47:19 +02:00
ble: Added adv report flow control config on ESP32C6 and ESP32H2
This commit is contained in:
@ -435,6 +435,38 @@ config BT_LE_USE_ESP_TIMER
|
|||||||
help
|
help
|
||||||
Set this option to use Esp Timer which has higher priority timer
|
Set this option to use Esp Timer which has higher priority timer
|
||||||
instead of FreeRTOS timer
|
instead of FreeRTOS timer
|
||||||
|
config BT_CTRL_BLE_ADV_REPORT_FLOW_CTRL_SUPP
|
||||||
|
bool "BLE adv report flow control supported"
|
||||||
|
default y
|
||||||
|
help
|
||||||
|
The function is mainly used to enable flow control for advertising reports. When it is enabled,
|
||||||
|
advertising reports will be discarded by the controller if the number of unprocessed advertising
|
||||||
|
reports exceeds the size of BLE adv report flow control.
|
||||||
|
|
||||||
|
config BT_CTRL_BLE_ADV_REPORT_FLOW_CTRL_NUM
|
||||||
|
int "BLE adv report flow control number"
|
||||||
|
depends on BT_CTRL_BLE_ADV_REPORT_FLOW_CTRL_SUPP
|
||||||
|
range 50 1000
|
||||||
|
default 100
|
||||||
|
help
|
||||||
|
The number of unprocessed advertising report that bluetooth host can save.If you set
|
||||||
|
`BT_CTRL_BLE_ADV_REPORT_FLOW_CTRL_NUM` to a small value, this may cause adv packets lost.
|
||||||
|
If you set `BT_CTRL_BLE_ADV_REPORT_FLOW_CTRL_NUM` to a large value, bluetooth host may cache a
|
||||||
|
lot of adv packets and this may cause system memory run out. For example, if you set
|
||||||
|
it to 50, the maximum memory consumed by host is 35 * 50 bytes. Please set
|
||||||
|
`BT_CTRL_BLE_ADV_REPORT_FLOW_CTRL_NUM` according to your system free memory and handle adv
|
||||||
|
packets as fast as possible, otherwise it will cause adv packets lost.
|
||||||
|
|
||||||
|
config BT_CTRL_BLE_ADV_REPORT_DISCARD_THRSHOLD
|
||||||
|
int "BLE adv lost event threshold value"
|
||||||
|
depends on BT_CTRL_BLE_ADV_REPORT_FLOW_CTRL_SUPP
|
||||||
|
range 1 1000
|
||||||
|
default 20
|
||||||
|
help
|
||||||
|
When adv report flow control is enabled, The ADV lost event will be generated when the number
|
||||||
|
of ADV packets lost in the controller reaches this threshold. It is better to set a larger value.
|
||||||
|
If you set `BT_CTRL_BLE_ADV_REPORT_DISCARD_THRSHOLD` to a small value or printf every adv lost event, it
|
||||||
|
may cause adv packets lost more.
|
||||||
|
|
||||||
config BT_LE_SCAN_DUPL
|
config BT_LE_SCAN_DUPL
|
||||||
bool "BLE Scan Duplicate Options"
|
bool "BLE Scan Duplicate Options"
|
||||||
|
@ -436,6 +436,39 @@ config BT_LE_USE_ESP_TIMER
|
|||||||
Set this option to use Esp Timer which has higher priority timer
|
Set this option to use Esp Timer which has higher priority timer
|
||||||
instead of FreeRTOS timer
|
instead of FreeRTOS timer
|
||||||
|
|
||||||
|
config BT_CTRL_BLE_ADV_REPORT_FLOW_CTRL_SUPP
|
||||||
|
bool "BLE adv report flow control supported"
|
||||||
|
default y
|
||||||
|
help
|
||||||
|
The function is mainly used to enable flow control for advertising reports. When it is enabled,
|
||||||
|
advertising reports will be discarded by the controller if the number of unprocessed advertising
|
||||||
|
reports exceeds the size of BLE adv report flow control.
|
||||||
|
|
||||||
|
config BT_CTRL_BLE_ADV_REPORT_FLOW_CTRL_NUM
|
||||||
|
int "BLE adv report flow control number"
|
||||||
|
depends on BT_CTRL_BLE_ADV_REPORT_FLOW_CTRL_SUPP
|
||||||
|
range 50 1000
|
||||||
|
default 100
|
||||||
|
help
|
||||||
|
The number of unprocessed advertising report that bluetooth host can save.If you set
|
||||||
|
`BT_CTRL_BLE_ADV_REPORT_FLOW_CTRL_NUM` to a small value, this may cause adv packets lost.
|
||||||
|
If you set `BT_CTRL_BLE_ADV_REPORT_FLOW_CTRL_NUM` to a large value, bluetooth host may cache a
|
||||||
|
lot of adv packets and this may cause system memory run out. For example, if you set
|
||||||
|
it to 50, the maximum memory consumed by host is 35 * 50 bytes. Please set
|
||||||
|
`BT_CTRL_BLE_ADV_REPORT_FLOW_CTRL_NUM` according to your system free memory and handle adv
|
||||||
|
packets as fast as possible, otherwise it will cause adv packets lost.
|
||||||
|
|
||||||
|
config BT_CTRL_BLE_ADV_REPORT_DISCARD_THRSHOLD
|
||||||
|
int "BLE adv lost event threshold value"
|
||||||
|
depends on BT_CTRL_BLE_ADV_REPORT_FLOW_CTRL_SUPP
|
||||||
|
range 1 1000
|
||||||
|
default 20
|
||||||
|
help
|
||||||
|
When adv report flow control is enabled, The ADV lost event will be generated when the number
|
||||||
|
of ADV packets lost in the controller reaches this threshold. It is better to set a larger value.
|
||||||
|
If you set `BT_CTRL_BLE_ADV_REPORT_DISCARD_THRSHOLD` to a small value or printf every adv lost event, it
|
||||||
|
may cause adv packets lost more.
|
||||||
|
|
||||||
config BT_LE_SCAN_DUPL
|
config BT_LE_SCAN_DUPL
|
||||||
bool "BLE Scan Duplicate Options"
|
bool "BLE Scan Duplicate Options"
|
||||||
default y
|
default y
|
||||||
|
@ -204,7 +204,7 @@
|
|||||||
|
|
||||||
#endif //CONFIG_IDF_TARGET_ESP32
|
#endif //CONFIG_IDF_TARGET_ESP32
|
||||||
|
|
||||||
#if (CONFIG_IDF_TARGET_ESP32C3 || CONFIG_IDF_TARGET_ESP32S3)
|
#if (CONFIG_IDF_TARGET_ESP32C3 || CONFIG_IDF_TARGET_ESP32S3 || CONFIG_IDF_TARGET_ESP32C6 || CONFIG_IDF_TARGET_ESP32H2)
|
||||||
//BTDM_BLE_ADV_REPORT_FLOW_CTRL_SUPP
|
//BTDM_BLE_ADV_REPORT_FLOW_CTRL_SUPP
|
||||||
#ifdef CONFIG_BT_CTRL_BLE_ADV_REPORT_FLOW_CTRL_SUPP
|
#ifdef CONFIG_BT_CTRL_BLE_ADV_REPORT_FLOW_CTRL_SUPP
|
||||||
#define UC_BTDM_BLE_ADV_REPORT_FLOW_CTRL_SUPP CONFIG_BT_CTRL_BLE_ADV_REPORT_FLOW_CTRL_SUPP
|
#define UC_BTDM_BLE_ADV_REPORT_FLOW_CTRL_SUPP CONFIG_BT_CTRL_BLE_ADV_REPORT_FLOW_CTRL_SUPP
|
||||||
@ -226,7 +226,7 @@
|
|||||||
#define UC_BTDM_BLE_ADV_REPORT_DISCARD_THRSHOLD 20
|
#define UC_BTDM_BLE_ADV_REPORT_DISCARD_THRSHOLD 20
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#endif //(CONFIG_IDF_TARGET_ESP32C3 || CONFIG_IDF_TARGET_ESP32S3)
|
#endif //(CONFIG_IDF_TARGET_ESP32C3 || CONFIG_IDF_TARGET_ESP32S3 || CONFIG_IDF_TARGET_ESP32C6 || CONFIG_IDF_TARGET_ESP32H2)
|
||||||
|
|
||||||
//BT ACL CONNECTIONS
|
//BT ACL CONNECTIONS
|
||||||
#ifdef CONFIG_BT_ACL_CONNECTIONS
|
#ifdef CONFIG_BT_ACL_CONNECTIONS
|
||||||
|
Reference in New Issue
Block a user