Can wiced_bt_sdp_init_discovery_db() init search for 2 service UUIDs at the same time?

Tip / Sign in to post questions, reply, level up, and achieve exciting badges. Know more

cross mob
LJYe_2922526
Level 5
Level 5
25 likes received 10 likes received 5 likes given

Hi forum,

Developing with WICED 6.0 for 20706 I'm trying to see if a remote bluetooth device supports HSP, HFP or both.

I'm calling wiced_bt_sdp_init_discovery_db() first, then wiced_bt_sdp_service_search_attribute_request(). In the result handler, I'm using wiced_bt_sdp_find_service_uuid_in_db() and wiced_bt_sdp_find_protocol_list_elem_in_rec() to find the record and protocol element in the result database.

This works if I'm only searching for one service UUID at a time. Looking at the documentation for wiced_bt_sdp_init_discovery_db(), it seems like it allows an array of UUIDs to be passed in and searched at the same time like so

wiced_bt_uuid_t astAGUUIDs[2] = {

                                    {2, {UUID_SERVCLASS_HEADSET}},

                                    {2, {UUID_SERVCLASS_HF_HANDSFREE}},

                                };

uint16_t ausAGAttributeList[4] =

{

    ATTR_ID_SERVICE_CLASS_ID_LIST,

    ATTR_ID_PROTOCOL_DESC_LIST,

    ATTR_ID_BT_PROFILE_DESC_LIST,

    ATTR_ID_SUPPORTED_FEATURES,

};

wiced_bt_sdp_init_discovery_db(stBlAudioGateway.pstMySDPDatabase, BL_AG_SDP_DB_BUFFER_SIZE, 2, astAGUUIDs, 4, ausAGAttributeList);

When I do this, the wiced_bt_sdp_find_service_uuid_in_db() always returns null pointer indicating it cannot find the service. Did I use the function wrong?

Thanks,

LJ

0 Likes
1 Solution
SheetalJ
Moderator
Moderator
Moderator
First comment on KBA 750 replies posted 500 likes received

Hi LJ,

Can you try this if it works - wiced_bt_sdp_init_discovery_db(stBlAudioGateway.pstMySDPDatabase, BL_AG_SDP_DB_BUFFER_SIZE, 2, &astAGUUIDs, 4, ausAGAttributeList);

View solution in original post

1 Reply
SheetalJ
Moderator
Moderator
Moderator
First comment on KBA 750 replies posted 500 likes received

Hi LJ,

Can you try this if it works - wiced_bt_sdp_init_discovery_db(stBlAudioGateway.pstMySDPDatabase, BL_AG_SDP_DB_BUFFER_SIZE, 2, &astAGUUIDs, 4, ausAGAttributeList);