3

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?

Felipe
  • 16,649
  • 11
  • 68
  • 92
Spenciefy
  • 892
  • 11
  • 33

3 Answers3

4

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

davidgyoung
  • 63,876
  • 14
  • 121
  • 204
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.

Community
  • 1
  • 1
liamnichols
  • 12,419
  • 2
  • 43
  • 62
  • What do you mean exactly by "trying to piggy back off the iBeacon protocol" - are there disadvantages? – Spenciefy May 01 '14 at 04:29
  • An iBeacon is just a BLE device sending out a advertisement packet with information conforming to a specific specification.. In that answer I linked to in my edit, you can see that its just some identifiers, the UUID, Major, Minor and a power calibration value.. For commercial use, I would have thought that you might have wanted to create your own sort of advertising packet more suited to your need. (you wouldn't necessarily have wanted to bother sending the major an minor bytes so maybe you could use your own BLE advertisement data to do exactly what you want instead? – liamnichols May 01 '14 at 08:25
1

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

Mavericks as an iBeacon

mttrb/BeaconOSX

thorb65
  • 2,696
  • 2
  • 27
  • 37