본문 바로가기
Wireless Network/Bluetooth LE/Beacon

[iBeacon]What is the iBeacon Bluetooth Profile@stackoverflow

by 개Foot/Dog발?! 2014. 4. 23.

URL : http://stackoverflow.com/questions/18906988/what-is-the-ibeacon-bluetooth-profile


iBeacon Profile이라는 것은 없다.

GAP위에서 BLE의 Advertising기능에서 Apple자체적으로 응용하여 적용한 것이다.


아래표는 현재 iBeacon이 BLE의 GAP위에서 데이터를 구성한 표이다.


 BLE Advertising Data

 AD Structure for Beacon Feature Flag(3)

 AD Structure for Apple iBeacon(27)

Structure Data Length[1]

 AD Structure Data

Structure Data Length[1A]

 AD Structure Data


 AD Type[01]

AD Flag[1A]



AD Type[FF]

Apple Compay Code[004C]

 iBeacon Data for Application(23)

 

 

 

 

 

 

iBeacon indicator(1)

iBeacon Data Len(1)

UUID(16)

Major(2)

Minor(2)

Tx Power(1)



<링크내용 발췌>

For an iBeacon with ProximityUUID E2C56DB5-DFFB-48D2-B060-D0F5A71096E0, major 0, minor 0, 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:

d6 be 89 8e # Access address for advertising data (this is always the same fixed value)
40 # Advertising Channel PDU Header byte 0.  Contains: (type = 0), (tx add = 1), (rx add = 0)
24 # Advertising Channel PDU Header byte 1.  Contains:  (length = total bytes of the advertising payload + 6 bytes for the BLE mac address.)
05 a2 17 6e 3d 71 # Bluetooth Mac address (note this is a spoofed address)
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 # Bluetooth advertisement
52 ab 8d 38 a5 # checksum

The key part of that packet is the Bluetooth Advertisement, which can be broken down like this:

02 # Number of bytes that follow in first AD structure
01 # Flags AD type
1A # Flags value 0x1A = 000011010  
   bit 0 (OFF) LE Limited Discoverable Mode
   bit 1 (ON) LE General Discoverable Mode
   bit 2 (OFF) BR/EDR Not Supported
   bit 3 (ON) Simultaneous LE and BR/EDR to Same Device Capable (controller)
   bit 4 (ON) Simultaneous LE and BR/EDR to Same Device Capable (Host)
1A # Number of bytes that follow in second (and last) AD structure
FF # Manufacturer specific data AD type
4C 00 # Company identifier code (0x004C == Apple)
02 # Byte 0 of iBeacon advertisement indicator
15 # Byte 1 of iBeacon advertisement indicator
e2 c5 6d b5 df fb 48 d2 b0 60 d0 f5 a7 10 96 e0 # iBeacon proximity uuid
00 00 # major 
00 00 # minor 
c5 # The 2's complement of the calibrated Tx Power