Hi, i would like to change programmatically the BLE MTU size on a custom cc2640 board, depending on the Android version of the tablet/smartphone I use.
To be more specific, I need to have the biggest throughput possible, as I have several Mbits of data to send as fast as possible. The BLE Stack V2.1 allows bigger MTU than 23, which is great.
However, it doesn't work if i manually change MAX_PDU_SIZE to something greater than 27 and use Android API 4.4 because the requestMTU() functionnality has been implemented since Android 5.0.
The following resumes my point:
- MAX_PDU_SIZE > 27 with Android 5.0 or more : WORK
- MAX_PDU_SIZE > 27 with Android 4.4 or less : DOESN'T WORK
- MAX_PDU_SIZE = 27 with Android 4.4 or less : WORK
- MAX_PDU_SIZE = 27 with Android 5.0 or more : WORK but not optimal
So, my goal is to manually set MAX_PDU_SIZE to 27 in order to work with Android 4.4, but to programmatically change it if Android 5.0 or more is being used.
Many thanks.
Regards,
Etienne