This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

CC2652R: SDK5.2的蓝牙从机例程simple_peripheral_CC26X2R1_LAUNCHXL_tirtos_ccs无法和手机完成配对

Part Number: CC2652R


使用手机端的ble调试助手,发起和目标设备的配对请求,

SimplePeripheral_processPasscode回调完成之后,便没有任何相应,手机无法读取任何数据。一段时间之后手机直接弹窗报错。

这是Debug的打印输出

GAP_LINK_ESTABLISHED_EVENT!
SP_PAIR_STATE_EVT
GAPBOND_PAIRING_STATE_STARTED
SP_PAIR_STATE_EVT
GAPBOND_PAIRING_STATE_STARTED
SP_PASSCODE_EVT
show Passcode: 123456
show numComparison: 0
write Passcode: 123456
Send passcode response SUCCESS
GAP_LINK_PARAM_UPDATE_EVENT!

static void SimplePeripheral_processPasscode(spPasscodeData_t *pPasscodeData)
{
  // Display passcode to user
  if (pPasscodeData->uiOutputs != 0)
  {
    Display_printf(printfHandle, 0, 0, "show Passcode: %d",
                         B_APP_DEFAULT_PASSCODE);
    Display_printf(printfHandle, 0, 0, "show numComparison: %d",
                         pPasscodeData->numComparison);
    Display_printf(dispHandle, SP_ROW_CONNECTION, 0, "Passcode: %d",
                   B_APP_DEFAULT_PASSCODE);
  }

  Display_printf(printfHandle, 0, 0, "write Passcode: %d",
                             B_APP_DEFAULT_PASSCODE);
  // Send passcode response
    if(GAPBondMgr_PasscodeRsp(pPasscodeData->connHandle , SUCCESS,
                                 B_APP_DEFAULT_PASSCODE)==SUCCESS)
    {
        Display_printf(printfHandle, 0, 0, "Send passcode response SUCCESS");
    }
}