用CC2640R2F自制的sensor板子,主要功能是作为外围设备发送sensor数据。
TI SimpleLink CC2640R2 Software Development Kit (Version 1.50.00.58)
TI Code Composer Studio: CCS-9
TI Code Generation Tools for ARM: 16.09.03.LTS
XDCTools: 3.50.03.3
The code was revised based on the simple_peripheral project from TI.
不能和Windows配对,但是可以通过Bluetooth LE Explorer连接,看到设备的信息和sensor数据。
但是可以和Raspbian与Androidthings配对。
因为BLE simple_peripheral的配对不是必须的,所以仅仅是连接就可以完成数据的传输。
请问windows 蓝牙是否有某种特殊的设置导致不能和该设备配对?我该怎样设置CC2640R2F才能使它能和Windows配对?
在debug模式中,可以看到当windows请求配对时,只能完成到pairing started,不能进行到pairing complete。

我的配对设置如下:
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);
Alvin Chen:
uint8_t pairMode = GAPBOND_PAIRING_MODE_WAIT_FOR_REQ;
你设置的是windows 提出pairingrequest ,
根据SPEC 规定timeout为SMP设置timeout为30秒。
TI中文支持网


