BLE外设吞吐量限制 [英] BLE peripheral throughput limit

查看:219
本文介绍了BLE外设吞吐量限制的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我们正在开发与iPad配合使用的BLE传感器外围设备,该设备需要使用TI CC2541 BLE模块和自定义配置文件在BLE通知特征(无确认)上具有以下数据吞吐量:

We are developing a BLE sensor Peripheral to work with an iPad, that requires the following throughput of data on the BLE notification characteristic (no acknowledge) using a TI CC2541 BLE module and a custom profile:

每10毫秒1个20字节(GATT最大标准数据包),或者由于每个连接间隔限制为4个数据包,因此等于每40毫秒1个连接间隔.要求的吞吐量为每秒2,000字节,TI网站建议将CC2541 BLE解决方案用于需要这种数据吞吐量水平的几种传感器设备.

One 20 bytes (GATT maximum standard packet) every 10ms, or since we appear to have a limit of 4 packets per connection interval, this equates to one connection interval every 40ms. Throughput required is 2,000 bytes per second, the TI website recommends the CC2541 BLE solution be used for several sensor devices requiring this level of data throughput.

BLE模块的配置文件分别设置为20ms和40ms的最小和最大连接间隔,这足够了. "Apple产品的蓝牙附件设计指南"文档建议,如上所述,我们设置的最小和最大连接间隔是正确的.我们正在新的Mac Mini/Mac Book上使用适用于iOS 6的最新iPad和Apple工具.

The profile for the BLE module is set with min and max connection intervals of 20ms and 40ms respectively, which should suffice. The "Bluetooth Accessory Design Guidelines for Apple Products" document suggests that the minimum and maximum connection intervals we set, as above are correct. We are using the latest iPad and Apple tools for iOS 6 on a new Mac Mini / Mac Book.

通过iPad上的简单测试程序,我们可以使链接正常工作,以20ms的间隔将20字节的数据包发送到BLE外围设备,但是一旦将其降低到10ms,我们就开始丢失数据包或获取损坏的数据包,我们关闭了FIFO空中断,因此我们可以更快地处理向BLE模块FIFO的发送,并且我们使用最大波特率230400从微控制器向BLE TX FIFO发送20个字节的数据包.

With a simple test program on the iPad, we can get the link to work well sending 20 byte packets to the BLE Peripheral at intervals of 20ms, however once we lower this to 10ms as required we start loosing packets or getting corrupt packets, we have the FIFO empty interrupt turned off so we can handle the sending to the BLE module FIFO quicker, and we are using the maximum Baud rate of 230400 to send the 20 byte packets to the BLE TX FIFO from the micro.

我们意识到我们处于BLE传输限制的最高端,并且处于可能的极限.有人能建议使用最新的iPad的TI CC2541 BLE芯片/模块是否有解决方案,以实现每秒2000字节的吞吐量?

We realise we are at the top end of the BLE transfer limit, and of what is possible. Can anyone advise if there is a solution to achieving 2000 bytes per second throughput using the TI CC2541 BLE chip / module with an up to date iPad?

推荐答案

我们成功将TI 2540(BLE堆栈版本1.3.2)与iPad/iPod/iPhone(iOS 6.x和7.x)一起使用.我们目前发送75条20字节每秒的通知=> 1500字节/秒.但是我尝试发送125条通知,效果也很好.

We use TI 2540 (BLE stack version 1.3.2) succesfully with iPad/iPod/iPhone (iOS 6.x and 7.x). We currently send 75 notifications of 20 bytes per second => 1500 bytes/second. But I have tried to send 125 notifications and that worked as well.

当然,您发送的次数越多,丢失数据的可能性就越大,例如,重新发送NACK消息的时间就更少.

Of course the more you send the greater likelihood of loosing data, e.g., less time to resend a NACK'ed message.

我已经体验到iOS的BLE堆栈可能会进入一种模式,在这种模式下,它开始连续NACK消息.如果发生这种情况,您将丢失很多消息.我已经向苹果报告了一个错误. (此问题似乎已在iOS 7.1.beta3/4中修复.)

I have experienced that iOS' BLE stack may enter a mode where it begins to NACK messages continuously. If this happens you will loose a lot of messages. I have reported an error to Apple about this. (This problem seems to have been fixed in iOS 7.1.beta3/4.)

我目前有:

// Minimum connection interval (units of 1.25ms, 80=100ms) if automatic parameter update request is enabled
#define DEFAULT_DESIRED_MIN_CONN_INTERVAL     10

// Maximum connection interval (units of 1.25ms, 800=1000ms) if automatic parameter update request is enabled
#define DEFAULT_DESIRED_MAX_CONN_INTERVAL     20

是的,它不符合Apple的准则.但我相信,在我们的情况下,它们可以放宽.

Yes, it doesn't conform with Apple's guidelines. But I believe they can be relaxed in our case.

更新:我也尝试过使用iDevice作为外围设备,即两个iDevice之间的BTLE.在这里,我每秒发送150条消息,没有任何问题.在此处检查代码.

UPDATE: I have also tried to use an iDevice as peripheral, i.e., BTLE between two iDevices. Here I have sent 150 messages per second without any problems. Check the code here.

这篇关于BLE外设吞吐量限制的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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