Important changes to forums and questions
All forums and questions are now archived. To start a new conversation or read the latest updates go to forums.mbed.com.
7 years, 11 months ago.
How to use linkSecuredCallback ..........?
Hai
i am new in ble and mbed. now i am working on a ble based project. i am using nrf51822 . in my code i need to add bonding between central and peripheral i have implemented using SecurityManager. i have two call back for pairing
void passkeyDisplayCallback(Gap::Handle_t handle, const SecurityManager::Passkey_t passkey) { printf("Input passKey: "); for (unsigned i = 0; i < Gap::ADDR_LEN; i++) { printf("%c ", passkey[i]); } printf("\r\n"); } void securitySetupCompletedCallback(Gap::Handle_t handle, SecurityManager::SecurityCompletionStatus_t status) { if (status == SecurityManager::SEC_STATUS_SUCCESS) { printf("Security success\r\n"); } else { printf("Security failed\r\n"); } }
by this i am able to bond a new device . but now i want to know when a bonded device is trying to reconnect. i can see a call back in security manager, but i dont know how to use it
void linkSecuredCallback(Gap::Handle_t handle, securityMode){ ///body of call back }
some body please help me with the body of the call back
thank you