Hi yifei gu,
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.
wiced_bt_ble_security_grant( p_event_data->security_request.bd_addr, WICED_BT_SUCCESS );
Please let me know if you have any queries.
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 .
1 of 1 people found this helpful
You can try using wiced_bt_dev_sec_bond API . Check /20706-A2_Bluetooth/include/wiced_bt_dev.h for API description.
I try it, and it works.