物联网技术
直播中

jefljel

8年用户 1094经验值
擅长:20762
私信 关注
[问答]

蓝牙设备断线重连功能要怎么设置?

请问如果蓝牙设备想实现断线重连功能,蓝牙主机设备该如何设置?

回帖(2)

h1654155273.0656

2016-3-24 10:58:50
受到警告
提示: 作者被禁止或删除 内容自动屏蔽
举报

发烧友推温针

2016-3-24 10:59:09
设置为bonding and pairing,

// Setup the GAP Bond Manager
{
uint32_t passkey = 0; // passkey "000000"
uint8_t pairMode = GAPBOND_PAIRING_MODE_INITIATE;
uint8_t mitm = FALSE;
uint8_t ioCap = GAPBOND_IO_CAP_DISPLAY_ONLY;
uint8_t bonding = TRUE;

GAPBondMgr_SetParameter(GAPBOND_DEFAULT_PASSCODE, sizeof(uint32_t),
&passkey);
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);
}
举报

更多回帖

发帖
×
20
完善资料,
赚取积分