<?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>Sending 247 Bytes of data using NUS</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/44998/sending-247-bytes-of-data-using-nus</link><description>Hi, I want to test sending multiple packets of data with each packet having the maximum possible size of 247 bytes. I am currently testing with nRF Connect app. When i try to send 20 Bytes of data it works fine, but when I am trying to send 21 Bytes of</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Wed, 20 Mar 2019 07:27:34 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/44998/sending-247-bytes-of-data-using-nus" /><item><title>RE: Sending 247 Bytes of data using NUS</title><link>https://devzone.nordicsemi.com/thread/177218?ContentTypeID=1</link><pubDate>Wed, 20 Mar 2019 07:27:34 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:8a670d7d-c3ce-46d4-8fa5-76cdebbf225c</guid><dc:creator>Vidar Berg</dc:creator><description>&lt;p&gt;Hi&amp;nbsp;Shrinidhi,&lt;/p&gt;
&lt;p&gt;Your phone supports long MTU if the &amp;quot;Data len is set to &amp;lt;bytes&amp;gt;&amp;quot; message says more than 20 bytes, so I&amp;#39;m not sure why you weren&amp;#39;t able to receive more data in the callback. Can you try the pre-compiled hex and see if you get the same result (&amp;quot;\nRF5_SDK_15.0.0_a53641a\examples\ble_peripheral\ble_app_uart\hex\ble_app_uart_pca10056_s140.hex&amp;quot;? E.g., nrfjprog --program&amp;nbsp;&lt;span&gt;ble_app_uart_pca10056_s140.hex --chiperase -r. You won&amp;#39;t be able to debug with the pre-compiled FW though, but you can use a serial client to verify that data gets received.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&amp;nbsp;I was not able to replicate this here. One packet&amp;nbsp; that I sent from nrf connect on iOS:&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&lt;img alt=" " src="https://devzone.nordicsemi.com/resized-image/__size/320x240/__key/support-attachments/beef5d1b77644c448dabff31668f3a47-b1c154c4e0194791b43dff89ef8730a6/pastedimage1553066772742v1.png" /&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;2. This seems to be related to nRF connect for desktop, which is a completely different implementation compared to nRF connect on Android and iOS.&amp;nbsp;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Kind regards,&lt;/p&gt;
&lt;p&gt;Vidar&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Sending 247 Bytes of data using NUS</title><link>https://devzone.nordicsemi.com/thread/177202?ContentTypeID=1</link><pubDate>Wed, 20 Mar 2019 05:35:23 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:4b050e77-a063-4588-a75a-b876c588ee3a</guid><dc:creator>Shrinidhi Bhat</dc:creator><description>&lt;p&gt;Hi Vidar,&lt;/p&gt;
&lt;p&gt;How do I know the phone supports larger MTU size? All the phones that we have here are equipped with BLE 5.0.&lt;/p&gt;
&lt;p&gt;The phone I am using currently is Poco F1 running on the latest Android.&lt;/p&gt;
&lt;p&gt;You said - &amp;quot; &lt;em&gt;&lt;strong&gt;and you can see from the debug log what the effective data length ends up being 20 Bytes&lt;/strong&gt;&lt;/em&gt;&amp;quot;.&lt;/p&gt;
&lt;p&gt;Case 1: When my BLE_GATT_ATT_MTU_DEFAULT is 23 then I can see the following log&lt;/p&gt;
&lt;p&gt;-----------Data len is set to 0xF4(244)-----&lt;/p&gt;
&lt;p&gt;Case 2: I set my BLE_GATT_ATT_MTU_DEFAULT to 247 it does not even enter the if condition to display the the Log file &lt;/p&gt;
&lt;p&gt;***if ((m_conn_handle == p_evt-&amp;gt;conn_handle) &amp;amp;&amp;amp; (p_evt-&amp;gt;evt_id == NRF_BLE_GATT_EVT_ATT_MTU_UPDATED))**&lt;/p&gt;
&lt;p&gt;Hence By default I&amp;#39;m pretty sure my phone does support the 247 Bytes of MTU.&lt;/p&gt;
&lt;p&gt;NOTE:- I am currently using the ble_app_uart example in the ble_peripheral folder. Should I use the ble_central file instead?&lt;/p&gt;
&lt;p&gt;2nd Question is -&amp;gt; By following case ID 215355 I infer there is a bug in the nRF Connect application rather than the phone. Is the Bug fixed? And if not is the nRF Connect app opensource?&lt;/p&gt;
&lt;p&gt;Kind Regards,&lt;/p&gt;
&lt;p&gt;Shrinidhi Bhat&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Sending 247 Bytes of data using NUS</title><link>https://devzone.nordicsemi.com/thread/177100?ContentTypeID=1</link><pubDate>Tue, 19 Mar 2019 14:47:38 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:41db08df-b190-4e33-8139-b861f13f9053</guid><dc:creator>Vidar Berg</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;The ble_app_uart example is configured to support a 247 byte MTU,&amp;nbsp; but it&amp;#39;s not guaranteed that your phone will support it. The &lt;a href="http://infocenter.nordicsemi.com/topic/com.nordic.infocenter.sdk5.v15.2.0/lib_ble_gatt.html?cp=4_0_0_3_2_12"&gt;MTU&lt;/a&gt; size is negotiated with the central (phone) after connection, and you can see from the debug log what the effective data length ends up being (20 bytes&amp;nbsp;is the&amp;nbsp;default supported by all BLE chipsets). Do you have another phone that you know should support long MTU?&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Best regards,&lt;/p&gt;
&lt;p&gt;Vidar&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>