<?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>Empty connection intervals after sending/receiving a complete packet</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/114017/empty-connection-intervals-after-sending-receiving-a-complete-packet</link><description>Hi guys, 
 i show you an image here where I am sending from my board a text file ( about 75KB ) to nordic toolbox via nus, I use notify to send ( but I have similar situation when receiving from nrf toolbox). 
 Basically I see some empty connection interval</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Wed, 21 Aug 2024 07:25:16 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/114017/empty-connection-intervals-after-sending-receiving-a-complete-packet" /><item><title>RE: Empty connection intervals after sending/receiving a complete packet</title><link>https://devzone.nordicsemi.com/thread/499151?ContentTypeID=1</link><pubDate>Wed, 21 Aug 2024 07:25:16 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:5d5a1df7-eeb8-46d0-b175-b2fb194a5034</guid><dc:creator>marklander</dc:creator><description>&lt;p&gt;Thanks for this info &lt;a href="https://devzone.nordicsemi.com/members/eith"&gt;Einar Thorsrud&lt;/a&gt; ! So I can leave to 1 indeed I am using &lt;strong&gt;write_without_response&lt;/strong&gt; to send from GATT client and notify from server to client.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Empty connection intervals after sending/receiving a complete packet</title><link>https://devzone.nordicsemi.com/thread/499148?ContentTypeID=1</link><pubDate>Wed, 21 Aug 2024 07:02:17 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:6348c91e-cadb-4a64-8d98-5a5635c2a635</guid><dc:creator>Einar Thorsrud</dc:creator><description>&lt;p&gt;No, and in any case this is only relevant when sending notifications (so when you are sending from the GATT client to the GATT server). The hvn queue on the nRF is not relevant when the peer is sending write commands.&amp;nbsp;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Empty connection intervals after sending/receiving a complete packet</title><link>https://devzone.nordicsemi.com/thread/499117?ContentTypeID=1</link><pubDate>Tue, 20 Aug 2024 19:05:59 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:f900fed1-d86b-4376-bce6-55b3285615e1</guid><dc:creator>marklander</dc:creator><description>&lt;p&gt;Thanks...so that&amp;#39;s not a so improving tweak let me say...&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Empty connection intervals after sending/receiving a complete packet</title><link>https://devzone.nordicsemi.com/thread/499060?ContentTypeID=1</link><pubDate>Tue, 20 Aug 2024 12:56:30 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:62ea6b1c-ac92-4091-b444-54875d881d54</guid><dc:creator>Einar Thorsrud</dc:creator><description>&lt;p&gt;Regarding&amp;nbsp;hvn_tx_queue_size that is a bit complicated. The&amp;nbsp;hvn_tx_queue_size can be used to configure the size of the dedicated HVN queue. However, internally ther eis also a shared link layer queue, and that is used first. So the&amp;nbsp;hvn_tx_queue_size will be the minimum amount of packets that can be queued, but the maximum (and typical) will be higher.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Empty connection intervals after sending/receiving a complete packet</title><link>https://devzone.nordicsemi.com/thread/499056?ContentTypeID=1</link><pubDate>Tue, 20 Aug 2024 12:41:05 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:1bb5c63d-ce31-4715-b2c3-1da2020a8fc8</guid><dc:creator>marklander</dc:creator><description>&lt;p&gt;Right &lt;a href="https://devzone.nordicsemi.com/members/eith"&gt;Einar Thorsrud&lt;/a&gt; , last part with no ACK is due to the crash 100% Yes in that log tx is good and I have peaks of data rate of 20KB/s which is not bad.&lt;/p&gt;
