Hi
I try to erase bondings in simpleBLECentral project with cc2640.my code is as below:
idx = GAPBondMgr_ResolveAddr(testAddrType, testAddr, NULL ); //find bond mgr index
LCD_WRITE_STRING_VALUE("del idx", idx, 10, LCD_PAGE6);
LCD_WRITE_STRING_VALUE("del bondCount", bondCount, 10, LCD_PAGE7);
if (idx < bondCount) //if address found in bond manager
{
int8_t tmp[B_ADDR_LEN + 1];
tmp[0] = testAddrType;
// memcpy(&tmp[1], testAddr, B_ADDR_LEN);
// Reverse bytes
// VOID osal_revmemcpy( &tmp[1], testAddr, B_ADDR_LEN );
tmp[1] = testAddr[0];
tmp[2] = testAddr[1];
tmp[3] = testAddr[2];
tmp[4] = testAddr[3];
tmp[5] = testAddr[4];
tmp[6] = testAddr[5];
GAPBondMgr_SetParameter(GAPBOND_ERASE_ALLBONDS, NULL, NULL);
//GAPBondMgr_SetParameter(GAPBOND_ERASE_SINGLEBOND, B_ADDR_LEN + 1, tmp);
for (cnt = 0; cnt < 10; cnt++)
Task_sleep(SLEEP_TICKS);
}
when I used GAPBOND_ERASE_ALLBONDS,I erased the bonding successfully.but when I use GAPBOND_ERASE_SINGLEBOND,I am failed to erase.