IBeacon协议分析

转载自:

https://www.cnblogs.com/ggband/p/8952407.html

对于一个UUID是E2C56DB5-DFFB-48D2-B060-D0F5A71096E0, major是0, minjor是0的iBeacon,此时的Tx的信号是-59 RSSI,他的BLE的广播包如下:

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

以上协议包拆解内容如下:

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

协议包中的关键部分就是蓝牙的广播部分,这些被分解为如下:

02 01 1a 1a ff 4c 00 02 15  # Apple's fixed iBeacon advertising prefix
e2 c5 6d b5 df fb 48 d2 b0 60 d0 f5 a7 10 96 e0 # iBeacon profile uuid
00 00 # major 
00 00 # minor 
c5 # The 2's complement of the calibrated Tx Power

所有的BLE设备都可以发送以上格式的广播包

 

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                                   # Apple's fixed iBeacon advertising prefix
e2 c5 6d b5 df fb 48 d2 b0 60 d0 f5 a7 10 96 e0 #uuid
00 00             #major
00 00             #minjor
c5                    #(-59 RSSI)

52 ab 8d 38 a5#checksum

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值