将两个蓝牙低功耗设备与其uuid连接,并显示其RSSI值

时间:2014-07-24 09:10:39

标签: ios bluetooth-lowenergy core-bluetooth

任何人都可以帮助我在他们的uuids的帮助下连接两个BLE。还如何显示他们的RSSI值。

 (void) viewWillAppear:(BOOL)animated
 {    
      discoverPeripherals=[[NSMutableArray alloc]init];
      _CBManager=[[CBCentralManager alloc]initWithDelegate:self queue:nil];
      NSDictionary *options=@{CBCentralManagerScanOptionAllowDuplicatesKey:[NSNumber numberWithBool:NO]};    
      NSArray *servicesUUIDsList=@[[CBUUID UUIDWithString:IMMEDIATE_ALERT_SERVICE_UUID],[CBUUID UUIDWithString:TX_POWER_LEVEL_SERVICE_UUID],[CBUUID UUIDWithString:BATTERY_LEVEL_SERVICE_UUID]];
      [self.CBManager scanForPeripheralsWithServices:servicesUUIDsList options:options];

 }

0 个答案:

没有答案