BLE ARCHITECTURE (HOST )

BLE ARCHITECTURE (HOST )

No alt text provided for this image

HCI Host Controller Interface?

  1. Interface between host and the controller
  2. Responsible or to main functions :?

- ? sending commands to controller and receiving events back

- ? sending and receiving data from peer device

  1. Serves as both physical and logical interface between devices

-? logical interface defines a number of packet formats for commands, events and data

- physical interface defines how these packets can be transported between the host and controller

For a system in which the controller and the host are on separate chips connected by a physical interface the HCI logical interface is represented as physical packets transferred over this physical interface


Logical link Control and Adaptation Protocol(L2CAP)

  1. Acts as a protocol multiplexing layer
  2. It takes multiple protocols from the upper layers and places them into standard BLE packets that are passed down to lower layers
  3. The L2CAP in BLE handles the Attribute protocol(ATT) and the security manager protocol
  4. The L2CAP also enables segmentation and reassembly of packets that are larger than what the radio can deliver

Generic Access profile (GAP)

The generic access protocol (GAP) layer directly interfaces with the application and/or profiles, to handle device discovery and connection-related services

for the device. GAP handles the initiation of security features

  1. Describes ho devices interact with each other like device roles device modes, advertisement, connection establishment

The GAP layer of the Bluetooth low energy protocol stack is responsible for connection functionality. This layer handles the access modes and procedures of the device including device discovery, link establishment, link termination, initiation of security features, and device configuration

No alt text provided for this image


Based on the role for which the device is configured, The following describes these states.

? Standby: The device is in the initial idle state upon reset.

? Advertiser: The device is advertising with specific data letting any initiating devices know that it is a connectable device (this advertisement contains the device address and can contain some additional data such as the device name).

? Scanner: When receiving the advertisement, the scanning device sends a scan request to the

advertiser. The advertiser responds with a scan response. This process is called device discovery. The scanning device is aware of the advertising device and can initiate a connection with it.

? Initiator: When initiating, the initiator must specify a peer device address to which to connect. If an advertisement is received matching that address of the peer device, the initiating device then sends

out a request to establish a connection (link) with the advertising device with the connection

? Slave/Master: When a connection is formed, the device functions as a slave if the advertiser and a master if the initiator.

Security Manager Layer

The security manager (SM) layer

  1. defines the methods for pairing and key distribution, and provides functions for the other layers of the
  2. protocol stack to securely connect and exchange data with another device

Attribute Protocol

The attribute protocol (ATT) layer protocol allows a device to expose certain pieces of data or attributes, to another device. Or ho the server exposes its data to a client.

  1. Server : the device that exposes the data
  2. Client : the device that consumes the data


An attribute is a generic name for any piece of data exposed by the server This piece of data is labelled and addressable An attribute is made up o a handle, type, a value and permissions.

No alt text provided for this image


Generic Attribute Profile (GATT)

The generic attribute protocol (GATT) layer is a service framework that defines the sub-procedures for using ATT. Data communications that occur between two devices in a Bluetooth low

energy connection are handled through GATT sub-procedures. The application and/or profiles will directly

use GATT.

Just as the GAP layer handles most connection-related functionality, the GATT layer of the Bluetooth low energy protocol stack is used by the application for data communication between two connected devices.

Data is passed and stored in the form of characteristics which are stored in memory on the Bluetooth low

energy device. From a GATT standpoint, when two devices are connected they are each in one of two roles.

? The GATT server is the device containing the characteristic database that is being read or written by a GATT client.

? The GATT client is the device that is reading or writing data from or to the GATT server.

Application

The BLE protocol stack layers interact with applications and profiles as desired. Application interoperability in the Bluetooth system is accomplished by Bluetooth profiles.

??The profile defines the vertical interactions between the layers as well as the peer-to-peer interactions of specific layers between devices.

??A profile composed of one or more services to address particular use case. A service consists of characteristics or references to other services.

??Any profiles/applications run on top of GAP/GATT layers of BLE protocol stack. It handles device discovery and connection related services for the BLE device.

Luiz Augusto von Dentz

Linux Kernel Engineer & Linux Bluetooth Subsystem Maintainer

2 年

'An attribute is a generic name for any piece of data exposed by the server This piece of data is labelled and addressable An attribute is made up o a handle, type, a value and permissions.' This is not quite right, the access permissions handling is implementation specific in the server, at runtime, what is specified is the so called Characteristic Properties (see BLUETOOTH CORE SPECIFICATION Version 5.3 | Vol 3, Part G page 1486), so at the protocol level an attribute is just handle, type (UUID), value and in case of characteristic there is also a properties.

要查看或添加评论,请登录

Nikita Yadav的更多文章

  • BLE ARCHITECTURE (CONTROLLER)

    BLE ARCHITECTURE (CONTROLLER)

    THE BLE ARCHITECTURE Three main block of BLE architecture Application : The application uses the host software to build…

    2 条评论
  • BLUETOOTH INTRODUCTION

    BLUETOOTH INTRODUCTION

    What is bluetooth ? A short range wireless technology focused on low power and low-bandwidth applications Each…

  • Compilation and Optimization

    Compilation and Optimization

    What is Compilation ? The compilation is a process of converting the source code into object code it is needed because…

  • WiFi Interfaces

    WiFi Interfaces

    We know that in past few years transition from wired networks to wireless networks is very much evident and fast…

    2 条评论
  • Embedded Basics-1

    Embedded Basics-1

    Difference between API's and HAL Microcontrollers have reached a cost point and capability stand point that developers…

社区洞察

其他会员也浏览了