&lt;p&gt;May I ask you a&amp;nbsp; confirmation about this below... it&amp;#39;s related to the other direction of the flow. From my embedded app to nrf toolbox.&lt;/p&gt;
[quote userid="134529" url="~/f/nordic-q-a/114017/empty-connection-intervals-after-sending-receiving-a-complete-packet/499046"]From my side of embedded board, can you confirm me that this variable &lt;strong&gt;hvv_tx_queue_size &lt;/strong&gt;is the one related to the max number of packet I can bufferize on my side before getting no resources available?[/quote]
&lt;p&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Empty connection intervals after sending/receiving a complete packet</title><link>https://devzone.nordicsemi.com/thread/499050?ContentTypeID=1</link><pubDate>Tue, 20 Aug 2024 12:30:16 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:a066f434-a4d5-4745-9099-53a443f987a9</guid><dc:creator>Einar Thorsrud</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;The empty packets here are acknowledgments. So tings seem quite optimal here? (I see retransmissions in the end of the trace which I assume is due to the crash you describe, but nothign in the trace before that which indicate an issue)&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Empty connection intervals after sending/receiving a complete packet</title><link>https://devzone.nordicsemi.com/thread/499046?ContentTypeID=1</link><pubDate>Tue, 20 Aug 2024 12:21:16 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:046a752c-3703-4474-9fb6-daea792736ef</guid><dc:creator>marklander</dc:creator><description>&lt;p&gt;Uh sorry, could be my fault:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;4048.sniffer&lt;/strong&gt; file indeed have master sending data (Nrf Toolbox).&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;empty_intervals&lt;/strong&gt; file has slave sending and probably there is indeed some improvement to do, I have the opposite path, an UART sending data to ble and I know I am running in NO_RESOURCES error many times, probably need to better manage it.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Around same topic I can show you another log from my wife POCO x3 phone where you can see event 2642 here below:&lt;/p&gt;
&lt;p&gt;&lt;img style="max-height:240px;max-width:320px;" alt=" " src="https://devzone.nordicsemi.com/resized-image/__size/640x480/__key/communityserver-discussions-components-files/4/Istantanea_5F00_2024_2D00_08_2D00_20_5F00_13_2D00_58_2D00_04.jpg" /&gt;&lt;/p&gt;
&lt;p&gt;Lot of packet in the same event, this made me crash for low buffering I suppose, still sending from NRF toolbox...many many different behaviours, below the log of image, you will&amp;nbsp; see lot of tx before event 2642, that is sending a lot of tx inside.&lt;/p&gt;
&lt;p&gt;&lt;a href="https://devzone.nordicsemi.com/cfs-file/__key/communityserver-discussions-components-files/4/poco_2D00_crash.pcapng"&gt;devzone.nordicsemi.com/.../poco_2D00_crash.pcapng&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;From my side of embedded board, can you confirm me that this variable &lt;strong&gt;hvv_tx_queue_size &lt;/strong&gt;is the one related to the max number of packet I can bufferize on my side before getting no resources available?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Empty connection intervals after sending/receiving a complete packet</title><link>https://devzone.nordicsemi.com/thread/499027?ContentTypeID=1</link><pubDate>Tue, 20 Aug 2024 11:50:47 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:16059e4b-557d-40c6-9122-d385e40756e3</guid><dc:creator>Einar Thorsrud</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
[quote user="marklander"]&lt;p&gt;Let me know I misunderstood something in your answer, but I think that kind of fragmentation is related to mobile app imo.&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;[/quote]
&lt;p&gt;You are right, I was reading it too quickly and assumed the nRF was senidng notifications (though the sniffer trace shows it is the central sending write commands). On the mobile app side there is nothing you can do (that is not available in source). Also, the bluetooth stack in both iOS and Android will have to prioritize traffic and also&amp;nbsp;schedule&amp;nbsp;other 2.4 GHz activity like Wi-Fi, and there is power optimization considerations that are enforced by the OS.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Empty connection intervals after sending/receiving a complete packet</title><link>https://devzone.nordicsemi.com/thread/499018?ContentTypeID=1</link><pubDate>Tue, 20 Aug 2024 11:13:40 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:019835ae-f616-4c2f-b2a2-a15c46444bcc</guid><dc:creator>marklander</dc:creator><description>&lt;p&gt;Hi &lt;a href="https://devzone.nordicsemi.com/members/eith"&gt;Einar Thorsrud&lt;/a&gt; ,&lt;/p&gt;
&lt;p&gt;first of all thanks for your kind answer. Regards your doubts I can agree, but... what you&amp;#39;re lookin at is the flow from mobile app (nrf connect) to my embedded app, so I have not any kind of control on how data is sent from NrfConnect.&lt;/p&gt;
&lt;p&gt;As I pointed out in another &lt;a href="https://devzone.nordicsemi.com/f/nordic-q-a/113980/send-a-file-to-device-from-nrf-toolbox-or-similar-mobile-app"&gt;post&lt;/a&gt; I am trying to send a file ( about 80KB/s ) from a macro button of the app. I don&amp;#39;t know if it&amp;#39;s a good way to do that, but It seems to that there are no other tools with a send file option.&lt;/p&gt;
&lt;p&gt;From my side i am using rust for the embedded application.&lt;/p&gt;
&lt;p&gt;Let me know I misunderstood something in your answer, but I think that kind of fragmentation is related to mobile app imo.&lt;/p&gt;
&lt;p&gt;Thanks!&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Empty connection intervals after sending/receiving a complete packet</title><link>https://devzone.nordicsemi.com/thread/498992?ContentTypeID=1</link><pubDate>Tue, 20 Aug 2024 09:27:10 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:ded1875f-d3a7-42d5-9b7f-cbf4d0282317</guid><dc:creator>Einar Thorsrud</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;As you have multiple empty packets here and also the more data field is not set to false this indicate to me that you are not providing data fast enough to the stack. Can you share more details about your implementation? Generally, for maximum thoughput you should push data with&amp;nbsp;sd_ble_gatts_hvx() until you get an error&amp;nbsp;(NRF_ERROR_RESOURCES). And then wait for&amp;nbsp;BLE_GATTS_EVT_HVN_TX_COMPLETE and continue calling&amp;nbsp;sd_ble_gatts_hvx() until you get an error, and so on. That way, you can ensure that the BLE stack always have data to send.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Empty connection intervals after sending/receiving a complete packet</title><link>https://devzone.nordicsemi.com/thread/498829?ContentTypeID=1</link><pubDate>Mon, 19 Aug 2024 12:17:37 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:576112ed-949f-4b2b-ba85-9b9f1e8ffd46</guid><dc:creator>marklander</dc:creator><description>&lt;p&gt;Ok some details more:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;I am using a 100KB text file copied inside a macro in nrf toolbox to send an I am using &lt;strong&gt;write_without_response &lt;/strong&gt;to send from master ( android device ) to slave ( my embedded board ) and &lt;strong&gt;notify&lt;/strong&gt; in the other direction.&lt;/li&gt;
&lt;li&gt;Due to my small microcontroller i am on s112 which not have the possibility to use &lt;strong&gt;DLE&lt;/strong&gt;, but i tried also with that and I cannot see a big improvement. I can try again with s113 anyway which supports &lt;strong&gt;DLE.&lt;/strong&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;strong&gt;&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;I was reading something similar here...&lt;a href="https://devzone.nordicsemi.com/f/nordic-q-a/71477/connection-interval-being-skipped-on-android"&gt;post&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;Thanks for your support&amp;nbsp;&lt;a href="https://devzone.nordicsemi.com/members/eith"&gt;Einar Thorsrud&lt;/a&gt;&amp;nbsp;and if I can send some more infos to get more data rate tell me if you need some logs...now I am still around a rough 9 to 11 KB/s&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Did another round activating DLE with S113:&lt;/p&gt;
&lt;p&gt;&lt;img style="max-height:240px;max-width:320px;" alt=" " src="https://devzone.nordicsemi.com/resized-image/__size/640x480/__key/communityserver-discussions-components-files/4/Istantanea_5F00_2024_2D00_08_2D00_19_5F00_15_2D00_09_2D00_47.jpg" /&gt;&lt;/p&gt;
&lt;p&gt;Also in the pic above you can see that some connection intervals are empty. Sniffer log below.&lt;a href="https://devzone.nordicsemi.com/cfs-file/__key/communityserver-discussions-components-files/4/4048.sniffer.pcapng"&gt;devzone.nordicsemi.com/.../4048.sniffer.pcapng&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;Here parameters of connection:&lt;/p&gt;
&lt;p&gt;&lt;img style="max-height:240px;max-width:320px;" alt=" " src="https://devzone.nordicsemi.com/resized-image/__size/640x480/__key/communityserver-discussions-components-files/4/Istantanea_5F00_2024_2D00_08_2D00_19_5F00_15_2D00_15_2D00_31.jpg" /&gt;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;And DLE req:&lt;/p&gt;
&lt;p&gt;&lt;img style="max-height:240px;max-width:320px;" alt=" " src="https://devzone.nordicsemi.com/resized-image/__size/640x480/__key/communityserver-discussions-components-files/4/Istantanea_5F00_2024_2D00_08_2D00_19_5F00_15_2D00_16_2D00_34.jpg" /&gt;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Res:&lt;/p&gt;
&lt;p&gt;&lt;img style="max-height:240px;max-width:320px;" alt=" " src="https://devzone.nordicsemi.com/resized-image/__size/640x480/__key/communityserver-discussions-components-files/4/Istantanea_5F00_2024_2D00_08_2D00_19_5F00_15_2D00_17_2D00_18.jpg" /&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Empty connection intervals after sending/receiving a complete packet</title><link>https://devzone.nordicsemi.com/thread/498825?ContentTypeID=1</link><pubDate>Mon, 19 Aug 2024 12:10:50 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:24de9c2e-18e3-4b91-9e8c-66be3e31eda7</guid><dc:creator>Einar Thorsrud</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;If the stack has data to send, I would not expect empty packets. How are you&amp;nbsp;pushing the data in your implementation?&lt;/p&gt;
&lt;p&gt;Also, if you want a higher throughput I would consider using data length extension so that you can send longer packets also at the GAP layer and avoid fragmentation.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>