Not getting macAddresses with didRangeBeacons

We have a space with 18 beacons.
We need to know which one is it, so I’m building a dictionary with macAddress.
The problem is that with didRangeBeacons event, I don’t get macAddresses…
And with didDiscoverBeacons event I don’t get distances…

Also with didDiscoverBeacons event I get different beacon.major value than with didRangeBeacons event…

What’s the best way to approach this issue?
What’s the non variable value which I can relate with my App beacons ID and also get distance?
In your examples you can get both macAddresses and distances all together…

I have the same issue .... can you solve this ??

+1, having same issue. Will also note that the provided ESTBeacon.h isEqualToBeacon: results in false/no on comparison of ESTBeacon in beacons array of didRangeBeacon: vs. beacons in arrray of didDiscoverBeacons:.

Jordi,

The main difference to keep in mind here is that didRangeBeacons is implemented using the CoreLocation API, while didDiscoverBeacons use the CoreBluetooth API. The former provides us with the distance, but not the macAddress, while with the latter we can retrieve the macAddress, but not the distance. Some people try to come up with their own distance-measurement algorithms and calculate the distance manually while using CoreBluetooth based scanning. This StackOverflow thread might be of help:

http://stackoverflow.com/questions/20416218/understanding-ibeacon-distancing

About different major values, can you make sure you retrieve the unsigned short value from the NSNumber in both cases, like this: [beacon.major unsignedShortValue]?

Eric,

About your isEqualToBeacon report: right now, it's not possible to compare two ESTBeacon instances retrieved from two different scanning methods (e.g. ranging and discovery) - mostly because of the CoreLocation vs. CoreBluetooth differences mentioned above. We're working on finding a way around that, but I can't promise anything at this time.

Jordi,

Appreciate the explanation, and completely understand now.

Cheers,

EvL