<?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>I want to reduce the data rate of nrf52840</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/70254/i-want-to-reduce-the-data-rate-of-nrf52840</link><description>I have developed data loggers based on nrf52840,it uses nus service,max payload is of 240 bytes,the device stores 30kb data in a spi memory.we have a custom built android app which downloads the data from the device.while transfering the data to the mobile</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Fri, 08 Jan 2021 12:56:39 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/70254/i-want-to-reduce-the-data-rate-of-nrf52840" /><item><title>RE: I want to reduce the data rate of nrf52840</title><link>https://devzone.nordicsemi.com/thread/288178?ContentTypeID=1</link><pubDate>Fri, 08 Jan 2021 12:56:39 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:538a8cf6-d5df-4882-99d2-140f68e02cea</guid><dc:creator>Susheel Nuguru</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
[quote user=""]our main problem is when the device transfers the data to the relay some packets are lost while tranfering to the gateway i.e we get a response of NRF_ERROR_RESOURCES[/quote]
&lt;p&gt;Getting the error NRF_ERROR_RESOURCES does not mean that your packets are lost, it means that the TX buffers are filled up and no free TX buffers are available which based on your next statements seems like you know already.&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
[quote user=""]i have tried increasing the queue size i.e&amp;nbsp;ble_cfg.conn_cfg.params.gatts_conn_cfg.hvn_tx_queue_size =20;&amp;nbsp; but it dosent help much[/quote]
&lt;p&gt;&amp;nbsp;Just changing the queue size does not help much if you have a smaller&amp;nbsp;&lt;span&gt;gap_event_length. You need to increase the gap_event_length so that more packets can fit in one connection interval.&amp;nbsp;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;This is a tedious game of fine tuning the connection_interval/even_length/queue_size/ application memory buffers to give you best performance. And we cannot give any given values as these values differ completely for every application. Try changing the event_length a bit more so that it fits more packets (calculate the event_length based on the maximum length of your packet and how many packets you want to send at once)&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;with 75ms max connection interval, you should be able to fit quite a few numbers of packets.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: I want to reduce the data rate of nrf52840</title><link>https://devzone.nordicsemi.com/thread/288172?ContentTypeID=1</link><pubDate>Fri, 08 Jan 2021 12:46:55 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:d1c6d7a6-d3ee-49ed-b2e3-9ec03f456503</guid><dc:creator>awneil</dc:creator><description>[quote userid="77687" url="~/f/nordic-q-a/70254/i-want-to-reduce-the-data-rate-of-nrf52840"]if the data logger transfers the data at a lower rate(&amp;lt; 1mbps) there would be less congestion[/quote]
&lt;p&gt;That&amp;#39;s just masking the symptoms - not addressing the underlying problem.&lt;/p&gt;
&lt;p&gt;You need to implement some kind of flow control in your protocol - so that the system doesn&amp;#39;t get overwhelmed.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>