Search code examples
iphonecordovacordova-pluginsibeacon

iBeacons: understanding minor, major and UUID


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


Solution

  • 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)