Question

I know this sounds strange, but can a Bluetooth LE equipped Mac use region monitoring to monitor iBeacons around it? For example, I would use my iPhone to broadcast an iBeacon signal and the Mac would be able to see it.

Is this possible? My reason for this is to be able to execute tasks on the Mac when an iPhone goes near it. Maybe there is a better way to do this?

Was it helpful?

Solution 2

Yes that is totally possible...

There is no official API for it but check out the source code to this project:

https://github.com/liamnichols/iBeaconScanner

It shows how you can listen out for BLE devices broadcasting using the iBeacon Protocol in the area using CoreBluetooth.

Hope it helps


Edit: Although a commercial app might need to implement its own kind of advertising protocol instead of trying to piggy back off the iBeacon protocol... If you want to understand how the advertisment data for the iBeacon works, check out this answer: https://stackoverflow.com/a/19026387/814389 It shows the structure of the packed being advertised.

OTHER TIPS

Yes, you can do this easily on your Mac with a command line tool from Radius Networks:

% ibeacon --scan
{entered: { uuid: "2F234454-CF6D-4A0F-ADF2-F4911BA9FFA6", major: 1, minor: 1, rssi: -61}}
{ranged: [{ uuid: "2F234454-CF6D-4A0F-ADF2-F4911BA9FFA6", major: 1, minor: 1, rssi: -61}]}

You can combine the output of the above with a script that launches apps or performs other activities upon iBeacon detection.

This is available for free from here: https://github.com/RadiusNetworks/ibeacon-cli

Full disclosure: I am Chief Engineer for Radius Networks

yes, it is possible. there are resources you should check.

Mavericks as an iBeacon

mttrb/BeaconOSX

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top