Page 1 of 1

BLE mtu and iPhone compatibility

Posted: Mon Jan 08, 2018 3:46 am
by chegewara
I would like to ask about ble functionality. Its LE Data Packet Length Extension (Core BLUETOOTH SPECIFICATION Version 4.2 [Vol 6, Part B] 4.6.6 LE Data Packet Length Extension). ESP32 user require long data trasmission between esp32 and iPhone. He also got response from Apple:
Unless your hardware is able to use BLE 4.2 Data Length Extension (only available on iPhone 7 and newer devices on iOS side), BLE transmissions are limited to 23 byte data packets over the air.
DLE is different than MTU. Even if you increase the MTU, actual data packets are still limited (unless you are extending them with 4.2 features). All this needs to be done on the peripheral. There is no way for your app to control any of these low level settings.

When your data is larger than what fits in an over the air packet, you must split it into smaller chunks and send in separate packets. I cannot answer how this would be done on your specific hardware, and you may want to consult the support channels for it to find out how you would do this with the hardware and possibly the firmware you are using.

If your hardware supports 4.2 DLE, and you can live with supporting iPhone 7 or later, using an extended data packet would be the best solution, as it will be future-proofing your solution.
Is it supported or is it planned to be supported?

Re: BLE mtu and iPhone compatibility

Posted: Mon Jan 08, 2018 6:45 pm
by Lucas.Hutchinson
Yes the BLE data length extension is supported.

Initially it will connect at an mtu of 23.
iOS will then automatically negotiate a larger mtu. in iOS 10+ the MTU will be 185. in 9 and lower it is slightly smaller (about 150..? but i am not sure).

Re: BLE mtu and iPhone compatibility

Posted: Tue Jan 09, 2018 5:08 am
by chegewara
I know it is supported in classic bluetooth, but i could not find any info about it in BLE documentation:
http://esp-idf.readthedocs.io/en/latest ... eir_type_t

Also i dont see any event to handle it in esp_gap_ble_api.h or esp_gatts_api.h

Re: BLE mtu and iPhone compatibility

Posted: Thu May 16, 2019 7:40 pm
by phatpaul
Did you find any info specific to 4.2 DLE?

I suspect that DLE is working automatically on ESP32 from my experience with an android phone transferring much faster vs iphone 6.

The answer from Lucas.Hutchinson doesn't seem to acknowledge that MTU is different from DLE.

Here's a great overview:
https://punchthrough.com/pt-blog-post/m ... nsion-dle/