<?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>Data bytes dropped in BLE packets</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/106091/data-bytes-dropped-in-ble-packets</link><description>I use an nRF52833 with nRF SDK 16.0.0. Softdevice is S140 (v7.0.1). 
 Max MTU size on my device is confured to 247. I have enabled Data Length Extension and set PDU payload length to 251 bytes which is getting negotiated to 251 for both rx and tx channels</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Mon, 27 Nov 2023 18:53:21 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/106091/data-bytes-dropped-in-ble-packets" /><item><title>RE: Data bytes dropped in BLE packets</title><link>https://devzone.nordicsemi.com/thread/457684?ContentTypeID=1</link><pubDate>Mon, 27 Nov 2023 18:53:21 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:84cfa90e-643a-4ef9-a716-7a3f1605d351</guid><dc:creator>Susheel Nuguru</dc:creator><description>&lt;p&gt;Hi Adarsh,&lt;/p&gt;
[quote user=""]When my nRF connects to a Mobile, the MTU size is getting negotiated to 185 bytes. Since I am trying to transmit a large block of data, I am splitting it into chunks of 244 bytes each. Now, when I try to Tx this 244-byte packet over BLE after 185 MTU negotiation, I am observing that only 185 bytes is being transmitted in each chunk and remaining 60 bytes are getting dropped. I am sending this message as a notification and calling&amp;nbsp;&lt;strong&gt;&lt;em&gt;sd_ble_gatts_hvx()&lt;/em&gt;&lt;/strong&gt; to send the message with param&amp;nbsp;&lt;strong&gt;&lt;em&gt;hvx_params.type = BLE_GATT_HVX_NOTIFICATION&lt;/em&gt;&lt;/strong&gt;. And&amp;nbsp;&lt;strong&gt;&lt;em&gt;sd_ble_gatts_hvx()&lt;/em&gt;&lt;/strong&gt;&lt;span&gt;&amp;nbsp;is returning 0 for every chunk.&lt;/span&gt;[/quote]
&lt;p&gt;There seems to be some logical error in the application in the memory buffer in which your data is allocated and send over hvx call.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Irrespective of the MTU size negotiated, all of your data should eventually reach the peer. If you data transmit size is bigger than the MTU size, then the data will be transmitted over many multiple connection events.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Can you show me some sniffer log that you are infact transmitting the whole data but receiving only part of it?&amp;nbsp;&lt;/p&gt;
&lt;p&gt;If air sniffer log confirms that full data is transmitted over multiple connection events, and at the receiving end you are seeing some data drop, then we need to dig a big deeper on how your receiver is handling the incoming data.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>