Tool/software:
Hi, Ti
I’m use TI\simplelink_lowpower_f3_sdk_8_40_00_61\examples\rtos\LP_EM_CC2745R10_Q1\ble5stack\basic_ble as Central and TI\simplelink_lowpower_f3_sdk_8_20_00_119\examples\rtos\LP_EM_CC2340R53\ble5stack\basic_ble as Peripheral for BLE connection.
I set the 2745 automatic connection .The process is :1.(void)BLEAppUtil_scanStart(¢ralScanStartParams); --> 2.match device --> 3.BLEAppUtil_scanStop(); --> 4.(void)BLEAppUtil_connect(&connParams);--> 5.Conn status: established --> sleep(30) --> 6.BLEAppUtil_disconnect(gapEstMsg->connectionHandle); --> 1.(void)BLEAppUtil_scanStart(¢ralScanStartParams);
After repeat above process several times ,I found that the 2340 as Peripheral is still Advertising but 2745 will stop at step4.BLEAppUtil_connect and can't established connection as step 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"); }
As the code you can see above , the log already printed "====BLEAppUtil_connect=====" as line 33. BLEAppUtil_connect already run but can't established connection