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.

[参考译文] CC2650:如何防止异步通知中的缓冲区过度运行?

Guru**** 2582405 points


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

https://e2e.ti.com/support/wireless-connectivity/bluetooth-group/bluetooth/f/bluetooth-forum/990142/cc2650-how-to-prevent-buffer-overun-in-asyncronous-notifications

器件型号:CC2650

您好!

我正在开发一个从 simple_peripheral (SDK ble_sdk_2_02_05_02\)启动的 BLE 应用。  我使用传感器控制器对输入进行采样、当输入超过阈值时、我会向应用发出警报。  发生这种情况时、我希望发送 BLE 通知消息。  

在 simple_peripheral.c 示例中、每5秒执行一个名为 SimpleBLEPeripheral_performPeriodicTask (void)的函数、该函数读取特征3的值并将其写入配置为通知的特征4。

在我的应用程序中、我要通知的事件是异步的、周期小于5s。  (我每2.5ms 检查一次事件、以获得低延迟、并且我不会更频繁地接受事件超过60ms。)  是否有办法查询 BLE 堆栈的"清除以发送"状态、以确保我不会溢出缓冲区、也就是说?  也就是说、我希望确保在发送另一条通知消息之前发送了最后一条通知消息。

谢谢、

Jim