请注意,本文内容源自机器翻译,可能存在语法或其它翻译错误,仅供参考。如需获取准确内容,请参阅链接中的英语原文或自行翻译。
器件型号:WL1835MOD 我正在 Linux 中使用 Bluetopia 栈。 我有一个通过低功耗蓝牙发送数据的外部设备。 如何获得新数据是否可用的通知?
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.
我正在 Linux 中使用 Bluetopia 栈。 我有一个通过低功耗蓝牙发送数据的外部设备。 如何获得新数据是否可用的通知?
我希望以200Hz 的频率读取数据。 我是否必须每秒发出200次读取? 或者 Bluetopia 中是否有函数可以在服务器上注册客户端对特定 UUID 感兴趣并希望在有新值可用时立即收到通知?
有一个名为 getGATTHandleValueData 的事件。 但是、如何指示服务器设备持续发送数据。
下面是另一个蓝牙堆栈用于实现该目的的一个片段:
if ((charaProp | BluetoothGattCharacteristic.PROPERTY_NOTIFY) > 0) {
setCharacteristicNotification(gattCharacteristic, true);
}