TI中文支持网
TI专业的中文技术问题搜集分享网站

CC2640R2L: 加密连接

Part Number:CC2640R2LOther Parts Discussed in Thread:CC2640,

我想请问一下,CC2640或者CC2640R2L 是否有加密连接的功能,如果有,那么该功能是如何实现的?

Nick Sun:

您好,

您这里指的是连接配对的加密还是传输内容的加密?

,

Zhang |:

连接配对的加密

,

Nick Sun:

您好,

感谢您的对TI产品的关注!为更加有效地解决您的问题,我需要多一些时间查看这个问题,稍后会为您解答。

,

Zhang |:

好的,麻烦您了!

,

Nick Sun:

您好,

没事,有结论会及时联系您。

,

Nick Sun:

您好,

您可以参考一下关于安全配对部分的文档:https://www.ti2k.com/wp-content/uploads/ti2k/DeyiSupport_Bluetooth_gapbondmngr.html

希望能够帮助到您。

,

Zhang |:

感谢您的解答!我详细看一下这篇文档。

,

Nick Sun:

您好,

后续还有问题可以再发帖提问。

感谢您的支持。

,

Zhang |:

您好,

我有两个关于配对的问题想要请教一下

1、我在初始设置时已经把配对后绑定选项设置成false了,但是使用手机成功连接后还是会自动绑定设备。设置的代码如下

// Don't send a pairing request after connecting; the peer device must//uint32_t passkey = 0; // passkey "000000"// initiate pairinguint8_t pairMode = GAPBOND_PAIRING_MODE_INITIATE;// Use authenticated pairing: require passcode.uint8_t mitm = TRUE;// This device only has display capabilities. Therefore, it will display the// passcode during pairing. However, since the default passcode is being// used, there is no need to display anything.uint8_t ioCap = GAPBOND_IO_CAP_DISPLAY_ONLY;// Request bonding (storing long-term keys for re-encryption upon subsequent// connections without repairing)uint8_t bonding = FALSE;uint8_t gapbondSecure = GAPBOND_SECURE_CONNECTION_NONE;//GAPBOND_SECURE_CONNECTION_ONLY ;GAPBondMgr_SetParameter(GAPBOND_SECURE_CONNECTION, sizeof(uint8_t), &gapbondSecure);//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);

2、我在启动配置后进入密钥连接事件,按照我的需求是如果连接密钥输入错误会断开连接。但是实际输入错误的密钥后,设备反而会快速连接。我在此处设置的代码是否有问题?

我在配对完成后的事件中添加了断开连接的处理事件。

/********************************************************************** @fnSimplePeripheral_processPairState** @briefProcess the new paring state.** @returnnone*/
static void SimplePeripheral_processPairState(spPairStateData_t *pPairData)
{uint8_t state = pPairData->state;uint8_t status = pPairData->status;switch (state){case GAPBOND_PAIRING_STATE_STARTED:Display_printf(dispHandle, SP_ROW_CONNECTION, 0, "Pairing started");break;case GAPBOND_PAIRING_STATE_COMPLETE:if (status == SUCCESS){Display_printf(dispHandle, SP_ROW_CONNECTION, 0, "Pairing success");}else{//DisconnectedHCI_EXT_DisconnectImmedCmd();Display_printf(dispHandle, SP_ROW_CONNECTION, 0, "Pairing fail: %d", status);}break;case GAPBOND_PAIRING_STATE_ENCRYPTED:if (status == SUCCESS){Display_printf(dispHandle, SP_ROW_CONNECTION, 0, "Encryption success");}else{Display_printf(dispHandle, SP_ROW_CONNECTION, 0, "Encryption failed: %d", status);//HCI_EXT_DisconnectImmedCmd();}break;case GAPBOND_PAIRING_STATE_BOND_SAVED:if (status == SUCCESS){Display_printf(dispHandle, SP_ROW_CONNECTION, 0, "Bond save success");}else{//Display_printf(dispHandle, SP_ROW_CONNECTION, 0, "Bond save failed: %d", status);//HCI_EXT_DisconnectImmedCmd();}break;default:break;}
}

,

Nick Sun:

您好,

这个麻烦您重新开个帖进行提问。

感谢您的理解,此帖将被关闭。

赞(0)
未经允许不得转载:TI中文支持网 » CC2640R2L: 加密连接
分享到: 更多 (0)

© 2024 TI中文支持网   网站地图 鲁ICP备2022002796号-1