Service discovery fails

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

cross mob
Anonymous
Not applicable

Hi

I'm trying to bond with my Android phone from a BCM943341 eval board.

The bluetooth communications seems to go well until I try to connect to it.

I use wiced_bt_start_inquiry to start the inquiry.

When I see the phone, I cancel the inquiry and try to bond with it using wiced_bt_dev_sec_bond. I then get the BTM_PAIRING_IO_CAPABILITIES_BR_EDR_REQUEST_EVT event and set the local_io_cap to DISPLAY_AND_KEYBOARD (which is what I will be having on the target board), and auth_req to BTM_AUTH_ALL_PROFILES_NO (which is a guess).

I then get a connect status callback telling me it is connected.

Then I get a BTM_USER_CONFIRMATION_REQUEST_EVT with the PIN, and I reply with a:

wiced_bt_dev_confirm_req_reply(WICED_BT_SUCCESS, p_event_data->user_confirmation_request.bd_addr);

A dialog pops up on the phone with the PIN and I press PAIR.

After that, I get a BTM_PAIRING_COMPLETE_EVT. This is when I initiate the service discovery using:

wiced_bt_sdp_init_discovery_db(sdp_disc_db, size, 0, NULL, 0, NULL)

(where size is the sum of the wiced_bt_sdp_discovery_db_t plus 50 records and 50 attributes total 1600 bytes)

Then I start the discovery using:

wiced_bt_sdp_service_search_request(bd_addr, sdp_disc_db, discComplete_cb);

But the result I get to the discComplete_cb (after a few seconds) is always FFF1 (WICED_BT_SDP_CONN_FAILED).

Anyone has a suggestion?

0 Likes
6 Replies
VikramR_26
Employee
Employee
25 sign-ins 10 sign-ins 10 comments on KBA

which version of SDK are you using ?

0 Likes
Anonymous
Not applicable

vik86

I think that was using 3.1.2.

0 Likes
Anonymous
Not applicable

Do you have the logs of the application which you have taken through terminal ?

If you have taken, can you post it ?

Also what error does those function calls return ?

0 Likes
Anonymous
Not applicable

Could you use  sdk 3.6.0? Or sdk 3.5.2?


The BT stack in 3.1.2 was not ever extensively tested for non GATT modes

0 Likes
Anonymous
Not applicable

Hi,

Could you please provide the necessary data that Nithin has requested ? Also as vik86 has suggested have you tried the latest SDK?

If you have and are still experiencing the same problem, could you please update us with the log?

Thanks

Shrikumar

0 Likes
Anonymous
Not applicable

Sorry for not replying. It turns out we have no real use for that specific use case, initiating pairing from the BCM radio. When the pairing is initiated from the phone, there's no problem.

The initial attempt was performed on v3.1.2. We're just now upgrading to 3.5.2 but I'm not sure we'll try this use case there either. The main reason we're uprading to 3.5.2 is to solve the rfcomm reconnect issue we were having. I'll get back on that thread if we still see it.