<?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>gatt_evt_handler config to set data length to send data by uart</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/30651/gatt_evt_handler-config-to-set-data-length-to-send-data-by-uart</link><description>Hi, 
 I am adapting the uart example to send mensages between central and peripheral using JSON. In this moment I can send central &amp;lt;------&amp;gt;peripheral... 
 
 I have a problem because there are a limitation to send string, the data length max is 61 characters</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Thu, 22 Feb 2018 18:25:14 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/30651/gatt_evt_handler-config-to-set-data-length-to-send-data-by-uart" /><item><title>RE: gatt_evt_handler config to set data length to send data by uart</title><link>https://devzone.nordicsemi.com/thread/121734?ContentTypeID=1</link><pubDate>Thu, 22 Feb 2018 18:25:14 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:1c87fb68-38c5-424f-a3a9-a37f974d5599</guid><dc:creator>hmolesworth</dc:creator><description>&lt;p&gt;As Martin says, the key is gatt_init() - see line 488 where 61+3=64 and change from&lt;/p&gt;
&lt;p&gt;&amp;lt;p&amp;gt;err_code = nrf_ble_gatt_att_mtu_periph_set(&amp;amp;m_gatt, 64);&amp;lt;/p&amp;gt;&lt;/p&gt;
&lt;p&gt;to&lt;br /&gt;&amp;lt;p&amp;gt;err_code = nrf_ble_gatt_att_mtu_periph_set(&amp;amp;m_gatt, NRF_SDH_BLE_GATT_MAX_MTU_SIZE);&amp;lt;/p&amp;gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: gatt_evt_handler config to set data length to send data by uart</title><link>https://devzone.nordicsemi.com/thread/121648?ContentTypeID=1</link><pubDate>Thu, 22 Feb 2018 12:05:22 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:1a308251-a767-4f19-9b00-b9a4fd958ae1</guid><dc:creator>Martin Lesund</dc:creator><description>&lt;p&gt;Hi Renato,&lt;/p&gt;
&lt;p&gt;You can use the function&amp;nbsp;&lt;a href="http://infocenter.nordicsemi.com/index.jsp?topic=%2Fcom.nordic.infocenter.sdk5.v14.2.0%2Fgroup__nrf__ble__gatt.html&amp;amp;anchor=ga4fd7e5c4607cba63f00b8bf9711c3ca3" rel="noopener noreferrer" target="_blank"&gt;nrf_ble_gatt_att_mtu_periph_set&lt;/a&gt;&lt;span&gt;() (&lt;em&gt;for peripheral side)&lt;/em&gt; as described at last post.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;You can also&amp;nbsp;take a look at the &amp;quot;&lt;a href="http://infocenter.nordicsemi.com/index.jsp?topic=%2Fcom.nordic.infocenter.sdk5.v14.2.0%2Fble_sdk_app_att_mtu.html&amp;amp;cp=4_0_0_4_2_1_0" rel="noopener noreferrer" target="_blank"&gt;ATT_MTU Throughput Example&lt;/a&gt;&amp;quot; for reference on how this is handled. Also here is a &lt;a href="https://devzone.nordicsemi.com/b/blog/posts/throughput-and-long-range-demo" rel="noopener noreferrer" target="_blank"&gt;blog post&lt;/a&gt;&amp;nbsp;describing&amp;nbsp;the different parameters.&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: gatt_evt_handler config to set data length to send data by uart</title><link>https://devzone.nordicsemi.com/thread/121432?ContentTypeID=1</link><pubDate>Tue, 20 Feb 2018 16:45:49 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:f3e07279-a6bb-4063-995d-84faf49feb45</guid><dc:creator>Renato Silva</dc:creator><description>&lt;p&gt;Hello Martin,&lt;/p&gt;
&lt;p&gt;[quote userid="66115" url="~/f/nordic-q-a/30651/gatt_evt_handler-config-to-set-data-length-to-send-data-by-uart/121431#121431"][/quote]&lt;/p&gt;
&lt;p&gt;The question is how many characters you are trying to send?&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;I want to send a json, and in my solution this structure does not size defined. The size can be between 10 and 255, for example.&lt;/span&gt;[quote userid="66115" url="~/f/nordic-q-a/30651/gatt_evt_handler-config-to-set-data-length-to-send-data-by-uart/121431#121431"][/quote]&lt;/p&gt;
&lt;p&gt;A proposal is to&amp;nbsp;increase the MTU size on both the peripheral and central side.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Where I can to do it?&lt;/p&gt;
[quote userid="66115" url="~/f/nordic-q-a/30651/gatt_evt_handler-config-to-set-data-length-to-send-data-by-uart/121431#121431"]If you look at the &amp;quot;ble_app_uart&amp;quot; example[/quote]
&lt;p&gt;I am working in this example..&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: gatt_evt_handler config to set data length to send data by uart</title><link>https://devzone.nordicsemi.com/thread/121431?ContentTypeID=1</link><pubDate>Tue, 20 Feb 2018 16:21:49 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:09186992-d452-47ad-8fdb-d766ae78b39c</guid><dc:creator>Martin Lesund</dc:creator><description>&lt;p&gt;Hello Renato,&lt;/p&gt;
&lt;p&gt;The question is how many characters you are trying to send?&amp;nbsp;&lt;/p&gt;
&lt;p&gt;A little more information of what you are trying to&amp;nbsp; achieve would be highly appreciated.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;A proposal is to&amp;nbsp;increase the MTU size on both the peripheral and central side.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;If you look at the &amp;quot;ble_app_uart&amp;quot; example and take a look in the &lt;em&gt;gatt_init() &lt;/em&gt;you can see how this is handled on the &lt;span style="text-decoration:underline;"&gt;peripheral side&lt;/span&gt; (&lt;a href="http://infocenter.nordicsemi.com/index.jsp?topic=%2Fcom.nordic.infocenter.sdk5.v14.2.0%2Fgroup__nrf__ble__gatt.html&amp;amp;anchor=ga4fd7e5c4607cba63f00b8bf9711c3ca3" rel="noopener noreferrer" target="_blank"&gt;nrf_ble_gatt_att_mtu_periph_set&lt;/a&gt;()).&amp;nbsp;&lt;/p&gt;
&lt;p&gt;(&lt;a href="https://devzone.nordicsemi.com/f/nordic-q-a/29255/mtu-size-of-nrf52832-as-central/116380#116380" rel="noopener noreferrer" target="_blank"&gt;similar Thread&lt;/a&gt;&amp;nbsp;about MTU size)&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>