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
PrYa_4592711
Level 1
Level 1
5 replies posted 5 questions asked First reply posted

Hello, This question was asked before, but the response doesn't seem right. I have the same question, posting here again since the original discussion was locked.

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

I am using WICED SDK 6.4 for 20706.

/* remote services to look up */
wiced_bt_uuid_t  ag_sdp_uuid[] = {
  {.len = LEN_UUID_16, .uu.uuid16 = UUID_SERVCLASS_HF_HANDSFREE},
  {.len = LEN_UUID_16, .uu.uuid16 = UUID_SERVCLASS_HEADSET_HS}
};

wiced_bt_sdp_init_discovery_db(p_scb->p_sdp_discovery_db, 360, 2, ag_sdp_uuid, num_attr, attr_list);

Same as asked in the previous posting, this query works on a single service id search, but not with two as above.

When probed the buffer at initialization and in the completion callback is same.

p_scb->p_sdp_discovery_db->mem_free is 252
p_scb->p_sdp_discovery_db->num_uuid_filters is 2

I even attempted to search for one at a time, second search started in the completion callback of first one.

1. Search for HF_HANDSFREEE

2. In the completion callback find the record of interest.

3. On failing to find the record of interest, start a search for HEADSET_HS  ==== This fails here.

It is getting unnecessarily complicated .


Thank you
Praveen

0 Likes
1 Solution
AnjanaM_61
Moderator
Moderator
Moderator
5 comments on KBA First comment on KBA 5 questions asked

Hi PrYa_4592711 ,

Can you please clarify if you are looking for remote device with both HF_HANDSFREEE and HEADSET_HS   or any of them?

What you were doing was correct if the remote device has both UUIDs defined in one SDP record. If it didn't find both UUIDs define in one record, it won't return any results. But with the individual searches, if you search for individual UUIDs, then it will find the individual record with the specific UUID.

Can you please clarify the application requirement ?

Regards,

Anjana

View solution in original post

0 Likes
2 Replies
AnjanaM_61
Moderator
Moderator
Moderator
5 comments on KBA First comment on KBA 5 questions asked

Hi PrYa_4592711 ,

Can you please clarify if you are looking for remote device with both HF_HANDSFREEE and HEADSET_HS   or any of them?

What you were doing was correct if the remote device has both UUIDs defined in one SDP record. If it didn't find both UUIDs define in one record, it won't return any results. But with the individual searches, if you search for individual UUIDs, then it will find the individual record with the specific UUID.

Can you please clarify the application requirement ?

Regards,

Anjana

0 Likes

Hello Anjana, The latter. The intent was to find either of them. This is just so the AG can connect to a preferred profile or fallback. Thanks for the clarification.

Praveen

0 Likes