title: Identity BlueTooth BLE device connection in multiple devices having same services and characteristics?
body: <p>I have multiple BLE devices which have same services and characteristics. I can scan and connect  multiple devices. After connections, tried to distinguish each one by sending command but it does not work. It works perfectly with a single device.   Is it something like socket connection ? Like A server spawns child threads and each client can maintain a connection through threads.  Please provide some tips on how to identity each device.  </p>
  
  <p>CBCentralManager instance I created is singleton.</p>
  
  <pre><code>+ (id) sharedInstance
  {
      static BLEConnectionManager *this   = nil;
  
      if (!this)  {
          this = [[BLEConnectionManager alloc] init];
      }
      else  {
          [this scanDevice];
      }
  
      return this;
  }
  
  -(void) scanDevice {
      [centralManager scanForPeripheralsWithServices:nil options:0];
  }
  
  - (id) init
  {
      centralManager = [[CBCentralManager alloc] initWithDelegate:self queue:nil];
      peripherals = [[NSMutableArray alloc] init];
  
      [centralManager scanForPeripheralsWithServices:nil options:0];
      return self;
  }
  </code></pre>
  
  <p>===
  EDIT</p>
  
  <p>Is this going to work?  After establishing a connection per a device,  I am going to create an instance handling service and characteristics in didConnectPeripheral delegation method like temperatureSensor example Apple provide. So each device maintains a connection separately. </p>
  
  <pre><code>- (void) centralManager:(CBCentralManager *)central didConnectPeripheral:(CBPeripheral *)peripheral  
  {
      service = [[[LeTemperatureAlarmService alloc] initWithPeripheral:peripheral  controller:peripheralDelegate] autorelease];
  [service start];
  }
  </code></pre>