I'd like to create my own iBeacon with some bluetooth low energy dev kits. Apple has yet to release a specification for iBeacons, however a few hardware developers have reverse Engineered the iBeacon from the AirLocate Sample code and started selling iBeacon dev kits.
So what is the iBeacon Bluetooth Profile?
Bluetooth Low Energy uses GATT for LE profile service discovery. So I think we need to know the Attribute Handle, Attribute Type, Attribute Value, and maybe the Attribute Permissions of the iBeacon attribute. So for an iBeacon with a UUID of E2C56DB5-DFFB-48D2-B060-D0F5A71096E0 a major value of 1 and a minor value of 1 what would the Bluetooth GATT profile service be?
Heres some assumptions I've made from the discussion on Apple's forums and through the docs.
You only need to see the profile service (GATT) of a Bluetooth peripheral to know it is an iBeacon.
The Major and Minor keys are encoded somewhere in this profile service
Heres some companies with iBeacon Dev Kits that seem to have this figure out already:
Hopefully in time we will have a profile posted on Bluetooth.org like these: https://www.bluetooth.org/en-us/specification/adopted-specifications
It seems to based on advertisement data, particularly the manufacturer data:
I have this node.js script working on Linux with the sample AirLocate app example.
For an iBeacon with ProximityUUID
E2C56DB5-DFFB-48D2-B060-D0F5A71096E0
, major0
, minor0
, and calibrated Tx Power of-59
RSSI, the transmitted BLE advertisement packet looks like this:d6 be 89 8e 40 24 05 a2 17 6e 3d 71 02 01 1a 1a ff 4c 00 02 15 e2 c5 6d b5 df fb 48 d2 b0 60 d0 f5 a7 10 96 e0 00 00 00 00 c5 52 ab 8d 38 a5
This packet can be broken down as follows:
The key part of that packet is the Bluetooth Advertisement, which can be broken down like this:
Any Bluetooth LE device that can be configured to send a specific advertisement can generate the above packet. I have configured a Linux computer using Bluez to send this advertisement, and iOS7 devices running Apple's AirLocate test code pick it up as an iBeacon with the fields specified above. See: Use BlueZ Stack As A Peripheral (Advertiser)
This blog has full details about the reverse engineering process.
iBeacon Profile contains 31 Bytes which includes the followings
Just to reconcile the difference between sandeepmistry's answer and davidgyoung's answer:
Is part of the advertising data format specification [1]
Missing from the AD is a Service [5] definition. I think the iBeacon protocol itself has no relationship to the GATT and standard service discovery. If you download RedBearLab's iBeacon program, you'll see that they happen to use the GATT for configuring the advertisement parameters, but this seems to be specific to their implementation, and not part of the spec. The AirLocate program doesn't seem to use the GATT for configuration, for instance, according to LightBlue and or other similar programs I tried.
References:
If the reason you ask this question is because you want to use Core Bluetooth to advertise as an iBeacon rather than using the standard API, you can easily do so by advertising an NSDictionary such as:
See this answer for more information.
It’s very simple, it just advertises a string which contains a few characters conforming to Apple’s iBeacon standard. you can refer the Link http://glimwormbeacons.com/learn/what-makes-an-ibeacon-an-ibeacon/