<?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>Queuing and sending logged sensor data over BLE</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/59764/queuing-and-sending-logged-sensor-data-over-ble</link><description>Hello, 
 I need to send logged sensor data in external 4MB flash to a phone via BLE. 
 I am using a nRF52840 based module on a custom PCB. I am using SDK v14.2. 
 I am using the Queue module to read logged data from in the flash and store it in a queue</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Mon, 20 Apr 2020 08:34:20 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/59764/queuing-and-sending-logged-sensor-data-over-ble" /><item><title>RE: Queuing and sending logged sensor data over BLE</title><link>https://devzone.nordicsemi.com/thread/245448?ContentTypeID=1</link><pubDate>Mon, 20 Apr 2020 08:34:20 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:40e551ce-54da-45c0-a1a7-194bbad38911</guid><dc:creator>tesc</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;Queue size: You are reading from external flash, and sending data over BLE as quickly as possible. The goal of the queue would then be to have a buffer of data that is ready to be sent, so that send_log() is never starved (never have to wait for data to be fetched from the external flash.) It depends on the speed, jitter and latency of reading from the external flash, and you may experience that a very short queue is enough.&lt;/p&gt;
&lt;p&gt;As the total amount of data is several times the amount of available RAM, increasing the queue size will never solve the issue of reading from flash faster than sending over BLE. If you get NRF_ERROR_NO_MEM you should wait until there is space in the queue again and then retry the flash read. You need to throttle the flash reads this way, so that they will not over time read more data from flash than what is sent out over BLE.&lt;/p&gt;
&lt;p&gt;Regards,&lt;br /&gt;Terje&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>