3
votes

I can't seem to figure out the relevance or importance of major and minor values in detecting iBeacons. When I register and configure my Gimbal beacon, I give it a specific set of values for UUID, major and minor, and then when I use my cordova iBeacon plugin I can detect my beacons but only if I instruct it to look for these exact parameters.

It would seem to me that only the uuid would be critical to detecting beacons. Yet they aren't detected by my app unless I match value for value each of those 3 criteria

Can anyone elucidate the relevance of the major and minor values in beacon detection and is it true that my code needs to specifically instruct the plugin to look for beacons matching all these values.

Hope this post makes sense... the iBeacon detection has so many moving parts that learning about it has tied my brain in a pretzel

2

2 Answers

7
votes

The iBeacon protocol was implemented this way to ensure that each beacon would be unique. If you have a large beacon deployment (lets say in all of your stores across the country) Then you want to set the identifiers in such a way that you can id the beacons individually. An example deployment would look like this:

All beacon UUIDS: 1234...

All department stores in Boston: Major = 1 All department stores in Chicago: Major = 2

Minor can vary by aisle or section.

So then I know if I detect beacon UUID 1234..., Major 1 Minor 8 I can map it to the Boston store clothing section. This is just an example (and a kind of lame on at that) but essentially the levels of identifiers are just a greater insurance that the beacon you detect is the one you actually want.

When monitoring for iBeacons you can actually monitor at each of the different identifier levels, so you could monitor for all beacons with a UUID, all beacons with a UUID and Major, or all beacons with a UUID, Major, and Minor (which ideally would just be a single beacon)

5
votes

This statement is critical:

It would seem to me that only the uuid would be critical to detecting beacons. Yet they aren't detected by my app unless I match value for value each of those 3 criteria

Using raw iOS APIs and the Android Beacon Library, supplying only the UUID will match beacons. You do not need to specify the major and minor to detect beacons. The fact that you are seeing otherwise means something is wrong with the code you are running, the framework it is using, or both.

The purpose of the major and minor are to subdivide the identifier space for logical purposes. If you then match solely on UUID or UUID and major, you can take diffrent actions depending on which beacon is detected by examining the minor value.