<?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>UART Service data length</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/40868/uart-service-data-length</link><description>Hi , 
 I have a large data structure that I&amp;#39;d like to transfer ( few KB ) , what is the maximum length I can pass on &amp;quot; ble_nus_string_send&amp;quot; ? ( length appear as uint_16 ) 
 
 Do I have to break down the data into 20 Bytes and put it back together on the</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Sat, 24 Nov 2018 22:38:08 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/40868/uart-service-data-length" /><item><title>RE: UART Service data length</title><link>https://devzone.nordicsemi.com/thread/158919?ContentTypeID=1</link><pubDate>Sat, 24 Nov 2018 22:38:08 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:37f6ce41-a10b-421f-951f-e66b4ca4b3b8</guid><dc:creator>howard n2wx</dc:creator><description>&lt;p&gt;You&amp;#39;ll know right away that the phone doesn&amp;#39;t work because the negotiation will fail and you&amp;#39;ll be stuck at 27 bytes. Anything other than the 27 byte default is negotiated. A new service won&amp;#39;t change the need to negotiate something other than the default.&lt;/p&gt;
&lt;p&gt;But don&amp;#39;t let that deter you: The soft device and friends does all of the hard work. Here&amp;#39;s a thread that may be helpful to inform what another has seen, and to help get you started &lt;a href="https://devzone.nordicsemi.com/f/nordic-q-a/27214/why-can-not-set-max_mtu_size-to-247"&gt;https://devzone.nordicsemi.com/f/nordic-q-a/27214/why-can-not-set-max_mtu_size-to-247&lt;/a&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: UART Service data length</title><link>https://devzone.nordicsemi.com/thread/158918?ContentTypeID=1</link><pubDate>Sat, 24 Nov 2018 22:27:21 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:007c297a-c816-45f4-a0ef-808fb0bd5752</guid><dc:creator>ran</dc:creator><description>&lt;p&gt;Thanks.&lt;/p&gt;
&lt;p&gt;How can i tell if the other end ( phone ) support larger MTU ? Is that something that is neggotiable during connection setup ?&amp;nbsp;&lt;/p&gt;
&lt;p&gt;What if i define a new service with a large tx size and long write ? Will this works the same ?&amp;nbsp;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: UART Service data length</title><link>https://devzone.nordicsemi.com/thread/158915?ContentTypeID=1</link><pubDate>Sat, 24 Nov 2018 22:16:50 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:652b5afe-2451-4067-a178-aad7b6d7bcdc</guid><dc:creator>howard n2wx</dc:creator><description>[quote userid="75383" url="~/f/nordic-q-a/40868/uart-service-data-length"]Do I have to break down the data into 20 Bytes and put it back together on the other end ?[/quote]
&lt;p&gt;Not necessarily, and yes.&amp;nbsp; Not 20 bytes necessarily: You can break it down to 247 byte packets if all of your devices support large MTU negotiation. Google NRF_SDH_BLE_GATT_MAX_MTU_SIZE for ex.&amp;nbsp; Yes, you are going to want to put it back together at the other end and do all of the usual things to discover data loss, recover from link breakage, and such.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>