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:动态地更改广播中的数据项数量

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

https://e2e.ti.com/support/wireless-connectivity/bluetooth-group/bluetooth/f/bluetooth-forum/1462214/cc2340r5-dynamically-change-the-number-of-data-items-in-the-advertisment

器件型号:CC2340R5

工具与软件:

早上好、

芯片:CC2340R5

SKD: simplelink_lowpower_f3_sdk_8_10_01_02

我想动态地更改我的广告中的数据数量。

大小在初始化时按照以下结构进行设置:

BLE4.12.451IT_t Util_Adv advSetInitParamsSet_1 =  

{  

  .advDataLen =大小、

...

};

在代码中、我想在再次启动广播时更改大小、具体操作如下:

advSetInitParamsSet_1.advDataLen = new_size;

BLEAppUtil_advStart (peripheralAdvHandle_1、&advSetStartParamsSet_1);

它运行良好,新数量的数据似乎可以在 NRF Connect 上工作。

但当我们观察发送到频谱分析仪的数据项数时、传输时间似乎总是相同、一开始就取 INIT 值。

在该示例中、无论在广播中传输多少个数据项、传输时间都是开始时的一个 INIT 时间:

此致、

Yohan

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

    您好!

    我找到解决方案:

    bStatus_t GapAdv_loadByHandle (uint8句柄、GapAdv_datatypes_t 数据类型、
    uint16 len、uint8 * pBuf);

    我不知道这是不是最干净的方法。

    这可以解决我的问题

    此致、

    Yohan