<?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>Writing characteristics longer than 20 bytes</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/60407/writing-characteristics-longer-than-20-bytes</link><description>I know there are multiple different questions/answers relating to this topic but none exactly solved my issue. Further, some of the questions are many years old so it&amp;#39;s not clear to me if some of that information is perfectly relevant. So here goes..</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Wed, 22 Apr 2020 21:14:45 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/60407/writing-characteristics-longer-than-20-bytes" /><item><title>RE: Writing characteristics longer than 20 bytes</title><link>https://devzone.nordicsemi.com/thread/246123?ContentTypeID=1</link><pubDate>Wed, 22 Apr 2020 21:14:45 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:805f3416-145e-497f-83e4-11d67f1e507e</guid><dc:creator>TCdeveloper</dc:creator><description>&lt;p&gt;Thanks &lt;a href="https://devzone.nordicsemi.com/members/amanda"&gt;Amanda Hsieh&lt;/a&gt;. I guess what I am really asking in my second question is what are the pros/cons of using queued writes vs. simply increasing the MTU size? Increasing the MTU size seems inherently simpler so why would someone choose queued writes for longer transmissions?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Writing characteristics longer than 20 bytes</title><link>https://devzone.nordicsemi.com/thread/245985?ContentTypeID=1</link><pubDate>Wed, 22 Apr 2020 09:35:06 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:0f429453-80da-425c-8c94-2d555c994505</guid><dc:creator>Amanda Hsieh</dc:creator><description>&lt;p&gt;Hi,&amp;nbsp;&lt;/p&gt;
[quote user="TCdeveloper"]1) How large can I make the MTU size?[/quote]
&lt;div&gt;
&lt;div&gt;&lt;/div&gt;
&lt;div&gt;&lt;span&gt;Start from S132 v3.0 (for nRF52) you can increase the MTU to maximum 512.&amp;nbsp;&lt;/span&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;div&gt;
&lt;div&gt;&lt;/div&gt;
&lt;/div&gt;
[quote user="TCdeveloper"]2) Is there a preferred way to write larger amounts of data (from central to peripheral)?[/quote]
&lt;p&gt;You can refer to the&amp;nbsp;&lt;a title="Experimental: ATT_MTU Throughput Example" href="https://infocenter.nordicsemi.com/topic/com.nordic.infocenter.sdk5.v15.0.0/ble_sdk_app_att_mtu.html?cp=7_5_2_4_1_1_0"&gt;ATT_MTU Throughput Example&lt;/a&gt;&amp;nbsp;which&amp;nbsp;uses Queued Write.&lt;/p&gt;
&lt;p&gt;-Amanda H.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Writing characteristics longer than 20 bytes</title><link>https://devzone.nordicsemi.com/thread/245943?ContentTypeID=1</link><pubDate>Wed, 22 Apr 2020 06:46:01 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:80c2d012-c756-41ab-bb52-c5540b2441f3</guid><dc:creator>Nguyen Hoan Hoang</dc:creator><description>&lt;p&gt;251-3 for ble 4.2&lt;/p&gt;
&lt;p&gt;512-3 for ble 5&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Writing characteristics longer than 20 bytes</title><link>https://devzone.nordicsemi.com/thread/245895?ContentTypeID=1</link><pubDate>Tue, 21 Apr 2020 16:15:12 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:aa5f2874-f001-4018-9f8b-dec647c4efb3</guid><dc:creator>TCdeveloper</dc:creator><description>&lt;p&gt;Thanks &lt;a href="https://devzone.nordicsemi.com/members/hnhoan"&gt;Nguyen Hoan Hoang&lt;/a&gt;. This is indeed what I needed to do. Any thoughts on the follow-up questions I asked Amanda?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Writing characteristics longer than 20 bytes</title><link>https://devzone.nordicsemi.com/thread/245894?ContentTypeID=1</link><pubDate>Tue, 21 Apr 2020 16:14:00 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:16ca2929-54e3-4281-961b-61e022172f19</guid><dc:creator>TCdeveloper</dc:creator><description>&lt;p&gt;&lt;a href="https://devzone.nordicsemi.com/members/amanda"&gt;Amanda Hsieh&lt;/a&gt; This was helpful, thanks. It did fix my immediate problem. A couple of follow up questions.&lt;/p&gt;
&lt;p&gt;1) How large can I make the MTU size?&lt;/p&gt;
&lt;p&gt;2) Is there a preferred way to write larger amounts of data (from central to peripheral)?&lt;/p&gt;
&lt;p&gt;For example, others on devzone have mentioned queued (or long) writes. I tried this out by instantiating the &amp;quot;ble_app_queued_writes&amp;quot; example and it also seems to work.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Writing characteristics longer than 20 bytes</title><link>https://devzone.nordicsemi.com/thread/245831?ContentTypeID=1</link><pubDate>Tue, 21 Apr 2020 12:01:45 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:8753283b-fdee-492c-be61-10a17be12dc9</guid><dc:creator>Nguyen Hoan Hoang</dc:creator><description>&lt;p&gt;When you increase the MTU size, softdevice will requires more ram space for that matter. &amp;nbsp;You need to readjust the reserve ram for softdevice as indicated in the log in the linker script.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Writing characteristics longer than 20 bytes</title><link>https://devzone.nordicsemi.com/thread/245760?ContentTypeID=1</link><pubDate>Tue, 21 Apr 2020 08:27:41 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:19e1b407-6a53-424f-95b2-8a9fe64fdf44</guid><dc:creator>Amanda Hsieh</dc:creator><description>&lt;p&gt;Hi,&amp;nbsp;&lt;/p&gt;
[quote user="TCdeveloper"]&amp;lt;warning&amp;gt; nrf_sdh_ble: Change the RAM start location from 0x20002220 to 0x20002228.&lt;br /&gt;&amp;lt;warning&amp;gt; nrf_sdh_ble: Maximum RAM size for application is 0xDDD8.[/quote]
&lt;p&gt;&amp;nbsp;You need to modify the&amp;nbsp;&lt;span&gt;RAM start location and&amp;nbsp;Maximum RAM size in the project option -&amp;gt; Linker -&amp;gt; Section Placement Marcos as the log indicates.&amp;nbsp;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;img alt=" " src="https://devzone.nordicsemi.com/resized-image/__size/640x480/__key/support-attachments/beef5d1b77644c448dabff31668f3a47-2a041fb5567744cca4bdb968fb91793a/248091.PNG" /&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Writing characteristics longer than 20 bytes</title><link>https://devzone.nordicsemi.com/thread/245624?ContentTypeID=1</link><pubDate>Mon, 20 Apr 2020 15:25:44 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:9de93c9b-d1e7-46a5-a46c-3b2c6b3b0fa1</guid><dc:creator>TCdeveloper</dc:creator><description>&lt;p&gt;&lt;a href="https://devzone.nordicsemi.com/members/hnhoan"&gt;Nguyen Hoan Hoang&lt;/a&gt; I assume you mean the following #defines:&lt;/p&gt;
&lt;p&gt;&lt;span style="background-color:#ffffff;"&gt;// &amp;lt;o&amp;gt; NRF_SDH_BLE_GATT_MAX_MTU_SIZE - Static maximum MTU size. &lt;br /&gt;#ifndef NRF_SDH_BLE_GATT_MAX_MTU_SIZE&lt;br /&gt;#define NRF_SDH_BLE_GATT_MAX_MTU_SIZE 24&amp;nbsp;&amp;nbsp; // Default = 23&lt;br /&gt;#endif&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;If I change the size greater to anything than the default value of 23, I wind up in the app_err_fault_handler() routine in app_error_weak.c.&lt;/p&gt;
&lt;p&gt;Debug terminal warning messages include:&lt;/p&gt;
&lt;p&gt;&lt;span style="background-color:#ffffff;"&gt;&amp;lt;warning&amp;gt; nrf_sdh_ble: Insufficient RAM allocated for the SoftDevice.&lt;br /&gt;&amp;lt;warning&amp;gt; nrf_sdh_ble: Change the RAM start location from 0x20002220 to 0x20002228.&lt;br /&gt;&amp;lt;warning&amp;gt; nrf_sdh_ble: Maximum RAM size for application is 0xDDD8.&lt;br /&gt;&amp;lt;error&amp;gt; nrf_sdh_ble: sd_ble_enable() returned NRF_ERROR_NO_MEM.&lt;br /&gt;&amp;lt;error&amp;gt; app: Fatal error&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="background-color:#ffffff;"&gt;Note that I am using SDK 15.0.0 with the nRF52 development kit (if that is helpful).&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="background-color:#ffffff;"&gt;Thoughts?&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Writing characteristics longer than 20 bytes</title><link>https://devzone.nordicsemi.com/thread/245425?ContentTypeID=1</link><pubDate>Mon, 20 Apr 2020 06:47:04 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:6c0ed88d-eb97-4e80-810b-aab761e335d0</guid><dc:creator>Nguyen Hoan Hoang</dc:creator><description>&lt;p&gt;You need to initialize the softdevice with a max mtu value require otherwise the default is 20. &amp;nbsp;look for MTU somewhere in sdk_config.h&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>