2014-07-07 3 views
1

저는 Ahmet입니다. 나는 3 일 동안 문제를 풀려고 애썼다. 처음으로 Estimote 표지와 통신하는 것에 관한 문제이다. (나는 비컨에 관해서 아주 새로운), 나는 많은 기사를 읽고 많은 예제 코드를 찾았다. Estimote 예제 응용 프로그램 (Estimote SDK 파일에서 제공)을 사용해 보았습니다. 어떤 방법으로 필자가 작성한 코드와 SDK 파일의 예제 코드 (app)를 통해 비컨을 찾을 수 없었습니다. 하지만 앱 스토어에서 애플리케이션을 평가하면 정상적으로 작동합니다.Estimote Ibeacon couldnt는 Mac 2011 년 말에 발견했습니다

2011 년 말 MacBookPro를 사용하고 있습니다.

내가 도와 주시면 감사하겠습니다. 내 목적은 먼저 의사 소통을하고 나머지는 올 것입니다. 나는 집에서 나갈 수 없다. 그래서 나는 그런 식으로 코드를 작성했다.

여기에 제가 사용하고있는 코드가 있습니다.

//MainViewController.h 
@interface MainViewController : UIViewController<CLLocationManagerDelegate> 


@property(nonatomic, strong)CLBeaconRegion *beaconRegion; 

@property(nonatomic, strong)CLLocationManager *locationManager; 

@end 





@implementation MainViewController 

(void)viewDidLoad 

{ 

    [super viewDidLoad]; 

    self.locationManager = [[CLLocationManager alloc]init]; 

    self.locationManager.delegate = self; 

    [self initRegion]; 

    [self locationManager:self.locationManager didStartMonitoringForRegion:self.beaconRegion]; 

} 


- (void)locationManager:(CLLocationManager *)manager didStartMonitoringForRegion:(CLRegion *)region { 

    NSLog(@"did start monitoring"); 

    [self.locationManager startRangingBeaconsInRegion:self.beaconRegion]; 

} 

-(void)initRegion 

{ 

    NSLog(@"Init Region"); 

    NSUUID *uuid = [[NSUUID alloc]initWithUUIDString:@"B9407F30-F5F8-466E-AFF9-25556B57FE6D"]; 

    self.beaconRegion = [[CLBeaconRegion alloc]initWithProximityUUID:uuid identifier:@"identifier"] ; 

    [self.locationManager startMonitoringForRegion:self.beaconRegion]; 

} 



-(void)locationManager:(CLLocationManager *)manager didEnterRegion:(CLRegion *)region 

{ 

    NSLog(@"Did enter region"); // never called 

    [self.locationManager startRangingBeaconsInRegion:self.beaconRegion]; 

} 


-(void)locationManager:(CLLocationManager *)manager didExitRegion:(CLRegion *)region 

{ 

    NSLog(@"Did exit region"); // never called 

    [self.locationManager stopRangingBeaconsInRegion:self.beaconRegion]; 

    NSLog(@"NO Beacon Found..."); 

} 

-(void)locationManager:(CLLocationManager *)manager didRangeBeacons:(NSArray *)beacons inRegion:(CLBeaconRegion *)region 

{ 

    NSLog(@"did range Beacons"); 

    CLBeacon *beacon = [[CLBeacon alloc]init]; 

    beacon = [beacons lastObject]; 



    NSLog(@"BEACON FOUND"); 

    NSLog(@"Proximity UUID: %@",beacon.proximityUUID.UUIDString); 

    NSLog(@"MAJOR ID: %@", beacon.major); 

    NSLog(@"MINOR ID: %@", beacon.minor); 

} 

@end 

답변

2

MacTracker에 따르면, 당신의 맥북 프로는 호환되지 않습니다.

애플은 아이 비콘 현실 (적어도 아이폰 OS 부분적으로 숨겨져 : CoreBluetooth 대 CLBeacon) BLE에 사용 중반부터 2012 년

로 시작하는 자사의 맥북 프로에 블루투스 낮은 에너지 칩을 넣어, 당신을 특수 BLE 칩 (extern, 우리가 시장에서 찾을 수있는 일부 USB)을 가지고있는 경우를 제외하고는 MBP와 함께 iBeacon을 감지하지 못합니다.

노트북이 BLE와 호환되는지 확인하려면 수퍼 유저 this을 읽어 보시기 바랍니다.

+0

당신이 옳았어요, 정말 고마워요. 나는 기사에서 빨간색을 가지고 있으며, 2011 년 말에 mac이 지원한다고 말했습니다. 이제는 그게 확실하지 않습니다. 감사합니다. –

+0

2011 년 BLE 칩을 취득한 것은 MBA였습니다. anwser가 정확하다면, 유효성을 검사 할 수 있습니까? – Larme