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.

[参考译文] CC2340R5:连接程序进入 abort ()函数后无法发送数据

Guru**** 2587365 points
Other Parts Discussed in Thread: CC2340R5, CC2340R5-Q1

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

https://e2e.ti.com/support/wireless-connectivity/bluetooth-group/bluetooth/f/bluetooth-forum/1406140/cc2340r5-unable-to-send-data-after-connection-program-is-going-into-the-abort-function

器件型号:CC2340R5

工具与软件:

您好!

IDE: Code Composer Studio v12.5
设备: CC2340R5
SDK 版本: simplelink_lowpower_f3_sdk_7_40_00_64

我们在多角色模式下使用 CC2340R5器件。 默认情况下、器件角色设置为外设。 但是、按下按钮时、器件会在2秒的扫描持续时间内从外设模式切换到中央模式、扫描间隔为100ms。

当我们按下器件上的开关时、器件的角色将从外设更改为中央。

更改为中央模式后、该器件连接到另一个外设。 在此连接期间、我们会尝试向外围设备发送数据。 虽然此操作有时会工作、但有时会失败、并且程序似乎会进入一个abort()位置。

我附上了一些屏幕截图供您参考。 您能否对其进行审核并在我们的实施过程中出现问题时提供建议? 如有任何解决这一问题的建议、将不胜感激

void Scan_connect(void)
{
    bStatus_t status;
   for(int i=0;i<10;i++)
   {
       if(connect_flag != 1)
       {
           i=10;
           const BLEAppUtil_ScanStart_t centralScanStartParams =
           {
            /*! Zero for continuously scanning */
            .scanPeriod     = 10 ,//DEFAULT_SCAN_PERIOD, /* Units of 1.28sec */

            /*! Scan Duration shall be greater than to scan interval,*/
            /*! Zero continuously scanning. */
            .scanDuration   = 200, //DEFAULT_SCAN_DURATION, /* Units of 10ms */

            /*! If non-zero, the list of advertising reports will be */
            /*! generated and come with @ref GAP_EVT_SCAN_DISABLED.  */
            .maxNumReport   = 20 //APP_MAX_NUM_OF_ADV_REPORTS
           };

           BLEAppUtil_scanStart(&centralScanStartParams);
       }
              vTaskDelay(pdMS_TO_TICKS(500));
//              LED_disconnect();
   }
   if(connect_flag)
   {
       status = BLEAppUtil_gattwrite(1);
       vTaskDelay(pdMS_TO_TICKS(100));
       LED_connect();
//      write_data();
   }
}
//

请帮助我们做到这一点。

谢谢、此致

Balaji Wankhede

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

    你好、Balaji、

    感谢您的咨询。

    您能否确认这是否用于汽车电子应用? 您是否在使用 CC2340R5-Q1 进行编程?

    从何处调用 Scan_connect()函数? 这是否来自 GPIO 回调("按下按钮时、器件从外设模式切换到中央模式")?

    BR、

    David。