This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

CC2640R2 配对



Hello:

我使用CC2640R2 作主从一体机,sdk是simplelink_cc2640r2_sdk_4_30_00_08,现在能够实现对某个CC2640R2 的从设备进行固定密码配对,

从设备定义的固定密码是123456,主从一体机当触发MR_PASSCODE_NEEDED_EVT事件,就调用

uint32_t passcode = 123456;
// Send passcode to GAPBondMgr
GAPBondMgr_PasscodeRsp(pData->connectionHandle, SUCCESS, passcode);

结果是配对、绑定是成功的。

--------------------------------------------------------

我的主从一体机的配对参数设置为:

uint8_t pairMode =GAPBOND_PAIRING_MODE_WAIT_FOR_REQ;
uint8_t mitm = TRUE;
uint8_t ioCap = GAPBOND_IO_CAP_KEYBOARD_DISPLAY;
uint8_t bonding = TRUE;
uint8_t replaceBonds = FALSE;

GAPBondMgr_SetParameter(GAPBOND_DEFAULT_PASSCODE, sizeof(uint32_t), &passkey);
// Set pairing mode
GAPBondMgr_SetParameter(GAPBOND_PAIRING_MODE, sizeof(uint8_t), &pairMode);

// Set authentication requirements
GAPBondMgr_SetParameter(GAPBOND_MITM_PROTECTION, sizeof(uint8_t), &mitm);

// Set I/O capabilities
GAPBondMgr_SetParameter(GAPBOND_IO_CAPABILITIES, sizeof(uint8_t), &ioCap);

// Set bonding requirements
GAPBondMgr_SetParameter(GAPBOND_BONDING_ENABLED, sizeof(uint8_t), &bonding);

现想请问下,若是主从一体机去与某手机/或者其他动态生成的配对码的从设备进行配对,如何获取这个配对码?

需要设置或者添加接口?

谢谢!