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.

CC2640R2F: CC2640R2 配对

Part Number: CC2640R2F


Hi:

我使用sdk 4.30, 需要实现一种功能,CC2640R2 作为从设备,当client端/手机端 连接从设备后,从设备发起配对请求

client端弹出配对框,不需要输入配对PIN码,只要点击确认即可pairing与bond。

我用的设置配对代码如下:

{
uint8_t pairMode = GAPBOND_PAIRING_MODE_INITIATE;
uint8_t mitm = TRUE;
uint8_t ioCap =GAPBOND_IO_CAP_NO_INPUT_NO_OUTPUT;
uint8_t bonding = TRUE;
uint8_t replaceBonds = FALSE;

// 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);

// Set bond list LRU
GAPBondMgr_SetParameter(GAPBOND_LRU_BOND_REPLACEMENT, sizeof(uint8_t), &replaceBonds);

// Register and start Bond Manager
VOID GAPBondMgr_Register(&multi_role_BondMgrCBs);
}

生成hex后,用手机去连接从设备后,手机弹出配对弹窗,

点击配对

没有配对成功,主机端terminate 断开

请问下,如何实现从设备设置无输入PIN码配对?

谢谢!!