L2CAP

<\/script>\n
'; }, get iframeSnippet() { const domain = '{ SITE_DOMAIN }'; const type = '{ embed_type }'; const slug = '{ embed_slug }'; return ''; }, get activeSnippet() { return this.method === 'script' ? this.scriptSnippet : this.iframeSnippet; }, copySnippet() { navigator.clipboard.writeText(this.activeSnippet).then(() => { this.copied = true; setTimeout(() => { this.copied = false; }, 2000); }); } }" @keydown.escape.window="open = false" @click.outside="open = false">

Embed This Widget

Theme


      
    

Widget powered by . Free, no account required.

Logical Link Control and Adaptation Protocol -- multiplexes data channels and handles segmentation/reassembly for BLE.

다른 명칭: 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

ATT

자주 묻는 질문

Our glossary covers 90+ BLE technical terms organized by category. Each term includes a definition, related terms, and links to relevant chips and guides.