The Wayback Machine - https://web.archive.org/web/20240827224210/https://www.geeksforgeeks.org/logical-link-control-and-adaptation-protocol-l2cap/
Open In App

Logical Link Control and Adaptation Protocol (L2CAP)

Last Updated : 16 Feb, 2023
Comments
Improve
Suggest changes
Like Article
Like
Save
Share
Report
News Follow

The Logical Link Control and Adaptation Protocol (L2CAP) is a layer in the Bluetooth stack that provides crucial services for communication between Bluetooth devices. L2CAP offers segmentation and reassembly services for large packets to be transmitted across Bluetooth links and also allows for the multiplexing of higher-layer protocols and services. 

Functions of  L2CAP Layer

  1. It accepts packets of up to 64 kB from upper layers and breaks them down into smaller frames for transmission. These frames are then reassembled into packets again at the receiving end.
  2. L2CAP manages the multiplexing and demultiplexing of multiple packet sources. Once a packet has been reassembled, the L2CAP layer determines which upper-layer protocol it should be passed to, such as RF communication or telephony.
  3. L2CAP also handles quality of service requirements, both during link establishment and normal operation. This includes negotiating maximum payload size to prevent large-packet devices from overwhelming small-packet devices. This is important because not all devices can handle the maximum packet size of 64 kB. The L2CAP layer corresponds with the 802 Data Link Layer which is typically responsible for transmission, framing, and error control over a particular link. As such, L2CAP overlaps the link controller task and the control end of the baseband, including error checking and correction.
Data Packet Frame

Data Packet Frame

 

In the L2CAP protocol, there are three specific fields that are used to transfer data:

  • The Length field is a 16-bit field that defines the size of the data, in bytes, coming from the upper layers.
  • The Channel ID (CID) field is a 16-bit field that serves as a unique identifier for the virtual channel created at this level.
  • The Data field is where the actual payload is placed. The maximum size of the data in this field is 65535 bytes.

The Logical Link Control and Adaptation Protocol (L2CAP) is responsible for taking data from the higher layers of the Bluetooth stack as well as from applications and sending it over to the lower layers of the stack. L2CAP does this by passing packets either to the Host Controller Interface (HCI) or, in a hostless system, directly to the Link Manager (LM). The position of L2CAP in the Bluetooth stack can be visualized with a diagram that shows the cases with and without an HCI. It is important to note that L2CAP only transfers data, not audio. This is because L2CAP works on the data link layer of the Bluetooth stack, which is responsible for managing the transmission of data packets and ensuring that they are properly organized and routed to their intended destination.

L2CAP's position in the Bluetooth protocol stack

L2CAP’s position in the Bluetooth protocol stack

The Logical Link Control and Adaptation Protocol (L2CAP) has a variety of functions that contribute to efficient communication between Bluetooth devices. Some of these functions include:

  1. Multiplexing between different higher-layer protocols, allows them to share lower-layer links. This allows multiple protocols to use the same link simultaneously, improving overall communication efficiency.
  2. Segmentation and reassembly allow for the transfer of larger packets than lower layers can support. L2CAP breaks these large packets into smaller segments and adds extra information to define the location of the segments in the original packet. The L2CAP segments the packet at the source and reassembles them at the destination.
  3. Group management, which allows for one-way transmission to a group of other Bluetooth devices. This allows for efficient communication between multiple devices simultaneously.
  4. Quality of service management for higher protocols ensures that the communication between devices meets the required quality standards.

To ensure reliable end-to-end data transfer, L2CAP relies on ACL connections. A separate control function must set up these connections when they are required by L2CAP and close them down when they are no longer needed. L2CAP also relies on the quality of service provided by these ACL connections to meet the quality of service negotiated with higher layers. These functions work together to ensure that communication between Bluetooth devices is efficient, reliable, and meets the necessary quality standards.



Similar Reads

