Objective c 无法发现我的扫描仪

Objective c 无法发现我的扫描仪,objective-c,bluetooth,Objective C,Bluetooth,我想通过蓝牙连接我的扫描仪和我的应用程序,因为我参考了本教程,但在这里我添加了我的uuid,但它没有发现我的扫描仪,请帮助我发现我的扫描仪 以下是我根据教程尝试的编码: UUID:00001101-0000-1000-8000-00805F9B34FB - (void)viewDidLoad { [super viewDidLoad]; NSArray *services = @[[CBUUID UUIDWithString:BLE_Devices]]; CBCentralManager *

我想通过蓝牙连接我的扫描仪和我的应用程序,因为我参考了本教程,但在这里我添加了我的uuid,但它没有发现我的扫描仪,请帮助我发现我的扫描仪 以下是我根据教程尝试的编码:

UUID:00001101-0000-1000-8000-00805F9B34FB

- (void)viewDidLoad
 {
[super viewDidLoad];

NSArray *services = @[[CBUUID UUIDWithString:BLE_Devices]];
CBCentralManager *centralManager = [[CBCentralManager alloc] initWithDelegate:self queue:nil];  
self.centralManager = centralManager;
}

//-这是以CBPeripheral类作为其主要输入参数调用的。这包含了关于可编程外围设备的大部分信息

- (void)centralManager:(CBCentralManager *)central didDiscoverPeripheral:(CBPeripheral *)peripheral advertisementData:(NSDictionary *)advertisementData RSSI:(NSNumber *)RSSI
{
NSString *localName = [advertisementData objectForKey:CBAdvertisementDataLocalNameKey];
NSLog(@"%@ The adverstisementData is:",advertisementData);

if ([localName length ]> 0)
{

//if (![localName isEqual:@""]) {
    NSLog(@"%@ Local Name:",localName);
    // We found the Heart Rate Monitor
    [self.centralManager stopScan];
    self.polarH7HRMPeripheral = peripheral;
    peripheral.delegate = self;
    [self.centralManager connectPeripheral:peripheral options:nil];
}}
CentralManagerDipDateState:方法工作正常, 请帮我连接扫描仪


[外围设备的中央扫描仪服务:无选项:无]
找到您的扫描仪吗?LightBlue.app是否找到您的扫描仪?你的设备真的是蓝牙低能量吗?谢谢,@Larme,我尝试过服务:无,没有,但有时我得到了不同的UUID。UUID是“FFF0”。现在我正在尝试浅蓝色应用程序。请告诉我如何使用浅蓝色应用程序。我已经创建了虚拟外设名称作为扫描参数,UUId作为扫描仪UUId,使用Lightblue.app是否正确。如果不创建虚拟设备,请检查是否可以找到扫描仪。如果服务为零,当您找到扫描仪时,
广告数据是什么?LightBlue应用程序显示“搜索外围设备”直到现在为止
[中央扫描外围设备服务:零选项:零]
找到您的扫描仪?LightBlue.app是否找到您的扫描仪?你的设备真的是蓝牙低能量吗?谢谢,@Larme,我尝试过服务:无,没有,但有时我得到了不同的UUID。UUID是“FFF0”。现在我正在尝试浅蓝色应用程序。请告诉我如何使用浅蓝色应用程序。我已经创建了虚拟外设名称作为扫描参数,UUId作为扫描仪UUId,使用Lightblue.app是否正确。如果不创建虚拟设备,请检查是否可以找到扫描仪。如果没有服务,当您找到扫描仪时,
广告数据是什么?LightBlue应用程序显示“搜索外围设备”直到现在为止
- (void)centralManager:(CBCentralManager *)central didDiscoverPeripheral:(CBPeripheral *)peripheral advertisementData:(NSDictionary *)advertisementData RSSI:(NSNumber *)RSSI
{
NSString *localName = [advertisementData objectForKey:CBAdvertisementDataLocalNameKey];
NSLog(@"%@ The adverstisementData is:",advertisementData);

if ([localName length ]> 0)
{

//if (![localName isEqual:@""]) {
    NSLog(@"%@ Local Name:",localName);
    // We found the Heart Rate Monitor
    [self.centralManager stopScan];
    self.polarH7HRMPeripheral = peripheral;
    peripheral.delegate = self;
    [self.centralManager connectPeripheral:peripheral options:nil];
}}