<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Bluetooth LE Credit-Based Flow Control for L2CAP Connection-Oriented Channels in Wireless MCU</title>
    <link>https://community.nxp.com/t5/Wireless-MCU/Bluetooth-LE-Credit-Based-Flow-Control-for-L2CAP-Connection/m-p/437369#M608</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;SPAN style="font-size: 14.0pt;"&gt;&lt;STRONG&gt;The theory&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 14.0pt;"&gt;The L2CAP layer of the BLE Host Stack performs data multiplexing through the use of a &lt;EM&gt;Channel ID (CID)&lt;/EM&gt;, which is a 2-byte value contained by the L2CAP Basic Header, as seen in the general L2CAP packet format:&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 14.0pt;"&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="pastedImage_0.png"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/52418i93188262E58F2377/image-size/large?v=v2&amp;amp;px=999" role="button" title="pastedImage_0.png" alt="pastedImage_0.png" /&gt;&lt;/span&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 14.0pt;"&gt;Several CIDs are reserved. For instance, 0x0004 is used by the ATT, 0x0006 by the SMP, 0x0005 is the Signaling Channel. The 0x0040-0x007F range is assigned for the &lt;EM&gt;Connection-Oriented Channels&lt;/EM&gt;.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 14.0pt;"&gt;The &lt;EM&gt;LE Credit-Based Flow Control&lt;/EM&gt; is an L2CAP mode of operation for Connection-Oriented Channels in which an endpoint device has complete control over how many packets the peer device may send at any time through the use of &lt;EM&gt;credits&lt;/EM&gt;.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 14.0pt;"&gt;One credit represents the permission to send one LE-frame over the established channel. The receiving device gives a fixed number of credits to the sending device, so that the latter knows exactly how many LE-frames it may send. The attempt to send more frames than permitted results in the receiving device closing the channel.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 14.0pt;"&gt;An initial number of credits are given by each device to the peer when the connection is created. Subsequently, each device can give more credits as it deems necessary; if a device wants to send more data than it is allowed, there’s nothing it can do but wait until it receives more credits from the peer.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 14.0pt;"&gt;A Protocol Service Multiplexer must be associated with any credit-based connection. It is abbreviated as &lt;EM&gt;LE_PSM&lt;/EM&gt; and is a two-byte value identifying the protocol that uses the credit-based connection. The specification defined the ranges for allowed LE_PSMs; some are reserved by specific profiles (e.g. IPSP) and others may be dynamically used by custom application profiles.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 14.0pt;"&gt;&lt;STRONG&gt;The protocol&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 14.0pt;"&gt;An LE Credit-Based connection is created and managed on the L2CAP Signaling Channel, with the following commands and parameters.&lt;/SPAN&gt;&lt;/P&gt;&lt;UL style="list-style-type: disc;"&gt;&lt;LI&gt;&lt;SPAN style="font-size: 14.0pt;"&gt;&lt;STRONG&gt;LE Credit-Based Connection Request&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;SPAN style="font-size: 14.0pt;"&gt;, with the parameters:&lt;/SPAN&gt;&lt;UL style="list-style-type: circle;"&gt;&lt;LI&gt;&lt;SPAN style="font-size: 14.0pt;"&gt;LE_PSM&lt;/SPAN&gt;&lt;/LI&gt;&lt;LI&gt;&lt;SPAN style="font-size: 14.0pt;"&gt;Source Channel ID (SCID)&lt;/SPAN&gt;&lt;/LI&gt;&lt;LI&gt;&lt;SPAN style="font-size: 14.0pt;"&gt;Maximum Transmission Unit (MTU)&lt;/SPAN&gt;&lt;/LI&gt;&lt;LI&gt;&lt;SPAN style="font-size: 14.0pt;"&gt;Maximum Payload Size (MPS)&lt;/SPAN&gt;&lt;/LI&gt;&lt;LI&gt;&lt;SPAN style="font-size: 14.0pt;"&gt;Initial Credits&lt;/SPAN&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;/LI&gt;&lt;LI&gt;&lt;SPAN style="font-size: 14.0pt;"&gt;&lt;STRONG&gt;LE Credit-Based Connection Response&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;UL style="list-style-type: circle;"&gt;&lt;LI&gt;&lt;SPAN style="font-size: 14.0pt;"&gt;Destination CID (DCID)&lt;/SPAN&gt;&lt;/LI&gt;&lt;LI&gt;&lt;SPAN style="font-size: 14.0pt;"&gt;MTU&lt;/SPAN&gt;&lt;/LI&gt;&lt;LI&gt;&lt;SPAN style="font-size: 14.0pt;"&gt;MPS&lt;/SPAN&gt;&lt;/LI&gt;&lt;LI&gt;&lt;SPAN style="font-size: 14.0pt;"&gt;Initial Credits&lt;/SPAN&gt;&lt;/LI&gt;&lt;LI&gt;&lt;SPAN style="font-size: 14.0pt;"&gt;Result&lt;/SPAN&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;/LI&gt;&lt;LI&gt;&lt;SPAN style="font-size: 14.0pt;"&gt;&lt;STRONG&gt;LE Flow Control Credit&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;UL style="list-style-type: circle;"&gt;&lt;LI&gt;&lt;SPAN style="font-size: 14.0pt;"&gt;CID&lt;/SPAN&gt;&lt;/LI&gt;&lt;LI&gt;&lt;SPAN style="font-size: 14.0pt;"&gt;Credits&lt;/SPAN&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;SPAN style="font-size: 14.0pt;"&gt;The requesting device must specify the LE_PSM for which the connection is opened, the CID to which the responder will send data (SCID), the supported MTU and MPS and the initial number of credits given to the responder.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 14.0pt;"&gt;In turn, the responding device can reject the request (reason is found in the Result parameter) or can accept it (Result is 0) and also provide the CID where the requesting device can send data (DCID), initial credits for this CID and its own MTU and MPS.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 14.0pt;"&gt;The minimum values between the two devices’ MTU and MPS are used. MTU is the &lt;EM&gt;maximum transmission unit&lt;/EM&gt;, i.e. the maximum size of data (an SDU – Service Data Unit) to be transmitted. MPS is the &lt;EM&gt;maximum payload size&lt;/EM&gt;, i.e. the maximum size of a single L2CAP packet, which is an LE-frame and “eats” one credit when is transmitted.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 14.0pt;"&gt;At any moment, any of the two devices can send a Flow Control Credit command to increase the credits of the peer on the given CID.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 14.0pt;"&gt;&lt;STRONG&gt;The data packets - example&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 14.0pt;"&gt;Let’s assume device A sends an LE Credit-Based Connection Request with:&lt;/SPAN&gt;&lt;/P&gt;&lt;UL style="list-style-type: disc;"&gt;&lt;LI&gt;&lt;SPAN style="font-size: 14.0pt;"&gt;LE_PSM = 0x0080&lt;/SPAN&gt;&lt;/LI&gt;&lt;LI&gt;&lt;SPAN style="font-size: 14.0pt;"&gt;SCID = 0x004a&lt;/SPAN&gt;&lt;/LI&gt;&lt;LI&gt;&lt;SPAN style="font-size: 14.0pt;"&gt;MTU = 100 &lt;/SPAN&gt;&lt;/LI&gt;&lt;LI&gt;&lt;SPAN style="font-size: 14.0pt;"&gt;MPS = 40&lt;/SPAN&gt;&lt;/LI&gt;&lt;LI&gt;&lt;SPAN style="font-size: 14.0pt;"&gt;I.C. = 5&lt;/SPAN&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;SPAN style="font-size: 14.0pt;"&gt;Device B answers with an LE Credit-Based Connection Response:&lt;/SPAN&gt;&lt;/P&gt;&lt;UL style="list-style-type: disc;"&gt;&lt;LI&gt;&lt;SPAN style="font-size: 14.0pt;"&gt;DCID = 0x004b&lt;/SPAN&gt;&lt;/LI&gt;&lt;LI&gt;&lt;SPAN style="font-size: 14.0pt;"&gt;MTU =260&lt;/SPAN&gt;&lt;/LI&gt;&lt;LI&gt;&lt;SPAN style="font-size: 14.0pt;"&gt;MPS = 60&lt;/SPAN&gt;&lt;/LI&gt;&lt;LI&gt;&lt;SPAN style="font-size: 14.0pt;"&gt;I.C. = 10&lt;/SPAN&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;SPAN style="font-size: 14.0pt;"&gt;So &lt;SPAN style="text-decoration: underline;"&gt;MTU becomes 100&lt;/SPAN&gt; and &lt;SPAN style="text-decoration: underline;"&gt;MPS becomes 40&lt;/SPAN&gt;. This means that a device can send SDUs of maximum 100 bytes, but these 100 bytes will be fragmented to fit into LE-frames of maximum 40 bytes payload.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 14.0pt;"&gt;An LE-frame contains:&lt;/SPAN&gt;&lt;/P&gt;&lt;UL style="list-style-type: disc;"&gt;&lt;LI&gt;&lt;SPAN style="font-size: 14.0pt;"&gt;The basic L2CAP header: &lt;STRONG&gt;Length&lt;/STRONG&gt; (2 bytes) and &lt;STRONG&gt;CID&lt;/STRONG&gt; (2 bytes)&lt;/SPAN&gt;&lt;/LI&gt;&lt;LI&gt;&lt;SPAN style="font-size: 14.0pt;"&gt;&lt;STRONG&gt;Payload&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;SPAN style="font-size: 14.0pt;"&gt; (length maximum equal to MPS)&lt;/SPAN&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;SPAN style="font-size: 14.0pt;"&gt;When a large SDU is sent, the first LE-frame Payload starts with 2 bytes of SDU Length then follow the first &lt;STRONG&gt;MPS-2&lt;/STRONG&gt; bytes of SDU. Subsequent LE-frames each contain MPS bytes of SDU, while the last one may contain less than MPS bytes.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 14.0pt;"&gt;If device A from our example wants to send an &lt;STRONG&gt;SDU of 90 bytes&lt;/STRONG&gt;, it would need &lt;STRONG&gt;3 credits&lt;/STRONG&gt; because the 90 bytes can be split in 3 LE-frames:&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt; &lt;span class="lia-inline-image-display-wrapper" image-alt="pastedImage_1.png"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/52457i859739164F3A4FCA/image-size/large?v=v2&amp;amp;px=999" role="button" title="pastedImage_1.png" alt="pastedImage_1.png" /&gt;&lt;/span&gt;&lt;/EM&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 13 Aug 2015 08:26:00 GMT</pubDate>
    <dc:creator>bogdanalexandru</dc:creator>
    <dc:date>2015-08-13T08:26:00Z</dc:date>
    <item>
      <title>Bluetooth LE Credit-Based Flow Control for L2CAP Connection-Oriented Channels</title>
      <link>https://community.nxp.com/t5/Wireless-MCU/Bluetooth-LE-Credit-Based-Flow-Control-for-L2CAP-Connection/m-p/437369#M608</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;SPAN style="font-size: 14.0pt;"&gt;&lt;STRONG&gt;The theory&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 14.0pt;"&gt;The L2CAP layer of the BLE Host Stack performs data multiplexing through the use of a &lt;EM&gt;Channel ID (CID)&lt;/EM&gt;, which is a 2-byte value contained by the L2CAP Basic Header, as seen in the general L2CAP packet format:&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 14.0pt;"&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="pastedImage_0.png"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/52418i93188262E58F2377/image-size/large?v=v2&amp;amp;px=999" role="button" title="pastedImage_0.png" alt="pastedImage_0.png" /&gt;&lt;/span&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 14.0pt;"&gt;Several CIDs are reserved. For instance, 0x0004 is used by the ATT, 0x0006 by the SMP, 0x0005 is the Signaling Channel. The 0x0040-0x007F range is assigned for the &lt;EM&gt;Connection-Oriented Channels&lt;/EM&gt;.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 14.0pt;"&gt;The &lt;EM&gt;LE Credit-Based Flow Control&lt;/EM&gt; is an L2CAP mode of operation for Connection-Oriented Channels in which an endpoint device has complete control over how many packets the peer device may send at any time through the use of &lt;EM&gt;credits&lt;/EM&gt;.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 14.0pt;"&gt;One credit represents the permission to send one LE-frame over the established channel. The receiving device gives a fixed number of credits to the sending device, so that the latter knows exactly how many LE-frames it may send. The attempt to send more frames than permitted results in the receiving device closing the channel.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 14.0pt;"&gt;An initial number of credits are given by each device to the peer when the connection is created. Subsequently, each device can give more credits as it deems necessary; if a device wants to send more data than it is allowed, there’s nothing it can do but wait until it receives more credits from the peer.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 14.0pt;"&gt;A Protocol Service Multiplexer must be associated with any credit-based connection. It is abbreviated as &lt;EM&gt;LE_PSM&lt;/EM&gt; and is a two-byte value identifying the protocol that uses the credit-based connection. The specification defined the ranges for allowed LE_PSMs; some are reserved by specific profiles (e.g. IPSP) and others may be dynamically used by custom application profiles.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 14.0pt;"&gt;&lt;STRONG&gt;The protocol&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 14.0pt;"&gt;An LE Credit-Based connection is created and managed on the L2CAP Signaling Channel, with the following commands and parameters.&lt;/SPAN&gt;&lt;/P&gt;&lt;UL style="list-style-type: disc;"&gt;&lt;LI&gt;&lt;SPAN style="font-size: 14.0pt;"&gt;&lt;STRONG&gt;LE Credit-Based Connection Request&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;SPAN style="font-size: 14.0pt;"&gt;, with the parameters:&lt;/SPAN&gt;&lt;UL style="list-style-type: circle;"&gt;&lt;LI&gt;&lt;SPAN style="font-size: 14.0pt;"&gt;LE_PSM&lt;/SPAN&gt;&lt;/LI&gt;&lt;LI&gt;&lt;SPAN style="font-size: 14.0pt;"&gt;Source Channel ID (SCID)&lt;/SPAN&gt;&lt;/LI&gt;&lt;LI&gt;&lt;SPAN style="font-size: 14.0pt;"&gt;Maximum Transmission Unit (MTU)&lt;/SPAN&gt;&lt;/LI&gt;&lt;LI&gt;&lt;SPAN style="font-size: 14.0pt;"&gt;Maximum Payload Size (MPS)&lt;/SPAN&gt;&lt;/LI&gt;&lt;LI&gt;&lt;SPAN style="font-size: 14.0pt;"&gt;Initial Credits&lt;/SPAN&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;/LI&gt;&lt;LI&gt;&lt;SPAN style="font-size: 14.0pt;"&gt;&lt;STRONG&gt;LE Credit-Based Connection Response&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;UL style="list-style-type: circle;"&gt;&lt;LI&gt;&lt;SPAN style="font-size: 14.0pt;"&gt;Destination CID (DCID)&lt;/SPAN&gt;&lt;/LI&gt;&lt;LI&gt;&lt;SPAN style="font-size: 14.0pt;"&gt;MTU&lt;/SPAN&gt;&lt;/LI&gt;&lt;LI&gt;&lt;SPAN style="font-size: 14.0pt;"&gt;MPS&lt;/SPAN&gt;&lt;/LI&gt;&lt;LI&gt;&lt;SPAN style="font-size: 14.0pt;"&gt;Initial Credits&lt;/SPAN&gt;&lt;/LI&gt;&lt;LI&gt;&lt;SPAN style="font-size: 14.0pt;"&gt;Result&lt;/SPAN&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;/LI&gt;&lt;LI&gt;&lt;SPAN style="font-size: 14.0pt;"&gt;&lt;STRONG&gt;LE Flow Control Credit&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;UL style="list-style-type: circle;"&gt;&lt;LI&gt;&lt;SPAN style="font-size: 14.0pt;"&gt;CID&lt;/SPAN&gt;&lt;/LI&gt;&lt;LI&gt;&lt;SPAN style="font-size: 14.0pt;"&gt;Credits&lt;/SPAN&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;SPAN style="font-size: 14.0pt;"&gt;The requesting device must specify the LE_PSM for which the connection is opened, the CID to which the responder will send data (SCID), the supported MTU and MPS and the initial number of credits given to the responder.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 14.0pt;"&gt;In turn, the responding device can reject the request (reason is found in the Result parameter) or can accept it (Result is 0) and also provide the CID where the requesting device can send data (DCID), initial credits for this CID and its own MTU and MPS.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 14.0pt;"&gt;The minimum values between the two devices’ MTU and MPS are used. MTU is the &lt;EM&gt;maximum transmission unit&lt;/EM&gt;, i.e. the maximum size of data (an SDU – Service Data Unit) to be transmitted. MPS is the &lt;EM&gt;maximum payload size&lt;/EM&gt;, i.e. the maximum size of a single L2CAP packet, which is an LE-frame and “eats” one credit when is transmitted.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 14.0pt;"&gt;At any moment, any of the two devices can send a Flow Control Credit command to increase the credits of the peer on the given CID.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 14.0pt;"&gt;&lt;STRONG&gt;The data packets - example&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 14.0pt;"&gt;Let’s assume device A sends an LE Credit-Based Connection Request with:&lt;/SPAN&gt;&lt;/P&gt;&lt;UL style="list-style-type: disc;"&gt;&lt;LI&gt;&lt;SPAN style="font-size: 14.0pt;"&gt;LE_PSM = 0x0080&lt;/SPAN&gt;&lt;/LI&gt;&lt;LI&gt;&lt;SPAN style="font-size: 14.0pt;"&gt;SCID = 0x004a&lt;/SPAN&gt;&lt;/LI&gt;&lt;LI&gt;&lt;SPAN style="font-size: 14.0pt;"&gt;MTU = 100 &lt;/SPAN&gt;&lt;/LI&gt;&lt;LI&gt;&lt;SPAN style="font-size: 14.0pt;"&gt;MPS = 40&lt;/SPAN&gt;&lt;/LI&gt;&lt;LI&gt;&lt;SPAN style="font-size: 14.0pt;"&gt;I.C. = 5&lt;/SPAN&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;SPAN style="font-size: 14.0pt;"&gt;Device B answers with an LE Credit-Based Connection Response:&lt;/SPAN&gt;&lt;/P&gt;&lt;UL style="list-style-type: disc;"&gt;&lt;LI&gt;&lt;SPAN style="font-size: 14.0pt;"&gt;DCID = 0x004b&lt;/SPAN&gt;&lt;/LI&gt;&lt;LI&gt;&lt;SPAN style="font-size: 14.0pt;"&gt;MTU =260&lt;/SPAN&gt;&lt;/LI&gt;&lt;LI&gt;&lt;SPAN style="font-size: 14.0pt;"&gt;MPS = 60&lt;/SPAN&gt;&lt;/LI&gt;&lt;LI&gt;&lt;SPAN style="font-size: 14.0pt;"&gt;I.C. = 10&lt;/SPAN&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;SPAN style="font-size: 14.0pt;"&gt;So &lt;SPAN style="text-decoration: underline;"&gt;MTU becomes 100&lt;/SPAN&gt; and &lt;SPAN style="text-decoration: underline;"&gt;MPS becomes 40&lt;/SPAN&gt;. This means that a device can send SDUs of maximum 100 bytes, but these 100 bytes will be fragmented to fit into LE-frames of maximum 40 bytes payload.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 14.0pt;"&gt;An LE-frame contains:&lt;/SPAN&gt;&lt;/P&gt;&lt;UL style="list-style-type: disc;"&gt;&lt;LI&gt;&lt;SPAN style="font-size: 14.0pt;"&gt;The basic L2CAP header: &lt;STRONG&gt;Length&lt;/STRONG&gt; (2 bytes) and &lt;STRONG&gt;CID&lt;/STRONG&gt; (2 bytes)&lt;/SPAN&gt;&lt;/LI&gt;&lt;LI&gt;&lt;SPAN style="font-size: 14.0pt;"&gt;&lt;STRONG&gt;Payload&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;SPAN style="font-size: 14.0pt;"&gt; (length maximum equal to MPS)&lt;/SPAN&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;SPAN style="font-size: 14.0pt;"&gt;When a large SDU is sent, the first LE-frame Payload starts with 2 bytes of SDU Length then follow the first &lt;STRONG&gt;MPS-2&lt;/STRONG&gt; bytes of SDU. Subsequent LE-frames each contain MPS bytes of SDU, while the last one may contain less than MPS bytes.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 14.0pt;"&gt;If device A from our example wants to send an &lt;STRONG&gt;SDU of 90 bytes&lt;/STRONG&gt;, it would need &lt;STRONG&gt;3 credits&lt;/STRONG&gt; because the 90 bytes can be split in 3 LE-frames:&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt; &lt;span class="lia-inline-image-display-wrapper" image-alt="pastedImage_1.png"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/52457i859739164F3A4FCA/image-size/large?v=v2&amp;amp;px=999" role="button" title="pastedImage_1.png" alt="pastedImage_1.png" /&gt;&lt;/span&gt;&lt;/EM&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 13 Aug 2015 08:26:00 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Wireless-MCU/Bluetooth-LE-Credit-Based-Flow-Control-for-L2CAP-Connection/m-p/437369#M608</guid>
      <dc:creator>bogdanalexandru</dc:creator>
      <dc:date>2015-08-13T08:26:00Z</dc:date>
    </item>
    <item>
      <title>Re: Bluetooth LE Credit-Based Flow Control for L2CAP Connection-Oriented Channels</title>
      <link>https://community.nxp.com/t5/Wireless-MCU/Bluetooth-LE-Credit-Based-Flow-Control-for-L2CAP-Connection/m-p/1512091#M13588</link>
      <description>&lt;P&gt;Hi,&amp;nbsp;&lt;/P&gt;&lt;P&gt;Any application note is available to get more information on this topic ?&lt;/P&gt;&lt;P&gt;also, how the error handling is done ? for example if the there is no credit to device 1 and device 2 trying to send data to device 1.&lt;/P&gt;&lt;P&gt;also, what is the relation between L2CAP and SPP.&lt;/P&gt;&lt;P&gt;Thanks you.&lt;/P&gt;</description>
      <pubDate>Fri, 26 Aug 2022 05:26:59 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Wireless-MCU/Bluetooth-LE-Credit-Based-Flow-Control-for-L2CAP-Connection/m-p/1512091#M13588</guid>
      <dc:creator>AnupBalharpure</dc:creator>
      <dc:date>2022-08-26T05:26:59Z</dc:date>
    </item>
  </channel>
</rss>

