14

Is it possible to have my MacBook become an iBeacon?

I would like it to broadcast itself to iOS devices which support iBeacons. If this is possible, what are the hardware requirements of the computer (e.g. is Bluetooth 4.0 enough?), and how would I do it?

Update: I am primarily looking for a way to do this without any additional hardware (since my MacBook already has Bluetooth built-in).

1

4 Answers 4

6

If you are a programmer I have posted instructions on how to use a MacBook with Mavericks as an iBeacon. You can find the instructions on my blog at http://www.blendedcocoa.com/blog/2013/11/02/mavericks-as-an-ibeacon/

If/When I get a chance I may create an app that you can use to advertise an iBeacon.

This is the answer I gave to a similar question on Stack Overflow


Mavericks doesn't have the iBeacon support in Core Location that was added to iOS 7. However, Mavericks does now have the ability to act as an BLE peripheral device. Given that an iBeacon is basically a peripheral it should be (and indeed is) possible to use Mavericks as an iBeacon.

In order to create an iBeacon on iOS you first create a CLBeaconRegion object and then use the peripheralDataWithMeasuredPower: method to get an NSDictionary containing the necessary advertisement data to broadcast. If you take the contents of this NSDictionary from an iOS device and use it on Mavericks then you get an iBeacon.

I have created a class to make this easier and allow you to generate the advertisement data dictionary directly on Mavericks. The source code is available at https://github.com/mttrb/BeaconOSX

The BLCBeaconAdvertisementData class take the proximityUUID, major, minor and calibrated power values and creates an NSDictionary that can be passed to the startAdvertising: method of CBPeripheralManager on Mavericks.

The BLCBeaconAdvertisementData class is quite simple. The main work is done by the following method:

- (NSDictionary *)beaconAdvertisement {
    NSString *beaconKey = @"kCBAdvDataAppleBeaconKey";

    unsigned char advertisementBytes[21] = {0};

    [self.proximityUUID getUUIDBytes:(unsigned char *)&advertisementBytes];

    advertisementBytes[16] = (unsigned char)(self.major >> 8);
    advertisementBytes[17] = (unsigned char)(self.major & 255);

    advertisementBytes[18] = (unsigned char)(self.minor >> 8);
    advertisementBytes[19] = (unsigned char)(self.minor & 255);

    advertisementBytes[20] = self.measuredPower;

    NSMutableData *advertisement = [NSMutableData dataWithBytes:advertisementBytes length:21];

    return [NSDictionary dictionaryWithObject:advertisement forKey:beaconKey];
}

I have a more detailed blog post about this at http://www.blendedcocoa.com/blog/2013/11/02/mavericks-as-an-ibeacon/

4

1) You would need to obtain a bluetooth 4.0 BLE (Bluetooth Low Energy) transmitter/receiver chipset to attach to/install in your MacBook.

This would allow you to transmit the beacon signal.

2) You would need to create or purchase software that could use the chipset appropriately.

This would allow you to recognize the presence of nearby beacon-enabled devices, such as the new iPhones, and interact with them appropriately.

Here's a site that explains more about iBeacons and BLE with some good example videos (actually linked to from 'iBeacon' in the original question):

Apple's iBeacons explained - What it is and why it mtters - Pocket-lint

Here is a link to a company selling BLE transmitter/receivers for use commercially (mentioned in the article above). This site also provides an overview as to how the technology works:

Estimote Beacons - real world context for your apps

This site gives details on BLE:

Low Energy | Bluetooth Technology Website

Then I'd say, put on your engineering hat and start searching for chipsets and software solutions!

Have fun!

Edit:

Another name for BLE is Bluetooth Smart. Search for hardware and/or software that is Bluetooth Smart (does BLE only) or Bluetooth Smart Ready (does both legacy bluetooth and BLE). Some lists are on the Bluetooth Technology Website (same as above), and a Google search brings up a few apps that have already been created.

Another search brings up a document for Apple developers:

Apple's Bluetooth Design Guidelines (from their developer center)

and a rapid development tool for Apple developers (from bluetooth.org):

Apple Developers | Bluetooth Development Portal

3
  • Sorry, I should have clarified, I am looking for a solution which doesn't require external hardware. Since some MacBooks already have Bluetooth 4.0 built-in, I was hoping there is a solution which could utilize that instead of having to add on more hardware.
    – Senseful
    Oct 1, 2013 at 20:23
  • The requirements are the same - so your MacBook is Bluetooth Smart Ready. Now, you need to find (or write your own) software to take advantage of the technology.
    – leanne
    Oct 3, 2013 at 15:01
  • I've added some links and further info in my answer to help with additional research.
    – leanne
    Oct 3, 2013 at 15:20
2

I have been using a small tool called MactsAsBeacon. All you need to do is download the .app file and open it. It then allows you to set the UUID, Major, Minor and Power values.

https://github.com/timd/MactsAsBeacon

1
  • Nice find! That's a perfect fit to the problem.
    – Ian C.
    Jun 17, 2014 at 5:04
0

Create a VM that will work like an iBeacon.

http://developer.radiusnetworks.com/ibeacon/virtual.html

:)

2
  • You've posted this as an answer, which is only for things that directly answer the question asked.
    – Daniel
    Nov 6, 2013 at 12:28
  • This answer is relevant to the question although I believe it require external hardware which the OP doesn't want. Using the virtual machine in the article will give you a functioning iBeacon on a MacBook.
    – mttrb
    Nov 7, 2013 at 2:19

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .