BLE MTU更高但速度是一样的 [英] BLE MTU higher but speed is the same

查看:373
本文介绍了BLE MTU更高但速度是一样的的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在玩iOS 7中的CoreBluetooth,并成功地让两台设备在彼此之间发送了大量数据(一个是中央,一个是外设)。

I'm playing around with CoreBluetooth in iOS 7, and have successfully got two devices sending quite a large amount of data between each other (one is the central, one is the peripheral).

在iPhone 5和4S之间,我有一个20字节的MTU,在iPhone 5s和iPhone 5之间,我有一个132字节的MTU。尺寸要大得多,所以我假设发送的个人信息较少,因此转移的总时间会减少。

Between an iPhone 5 and 4S I had an MTU of 20 bytes, and between an iPhone 5s and iPhone 5 I had an MTU of 132 bytes. The size is much larger, so I assumed fewer individual messages would be sent and therefore the overall time of the transfer would decrease.

不幸的是,时间基本保持不变两种情况(大约15秒)。我原来的假设是不正确的还是我可能做错了什么?

Unfortunately the time remains pretty much the same in both scenarios (around 15 seconds). Was my original assumption incorrect or is there something I may be doing wrong?

推荐答案

L2CAP的MTU为20字节。如果要发送超过20个字节的数据,则会以多个数据包发送。最有可能的是,132个字节以7个20字节数据包的速率在7个数据包中发送。所以吞吐量是一样的。

L2CAP has MTU of 20 bytes. If you want to send data of more than 20 bytes, it is sent in multiple packets. Most likely the 132 bytes are being sent in 7 packets at the same rate as 7 20-byte packets. So the throughput is the same.

这篇关于BLE MTU更高但速度是一样的的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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