<?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>NCS NUS example - bigger buffer</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/62119/ncs-nus-example---bigger-buffer</link><description>Hi, I have two Nordic BLE devices, one nrf52-DK that has peripherial_uart application and nrf52840-DK that has central_uart application. This works well, but the thing I need to change is buffer size (from central to peripheral) which is set to 20 bytes</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Mon, 08 Jun 2020 17:16:59 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/62119/ncs-nus-example---bigger-buffer" /><item><title>RE: NCS NUS example - bigger buffer</title><link>https://devzone.nordicsemi.com/thread/253879?ContentTypeID=1</link><pubDate>Mon, 08 Jun 2020 17:16:59 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:881abbaa-5abb-4608-b3cd-96f2fb95c8fd</guid><dc:creator>Vojislav</dc:creator><description>&lt;p&gt;I figured it out, thanks for all the help!&lt;br /&gt;&lt;br /&gt;Best regards,&lt;br /&gt;Vojislav&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: NCS NUS example - bigger buffer</title><link>https://devzone.nordicsemi.com/thread/253787?ContentTypeID=1</link><pubDate>Mon, 08 Jun 2020 12:07:02 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:5ec4b029-fa1f-4fa2-8dd8-6e33790d92e1</guid><dc:creator>Vojislav</dc:creator><description>&lt;p&gt;&lt;span&gt;&lt;strong&gt;issue1&lt;/strong&gt; (peripheral &amp;gt; central):&lt;br /&gt;&lt;/span&gt;&lt;/p&gt;
[quote userid="80703" url="~/f/nordic-q-a/62119/ncs-nus-example---bigger-buffer/253760"]Not able to allocate UART send data buffer[/quote]
&lt;p&gt;Data is received and then this message is sent from the central device to PC.&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;issue2&lt;/strong&gt; (central &amp;gt; peripheral):&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
[quote userid="80703" url="~/f/nordic-q-a/62119/ncs-nus-example---bigger-buffer/253773"]NUS send timeout &lt;br /&gt;Failed to send data over BLE connection (err -69)[/quote]
&lt;p&gt;This is how sending data looks:&lt;br /&gt;&lt;img src="https://devzone.nordicsemi.com/resized-image/__size/320x240/__key/communityserver-discussions-components-files/4/pastedimage1591618135316v1.png" alt=" " /&gt;&lt;br /&gt;* time between data packets is ~9ms, and each block is 127bytes&lt;br /&gt;it seems that UART is sending data too quickly and BLE NUS does not have time to send it.&amp;nbsp;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: NCS NUS example - bigger buffer</title><link>https://devzone.nordicsemi.com/thread/253773?ContentTypeID=1</link><pubDate>Mon, 08 Jun 2020 11:48:32 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:a33deb7a-4ea4-427e-b171-c74a521b1d09</guid><dc:creator>Vojislav</dc:creator><description>&lt;p&gt;and also:&lt;br /&gt;&lt;br /&gt;NUS send timeout &lt;br /&gt;Failed to send data over BLE connection (err -69)&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: NCS NUS example - bigger buffer</title><link>https://devzone.nordicsemi.com/thread/253760?ContentTypeID=1</link><pubDate>Mon, 08 Jun 2020 11:18:08 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:3b9460e1-8200-40ba-9013-ff050568d224</guid><dc:creator>Vojislav</dc:creator><description>&lt;p&gt;Hi Simon,&lt;br /&gt;&lt;br /&gt;This seems to work, but sometimes I get BLE timeout message or &amp;quot;Not able to allocate UART send data buffer&amp;quot;&lt;br /&gt;&lt;br /&gt;Did you have similar problems?&lt;br /&gt;&lt;br /&gt;Best regards,&lt;br /&gt;Vojislav.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: NCS NUS example - bigger buffer</title><link>https://devzone.nordicsemi.com/thread/253638?ContentTypeID=1</link><pubDate>Sat, 06 Jun 2020 16:02:49 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:30cb2b6f-b438-4648-b629-950f75110314</guid><dc:creator>Simon</dc:creator><description>&lt;p&gt;I was able to send 1000 bytes by doing the following:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;In&amp;nbsp;&lt;em&gt;ncs\nrf\samples\bluetooth\central_uart\prj.conf&lt;/em&gt; set these:&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;CONFIG_BT_L2CAP_TX_MTU=1024
CONFIG_BT_L2CAP_RX_MTU=1024
CONFIG_BT_RX_BUF_LEN=1024&lt;/pre&gt;&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;In&amp;nbsp;&lt;em&gt;ncs\nrf\samples\bluetooth\peripheral_uart\prj.conf&amp;nbsp;&lt;/em&gt;set these:&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;CONFIG_BT_GATT_NUS_UART_BUFFER_SIZE=1024
CONFIG_BT_RX_BUF_LEN=1024
CONFIG_BT_L2CAP_TX_MTU=1024
CONFIG_BT_L2CAP_RX_MTU=1024&lt;/pre&gt;&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;In&amp;nbsp;in &lt;em&gt;ncs\zephyr\subsys\bluetooth\host\att_internal.h&lt;/em&gt;, set&amp;nbsp;BT_ATT_DEFAULT_LE_MTU to 1024&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;In &lt;em&gt;ncs\nrf\samples\bluetooth\central_uart\src\main.c&lt;/em&gt; set&amp;nbsp;UART_BUF_SIZE to 1024&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;If you&amp;#39;re going to send data chunks of size 1024, you may have to set the buffers a little bigger, due to overhead and so on.&lt;/p&gt;
&lt;p&gt;Best regards,&lt;/p&gt;
&lt;p&gt;Simon&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: NCS NUS example - bigger buffer</title><link>https://devzone.nordicsemi.com/thread/253256?ContentTypeID=1</link><pubDate>Thu, 04 Jun 2020 11:05:13 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:a8e5bc4c-6b81-4f36-af80-d78b417d2b54</guid><dc:creator>Vojislav</dc:creator><description>&lt;p&gt;So when I want to send a bigger data packet (with code changed in central application) I get a response:&lt;br /&gt;&lt;pre class="ui-code" data-mode="text"&gt;E: ***** BUS FAULT *****␍␊
[13:03:07:755] E:   Precise data bus error␍␊
[13:03:07:755] E:   BFAR Address: 0x1000257␍␊
[13:03:07:761] E: r0/a1:  0x00000010  r1/a2:  0x01000257  r2/a3:  0x00001010␍␊
[13:03:07:761] E: r3/a4:  0x01000257 r12/ip:  0x00000003 r14/lr:  0x00002ec3␍␊
[13:03:07:769] E:  xpsr:  0x21000000␍␊
[13:03:07:769] E: Faulting instruction address (r15/pc): 0x00002ec4␍␊
[13:03:07:776] E: &amp;gt;&amp;gt;&amp;gt; ZEPHYR FATAL ERROR 0: CPU exception on CPU 0␍␊
[13:03:07:784] E: Current thread: 0x200010b4 (unknown)␍␊
[13:03:07:784] E: Resetting system␍␊&lt;/pre&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>