CLBeacon - how to change rssi, major and minor?

My main question is how do I change iBeacon's default settings, such as major, minor and RSSI?

+1
source share
2 answers

There are different ways to set these values ​​depending on what you mean by iBeacon:

  • IBeacons Equipment

    Each Beacon provider has different ways to configure these values. Some of them change using the bluetooth service, which is usually controlled using the proprietary iOS or Android application. (Examples include battery-powered Radius Networks with USB beacons and TwoCanoes Beacons .) Radius Networks PiBeacon includes an SD card with an editable file containing identifiers. Other manufacturers, such as Estimote, create beacons with fixed UUIDs that cannot be changed. Since there is no standard mechanism, there is no universal tool for setting identifiers on all types of beacon radios.

  • IOS iBeacons Software:

    You set these values ​​using the code as shown below:

    CLBeaconRegion *region = [[CLBeaconRegion alloc] initWithProximityUUID:[[NSUUID alloc] initWithUUIDString:@"2F234454-CF6D-4A0F-ADF2-F4911BA9FFA6"] major:1 minor:1 identifier:@"com.radiusnetworks.iBeaconExample"];
    NSDictionary *peripheralData = [region peripheralDataWithMeasuredPower:-55];
    [_peripheralManager startAdvertising:peripheralData];
    
  • IOS class CLBeacon

    CLBeacon - , CoreLocation, iBeacons. , , KVO :

    CLBeacon * iBeacon = [[CLBeacon alloc] init];
    [iBeacon setValue:[NSNumber numberWithInt:1] forKey:@"major"];
    [iBeacon setValue:[NSNumber numberWithInt:1] forKey:@"minor"];
    [iBeacon setValue:[NSNumber numberWithInt:-55] forKey:@"rssi"];
    [iBeacon setValue:[[NSUUID alloc] initWithUUIDString:@"2F234454-CF6D-4A0F-ADF2-F4911BA9FFA6"] forKey:@"proximityUUID"];
    NSLog(@"I constructed this iBeacon manually: %@", iBeacon);
    

    , CLBeacon , , , - .

: Radius Networks.

+14

All Articles