修改了從機配對設(shè)置后,手機藍(lán)牙連接的時候需要配對密碼,但是用藍(lán)牙調(diào)試助手就能直接連接上,想讓調(diào)試助手連接時也需要密碼,需要怎么操作?
? ? ? ? uint32_t passkey = 123456; // passkey "000000"
? ? ? ? uint8_t? pairMode = GAPBOND_PAIRING_MODE_WAIT_FOR_REQ;
? ? ? ? uint8_t? mitm = TRUE;
? ? ? ? uint8_t? bonding = TRUE;
? ? ? ? uint8_t? ioCap = GAPBOND_IO_CAP_KEYBOARD_ONLY;
? ? ? ? GAPBondMgr_SetParameter(GAPBOND_PERI_DEFAULT_PASSCODE, sizeof(uint32_t), &passkey);
? ? ? ? GAPBondMgr_SetParameter(GAPBOND_PERI_PAIRING_MODE, sizeof(uint8_t), &pairMode);
? ? ? ? GAPBondMgr_SetParameter(GAPBOND_PERI_MITM_PROTECTION, sizeof(uint8_t), &mitm);
? ? ? ? GAPBondMgr_SetParameter(GAPBOND_PERI_IO_CAPABILITIES, sizeof(uint8_t), &ioCap);
? ? ? ? GAPBondMgr_SetParameter(GAPBOND_PERI_BONDING_ENABLED, sizeof(uint8_t), &bonding);