GATT特性BLE的读取速度慢 [英] Slow reading speed of GATT characteristics BLE

查看:228
本文介绍了GATT特性BLE的读取速度慢的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在研究一个在蓝牙设备(TI CC2650)和android之间传输数据的项目.为此,必须以至少24 kbps的速度读取GATT特性.蓝牙低功耗规范允许此传输速率. 我在Android Studio中工作,并使用该工作室提供的BLE标准库.当请求从主设备读取数据时,使用mBluetoothLeService.readCustomCharacteristic ()mBluetoothLeService.readCharacteristic ()命令的从设备的特性至少为100 ms,直到数据可用为止.通过增加GATT特性的大小,时间可以达到1500 ms.出现此限制的原因是什么?如何规避?

I'm working on a project to transfer data between a Bluetooth device (TI CC2650) and android. To do this, it is necessary to perform a reading of the GATT characteristic at a speed of at least 24 kbps. The Bluetooth Low Energy specification allows this transfer rate. I work in Android Studio and use standard libraries for BLE offered by the studio. When requesting a read from a master device, the characteristics of a slave device using the mBluetoothLeService.readCustomCharacteristic () or mBluetoothLeService.readCharacteristic () command is at least 100 ms until the data is available. By increasing the size of the GATT characteristics, the time can reach 1500 ms. What is the reason for this limitation and how can it be circumvented?

推荐答案

读取操作需要每个块进行一次往返.并且往返时间至少是连接间隔的一倍.

The read operation requires one roundtrip per chunk. And the round trip time is at least one multiple of the connection interval.

如果改用通知,则可以非常快速地发送此类消息,因为每个连接事件都可以发送多个数据包.另外,请尝试增加mtu并在可能的情况下使用LE数据长度扩展.

If you use notifications instead, you can pump such messages very fast since multiple packets can be sent every connection event. Also try increase mtu and use LE data length extention when possible.

这篇关于GATT特性BLE的读取速度慢的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