I’m attempting to transfer 100-200 kB over BLE. I understand the limits of BLE for this purpose, and am willing for this transfer to be slow, but I would still like to maximize it as much as possible. There is a lot of information online regarding transmission
rates, but much of it seems to be outdated (pre-iOS 7). My setup is as follows:
CBCentral: iPhone 6S+
CBPeripheral: BLE121LR
This transfer is going from the Central to the Peripheral through the `CBPeripheral.writeValue(data, forCharacteristic: characteristic, type: CBCharacteristicWriteType)` method.
I have tried a variety of schemes.
- Write 100kB once withResponse
- Write a single 20 byte chunk withResponse
- Write 4 20 byte chunks every 20ms withoutResponse
- Write a single 80 byte chunk every 20ms withResponse
Obviously using ‘withResponse’ gives a huge overhead & latency. The best transmission rates I have achieved are by writing 4 20 byte chunks every 20ms without notifications. Obviously, without loss, this is a hard limit of 4kB/s. I can typically achieve
rates of 1-3 kB/s depending on connection strength.
Are there any adjustments I can make to increase this? Can I modify the BLE connection parameters (MTU size)? Would increasing the characteristic size in the GATT profile give me any real-world benefit?
|