From 957bf03d6ad2f4e7c4ae4bd5061b0b2c01642414 Mon Sep 17 00:00:00 2001 From: zhiweijian Date: Thu, 3 Nov 2022 21:33:14 +0800 Subject: [PATCH 1/2] bluedroid host supports the maximum number of connections to 9 --- components/bt/host/bluedroid/Kconfig.in | 10 +++++++--- .../bt/host/bluedroid/bta/dm/include/bta_dm_int.h | 2 +- .../bt/host/bluedroid/bta/gatt/include/bta_gattc_int.h | 2 +- 3 files changed, 9 insertions(+), 5 deletions(-) diff --git a/components/bt/host/bluedroid/Kconfig.in b/components/bt/host/bluedroid/Kconfig.in index 74417f43368..f2c08f9fb6e 100644 --- a/components/bt/host/bluedroid/Kconfig.in +++ b/components/bt/host/bluedroid/Kconfig.in @@ -1010,12 +1010,16 @@ menu "BT DEBUG LOG LEVEL" endmenu #BT DEBUG LOG LEVEL config BT_ACL_CONNECTIONS - int "BT/BLE MAX ACL CONNECTIONS(1~7)" + int "BT/BLE MAX ACL CONNECTIONS(1~9)" depends on BT_BLUEDROID_ENABLED - range 1 7 + range 1 9 default 4 help - Maximum BT/BLE connection count + Maximum BT/BLE connection count. The ESP32-C3/S3 chip supports a maximum of 10 instances, + including ADV, SCAN and connections. The ESP32-C3/S3 chip can connect up to 9 devices if + ADV or SCAN uses only one. If ADV and SCAN are both used, The ESP32-C3/S3 chip is connected + to a maximum of 8 devices. Because Bluetooth cannot reclaim used instances once ADV or SCAN + is used. config BT_MULTI_CONNECTION_ENBALE bool "Enable BLE multi-conections" diff --git a/components/bt/host/bluedroid/bta/dm/include/bta_dm_int.h b/components/bt/host/bluedroid/bta/dm/include/bta_dm_int.h index 30b3b5a9952..f6b93d0744d 100644 --- a/components/bt/host/bluedroid/bta/dm/include/bta_dm_int.h +++ b/components/bt/host/bluedroid/bta/dm/include/bta_dm_int.h @@ -1153,7 +1153,7 @@ typedef union { } tBTA_DM_MSG; -#define BTA_DM_NUM_PEER_DEVICE 7 +#define BTA_DM_NUM_PEER_DEVICE MAX_ACL_CONNECTIONS #define BTA_DM_NOT_CONNECTED 0 #define BTA_DM_CONNECTED 1 diff --git a/components/bt/host/bluedroid/bta/gatt/include/bta_gattc_int.h b/components/bt/host/bluedroid/bta/gatt/include/bta_gattc_int.h index 4262f20b708..db1408ea4fd 100644 --- a/components/bt/host/bluedroid/bta/gatt/include/bta_gattc_int.h +++ b/components/bt/host/bluedroid/bta/gatt/include/bta_gattc_int.h @@ -317,7 +317,7 @@ typedef struct { } tBTA_GATTC_SERV; #ifndef BTA_GATTC_NOTIF_REG_MAX -#define BTA_GATTC_NOTIF_REG_MAX 7//15 +#define BTA_GATTC_NOTIF_REG_MAX BTA_GATTC_CONN_MAX #endif typedef struct { From 51c739c1815c35b7b5b581adeb471d750afa7d59 Mon Sep 17 00:00:00 2001 From: zwj Date: Tue, 29 Nov 2022 17:37:04 +0800 Subject: [PATCH 2/2] update BLE lib for ESP32-C3 and ESP32-S3 - Fixed lld_con.c line 3048 assert - Fixed crash sometimes when connected as a slave by 8th device --- components/bt/controller/lib_esp32c3_family | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/components/bt/controller/lib_esp32c3_family b/components/bt/controller/lib_esp32c3_family index 976ca00e439..79152b51902 160000 --- a/components/bt/controller/lib_esp32c3_family +++ b/components/bt/controller/lib_esp32c3_family @@ -1 +1 @@ -Subproject commit 976ca00e43905df9e910b400a9e17c311b085ce2 +Subproject commit 79152b519023f26462498f3ef8805cff2a80e193