Skip to content

Commit fb0a087

Browse files
committed
Merge branch 'bugfix/sec_service_record_conn_fail' into 'master'
fix(bt/bluedroid): fix the issue of connection failure when initializing multiple profiles See merge request espressif/esp-idf!38032
2 parents fa0a2d9 + b2a5b96 commit fb0a087

File tree

1 file changed

+88
-2
lines changed
  • components/bt/host/bluedroid/common/include/common

1 file changed

+88
-2
lines changed

components/bt/host/bluedroid/common/include/common/bt_target.h

Lines changed: 88 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1100,9 +1100,95 @@
11001100
#define BTM_SEC_MAX_DEVICE_RECORDS UC_BT_SMP_MAX_BONDS
11011101
#endif
11021102

1103-
/* The number of security records for services. 32 AS Default*/
1103+
#if BTA_SDP_INCLUDED
1104+
#define BTM_SDP_SEC_SERVICE_RECORDS 1
1105+
#else
1106+
#define BTM_SDP_SEC_SERVICE_RECORDS 0
1107+
#endif
1108+
1109+
#if BTA_AG_INCLUDED
1110+
#define BTM_AG_SEC_SERVICE_RECORDS 1
1111+
#else
1112+
#define BTM_AG_SEC_SERVICE_RECORDS 0
1113+
#endif
1114+
1115+
#if BTA_HF_INCLUDED
1116+
#define BTM_HF_SEC_SERVICE_RECORDS 1
1117+
#else
1118+
#define BTM_HF_SEC_SERVICE_RECORDS 0
1119+
#endif
1120+
1121+
#if BTA_JV_INCLUDED
1122+
#define BTM_JV_SEC_SERVICE_RECORDS (MAX_RFC_PORTS - BTM_HF_SEC_SERVICE_RECORDS - BTM_AG_SEC_SERVICE_RECORDS)
1123+
#else
1124+
#define BTM_JV_SEC_SERVICE_RECORDS 0
1125+
#endif
1126+
1127+
#if BTA_PBA_CLIENT_INCLUDED
1128+
#define BTM_PBA_SEC_SERVICE_RECORDS 2
1129+
#else
1130+
#define BTM_PBA_SEC_SERVICE_RECORDS 0
1131+
#endif
1132+
1133+
#if BTA_AV_CA_INCLUDED
1134+
#define BTM_AC_VA_SEC_SERVICE_RECORDS 1
1135+
#else
1136+
#define BTM_AC_VA_SEC_SERVICE_RECORDS 0
1137+
#endif
1138+
1139+
#if AVCT_INCLUDED
1140+
#if AVCT_BROWSE_INCLUDED
1141+
#define BTM_AVCT_SEC_SERVICE_RECORDS 2
1142+
#else
1143+
#define BTM_AVCT_SEC_SERVICE_RECORDS 1
1144+
#endif // AVCT_BROWSE_INCLUDED
1145+
#else
1146+
#define BTM_AVCT_SEC_SERVICE_RECORDS 0
1147+
#endif
1148+
1149+
#if AVDT_INCLUDED
1150+
#if AVDT_REPORTING
1151+
#define BTM_AVDT_SEC_SERVICE_RECORDS 3
1152+
#else
1153+
#define BTM_AVDT_SEC_SERVICE_RECORDS 2
1154+
#endif // AVDT_INCLUDED
1155+
#else
1156+
#define BTM_AVDT_SEC_SERVICE_RECORDS 0
1157+
#endif
1158+
1159+
#if GAP_CONN_INCLUDED
1160+
#define BTM_GAP_SEC_SERVICE_RECORDS GAP_MAX_CONNECTIONS
1161+
#else
1162+
#define BTM_GAP_SEC_SERVICE_RECORDS 0
1163+
#endif
1164+
1165+
#if HID_DEV_INCLUDED
1166+
#define BTM_HIDD_SEC_SERVICE_RECORDS 3
1167+
#else
1168+
#define BTM_HIDD_SEC_SERVICE_RECORDS 0
1169+
#endif
1170+
1171+
#if HID_HOST_INCLUDED
1172+
#define BTM_HIDH_SEC_SERVICE_RECORDS 3
1173+
#else
1174+
#define BTM_HIDH_SEC_SERVICE_RECORDS 0
1175+
#endif
1176+
1177+
#if BLE_INCLUDED
1178+
#define BTM_GATT_SEC_SERVICE_RECORDS 1
1179+
#else
1180+
#define BTM_GATT_SEC_SERVICE_RECORDS 0
1181+
#endif
1182+
1183+
#define BTM_SEC_DEV_SERVICE_RECORDS 1
1184+
1185+
/* The number of security records for services. */
11041186
#ifndef BTM_SEC_MAX_SERVICE_RECORDS
1105-
#define BTM_SEC_MAX_SERVICE_RECORDS 32
1187+
#define BTM_SEC_MAX_SERVICE_RECORDS (BTM_SDP_SEC_SERVICE_RECORDS + BTM_AG_SEC_SERVICE_RECORDS \
1188+
+ BTM_AVCT_SEC_SERVICE_RECORDS + BTM_AVDT_SEC_SERVICE_RECORDS + BTM_GAP_SEC_SERVICE_RECORDS \
1189+
+ BTM_HIDD_SEC_SERVICE_RECORDS + BTM_GATT_SEC_SERVICE_RECORDS + BTM_PBA_SEC_SERVICE_RECORDS \
1190+
+ BTM_HIDH_SEC_SERVICE_RECORDS + BTM_SEC_DEV_SERVICE_RECORDS + BTM_HF_SEC_SERVICE_RECORDS \
1191+
+ BTM_JV_SEC_SERVICE_RECORDS + BTM_AC_VA_SEC_SERVICE_RECORDS )
11061192
#endif
11071193

11081194
/* If True, force a retrieval of remote device name for each bond in case it's changed */

0 commit comments

Comments
 (0)