Cisco Discovery Protocol (CDP) and Link Layer Discovery Protocol (LLDP) in Data Link Layer
Layer 2 or the Datalink layer provides physical addressing and access to media. It defines how data is to be formatted for transmission and how access to the network is to be controlled. It also provides error detection, ensuring data on higher layers is formatted correctly for transmission. Cisco Discovery Protocol (CDP) and Link Layer Discovery P
2 min read
Logical Link Control (LLC) Protocol Data Unit
Logical Link Control (LLC) is a sublayer that generally provides the logic for the data link as it controls the synchronization, multiplexing, flow control, and even error-checking functions of DLL (Data Link Layer). DLL is divided into two sublayers i.e. LLC sublayer and MAC (Medium Access Control) sublayer. The basic model of LLC protocols is mod
3 min read
Difference Between High-level Data Link Control (HDLC) and Point-to-Point Protocol (PPP)
The main difference between High-level Data Link Control (HDLC) and Point-to-Point Protocol (PPP) is that High-level Data Link Control is the bit-oriented protocol, on the other hand, Point-to-Point Protocol is the byte-oriented protocol. Another difference between HDLC and PPP is that HDLC is implemented by Point-to-point configuration and also mu
3 min read
Link Aggregation Control Protocol
In the process of networking, wired and wireless both are useful methods. However, wired methods are proven more effective than wireless. But while networking, it’s troublesome to manage many wires at once. To solve this problem, link aggregation plays a vital role. since it’s known to carry multiple ports collectively as a single channel. In other
7 min read
IPv6 and DNSSEC: Their Slow adaptation
In this article, we will discuss the overview of IPv6 and DNSSEC and will discuss the reason in detail with all these benefits why is IPv6 deployment is slow. Let's discuss it one by one. Pre-requisite -Internet Protocol version6 And IPv4 vs IPv6 Overview :Internet isn't as simple as it looks, It's a merger of many protocol stacks. Many of these ha
4 min read
Difference between Stop and Wait protocol and Sliding Window protocol
Both the Stop and Wait protocol and the Sliding Window protocol are the techniques to the solution of flow control handling. The main difference between the Stop-and-wait protocol and the Sliding window protocol is that in the Stop-and-Wait Protocol, the sender sends one frame and waits for acknowledgment from the receiver whereas in the sliding wi
5 min read
Hot Standby Router Protocol (HSRP) and Virtual Router Redundancy Protocol (VRRP)
Hot Standby Router Protocol (HSRP) is a CISCO proprietary protocol used to provide redundancy in a network. Only one router is the active router while others will be in standby state i.e the standby router will be responsible for forwarding the traffic when the active router fails. Virtual Router Redundancy Protocol (VRRP) is an open standard proto
3 min read
Difference between File Transfer Protocol (FTP) and Secure File Transfer Protocol (SFTP)
FTP (File Transfer Protocol) It is a protocol that is used to transfer or copy the file from one host to another host. But there may be some problems like different file names and different file directories while sending and receiving a files in different hosts or systems. And in FTP, a secure channel is not provided to transfer the files between t
3 min read
Difference between Serial Line Internet Protocol (SLIP) and Point-to-Point Protocol (PPP)
The main difference between the Serial Line Internet Protocol (SLIP) and Point-to-Point Protocol (PPP) is that Serial Line Internet Protocol is the Predecessor protocol of Point-to-Point Protocol. On the other hand, Point-to-Point Protocol is the Successor protocol of Serial Line Internet Protocol. Features of SLIP: Simple: SLIP is a simple protoco
4 min read
Difference between Border Gateway Protocol (BGP) and Routing Information Protocol (RIP)
1. Border Gateway Protocol (BGP): In BGP, Transmission Control Protocol is used. It is a type of mesh topology or design. It works by two independent networks (Autonomous Systems or AS) exchanging routing information. The two routers agree to exchange information about how to reach certain IP-ranges. BGP uses Transmission Control Protocol (TCP) por
2 min read
Difference between Spanning Tree Protocol (STP) and Rapid Spanning Tree Protocol (RSTP)
1. Spanning Tree Protocol (STP) : STP is also known as spanning tree protocol is a layer 2 (Data link layer) protocol, it runs on switches and bridges. The IEEE standard of STP is 802.1D. STP is a feature used to prevent loops when using redundant switches. For example, we have three switches they are all linked together and without STP a loop coul
4 min read
Optimized Link State Routing Protocol
OLSR stands for Optimized Link State Routing Protocol. In this, each node periodically floods status of its links. Each node re-broadcasts link state information received from its neighbors. Each node keeps track of link state information received from other nodes. Each node uses above information to determine next hope to each destination. It is p
6 min read
Link Access Protocol D-channel (LAPD)
LAPD or Link Access Protocol on D channel is basically Layer 2 protocol usually required on ISDN D channel. It is being derived from Link Access Protocol Balanced (LAPB) protocol. It was specially designed and developed to simply satisfy the signaling requirements of ISDN basic access. The main objective of LAPD is simply to provide a secure, error
3 min read
Link Layer Discovery Protocol (LLDP)
LLDP stands for Link Layer Discovery Protocol. It is an open IEEE-standard (802.1AB) Layer 2 protocol. LLDP is the open-source alternative for CDP (Cisco Discovery Protocol) which is also a device discovery protocol that runs over Layer 2 (the data link layer) only on Cisco-manufactured devices (routers, bridges, access servers, and switches). LLDP
6 min read
What is DCCP (Datagram Congestion Control Protocol)?
Congestion in a network means deterioration of network or services which are caused due to overloading of network nodes, basically, this problem is primarily associated with large networks, in which a large amount of data and information is being transmitted. Congestion can be caused by several reasons: either the routers which are being used are n
6 min read
Network Control Protocol (NCP)
ARPANET included several protocols on the internet and NCP was one of them. NCP was a unidirectional or simplex protocol between two computers or devices. It provided user access and flow control to use computers and devices at remote locations and to transmit files between them. The NCP also allows protocols other than IP to use the serial link at
3 min read
Real-time Transport Control Protocol (RTCP)
Real-time Transport Protocol (RTP) allows only that type of message, which carries data from the source to the destination. But in some cases, we need some other type of messages in a session. The messages that can control the transmission and quality of data as well as also allow the recipients so that they can send feedback to the source or sourc
3 min read
Bandwidth Allocation Control Protocol (BACP)
Bandwidth Allocation Control Protocol (BACP) generally allows the negotiation with another party of the data call to simply request additional calls to be made to improve and increase the efficiency of the data throughput. BACP basically provides dynamic control mechanism over how the Point-to-Point Protocol (PPP) Multilink Protocol should function
3 min read
Media Gateway Control Protocol (MGCP)
MGCP stands for Media Gateway Control Protocol. It is a protocol that is extensively used for signalling and controlling communications protocols applied in VoIP telecommunication systems. MGCP is next in line to Simple Gateway Control Protocol. MGCP reflects the architecture in which the endpoints are less capable devices that only executes comman
2 min read
Types of ICMP (Internet Control Message Protocol) Messages
Pre-Requisite: Internet Control Message Protocol (ICMP) Internet Control Message Protocol is a protocol used for error handling and debugging in the network layer. It is mainly used in network devices such as routers for sending errors and operations. The main work of the Internet Control Message Protocol is of reporting errors, between any two dev
4 min read
When Transmission Control Protocol (TCP) most appropriate?
TCP(Transmission Control Protocol) is a protocol of the Transport layer. TCP is a connection-oriented, reliable, and secured protocol. To provide reliable service TCP implements Error control, Congestion control, Flow control. Services provide by TCP : The process to process communication -It is achieved using the port number.Stream Delivery Servic
2 min read
Stream Control Transmission Protocol (SCTP)
Stream Control Transmission Protocol (SCTP) is a network protocol that is connection-oriented and used for transmitting multiple streams of data simultaneously between any two endpoints that have established a connection in a computer network. SCTP is a transport layer of Internet Protocol (IP). SCTP support telephone connection over the internet.H
8 min read
What is TCP (Transmission Control Protocol)?
TCP (Transmission Control Protocol) is one of the main protocols of the TCP/IP suite. It lies between the Application and Network Layers which are used in providing reliable delivery services. Transmission Control Protocol (TCP) ensures reliable and efficient data transmission over the internet. TCP plays a crucial role in managing the flow of data
6 min read
Internet Control Message Protocol (ICMP)
Internet Control Message Protocol is known as ICMP. The protocol is at the network layer. It is mostly utilized on network equipment like routers and is utilized for error handling at the network layer. Since there are various kinds of network layer faults, ICMP can be utilized to report and troubleshoot these errors. Since IP does not have an inbu
10 min read
Why Flow Control is Used in Both Data Link Layer and Network Layer?
OSI model was established in1947 by international standard organization is a multinational body dedicated to worldwide agreement on international standards.ISO standard covers all the aspects of network communications is the Open System Interconnection model.It was introduced in the late 1070s. an open system is a set of protocols that allows any t
6 min read
Difference between Flow Control and Congestion Control
Flow Control and Congestion Control are traffic controlling methods for different situations. The main difference between flow control and congestion control is that, In flow control, rate of traffic received from a sender can be controlled by a receiver. On the other hand, In congestion control, rate of traffic from sender to the network is contro
4 min read
Difference between Control Structure and Control Statement
1. Control Structure :Control Structure, as name suggests, is basically a set of statements and control statements that are controlling their execution. 2. Control Statement :Control Statement, as name suggests, is basically a statement that is used to determine control flow of set of statements. It makes decision on basis of condition provided by
2 min read
Difference Between Flow Control and Error Control
In data transmission, the general aspect of maintaining effective and accurate transfer of data between gadgets is very important. This is where the flow control and the error control mechanisms will be of help. Flow control regulates the amount of data being transmitted from the sender to the receiver so that it does not overpower the receiver, wh
5 min read
Synchronous Data Link Control (SDLC) Loop Operation
Loop configuration is basically a communication link that is used to transmit data or information from one link station to another link station conferring the entire loop. At transmit port of the primary station, link connection gets initiated, connects one or more than one secondary station in a serial fashion, and after then ends back at the rece
3 min read
Flow Control in Data Link Layer
Flow control is design issue at Data Link Layer. It is a technique that generally observes the proper flow of data from sender to receiver. It is very essential because it is possible for sender to transmit data or information at very fast rate and hence receiver can receive this information and process it. This can happen only if receiver has very
4 min read