L2CAP
Logical Link Control and Adaptation Protocol -- multiplexes data channels and handles segmentation/reassembly for BLE.
L2CAP (Logical Link Control and Adaptation Protocol)
L2CAP is a core protocol in the BLE stack that sits between the Link Layer (controller) and the higher-level protocols (ATT, SMP). It provides logical channel multiplexing, segmentation and reassembly (SAR) of large payloads, and flow control for data exchange.
Role in the BLE Stack
In the BLE protocol hierarchy, L2CAP receives data from ATT, SMP, or application-specific protocols and segments it into Link Layer PDUs for transmission. On the receiving side, it reassembles fragments back into complete PDUs and routes them to the correct higher-layer protocol based on Channel Identifier (CID).
Three fixed CIDs are defined for BLE: - CID 0x0004: ATT bearer (all GATT traffic) - CID 0x0005: LE Signaling Channel (parameter updates, connection management) - CID 0x0006: SMP (security key exchange)
Connection-Oriented Channels
Beyond fixed CIDs, L2CAP supports dynamic Connection-Oriented Channels (CoC) using credit-based flow control. These channels enable IP-over-BLE, bulk data transfer, and other protocols that need a stream-oriented transport. Applications like firmware updates (OTA) often use L2CAP CoC for higher throughput than GATT write operations.
Segmentation and MTU
L2CAP handles the translation between the application-level MTU (up to 512 bytes for ATT) and the Link Layer PDU size (up to 251 bytes with DLE). When an ATT payload exceeds the Link Layer PDU capacity, L2CAP segments it into multiple fragments, each transmitted in a separate Connection Event.
ECBFC for EATT
Bluetooth 5.2 introduced Enhanced Credit Based Flow Control (ECBFC), which enables EATT -- multiple parallel ATT bearers over dynamically allocated L2CAP channels. ECBFC provides per-channel flow control with credit tracking, preventing head-of-line blocking that plagued the single-bearer ATT model.
Implementation
L2CAP is implemented within the BLE host stack and is generally transparent to application developers. However, understanding L2CAP is important when analyzing HCI traces to debug connection issues, MTU negotiation failures, or data throughput bottlenecks.
Related Terms
Related Content
BLE vs Bluetooth Classic: Key Differences Explained
Getting Started…model with GATT for structured data exchange via L2CAP . Dual-mode chips implement both stacks on the same radio,…
Web Bluetooth API: BLE from the Browser
Development…— browser can only act as a GATT client No raw HCI or L2CAP access iOS Safari exclusion affects a large mobile segment…
GATT UUID & Descriptors (0x2902) Explained — BLE
Protocols & Profiles…in Bluetooth 5.3, multiplexes multiple ATT bearers over L2CAP enhanced credit-based channels. Classic ATT permits only…
자주 묻는 질문
Our glossary covers 90+ BLE technical terms organized by category. Each term includes a definition, related terms, and links to relevant chips and guides.