title: Android 4.3: How to connect to multiple Bluetooth Low Energy devices
body: <p><strong>My Question is: Can Android 4.3 (client) have active connections with multiple BLE devices (servers)? If so, how can I achieve it?</strong></p>
  
  <p><strong>What I did so far</strong></p>
  
  <p>I try to evaluate what throughput you can achieve using BLE and Android 4.3 BLE API. In addition I also try to find out how many devices can be connected and active at the same time. I use a Nexus 7 (2013), Android 4.4 as master and TI CC2540 Keyfob as slaves.</p>
  
  <p>I wrote a simple server software for the slaves, which transmits 10000 20Byte packets through BLE notifications. I based my Android App on the <a href="https://developer.bluetooth.org/Pages/bluetooth-smart-developers.aspx" rel="noreferrer">Application Accelerator</a> from the Bluetooth SIG.</p>
  
  <p>It works well for one device and I can achieve around 56 kBits payload throughput at a Connection Interval of 7.5 ms. To connect to multiple slaves I followed the advice of a Nordic Employee who wrote in the <a href="https://devzone.nordicsemi.com/index.php/multiple-slave-support-for-nrf-toolbox-proximity-application" rel="noreferrer">Nordic Developer Zone</a>:</p>
  
  <blockquote>
    <p>Yes it's possible to handle multiple slaves with a single app. You would need to handle each slave with one BluetoothGatt instance. You would also need specific BluetoothGattCallback for each slave you connect to.</p>
  </blockquote>
  
  <p>So I tried that and it partly works. I can connect to multiple slaves. I can also register for notifications on multiple slaves. The problem begins when I start the test. I receive at first notifications from all slaves, but after a couple Connection Intervals just the notifications from one device come trough. After about 10 seconds the other slaves disconnect, because they seem to reach the connection time-out. Sometimes I receive right from the start of the test just notifications from one slave.</p>
  
  <p>I also tried accessing the attribute over a read operation with the same result. After a couple of reads just the answers from one device came trough.</p>
  
  <p>I am aware that there are a few similar questions on this forum: <a href="https://stackoverflow.com/questions/18327815/does-andriod-4-3-support-multiple-ble-device-connections">Does Android 4.3 support multiple BLE device connections?</a>, <a href="https://stackoverflow.com/questions/18011816/has-native-android-ble-gatt-implementation-synchronous-nature/18020287#18020287">Has native Android BLE GATT implementation synchronous nature?</a> or <a href="https://stackoverflow.com/questions/20214862/ble-multiple-connection">Ble multiple connection</a>. But none of this answers made it clear for me, if it is possible and how to do it.</p>
  
  <p>I would be very grateful for advice.</p>