您好, 我的配置如下:
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);
藍(lán)牙斷開連接后調(diào)用函數(shù)GAPBondMgr_SetParameter(GAPBOND_ERASE_ALLBONDS, 0, NULL)刪除綁定
且GAPBondMgr_GetParameter(GAPBOND_BOND_COUNT, &bond_count)函數(shù)的返回值bound_count確實為0
但第一次手機點擊連接后仍能直接連接成功, 斷開連接后再點連接才提示配對輸入密碼
麻煩幫忙看一下哪里出了問題, 萬分感謝!