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:中央到外设数据发送状态设为 blePending

Guru**** 2589265 points


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

https://e2e.ti.com/support/wireless-connectivity/bluetooth-group/bluetooth/f/bluetooth-forum/1392927/cc2340r5-central-to-peripheral-data-sending-status-getting-as-blepending

器件型号:CC2340R5

工具与软件:

您好!

              目前我正在处理 basic_ble 外设配置文件项目和  basic_ble 中央配置文件项目。

成功连接和通知后、使能 AM 尝试从中央器件向外设发送20个字节的数据、并在外设中接收数据。

在以100ms 的间隔 从中央器件连续向外设发送20个字节的数据时 、我们会得到如所示的状态  blePending 中央设备。 但  间隔为 400ms、外设中的数据接收。

我已尝试将 PDU 的最大数量增加 到255、PDU 的最大大小增加到 255、仍然面对  blePending 发行。

bool Central_sendGattWrite(uint8_t *pData, uint8_t len)
{
    attPrepareWriteReq_t req;
    status_t status = FAILURE;
    req.pValue = GATT_bm_alloc(scConnHandle, ATT_PREPARE_WRITE_REQ, len, NULL);

    if (req.pValue != NULL)
    {
        req.handle = 19;
        req.len = len;
        memcpy(req.pValue, pData, len);
        status = GATT_WriteLongCharValue(scConnHandle, &req, getSelfEntity);
        if (status != SUCCESS)
        {
            UART2_write(uart, &status,1,0);
            GATT_bm_free((gattMsg_t*) &req, ATT_PREPARE_WRITE_REQ);
        }
    }
    return status;
}

请帮助我们解决这个问题。

SDK 版本:simplelink_lowpower_f3_sdk_8_10_01_02

CCS 版本:CCS 12.7.1

此致、

Vignesh。

 

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

    尊敬的 Vignesh:  

    感谢您的咨询。  通常 blePending 表示尚未收到来自客户端的响应。  您是否能够 发布监听器对此事件的日志?

    您能尝试以下操作吗?  

    • 减小连接监控超时
      • 如果未接收到数据包、器件在断开连接之前将等待多长时间
    • 减少外设延迟
      • 在断开连接之前、器件可以跳过多少个数据包

    我还可以简单地确认您同时将 LaunchPad 用于中央设备和外设吗?  

    此致