Tool/software:
Hello,
I am working with the MultiRole example from the following SDK and platform:
SDK: C:\ti\simplelink_cc13xx_cc26xx_sdk_7_10_02_23
Board: LP_CC2651R3SIPA
Example: ble5stack\multi_role
My use case:
I have a custom characteristic with GATT_PERMIT_ENCRYPT_READ.
In smartphone board connection, when the phone tries to read this characteristic, the pairing sequence starts automatically (pairing popup appears, using Just Works).
In board board connection (MultiRole
MultiRole), when I call GATT_ReadCharValue(), the call succeeds but returns bleInsufficientEncrypt (0x42). Pairing does not start automatically.
To work around this, I explicitly call:GAPBondMgr_Pair(pMsg->connHandle);
inside the ATT error response handling, which then triggers the multi_role_processPairState() flow and pairing and bonding completes successfully.
My question: Why is it necessary to manually call GAPBondMgr_Pair() in the board-to-board scenario to trigger pairing, while in the smartphone scenario the stack automatically initiates pairing when accessing an encrypted characteristic?
Is this expected behavior of the MultiRole example, or is there some configuration in the Bond Manager / GAP role that I may have missed?
My bond manger setting in syscfg
uint8_t pairMode = GAPBOND_PAIRING_MODE_WAIT_FOR_REQ;
uint8_t mitm = false;
uint8_t ioCap = GAPBOND_IO_CAP_NO_INPUT_NO_OUTPUT;
uint8_t bonding = true;
uint8_t secureConnection = GAPBOND_SECURE_CONNECTION_ONLY;
uint8_t authenPairingOnly = false;
uint8_t autoSyncWL = true;
uint8_t eccReGenPolicy = 0;
uint8_t KeySize = 16;
uint8_t removeLRUBond = true;
uint8_t bondFailAction = GAPBOND_FAIL_TERMINATE_ERASE_SINGLE_BOND;
uint8_t KeyDistList = GAPBOND_KEYDIST_MENCKEY | GAPBOND_KEYDIST_MIDKEY | GAPBOND_KEYDIST_MSIGN | GAPBOND_KEYDIST_SENCKEY | GAPBOND_KEYDIST_SIDKEY | GAPBOND_KEYDIST_SSIGN;
uint8_t allowDebugKeys = false;
uint8_t eraseBondWhileInConn = false;
uint8_t sameIrkAction = GAPBOND_SAME_IRK_UPDATE_BOND_REC;
Thanks,
Vikas