Hi,
I would like to change the default passkey on simpleBLEperipheral from a connected device (smartphone) with bonding enable. My GAP Bond Manager configuration is initialized as following:
// Setup the GAP Bond Manager
{
uint32_t passkey = 123456; // 6-digits passkey "000000"
uint8_t pairMode = GAPBOND_PAIRING_MODE_INITIATE; //GAPBOND_PAIRING_MODE_INITIATE; //GAPBOND_PAIRING_MODE_WAIT_FOR_REQ;
uint8_t mitm = TRUE;
uint8_t ioCap = GAPBOND_IO_CAP_DISPLAY_ONLY;
uint8_t bonding = TRUE;
GAPBondMgr_SetParameter(GAPBOND_DEFAULT_PASSCODE, sizeof(uint32_t), &passkey);
GAPBondMgr_SetParameter(GAPBOND_PAIRING_MODE, sizeof(uint8_t), &pairMode);
GAPBondMgr_SetParameter(GAPBOND_MITM_PROTECTION, sizeof(uint8_t), &mitm);
GAPBondMgr_SetParameter(GAPBOND_IO_CAPABILITIES, sizeof(uint8_t), &ioCap);
GAPBondMgr_SetParameter(GAPBOND_BONDING_ENABLED, sizeof(uint8_t), &bonding);
}
But when I send a new 32bit-passkey from the android device through an attribute and pass it to the following function :
GAPBondMgr_SetParameter(GAPBOND_DEFAULT_PASSCODE, sizeof(uint32_t), &passkey);
.. then the system crashes and the code gets stuck here :
/****************************************************************************/
/* ABORT - ABNORMAL PROGRAM TERMINATION. CURRENTLY JUST HALTS EXECUTION. */
/****************************************************************************/
void abort(void)
{
loader_exit();
for (;;); /* SPINS FOREVER */
}
Is it possible to update the passkey in this sort of way or do I need to add a layer by myself to manage a user-defined passkey ? My project is based on ble_sdk_2_02_01_18
In advance, thank you for the help
Regards,
Robin B.