This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

How to two ble devices connect with one android phone at same time?

if the issue can be worked ,how to do that with android source code? the 2 ble pure devices (not android phone) connect with a ble android phone.

  • Hi. Yes, that should be possible. I don't know of any examples though, but a google search gives you a few places to start: android bluetooth low energy multiple connections.

  • the search link that you supply , i even researched for a long period. without any good solution in result.

    Only a condition can be implemented. 2 ble Android phone(play as Peripherals ) connect with 1 ble android phone (play as central ). But the solution is wroing , i want to 2 ble pure headset or watch devices connect with a ble android phone!!

  • I am not sure if I understand your questions, but:

    • Some newer Android phones can act as a Bluetooth Low Energy peripheral.
    • You can have several Bluetooth Low Energy peripherals (of any kind) connected to a central.
    • Android phones can act as a Bluetooth Low Energy central.
    • Are you talking about a headset like this: Nokia Purity? Headsets like these does not use Bluetooth Low Energy.
    • There should not be a problem connecting a headset using a different Bluetooth version than Bluetooth Low Energy and a Bluetooth Low Energy peripheral to an Android phone.
  • Thank your reply,But below link is my issue: drive.google.com/.../view

    please check ,red font text is my problem .

  • Hi,

    Yes, Android devices, since Android version 4.3, may connect to more then one Bluetooth Smart device. You may try it with nRF Master Control Panel application; after connecting to the first one select another one, and another one, in the drop down at the top. I've tested it against some phones I have and reached a limit of 6 devices on Nexus 5, but connected easily to 8 on a Samsung phone. So the maximum number of simultaneously connected devices depends on the chip vendor.

    From the developer point of view it's not very hard. You do exactly the same operations, but more than ones. For each device you are connected to you should have a BluetoothGatt object and a callback. You may even use the same callback as you get the gatt object as a parameter. You may try it with nRF Toolbox application (available on Google Play and GitHub). Each profile allows you right now to connect only to a single device, but in most of them you may go back to the menu, open another profile and connect to a different device. In case of nRF Toolbox there will be a separate service for each connected device, but this is not necessary, as I said before. Profiles that support 'background connection' are those where the service is used: UART, CSC, RSC, HTS, PROXIMITY.

    Currently I don't have any examples of an app that illustrates it better, but we plan to add support for multiple proximity devices in the PROXIMITY profile. This may take some time (few months) however.

Related