GAP (Generic Access Profile)
- 블루투스의 연결과 관련된 주요 부분을 다룬다
- Central, Peripheral, Observer, Broadcaster / Discovery, Connectivity / Security
GATT (Generic Attribute Profile)
- BLE에서, 블루투스를 통해 전달되는 데이터를 다룬다.
- BLE의 ATT(Attribute Protocol)를 기반으로 만들어준 Profile
* Bluetooth Classic은 데이터 전송과 관련하여 여러가지 profile을 사용
- SPP (Serial Port Profile): serial data 전송
- A2DP (Audio Distribution Profile): 소리 전송
- HFP ( Hands-Free Profile): facilitates voice calls via hands-free devices
-------------------------- ChatGPT --------------------------
The Generic Attribute Profile (GATT) is an integral part of the Bluetooth Low Energy (BLE) specification, working closely with the Generic Access Profile (GAP) but serving distinct roles and addressing different aspects of Bluetooth communication. Understanding the differences between GAP and GATT is crucial for developing Bluetooth applications, especially those that involve BLE technology. Here's a breakdown of their primary differences:
Purpose and Function
- GAP (Generic Access Profile): Establishes the basic requirements for discovering and connecting Bluetooth devices. It defines how devices can advertise themselves and initiate or accept connections. GAP is concerned with device roles (central, peripheral, observer, broadcaster), modes (discoverable, connectable), and procedures for security (pairing and bonding).
- GATT (Generic Attribute Profile): Builds on the connection framework established by GAP to define how data is structured, transferred, and stored between BLE devices. GATT is centered around the concept of Attributes structured into Services and Characteristics, which enable the detailed exchange of data and commands between devices.
Roles and Data Exchange
- GAP Roles: Defines roles like central (initiates connections) and peripheral (accepts connections) that are fundamental to establishing BLE communications.
- GATT Roles: In the context of GATT, the roles are server (stores data and provides it to the client upon request) and client (accesses data from the server). These roles are orthogonal to GAP roles; for instance, a peripheral device (GAP role) typically acts as a GATT Server.
Structure and Abstraction
- GAP Abstraction: GAP is about abstracting the device's capabilities in terms of visibility and connection to other Bluetooth devices. It deals with the broader aspects of the Bluetooth communication process.
- GATT Abstraction: GATT introduces a structured framework for data communication. It organizes data into hierarchies of Services, which are collections of related features of a device. Each Service contains Characteristics, which represent data points (like sensor readings) or control points (like commands to perform an action). Characteristics can have various properties (read, write, notify) and are accompanied by Descriptors that provide additional metadata or control for the characteristic.
Use Cases
- GAP Use Cases: Essential for all Bluetooth devices as it manages discovery and connections. It's the first step in any Bluetooth communication scenario.
- GATT Use Cases: Primarily used in BLE applications for IoT devices, health and fitness trackers, smart home devices, etc., where there's a need to exchange more complex data beyond simple device discovery and connection. GATT enables these devices to offer specific functionalities and services in a discoverable manner.
Conclusion
While GAP lays the groundwork for Bluetooth devices to discover each other and establish connections, GATT defines the structure and procedures for these devices to interact and exchange detailed data in a meaningful way. Both are crucial for the Bluetooth ecosystem, with GAP focusing on connection management and GATT facilitating rich data exchange and interaction between devices.
Correct, the Generic Attribute Profile (GATT) is specifically a part of Bluetooth Low Energy (BLE) technology and is not used in Bluetooth Classic. The distinction between BLE and Bluetooth Classic is significant, as they cater to different use cases and are optimized for different types of applications.
Bluetooth Low Energy (BLE) and GATT
- BLE (Bluetooth Low Energy), also known as Bluetooth Smart, was introduced to provide low-power wireless connectivity suitable for devices that need to operate for months or years on a tiny battery (like wearable health monitors, smart home devices, and sensors). BLE achieves this efficiency by simplifying the communication protocols and reducing power consumption.
- GATT operates over BLE's Attribute Protocol (ATT) and is essential for organizing data exchange in BLE. It structures data into services, characteristics, and descriptors, allowing for efficient, organized communication of data like sensor readings, control commands, and device status information. This structured approach is particularly well-suited to the low-power, low-bandwidth goals of BLE.
Bluetooth Classic and Its Profiles
- Bluetooth Classic is designed for continuous, streaming communication at higher data rates, such as audio streaming (e.g., wireless headphones and speakers) or serial port communications. It consumes more power compared to BLE and is thus less suited for devices with strict power consumption requirements.
- Instead of GATT, Bluetooth Classic uses a variety of specific profiles to handle different types of data and communication needs. For instance, the Serial Port Profile (SPP) enables serial data streams, the Advanced Audio Distribution Profile (A2DP) is used for audio streaming, and the Hands-Free Profile (HFP) facilitates voice calls via hands-free devices.
Conclusion
So, while BLE devices use GATT for managing data communication in an organized, efficient manner tailored to low-power devices, Bluetooth Classic does not use GATT. Instead, Bluetooth Classic relies on a set of different profiles designed for higher data throughput and continuous communication. This fundamental difference reflects the distinct purposes and design philosophies behind BLE and Bluetooth Classic.
'MCU > Bluetooth' 카테고리의 다른 글
Bluetooth: ESP32 - examples - gatts_table_create_demo (1) | 2024.07.12 |
---|---|
Bluetooth - HID: Little Endian, Big Endian (1) | 2024.05.01 |
Bluetooth: Protocol vs Profile (0) | 2024.04.14 |