20706-A2 security request

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

cross mob
yigu_3831571
Level 1
Level 1

Hi:

     where is the function in the peripheral ble ?

     The peripheral ble let the central ble to launch a  BTM_SECURITY_REQUEST_EVT .

Thank you.

0 Likes
1 Solution

Hi ,

You can try using wiced_bt_dev_sec_bond API . Check /20706-A2_Bluetooth/include/wiced_bt_dev.h for API description.

Thanks,

Anjana

View solution in original post

4 Replies
DheerajPK_41
Moderator
Moderator
Moderator
750 replies posted 500 likes received 500 replies posted

Hi yigu_3831571

All the Bluetooth management APIs are documented in wiced_bt_dev.h.  You will be able to see various categories of BTM APIs in it, like, Device Management Functions, SECURITY MANAGEMENT FUNCTIONS, etc.  I suggest you to go through it.

In the application, you have to process the event and do the appropriate action.

For Eg: In hello_sensor app (hello_sensor.c), hello_sensor_management_cback( ) function handles the event processing. When it gets the security requests from the client, application grant the permission for that particular device by selecting the BD_ADDR as below. Similarly hello_client also handles the event through appropriate callback function.

case BTM_SECURITY_REQUEST_EVT:

            wiced_bt_ble_security_grant( p_event_data->security_request.bd_addr, WICED_BT_SUCCESS );

            break;

Please let me know if you have any queries.

Thanks,

-Dheeraj

0 Likes

hi DheerajP_41,

     I understand the procedure that you said.

     I mean before the security requests from the client , if there is a function in the peripheral that notify the central to initiate a security request.

     The central doesn't initiate a security request until it get a notification from the peripheral .

Thanks.

0 Likes

Hi ,

You can try using wiced_bt_dev_sec_bond API . Check /20706-A2_Bluetooth/include/wiced_bt_dev.h for API description.

Thanks,

Anjana

Hi,

     I try it, and it works.

Thanks.

0 Likes