工具/软件:
您好、TI
我将 TI\simplelink_lowpower_f3_SDK_8_40_00_61\examples\rtos\LP_EM_CC2745-Q1\ble5stack\basic_ble 作为中央器件、而将 TI\simplelink_lowpower_f3_SDK_8_20_00_119\examples\rtos\LP_EM_R53\ble5导电 外设连接 CC2340R10作为 BLE 外设连接。
我设置了2745 自动连接。过程如下: 1. .(void) BLEAppUtil_SCANStart(¢ralScanStartParams);--> 2. .match device --> 3. .BLEAppUtil_scanStop();--> 4. .(void) BLEAppUtil_connect (&connParams);--> 5. 连接状态:已建立-->睡眠(30)--> 6. .BLEAppUtil_DISCONNECT(gapEstMsg->connectionHandle);--> 1. .(void) BLEAppUtil_SCANStart (¢ralScanStartParams);
重复上述过程 几次后,我发现2340作为外设仍在广播 ,但 2745将在步骤4.BLEAppUtil_CONNECT 停止 ,无法建立连接作为步骤5。
case BLEAPPUTIL_SCAN_DISABLED:
{
uint8 i;
for(i = 0; i < APP_MAX_NUM_OF_ADV_REPORTS; i++)
{
memset(¢ralScanRes[i], 0, sizeof(App_scanResults));
}
// Go over the advertise reports that was saved in the host level and save it
for (i = 0; i < scanMsg->pBuf->pScanDis.numReport; i++)
{
GapScan_Evt_AdvRpt_t advReport;
// Get the address from the report
GapScan_getAdvReport(i, &advReport);
// Add the report to the scan list
Central_addScanRes(&advReport);
}
MenuModule_printf(APP_MENU_SCAN_EVENT, 0, "Scan status: Scan disabled - "
"Reason: " MENU_MODULE_COLOR_YELLOW "%d " MENU_MODULE_COLOR_RESET
"Num results: " MENU_MODULE_COLOR_YELLOW "%d " MENU_MODULE_COLOR_RESET,
scanMsg->pBuf->pScanDis.reason,
scanMsg->pBuf->pScanDis.numReport);
if (ready_to_conn == 1)
{
BLEAppUtil_ConnectParams_t connParams =
{
.peerAddrType = match_addrtype,
.phys = INIT_PHY_1M,
.timeout = 1000
};
memcpy(connParams.pPeerAddress, match_addr, B_ADDR_LEN);
(void)BLEAppUtil_connect(&connParams);
MenuModule_printf(APP_MENU_SCAN_EVENT, 0, "\n ====BLEAppUtil_connect=====\n");
}
如上面的代码所示、日志已打印"===BLEAppUtil_CONNECT====== " 作为第33行。 BLEAppUtil_connect 已运行但无法建立连接

