Search code examples
iosbluetooth-lowenergyibeaconibeacon-androidbeacon

Mac address of a beacon as uuid


Is it possible to assign mac address of an iBeacon as uuid. With adding some extra dummy digits to fill the uuid since uuid is 32 digits whereas mac address is 12 digits.


Solution

  • Yes, this is certainly possible. A few points:

    1. If you fill the remaining digits with a unique value you will have some degree of confidence that the beacon is "yours" vs some other person doing the same thing.

    2. For iOS receivers, you must tell CoreLocation the exact UUIDs to look for up front, otherwise you cannot see these beacons. This makes encoding the MAC in the UUID not so useful because you could always just keep a mapping of UUID to MAC in code anyway.

    3. For Android and other receivers you can simply look for all beacons and read the MAC out of the UUID. But for Android and other platforms you can just read the MAC directly anyway.