Expand description
Bluetooth L2CAP (Logical Link Control and Adaptation Protocol)
Implements the L2CAP layer for Bluetooth, providing connection-oriented and connectionless data transport between upper-layer protocols and the HCI/baseband layer. Supports segmentation and reassembly (SAR), MTU negotiation, and signaling command processing.
Reference: Bluetooth Core Specification v5.4, Volume 3, Part A (L2CAP)
Structs§
- L2cap
Channel - An L2CAP logical channel
- L2cap
Manager - L2CAP connection and channel manager
- L2cap
Pdu - L2CAP Protocol Data Unit
- SarFragment
- A single SAR fragment
- Signaling
Command - L2CAP signaling command (within the signaling channel)
Enums§
- Channel
State - L2CAP channel state
- Config
Result - L2CAP Configuration Response result codes
- Connection
Result - L2CAP Connection Response result codes
- Signaling
Code - L2CAP signaling command codes
Constants§
- CID_ATT
- L2CAP ATT fixed channel (CID 0x0004)
- CID_
CONNECTIONLESS - L2CAP Connectionless channel (CID 0x0002)
- CID_
DYNAMIC_ END - Last dynamically allocated CID
- CID_
DYNAMIC_ START - First dynamically allocated CID
- CID_
LE_ SIGNALING - L2CAP LE Signaling channel (CID 0x0005)
- CID_
SIGNALING - L2CAP Signaling channel (CID 0x0001)
- CID_SMP
- L2CAP SMP channel (CID 0x0006)
- L2CAP_
DEFAULT_ MTU - Default L2CAP MTU
- L2CAP_
HEADER_ SIZE - L2CAP header size (length + CID)
- L2CAP_
MAX_ PAYLOAD - Maximum L2CAP payload size (before segmentation)
- L2CAP_
MIN_ MTU - Minimum L2CAP MTU
- PSM_
AVCTP - AVCTP PSM (Audio/Video Control Transport Protocol)
- PSM_
AVDTP - AVDTP PSM (Audio/Video Distribution Transport Protocol)
- PSM_
BNEP - BNEP (Bluetooth Network Encapsulation Protocol) PSM
- PSM_
HID_ CONTROL - HID Control PSM
- PSM_
HID_ INTERRUPT - HID Interrupt PSM
- PSM_
RFCOMM - RFCOMM PSM
- PSM_SDP
- SDP PSM
Functions§
- reassemble_
fragments - Reassemble fragments into a complete L2CAP payload
- segment_
data - Segment data into MTU-sized L2CAP PDU fragments