<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="https://devzone.nordicsemi.com/cfs-file/__key/system/syndication/rss.xsl" media="screen"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:wfw="http://wellformedweb.org/CommentAPI/" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>BLE Data Fragmentation and Layers</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/117156/ble-data-fragmentation-and-layers</link><description>Hi, I am trying to understand how BLE data is fragmented and how I can send large amounts of data over BLE. I have log files that I want to send from an nRF54L15 to a mobile app, let&amp;#39;s say these log files are 20 KB. My understanding is the normal largest</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Tue, 10 Dec 2024 10:25:00 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/117156/ble-data-fragmentation-and-layers" /><item><title>RE: BLE Data Fragmentation and Layers</title><link>https://devzone.nordicsemi.com/thread/514199?ContentTypeID=1</link><pubDate>Tue, 10 Dec 2024 10:25:00 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:896c2c8d-fd76-499b-8744-7a0f1cc5160d</guid><dc:creator>Torsten Robitzki</dc:creator><description>&lt;p&gt;Yes, if you want to send data, using GATT notify, you have to first, figure out, what the actual, negotiated MTU size is (could be less than 247, even when your peripheral supports that size, there is no guarantee, that you central supports that size too). After that, you could send out the log file in parts of MTU size -3 (one byte opcode and 16 bit ATT attribute handle). If you are sure, that there is no chance that notifications get lost on the receiving side, you probably need not much of a protocol (maybe log size at the beginning).&lt;/p&gt;
&lt;p&gt;For efficiency, you should make sure, that your peripherals link layer supports Data Length Updates. Otherwise, your large ATT PDUs will be fragmented into very much small LL SDUs.&lt;/p&gt;
&lt;p&gt;Alternatively, you could open a user L2CAP channel and send that file directly, using L2CAP, then you do not need any application support for the fragmentation. But make sure, that all centrals you need to support actually have an API to access the L2CAP protocol layer.&lt;/p&gt;
&lt;p&gt;If you really mean to send data through GAT (not GATT), then you are probably talking about sending data through advertisments.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>