CC2541与IOS不管输入正确或者错误密码都会连接上?

2019-07-18 14:24发布

cc2541作为从机广播。手机作为主机,当打开IOS手机上的lightblue时会弹出输入密码配对的对话框,但是此时cc2541已经显示从广播状态变为连接状态,手机上不管输入正确或者错误密码都会连接上,怎么回事?
// Setup the GAP Bond Manager
{
uint32 passkey = 111111; // passkey "000000"
//uint8 pairMode = GAPBOND_PAIRING_MODE_WAIT_FOR_REQ;
uint8 pairMode = GAPBOND_PAIRING_MODE_INItiATE;
uint8 mitm = TRUE;
uint8 ioCap = GAPBOND_IO_CAP_DISPLAY_ONLY;
uint8 bonding = TRUE;
GAPBondMgr_SetParameter( GAPBOND_DEFAULT_PASSCODE, sizeof ( uint32 ), &passkey );
GAPBondMgr_SetParameter( GAPBOND_PAIRING_MODE, sizeof ( uint8 ), &pairMode );
GAPBondMgr_SetParameter( GAPBOND_MITM_PROTECTION, sizeof ( uint8 ), &mitm );
GAPBondMgr_SetParameter( GAPBOND_IO_CAPABILITIES, sizeof ( uint8 ), &ioCap );
GAPBondMgr_SetParameter( GAPBOND_BONDING_ENABLED, sizeof ( uint8 ), &bonding );
}

友情提示: 此问题已得到解决,问题已经关闭,关闭后问题禁止继续编辑,回答。