This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

how to know whether the device is bonded already........?

Hai

i am using mbed to program my nrf5188. now i am using securityManager to implement a bonding between central and peripheral. now i need to know when a device is connected with my device is already bonded or not. how can i implement that.........?

this is my security section

uint8_t PASS_KEY[6] = {'1', '0', '0', '0', '0', '6'}; 



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");
    }
}
Related