BLE MTU higher but speed is the same

為{幸葍}努か 提交于 2019-12-07 05:49:24

问题


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).

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.

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?


回答1:


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.



来源:https://stackoverflow.com/questions/21872239/ble-mtu-higher-but-speed-is-the-same

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!