BLE Basics [ BLE基础 ]
需要了解的两个主要概念是 BLE 设备的两种模式:
Two major concepts to know about are the two modes of BLE devices:
* 广播模式(也称为通用访问配置文件 GAP)
* 连接设备模式(也称为通用属性配置文件 GATT)。
* Broadcasting mode (also called GAP for Generic Access Profile)
* Connected device mode (also called GATT for Generic ATTribute Profile).
GAP 模式用于广播外设广告,如 "我是一个名为 LEDBlue-19592CBC 的设备",以及在需要时,为了与专用设备建立连接,来广播相关信息。在需要时建立所需的广告信息。外围设备还可能广播一些其提供的可用服务信息。
GAP mode deals with broadcasting peripheral advertisements, such as "I'm a device named LEDBlue-19592CBC", as well as advertising information necessary to establish a dedicated device connection if desired. The peripheral may also be advertising available services.
GATT 模式处理两台设备连接后的通信和属性传输,如心脏监视器和手机之间。
GATT mode deals with communications and attribute transfer between two devices once they are connec