feat(bt/bluedroid): Add new APIs for 32 and 128-bit UUIDs

1. Added new API functions that can add 32 and 128-bit UUID to the EIR data
when these UUIDs are set in SDP.
The old functions that only work with 16-bit UUIDs have been left
unchanged to avoid having to redo code that already utilizes them.

2. Fixed bug with zero handler return in btc_sdp.c
sdp_create_record.handle in tBTA_SDP struct wasn't saved before.
Because of it Bluetooth stack always returned zero handler to
application callback.

Closes https://github.com/espressif/esp-idf/issues/11529
This commit is contained in:
Ilia Lutchenko
2023-07-24 16:20:50 +02:00
parent b4268c874a
commit 0a23da71ac
7 changed files with 397 additions and 33 deletions

View File

@@ -4080,6 +4080,22 @@ BOOLEAN BTM_HasEirService( UINT32 *p_eir_uuid, UINT16 uuid16 );
tBTM_EIR_SEARCH_RESULT BTM_HasInquiryEirService( tBTM_INQ_RESULTS *p_results,
UINT16 uuid16 );
/*******************************************************************************
**
** Function BTM_HasCustomEirService
**
** Description This function is called to know if UUID is already in custom
** UUID list.
**
** Parameters custom_uuid - pointer to custom_uuid array in tBTA_DM_CB
** uuid - UUID struct
**
** Returns TRUE - if found
** FALSE - if not found
**
*******************************************************************************/
BOOLEAN BTM_HasCustomEirService( tBT_UUID *custom_uuid, tBT_UUID uuid );
/*******************************************************************************
**
** Function BTM_AddEirService
@@ -4095,6 +4111,20 @@ tBTM_EIR_SEARCH_RESULT BTM_HasInquiryEirService( tBTM_INQ_RESULTS *p_results,
//extern
void BTM_AddEirService( UINT32 *p_eir_uuid, UINT16 uuid16 );
/*******************************************************************************
**
** Function BTM_AddCustomEirService
**
** Description This function is called to add a custom UUID.
**
** Parameters custom_uuid - pointer to custom_uuid array in tBTA_DM_CB
** uuid - UUID struct
**
** Returns None
**
*******************************************************************************/
void BTM_AddCustomEirService(tBT_UUID *custom_uuid, tBT_UUID uuid);
/*******************************************************************************
**
** Function BTM_RemoveEirService
@@ -4110,6 +4140,20 @@ void BTM_AddEirService( UINT32 *p_eir_uuid, UINT16 uuid16 );
//extern
void BTM_RemoveEirService( UINT32 *p_eir_uuid, UINT16 uuid16 );
/*******************************************************************************
**
** Function BTM_RemoveCustomEirService
**
** Description This function is called to remove a a custom UUID.
**
** Parameters custom_uuid - pointer to custom_uuid array in tBTA_DM_CB
uuid - UUID struct
**
** Returns None
**
*******************************************************************************/
void BTM_RemoveCustomEirService(tBT_UUID *custom_uuid, tBT_UUID uuid);
/*******************************************************************************
**
** Function BTM_GetEirSupportedServices