Search code examples
iosbluetooth-lowenergycore-bluetooth

Transfer File (~1MB) through out BLE iOS is possible?


I want to transfer a file (roughly 1MB) through out iOS BLE and it will send 155bytes each sending time.

And I wrote 2 iOS application:

  • One plays as Central role, It will read data and send to peripheral device

  • The other plays as Peripheral role, Il will receive data from central device

The problem is peripheral device received data too slow. It only received 1 packet every 10 seconds. See log belows.

Can I send a file( 1MB) throught out iOS BLE more quickly?

Log File:

2015-01-05 16:51:46.072 BTLE Transfer[996:60b] <10020110 03>

2015-01-05 16:51:56.122 BTLE Transfer[996:60b] <10020110 03>

2015-01-05 16:52:06.173 BTLE Transfer[996:60b] <10020220 00001137 37905889 2737d632 de529d9d 3af28827 378827de 52373790 58882737 8827de52 37379058 89273788 26de0071 1add37ec 525bed27 de523737 90588827 378826de 56373790 58882737 8a279c17 1a07a069 88273788 27de5237 37905888 27378a27 dd523717 90588827 3588659b 7f0707a4 58882737 8827de52 37379058 8827f962 e9f61003>

2015-01-05 16:52:16.254 BTLE Transfer[996:60b] <10020220 00013488 23de5217 379058a8 2537ca62 f362070f 90588827 378827de 52373790 58882337 8c27de72 37379018 8a2775cd 0aee6305 68c25888 27378827 de523737 90588d27 338827fe 523737f0 5a886572 a517ef65 68659058 88273788 27de5237 37905e88 23378807 de5237b7 9258ca62 1ab816e9 0d7b3790 58882737 8827de52 3737a9e4 a91f1003>

2015-01-05 16:52:26.276 BTLE Transfer[996:60b] <10020220 00029758 8b2737a8 27de5297 35901acd 0a73ba17 ee523737 90588827 378827de 52373f90 5b882717 8827de92 3537c019 a51407b9 16de5237 37905888 27378827 de523e37 93588807 3788273e 503767d1 75db737c c927de52 37379058 88273788 27de5837 349058a8 27378827 dd526776 bd6eb815 078827de 52373790 58882737 88279d5c d6271003>

2015-01-05 16:52:36.266 BTLE Transfer[996:60b] <10020220 0003d552 34379078 882737a8 24de0276 1ad368bd 17378827 de523737 90588827 37882bde 513737b0 58882777 8b278e13 1a7bd168 c9273788 27de5237 37905888 27378527 dd523717 90588847 3488749d 7f6107a0 68882737 8827de52 37379058 88273988 24de5217 37905808 2437d866 f3027607 d1588827 378827de 52373790 5888035b e9741003>

2015-01-05 16:52:46.287 BTLE Transfer[996:60b] <10020220 00042837 8b27de72 373790f8 8b2767c9 0a8d6161 76905888 27378827 de523737 90589827 348827fe 52373750 5b887776 a5749013 76379058 88273788 27de5237 37904988 24378807 de5237d7 9358d866 1adb709f 61373790 58882737 8827de52 37378258 8c2737a8 27de5237 33900bcb 0a07b815 e6523737 90588827 378827de 52378b0f 9cdd1003>

Solution

  • According to Apple BLE in iOS is designed for a maximum transfer speed of about 300 kbps under laboratory conditions. In reality you may reach 50 kbps. You probably want to care about the MTU. The greater the MTU, the smaller the overhead for every package to send. That could boost your transfer speed a little bit. iOS7+ does this automatically, but your peripheral needs to support a MTU greater than the default ~20 Bytes.