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.

[参考译文] LAUNCHXL-CC1352P:使用 UART 命令的多角色

Guru**** 2390755 points


请注意,本文内容源自机器翻译,可能存在语法或其它翻译错误,仅供参考。如需获取准确内容,请参阅链接中的英语原文或自行翻译。

https://e2e.ti.com/support/wireless-connectivity/bluetooth-group/bluetooth/f/bluetooth-forum/1402884/launchxl-cc1352p-multi-role-using-command-with-uart

器件型号:LAUNCHXL-CC1352P

工具与软件:

您好、TI

删除双按钮菜单后、
我想通过主机通过 UART 发送的命令来控制 BLE 发现和连接操作。
但是、初始化完成后multi_role_doDiscoverDevices、当我发送执行命令时、
系统似乎在之后卡住GAPScan_enable、UART 停止工作。
系统似乎已冻结。
对于如何解决此问题、您有什么建议吗?

bool multi_role_doDiscoverDevices(uint8_t index)
{
  (void) index;

#if (DEFAULT_DEV_DISC_BY_SVC_UUID == TRUE)
  // Scanning for DEFAULT_SCAN_DURATION x 10 ms.
  // The stack does not need to record advertising reports
  // since the application will filter them by Service UUID and save.

  // Reset number of scan results to 0 before starting scan
  numScanRes = 0;
  GapScan_enable(0, DEFAULT_SCAN_DURATION, 0);
#else // !DEFAULT_DEV_DISC_BY_SVC_UUID
  // Scanning for DEFAULT_SCAN_DURATION x 10 ms.
  // Let the stack record the advertising reports as many as up to DEFAULT_MAX_SCAN_RES.
  GapScan_enable(0, DEFAULT_SCAN_DURATION, DEFAULT_MAX_SCAN_RES);
#endif // DEFAULT_DEV_DISC_BY_SVC_UUID
  // Enable only "Stop Discovering" and disable all others in the main menu
  //tbm_setItemStatus(&mrMenuMain, MR_ITEM_STOPDISC,
  //                  (MR_ITEM_ALL & ~MR_ITEM_STOPDISC));

  return (true);
}