Home:ALL Converter>Turn Macbook into iBeacon

Turn Macbook into iBeacon

Ask Time:2013-10-17T01:54:32         Author:user2887527

Json Formatter

I know that I can turn iOS devices into iBeacons (Can an iOS7 device act as an iBeacon?). Unfortunately, I only have one device and my beacons have not arrived yet. So I was wondering how I could turn my MacBook Air (Mid-2011, does support Bluetooth 4.0) into an iBeacon for testing purposes. Are there any ready-made applications available like the airlocate for iOS? Thanks in advance!

Author:user2887527,eproduced under the CC 4.0 BY-SA copyright license with a link to the original source and this disclaimer.
Link to original article:https://stackoverflow.com/questions/19410398/turn-macbook-into-ibeacon
mttrb :

Note: This only works in Mavericks, it does NOT work in Yosemite.\n\nMavericks 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.\n\nIn 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.\n\nI 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\n\nThe 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.\n\nThe BLCBeaconAdvertisementData class is quite simple. The main work is done by the following method:\n\n- (NSDictionary *)beaconAdvertisement {\n NSString *beaconKey = @\"kCBAdvDataAppleBeaconKey\";\n\n unsigned char advertisementBytes[21] = {0};\n\n [self.proximityUUID getUUIDBytes:(unsigned char *)&advertisementBytes];\n\n advertisementBytes[16] = (unsigned char)(self.major >> 8);\n advertisementBytes[17] = (unsigned char)(self.major & 255);\n\n advertisementBytes[18] = (unsigned char)(self.minor >> 8);\n advertisementBytes[19] = (unsigned char)(self.minor & 255);\n\n advertisementBytes[20] = self.measuredPower;\n\n NSMutableData *advertisement = [NSMutableData dataWithBytes:advertisementBytes length:21];\n\n return [NSDictionary dictionaryWithObject:advertisement forKey:beaconKey];\n}\n\n\nI have a more detailed blog post about this at http://www.blendedcocoa.com/blog/2013/11/02/mavericks-as-an-ibeacon/",
2013-11-02T11:52:08
James Frost :

The best solution I've found so far is this one from Tim Duckett: https://github.com/timd/MactsAsBeacon\n\nJust grab the project, set up a UUID, major, and minor value and click Broadcast. Really simple. The solution is based upon this blog post: http://www.blendedcocoa.com/blog/2013/11/02/mavericks-as-an-ibeacon/",
2013-11-19T22:17:55
volkersfreunde :

If you want to save the 9.99€ take a look at the latest Version of the open source client by mttrb. I added some more GUI so you can adjust all the fields. https://github.com/deadfalkon/BeaconOSX/releases even has a binary download.",
2013-12-02T14:30:08
davidgyoung :

This is possible with OSX Mavericks, but not in Mountain Lion and earlier versions of the OS. My company, Radius Networks, has a MacBeacon app that does this on Mavericks.\n\nIn OSX Mountain Lion, unlike iOS 6+, there is no built-in support for the Bluetooth peripheral mode you need to advertise like an iBeacon. This means rolling your own low-level Bluetooth code, which is not easy to say the least.\n\nBut there is a solution for older operating systems. I paired an external Bluetooth dongle on my Mac with a VirtualBox VM running Linux and achieved what you are looking for. My company made this VM available for a free download here: http://developer.radiusnetworks.com/ibeacon/",
2013-10-17T02:34:17
amay0048 :

I tried all these solutions, but couldn't get AirLocate to pick up a signal until I complied this: \nhttps://github.com/lgaches/BeaconEmitter \nand started transmitting with this UUID:\nE2C56DB5-DFFB-48D2-B060-D0F5A71096E0\nand with an identifier of:\nhello\n\nI found this post about AirLocate useful as well:\nDoes AirLocate only look for particular UUIDs?",
2014-04-05T04:50:56
nolim1t :

Yep its possible. Check out this github project https://github.com/nolim1t/iBeaconAdvertisement",
2013-11-19T03:47:01
yy