title: Communicating with multiple BLE devices at once
body: <p>I read almost every single one thread about BLE on the stackoverflow, nordicsemi devzone, online tutorials etc but still can't solve problem of connecting 10> BLE devices to android in parallel communication. I know that theoretically android limit is 7 so when I write 10 I mean 10 in minimum amount of time.</p>
  
  <p>Setup is standard. Service, GATT for every device, broadcast listeners, leScanCallbacks etc. </p>
  
  <p>Problem occurs when few devices are communicating with android and it occurs on different communication steps. </p>
  
  <p>Cases are like this:</p>
  
  <p>One device is connected and communicating, second also, third one is trying to connect but it keeps failing. After successful connection of teh third one, two new devices are trying to connect but keep failing.</p>
  
  <p>Problem also occurs when few devices are communicating but are on different steps. One is on discovery, second on reading battery level and the third one can't connect until those two finish and disconnect/close.</p>
  
  <p>Sometimes response doesn't come and after programatically set timeout requests retry nothing happens etc</p>
  
  <p>I could write xy failed cases but there wouldn't be pattern which could point out obvious error and that is the main problem. Only thing certain is that some kind of collision exists and "block" response from device to my broadcast receiver but that collision is very odd since android device supports 7 connections at the time and sometimes i don't get response even when &lt;7 devices are communicating simultaneously.</p>
  
  <p>When I set communication to go one after another(when previous disconnects start next) everything goes smoothly but that takes time and time is the main reason I am trying to sync max number of devices asynchronously.</p>
  
  <p>My question is does multiple communicating through bluetooth could work and if it can how to achieve it on android? I saw example of iOS handling it through multiple threads but I don't have the idea how to achieve in android with broadcast receiver so I put communication steps in different threads but it changed nothing.</p>