Communicating Between iOS and Android with Bluetooth Le

Communicating between iOS and Android with Bluetooth LE

I've already gone through this for at least one week having this same issue. I've already asked a question here and I've already answered on my own. The main problem is an Android BUG issue. It's sending a non permitted command on a fixed L2CAP channnel.

But when Android is communicating with normal peripheral BLE devices, it works pretty well. In fact, the BLE sample works like a charm. The problem is when is comunicating with an iOS device for example: Just after the connection is made, they start negotiating their connection parameters (this phase doesn't happen with normal BLE peripheral), and this is when the problem comes up. Android sends a bad command to iOS, iOS drops the connection. That's basically how it works

Some issues have been already reported to Google, and one of them have been already accepted and I hope they will start working on it soon.

Unfortunately, what you can do, is to wait until next Android release. Anyway, I highly suggest you to have a look at my issue report with all my test documents if you want to make some light on this problem.

Here's the link: https://code.google.com/p/android/issues/detail?id=58725

Data communication between Android and iOS over Bluetooth

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.

how to establish communication between android and ios

You can't connect the devices over to Bluetooth connection Protokoll:
Transfer data between iOS and Android via Bluetooth?

But if you're not needing a two way socket connection, you're maybe able to do it over Bluetooth LE. You need to create a profile or reuse one and subscribe on the other phone to this profile and vice versa.

A Sample for Bluetooth LE: Communicating between iOS and Android with Bluetooth LE

Is Bonding required for BLE - Android, iOS device communication?

Based on what we got working and based on the answers to this question.

  • A1: Yes, it's possible if no MITM is set and the Security scheme is set to Just Works, which means no security at all.
  • A2: Bonding is not required for BLE communication. If the BLE device can't store the Bond information, it may lead to some issues as we got in our case. If the BLE device is able to store and use Bond information then it's recommended to Bond.
  • A3: The Connection will not be closed. The only downside we got is that now it takes a little more time to reconnect.
  • A4: The app is initiating the connection, but the dialog is shown only if the BLE device requests some type of security, it can be MITM, encryption, pin. Short answer, the pairing dialog can be avoided by changing the settings on the BLE device.
  • A5: When having the device with Just Works security protocol, with no bonding and no MITM protection the pairing dialog should not be presented. We got no pairing dialog experience on both iOS and Android.

Can a iPhone discover Android Phones using Bluetooth or BLE?

If you mean to just detect a presence of another phone - I'm not sure.

If you mean to communicate between applications - yes, with BLE it's possible, both ways:

  • iOS app as Central + Android app as Peripheral
  • Android app as Central + iOS app as Peripheral

It's a good idea to have a quick check with already existing apps, as @ukBaz suggested in comment.

Also check example apps (source code) here: https://github.com/alexanderlavrushko/BLEProof-collection - iOS, Android, all apps compatible with each other, read/write/notify.

Android / iOS Bluetooth Low Energy (BLE) communication with multiple Services

I realized that it was all about the length of two or more 128bit UUIDs being added. Adding one 128bit and one 32bit UUID worked fine.



Related Topics



Leave a reply



Submit