您好, 我的配置如下:
uint32 passkey = 123456;
uint8 pairMode = GAPBOND_PAIRING_MODE_INITIATE;
uint8 mitm = TRUE;
uint8 bonding = TRUE;
uint8 ioCap = GAPBOND_IO_CAP_DISPLAY_ONLY;
GAPBondMgr_SetParameter(GAPBOND_PERI_DEFAULT_PASSCODE, sizeof(uint32), &passkey);
GAPBondMgr_SetParameter(GAPBOND_PERI_PAIRING_MODE, sizeof(uint8), &pairMode);
GAPBondMgr_SetParameter(GAPBOND_PERI_MITM_PROTECTION, sizeof(uint8), &mitm);
GAPBondMgr_SetParameter(GAPBOND_PERI_IO_CAPABILITIES, sizeof(uint8), &ioCap);
GAPBondMgr_SetParameter(GAPBOND_PERI_BONDING_ENABLED, sizeof(uint8), &bonding);
蓝牙断开连接后调用函数GAPBondMgr_SetParameter(GAPBOND_ERASE_ALLBONDS, 0, NULL)删除绑定
且GAPBondMgr_GetParameter(GAPBOND_BOND_COUNT, &bond_count)函数的返回值bound_count确实为0
但第一次手机点击连接后仍能直接连接成功, 断开连接后再点连接才提示配对输入密码
麻烦帮忙看一下哪里出了问题, 万分感谢!