1

Communication between an android device and iOS is fairly simple using Bluetooth LE , Here I can execute simple commands and small data transfer between. But have been stuck when it comes to big data transfers like Image, Video, document through bluetooth from android device to iOS application.

Although Android to android big data transfer happens through bluetooth Sockets, Is there anyway I could achieve Image and Video transfer through Bluetooth to iOS ?

I have been exploring on this topic from quite some time now, but all the document said the same that it is not possible using iOS, Can someone put some light on this approach ?...

vinay
  • 351
  • 1
  • 5
  • 16
  • one device is server, the other - client. Client connects to the server, they both have sockets (or streams) to read and write bytes into. Read/write bytes on image/video or whatever you want through those streams. – Vladyslav Matviienko May 21 '19 at 07:19
  • @user1241241 its not about the code, its about approach followed to achieve. currently I am using BLE approach to send and receive data which is much slower that normal bluetooth communication. – vinay May 21 '19 at 08:39
  • Have you tried using wifi direct? –  May 21 '19 at 08:47
  • 1
    if not you have to explore wifi direct. I have implemented it in the past for cross platform file transfers. The transfer speed was blazing fast. –  May 21 '19 at 08:49
  • @VladyslavMatviienko I dont see any alternative for BluetoothSocket android library in iOS – vinay May 21 '19 at 08:49
  • @user1241241 thanks, but my options are limited to Bluetooth. we are currently sending data by using wifi. – vinay May 21 '19 at 08:55
  • u cant get most of it. probably u might have to explore other available options apart form bluetoothh. One such option would be nanohttpd –  May 21 '19 at 09:00
  • @user1241241 ya that's the final stand, but before that wanted to know if anyone explored this option for sending and receiving large data through BT in iOS – vinay May 21 '19 at 09:05
  • try to reduce your dataframes into minor chunks and transfer simultaneously. u will get an amazing speed same as wifi direct. I have tried this before/ –  May 21 '19 at 09:08
  • 1
    @user1241241 sure let me try this and let you know if it works !.. thanks – vinay May 21 '19 at 09:10
  • `BluetoothSocket android library`you don't need to use any library for that – Vladyslav Matviienko May 21 '19 at 10:45

2 Answers2

1

One reason might be that iOS has strict policies regarding battery usage. From our app team I know that when doing firmware update for one of our peripheral devices by BLE they need to limit the BLE transmission speed. If they do not, iOS kills the app after some time because it is consuming too much energy for a longer period of time.

For questions to throughput see for example:

BLE peripheral throughput limit

Bluetooth BLE Android write to peripheral with max throughput

How can I increase the throughput of my BLE application?

In short, please have a look at Connection Interval, MTU size and if possible BLE packet length extension. But also node that BLE throughput is usually lower than EDR throughput from my experience.

maze
  • 789
  • 1
  • 7
  • 31
  • currently we are using BLE for simple commands execution and small data transfer, but when it comes to large data like image or video BLE is slower than that of Classic BT. – vinay May 21 '19 at 09:01
  • ah, now I understand your question better. I will extend my anser – maze May 21 '19 at 09:05
0

After spending some time on Bluetooth And BLE Following are my observations:-

In BLE:

Data can be transferred Max of 185 in write without response characterstics, But for write characterstics it can go upto 512. when calculate the speed of the connection in BLE

Throughput = (1000ms) * (no. of packet for time interval) * (Data per packet) / (connection Interal in ms)

which comes close to 193kbps for (183 byte packet as 3 byte is header), But practically I got upto 72kbps.

For Classic bluetooth:

There is no framework available from apple but you can enroll to apple's MFI program and use External accessory framework for connection.

vinay
  • 351
  • 1
  • 5
  • 16