BLE广播帧和BLE信标帧之间有区别吗 [英] Is there a difference between a BLE broadcast frame and BLE beacon frame

查看:421
本文介绍了BLE广播帧和BLE信标帧之间有区别吗的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在从HCI套接字接收EVT_LE_ADVERTISING_REPORT.我想区分BLE信标和普通BLE设备(解析设备名称等),对于所有BLE设备是否都发出信标还是它们不同,我几乎不感到困惑.如果不同,那么它们的数据包格式如何?

I am receiving EVT_LE_ADVERTISING_REPORT from a HCI socket. I want to differentiate between a BLE beacon and normal BLE devices (resolving device names etc) I am little confused whether all BLE devices do emit beacons or they are different. If different then how is the packet format for them?

推荐答案

BLE信标帧只是BLE广告帧内的专用负载.寻找BLE信标的设备只需对BLE进行扫描.广告,查看每个广告,看是否有任何包含已知BLE信标格式(如iBeacon,AltBeacon或Eddystone)的字节模式.

A BLE beacon frame is just a specialized payload inside a BLE advertisement frame. Devices looking for BLE beacons simply perform a scan for BLE advertisements, look at each one, and see if any of them contain the byte pattern of a known BLE beacon format like iBeacon, AltBeacon or Eddystone.

很多BLE设备类型发出广告,通常是为了宣传GATT服务.但是,除非将设备专门设计为BLE信标,否则大多数BLE设备都不会发出BLE信标帧.信标是BLE设备的一种特殊类型,尽管它非常简单.

Lots of BLE devices types emit advertisements, often to advertise GATT Services. But unless a device is specifically designed to be a BLE beacon, most BLE devices to not emit BLE beacon frames. A beacon is a specialized type of BLE device, albeit a very simple one.

常见的BLE信标格式使用BLE服务广告(广告数据类型0x16)或BLE制造商广告(广告数据类型0xff).然后,它们在这些数据包中包含一个字节序列,向接收方指示它们是一种特殊格式.按照该字节模式,它们有几个专用于唯一标识符的字节,还有数据和发射机功率校准字段.

Common BLE beacon formats use either a BLE service advertisement (Advertising Data type 0x16) or a BLE manufacturer advertisement (Advertising Data type 0xff). They then contain a byte sequence inside these packets that indicates to receivers they are a particular format. Following that byte pattern, they have several bytes dedicated to unique identifiers as well as data and a transmitter power calibration field.

使用制造商广告的常见信标格式包括iBeacon和AltBeacon.

Common beacon formats that use manufacturer advertisements include iBeacon and AltBeacon.

  • AltBeacon format
  • iBeacon format

Eddystone是使用服务广告的常见信标格式.

Eddystone is a common beacon format that uses a service advertisement.

非信标BLE设备也发出类似于Eddystone格式的GATT服务广告,但具有不同的服务UUID,表示它们提供的特定服务. (例如,心跳监视器或智能手表配置服务.)但是,这些非信标GATT广告通常不用于在广告内部发送数据,而仅用于广告其存在,因此智能手机和计算机可以与其连接并使用设备托管的更复杂的GATT服务来交换数据.

Non-beacon BLE devices also emit GATT Service Advertisements similar to the Eddystone format, but with a different Service UUID that indicates a particular service they offer. (E.g. a heartbeat monitor, or a smart watch configuration service.) However, instead of sending out data inside the advertisement itself, these non-beacon GATT Advertisements are typically used just to advertise their presence, so smartphones and computers can connect to them and exchange data using the more complex GATT service hosted by the device.

这篇关于BLE广播帧和BLE信标帧之间有区别吗的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