Warning: file_get_contents(/data/phpspider/zhask/data//catemap/9/ios/93.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Ios 将两个蓝牙低能设备与其uuid连接并显示其RSSI值_Ios_Bluetooth Lowenergy_Core Bluetooth - Fatal编程技术网

Ios 将两个蓝牙低能设备与其uuid连接并显示其RSSI值

Ios 将两个蓝牙低能设备与其uuid连接并显示其RSSI值,ios,bluetooth-lowenergy,core-bluetooth,Ios,Bluetooth Lowenergy,Core Bluetooth,有人能帮我在UUID的帮助下连接两个BLE吗。以及如何显示它们的RSSI值 (void) viewWillAppear:(BOOL)animated { discoverPeripherals=[[NSMutableArray alloc]init]; _CBManager=[[CBCentralManager alloc]initWithDelegate:self queue:nil]; NSDictionary *options=@{CBCen

有人能帮我在UUID的帮助下连接两个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];

 }

您看过核心蓝牙编程指南了吗?您是否实现了CBCentralManager委托方法?是的,我实现了所有委托方法扫描您显示了您尝试连接到外围设备的代码?如果您搜索或阅读Apple编程指南voidcentralManager:CBCentralManager*central DidDiscoveryPeripheral:CBPeripheral*peripheral advertisementData:NSDictionary*advertisementData RSSI:NSNumber*RSSI{[[advertisementData objectForKey:CBAdvertisementDataLocalNameKey]isEqualToString:@02D0D956-B0ED-D802-0000-000000000000];{peripheral.delegate=self;[self.CBManager connectPeripheral:peripheral 1 options:nil];}[[advertisementData objectForKey:CBAdvertisementDataLocalNameKey]isEqualToString:@E2297F70-FD3F-C325-0000-000000000000000000];{peripheral.delegate=self;[self.CBManager connectPeripheral:peripheral-2 options:nil]}您应该编辑您的问题以包含代码,以便正确格式化