7 years, 5 months ago.

Not able to clear bond/pairing

I was using the BLE_SecureHeartRate example to test the securityManager. I use a no passkey pairing. ble.securityManager().init(enableBonding, requireMITM, SecurityManager::IO_CAPS_NONE); After that, I tested with various programs. Pressing "cancel" from pair bonding menu supposed to disconnect the device. But it shows that device is connected. I tested the program on both IOS>Settings>Bluetooth and nrf Connect. Pior to working on mbed, I have a working program in Arduino that used to disconnect correctly when cancelling the pair bonding. I flashed this program back and it behaves differently ever since my test with mbed. Device will get connected even cancelling the pair bonding! This Arduino program will clear a flash page and thereby the bonding data every power cycle. It seems like it doesn't erase the right flash page that mbed stored the data. I went back to mbed and remove all the securityManager().init.. and just ble.securityManager().purgeAllBondingState() . I flashed this program onto the module. It doesn't help to erase any bonding data. It seems like my phone has already bonded and will connect automatically even if you cancel the pair bonding request. Is this something wrong with the securityManage()? I have no idea where the pairing data is store and not able to wipe that out correctly.

Be the first to answer this question.