uuwufydsw 发表于 2019-10-21 08:43
“ xPOWER_SAVING”其实相当于删除
请提供一下配对的设置代码,我的代码是:
uint8_t pairMode = GAPBOND_PAIRING_MODE_INITIATE;//GAPBOND_PAIRING_MODE_WAIT_FOR_REQ;
我使用的就是工程中自带的配对设置,没有经过更改
[
// Don't send a pairing request after connecting; the peer device must
// initiate pairing
uint8_t pairMode = GAPBOND_PAIRING_MODE_WAIT_FOR_REQ;
// 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 = TRUE;
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);
]