RE: Maximizing Data Transfer over BLE on iOS9
RE: Maximizing Data Transfer over BLE on iOS9
- Subject: RE: Maximizing Data Transfer over BLE on iOS9
- From: "Meyer, Chas" <email@hidden>
- Date: Tue, 26 Jan 2016 21:27:54 +0000
- Thread-topic: 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 <email@hidden>
To: "email@hidden" <email@hidden>
Subject: Maximizing Data Transfer over BLE on iOS9
Message-ID:
<email@hidden>
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?
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.apple.com/mailman/private/bluetooth-dev/attachments/20160126/50e2939a/attachment.html>
------------------------------
Message: 2
Date: Tue, 26 Jan 2016 17:16:16 +0100
From: Aleksandar Mihailovski <email@hidden>
To: Ben Flannery <email@hidden>
Cc: "email@hidden" <email@hidden>
Subject: Re: Maximizing Data Transfer over BLE on iOS9
Message-ID: <email@hidden>
Content-Type: text/plain; charset="utf-8"
Hi,
With my experience the best you can do is 4KB/s. My approach is the 4x20B every 20ms without response, but you can try and push the repetition to "every 16ms", or even less.
I strongly recommend for you to implement some simple reliable transfer protocol, just to verify the data.
Best regards,
Aleksandar Mihailovski
> On Jan 26, 2016, at 16:40, Ben Flannery <email@hidden> wrote:
>
> 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?
> _______________________________________________
> Do not post admin requests to the list. They will be ignored.
> Bluetooth-dev mailing list (email@hidden)
> Help/Unsubscribe/Update your Subscription:
> email@hidden
>
> This email sent to email@hidden
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.apple.com/mailman/private/bluetooth-dev/attachments/20160126/84de5d93/attachment.html>
------------------------------
Message: 3
Date: Wed, 27 Jan 2016 07:46:10 +1300
From: Nick Brook <email@hidden>
To: Ben Flannery <email@hidden>
Cc: "email@hidden Bluetooth"
<email@hidden>
Subject: Re: Maximizing Data Transfer over BLE on iOS
Message-ID:
<email@hidden>
Content-Type: text/plain; charset="utf-8"
The best way I have found to do this is to add another characteristic which notifies when a certain number of data chunks has been received. Your data characteristic is 20 bytes. Write the data characteristic n times then wait for the notification, then another n times until all data is written. I pack out the last chunk with 0xFF as that is unwritten flash on the Bluegiga chips.
Cheers
Nick
On 27 Jan 2016 4:41 am, "Ben Flannery" <email@hidden>
wrote:
> 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?
>
> _______________________________________________
> Do not post admin requests to the list. They will be ignored.
> Bluetooth-dev mailing list (email@hidden)
> Help/Unsubscribe/Update your Subscription:
> com
>
> This email sent to email@hidden
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.apple.com/mailman/private/bluetooth-dev/attachments/20160127/96765811/attachment.html>
------------------------------
_______________________________________________
Bluetooth-dev mailing list
email@hidden
https://lists.apple.com/mailman/listinfo/bluetooth-dev
End of Bluetooth-dev Digest, Vol 13, Issue 10
*********************************************
[CONFIDENTIALITY AND PRIVACY NOTICE] Information transmitted by this email is proprietary to Medtronic and is intended for use only by the individual or entity to which it is addressed, and may contain information that is private, privileged, confidential or exempt from disclosure under applicable law. If you are not the intended recipient or it appears that this mail has been forwarded to you without proper authority, you are notified that any use or dissemination of this information in any manner is strictly prohibited. In such cases, please delete this mail from your records. To view this notice in other languages you can either select the following link or manually copy and paste the link into the address bar of a web browser: http://emaildisclaimer.medtronic.com
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Bluetooth-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden