
A Practical Guide to Bluetooth Low Energy (BLE) Throughput - fra
https://interrupt.memfault.com/blog/ble-throughput-primer
======
oflannabhra
The best presentation I've seen on BLE throughput is a 2017 WWDC session on
CoreBluetooth [0][1].

Upping the MTU is "easy" on Android (you can do it, but I've had mixed
results), but requires HID on iOS. In fact, you cannot trigger an MTU
negotiation through CoreBluetooth, so that a single peripheral cannot take
over the entire radio. If you control the peripheral firmware, you can
obviously request an increase from that end.

The best checklist I've seen is in that presentation:

1\. Use Write Without Response

2\. Chunk your data based on the connection interval, so you maximize # of
packets sent per interval

3\. Negotiate a larger MTU

4\. Use BLE 4.2 Extended Data Length extensions

[0] -
[https://asciiwwdc.com/2017/sessions/712?q=core%20bluetooth](https://asciiwwdc.com/2017/sessions/712?q=core%20bluetooth)
[1] - [https://devstreaming-
cdn.apple.com/videos/wwdc/2017/712jqzhs...](https://devstreaming-
cdn.apple.com/videos/wwdc/2017/712jqzhsxoww3zn/712/712_whats_new_in_core_bluetooth.pdf?dl=1)

~~~
chrisc11
Thanks for sharing the link! I remember watching that presentation ... I
really liked how thorough it was. I'll include the links in the article as an
additional reference!

> Upping the MTU is "easy" on Android (you can do it, but I've had mixed
> results)

hehe, yeah, I've definitely run into some interesting issues when changing the
MTU on android. There's a class of older devices that seem to only support the
default MTU size but will happily negotiate a 512 byte MTU and then drop the
data for you :)

~~~
oflannabhra
Your article is great, too! I've saved it along with other Bluetooth resources
for reference. Way more accessible than a video, thanks for posting it. There
was nothing like it when I was deep in needing to maximize throughput.

The thing I really appreciated in the presentation was the visualization of
how each of the options increased throughput. I also was very thankful that
CoreBluetooth handles so much for us. I was able to get our firmware updates
to get to 85% theoretical speeds without having to do much fiddling (besides
good algorithm design).

I am jealous of your lab gear, though. I got Ubertooth [0] running for
sniffing, but could only successfully follow a connection event about 25-33%
of the time.

[0] -
[https://github.com/greatscottgadgets/ubertooth](https://github.com/greatscottgadgets/ubertooth)

~~~
chrisc11
> I also was very thankful that CoreBluetooth handles so much for us. I was
> able to get our firmware updates to get to 85% theoretical speeds

That's awesome! I've generally been pretty happy with the CoreBluetooth
framework as well and it's nice that all devices in the iOS ecosystem behave
fairly consistently. I have found Bluetooth State Restoration to have some odd
quirks from release to release but I think it has gotten better over the years
as well.

> I got Ubertooth [0] running for sniffing, but could only successfully follow
> a connection event about 25-33% of the time.

heh, yeah, the Ubertooth is neat for the price point ... I've used it as cheap
spectrum analyzer [0] several times in the past when prepping for BLE RF
testing. Could pretty quickly verify that a bluetooth chip was at least
entering Direct Test Mode and transmitting on a particular channel using it!

[0]
[http://ubertooth.sourceforge.net/usage/start/](http://ubertooth.sourceforge.net/usage/start/)

