Getting UUID for a particular Beacon

Hello

I just want to know how can I get the Proximity Id(UUID) for a particular Beacon if it is present in the range of a device. I have gone through the Demo project but unable to figure out the same. Kindly help me to sort out this.

Thanks

Hi Salman,

Please note, that all our beacons are shipped with the same, default UUID.

You can check it using the Estimote mobile app.

Thanks!

Hi Ola,

Thanks for the anwer. But I just want to know whether I can extract the UUID of a beacon programmatically or not.
Or do we need to hardcode the same in the app itself.
Also, I want to know whether we can change the UUID of the Beaqcons or not.

Thanks

Hi again!

You need to hardcode it in the app.
Also, you can change it in the app or using our SDK:

Change region to UUID/major/minor of your beacon,
Insert your app ID and your app token,
Change "NEW_UUID" to the new uuid.

let beaconManager = ESTBeaconManager()
let region = ESTBeaconRegion(proximityUUID: NSUUID(UUIDString: "B9407F30-F5F8-466E-AFF9-25556B57FE6D"), major: 123, minor: 456, identifier: "my beacon")

var beacon: ESTBeacon!

override func viewDidLoad() {
super.viewDidLoad()

ESTConfig.setupAppID("XXX", andAppToken: "YYY")
beaconManager.requestWhenInUseAuthorization()
beaconManager.delegate = self
beaconManager.startRangingBeaconsInRegion(region)

}

func beaconManager(manager: ESTBeaconManager!, didRangeBeacons beacons: [ESTBeacon]!, inRegion region: ESTBeaconRegion!) {
println("bm didRangeBeacons, (beacons.count) in region: (region.identifier)")

if let beacon = beacons.first {
    beaconManager.stopRangingBeaconsInRegion(region)
    self.beacon = beacon
    beacon.delegate = self
    beacon.connect()
}

}

func beaconConnectionDidSucceeded(beacon: ESTBeacon!) {
println("beaconConnectionDidSucceeded")

beacon.writeProximityUUID("NEW_UUID") { (newValue, error) in
    println("newValue = \(newValue), error = \(error)")
    beacon.disconnect()
}

}

Hope it helps!