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:调用 GATT_Indication API 后、CC2340R5落入 iCall_ABORT ()函数中

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

https://e2e.ti.com/support/wireless-connectivity/bluetooth-group/bluetooth/f/bluetooth-forum/1515866/cc2340r5-cc2340r5-fell-into-the-icall_abort-function-after-calling-the-gatt_indication-api

器件型号:CC2340R5

工具/软件:

下午好、

CC2340R5
SDK: simplelink_lowpower_f3_SDK_8_10_01_02

当 cc2340r5在 BLE 中连接时,我们在调用 GATT_Indication API 后落入 iCall_abort ()函数中。 这种现象经常发生
我不确定为什么会发生这种情况、以及什么可能导致 API 崩溃?  如何诊断错误?

提前感谢、

此致、

Yohan

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

    您好、Yohan、

    感谢您的联系。

    您能分享在调用 GATT 函数的代码片段吗? 我想看看这是如何实现的。

    BR、

    David。

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

    您好、David、

    我的代码:

    void app_ble_Indication_task (void)

    uint8 ret;
    uint8长度;
    长度= 0;
    gattAttribute_t *pAttr = NULL;

    if (ProjectGatt Profile_Char InDICATEConfig->value == 0)

    返回;
    }

    if (!is_FIFO_EMPTY (EVT)){//如果一个事件挂起
    switch (EVT_BUFFER[EVT_OUT]){
    默认值:
    INC_FIFO_INDEX_OUT (EVT);
    返回;

    用例 BLE_Indic_EVT_TIMER:
    length = app_ble_indation_timer ();
    休息;

    用例 BLE_Indic_EVT_STAT:
    length = app_ble_Indication_stat ();
    休息;
    }

    pAttr = GATTServ App_Find 属性(ProjectGattProfile_attrTbl、
    GATT_NUM_ATTRS (ProjectGattProfile_attrTbl)、
    &ProjectGattProfile_indicator);

    Indication.handle = pAttr->handle;
    indic.len =长度;
    Indication.pValue =(uint8 *) GATT_BM_alloc (
    ProjectGatt Profile_Char INDICATEConfig->connHandle、ATT_Handle_Value_IND、
    Indication.len、0);//指示正常工作需要!!!

    memcpy (indic.pValue、indicate_buffer、indication.len);

    RET =
    GATT_Indication (ProjectGatt Profile_Char、
    指示、FALSE、BLEAppUtil_getSelfEntity());

    如果(ret !=成功){
    Time_wakeup (1);
    返回;
    }
    INC_FIFO_INDEX_OUT (EVT);
    }
    }

    谢谢您、

    此致

    Yohan

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

    您好、Yohan、

    请确保使用 BLEAppUtil_invokeFunction()在 BLE 上下文中排队执行任务。 您可以使用此 SLA: https://dev.ti.com/tirex/explore/content/simplelink_academy_for_cc23xx_8_40_00_00/_build_simplelink_academy_for_cc23xx_8_40_00_00/source/ble/cc2340rx_08_basicble_drivers.html 作为参考。

    BR、

    David。