<?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>CoAP server, send max amount of data</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/13542/coap-server-send-max-amount-of-data</link><description>Hi! 
 Goal: I want to send as much data as possible using CoAP. 
 I have connected a nRF52 (IoT-DK) to a Raspberry Pi using BLE and 6LoWPAN. The nRF52 is running the CoAP Observable server example, and I am able to observe the state of LED3 from the</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Tue, 03 May 2016 16:31:40 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/13542/coap-server-send-max-amount-of-data" /><item><title>RE: CoAP server, send max amount of data</title><link>https://devzone.nordicsemi.com/thread/51672?ContentTypeID=1</link><pubDate>Tue, 03 May 2016 16:31:40 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:e0679654-6be3-44a4-afda-0f10349b69da</guid><dc:creator>sindrsch</dc:creator><description>&lt;p&gt;Thanks a lot, this worked great. Exactly what I needed!&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: CoAP server, send max amount of data</title><link>https://devzone.nordicsemi.com/thread/51671?ContentTypeID=1</link><pubDate>Tue, 03 May 2016 07:56:24 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:5e79e16e-9054-4e8e-9fd9-01a5e6963abb</guid><dc:creator>Glenn Ruben Bakke</dc:creator><description>&lt;p&gt;Hi Sindre,&lt;/p&gt;
&lt;p&gt;I recommend you to take a look at the define in sdk_config.h defining the maximum CoAP Payload size, COAP_MESSAGE_DATA_MAX_SIZE 256. Also, you could enabling memory manager statistics to see whether you are starving any the memory.&lt;/p&gt;
&lt;p&gt;By default, the configurations are:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;MEMORY_MANAGER_SMALL_BLOCK_COUNT      8
MEMORY_MANAGER_SMALL_BLOCK_SIZE       128
MEMORY_MANAGER_MEDIUM_BLOCK_COUNT     4
MEMORY_MANAGER_MEDIUM_BLOCK_SIZE      256
MEMORY_MANAGER_LARGE_BLOCK_COUNT      1
MEMORY_MANAGER_LARGE_BLOCK_SIZE       1024
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Normally, you would if you sent small packets (&amp;lt; 128) use the SMALL buffers. As you describe you are using &amp;gt; 128 bytes payloads, which could indicate that you would need to increase the number of medium buffers.&lt;/p&gt;
&lt;p&gt;To get a statistic in your code which you can use to debug the memory, you can enable this by adding these two defines to your sdk_config.h:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;#define MEM_MANAGER_ENABLE_DIAGNOSTICS 1
#define MEM_MANAGER_DIAGNOSTICS_LOGS_ONLY 1
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;You can now call the  nrf_mem_diagnose() whenever you like to see the state of the memory usage.&lt;/p&gt;
&lt;p&gt;Please let me know if you get any results.&lt;/p&gt;
&lt;p&gt;Cheers,
Glenn&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>