RE: Maximizing Data Transfer over BLE on iOS9
Ben, On the BLE121LR side, have you tried negotiating for more favorable connection parameters? Using iOS 8, we built a BLE interface that used the "SPPLE" service demo by Stone Street One (Bluetopia BT stack), now maintained by TI. I may have the exact numbers wrong, but we saw a best-case connection interval of about 35 msec with iOS, and an MTU size of about 130 bytes. At the time, these were iOS defaults. Using the SPPLE service, we saw a peak throughput of about 5-6 KB/s. Disclaimer: I was not the iOS developer; I worked on the BLE firmware for the accessory. Chas Meyer ---------------------------------------------------------------------- Message: 1 Date: Tue, 26 Jan 2016 15:40:08 +0000 From: Ben Flannery <ben.flannery@bigasssolutions.com> To: "bluetooth-dev@lists.apple.com" <bluetooth-dev@lists.apple.com> Subject: Maximizing Data Transfer over BLE on iOS9 Message-ID: <5F3E18CA-246E-46DF-B5B0-46A7D1BABA28@baf.mail.onmicrosoft.com> Content-Type: text/plain; charset="utf-8" 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. 1. Write 100kB once withResponse 2. Write a single 20 byte chunk withResponse 3. Write 4 20 byte chunks every 20ms withoutResponse 4. 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?
participants (1)
-
Meyer, Chas