<?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>Not able to transmit more than 20bytes with sample application &amp;quot;central_uart&amp;quot;</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/78763/not-able-to-transmit-more-than-20bytes-with-sample-application-central_uart</link><description>Hello, 
 
 I am working on nrf5340DK board and with a sample example &amp;quot;central_uart&amp;quot; under ncs-&amp;gt;nrf-&amp;gt;samples-&amp;gt;bluetooth &amp;amp; &amp;quot;peripheral_uart&amp;quot; from ncs v1.5.1. I wanted to send approx 200~300bytes but not able to send more than 20bytes. 
 When trying to send</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Thu, 26 Aug 2021 13:56:05 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/78763/not-able-to-transmit-more-than-20bytes-with-sample-application-central_uart" /><item><title>RE: Not able to transmit more than 20bytes with sample application "central_uart"</title><link>https://devzone.nordicsemi.com/thread/326824?ContentTypeID=1</link><pubDate>Thu, 26 Aug 2021 13:56:05 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:23dbdd27-5f18-421a-a12d-2f4a2136cea6</guid><dc:creator>ovrebekk</dc:creator><description>&lt;p&gt;Hi Sanket&lt;/p&gt;
&lt;p&gt;That is great news. I will close the case then &lt;span class="emoticon" data-url="https://devzone.nordicsemi.com/cfs-file/__key/system/emoji/1f642.svg" title="Slight smile"&gt;&amp;#x1f642;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;Best regards&lt;br /&gt;Torbjørn&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Not able to transmit more than 20bytes with sample application "central_uart"</title><link>https://devzone.nordicsemi.com/thread/326634?ContentTypeID=1</link><pubDate>Thu, 26 Aug 2021 04:16:12 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:e61f1e6e-0c1b-4968-800d-0b00d7b6c4bf</guid><dc:creator>SanketC</dc:creator><description>&lt;p&gt;Hello&amp;nbsp;&lt;span&gt;Torbj&amp;oslash;rn,&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Thank you for your inputs. By looking and your suggestions and throughput example I could able to achieve 247B MTU size.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Thanks for the help.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Best Regards,&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;SanketC&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Not able to transmit more than 20bytes with sample application "central_uart"</title><link>https://devzone.nordicsemi.com/thread/326152?ContentTypeID=1</link><pubDate>Mon, 23 Aug 2021 11:11:25 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:85b10b92-b9e9-4abe-b98f-e9f7c76c4823</guid><dc:creator>ovrebekk</dc:creator><description>&lt;p&gt;Hi Sanket&lt;/p&gt;
&lt;p&gt;My bad, I didn&amp;#39;t realize you were using the UART examples for both the peripheral and the central.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Normally the central needs to initiate a data length and MTU update, and the central_uart example does not do this.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;In order to fix this all you have to do is add some code in the connected(..) callback function, in order to request larger MTU:&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;static struct bt_gatt_exchange_params params;
params.func = mtu_exchange_func;
err = bt_gatt_exchange_mtu(conn, &amp;amp;params);
if (err) {
	LOG_WRN(&amp;quot;Failed to exchange MTU: %d&amp;quot;, err);
}&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;You also need to implement the callback function, but it doesn&amp;#39;t need to do anything in particular. If the exchange fails you will be notified through this function:&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;void mtu_exchange_func(struct bt_conn *conn, uint8_t err, struct bt_gatt_exchange_params *params)
{

}&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;Best regards&lt;br /&gt;Torbjørn&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Not able to transmit more than 20bytes with sample application "central_uart"</title><link>https://devzone.nordicsemi.com/thread/325909?ContentTypeID=1</link><pubDate>Fri, 20 Aug 2021 10:16:45 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:b2019213-a2ca-4412-a7db-77c2f49a3068</guid><dc:creator>SanketC</dc:creator><description>&lt;p&gt;Adding to above,&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;I also tried by adding following configuration in prj.conf of peripheral_uart &amp;amp; central_uart (ncs default sample application)&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;CONFIG_BT_USER_DATA_LEN_UPDATE=y
CONFIG_BT_RX_BUF_LEN=255
#CONFIG_BT_GATT_CLIENT=y
CONFIG_BT_ATT_TX_MAX=10
CONFIG_BT_ATT_PREPARE_COUNT=2
CONFIG_BT_CONN_TX_MAX=10
CONFIG_BT_L2CAP_TX_BUF_COUNT=10
CONFIG_BT_L2CAP_TX_MTU=247
CONFIG_BT_L2CAP_RX_MTU=247
CONFIG_BT_CTLR_TX_BUFFER_SIZE=251
CONFIG_BT_CTLR_DATA_LENGTH_MAX=251&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;And following configuration in prj.conf of ncs/zephyr/samples/bluetooth/hci_rpmsg&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;CONFIG_BT_USER_DATA_LEN_UPDATE=y
CONFIG_BT_RX_BUF_LEN=255
CONFIG_BT_L2CAP_TX_MTU=247
CONFIG_BT_L2CAP_RX_MTU=247
CONFIG_BT_CTLR_TX_BUFFER_SIZE=251
CONFIG_BT_CTLR_DATA_LENGTH_MAX=251
CONFIG_BT_MAX_CONN=2&amp;#160; &amp;#160; #default value was 16&amp;#160;&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Also updated connect() api in main.c of peripheral_uart. as&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;static void connected(struct bt_conn *conn, uint8_t err)
{
	char addr[BT_ADDR_LE_STR_LEN];

	if (err) {
		LOG_ERR(&amp;quot;Connection failed (err %u)&amp;quot;, err);
		return;
	}

	bt_addr_le_to_str(bt_conn_get_dst(conn), addr, sizeof(addr));
	LOG_INF(&amp;quot;Connected %s&amp;quot;, log_strdup(addr));

	current_conn = bt_conn_ref(conn);

	dk_set_led_on(CON_STATUS_LED);

        printk(&amp;quot;Start DLE...\n&amp;quot;);
        
        //below code is added to increase MTU size as per throughput example
	struct bt_conn_le_data_len_param data_len_param;

	data_len_param.tx_max_len = 200; // byte
	data_len_param.tx_max_time = 3750; // us

	err = bt_conn_le_data_len_update(current_conn, &amp;amp;data_len_param);
	if (err)
	{
		printk(&amp;quot;LE data length update failed: %d\n&amp;quot;, err);
	}
        else
	{
		printk(&amp;quot;LE data length update success \n&amp;quot;);
	}
}&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;updated&amp;nbsp;UART_BUF_SIZE to 100.&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Still, I am not able to send more than 36 characters from central to peripheral and getting an error&amp;nbsp;as&amp;nbsp;&amp;nbsp;&lt;span style="color:#ff0000;"&gt;central_uart: ATT error code: 0x09&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="color:#000000;"&gt;Note: Data received at the peripheral side are in a chunk of 18bytes.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="color:#ff0000;"&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="color:#ff0000;"&gt;&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Not able to transmit more than 20bytes with sample application "central_uart"</title><link>https://devzone.nordicsemi.com/thread/325879?ContentTypeID=1</link><pubDate>Fri, 20 Aug 2021 09:02:13 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:ae201175-106c-4b2d-b35a-08fef2b5ead5</guid><dc:creator>SanketC</dc:creator><description>&lt;p&gt;Hello&amp;nbsp;&lt;span&gt;Torbj&amp;oslash;rn,&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Thank you for your reply. As per your suggestion, I tried adding configurations in prj.conf of ncs/nrf/samples/bluetooth/central_uart &amp;amp;&amp;nbsp;ncs/nrf/samples/bluetooth/peripheral_uart and also added configuration of child imahe in prj.conf in ncs/zephyr/samples/bluetooth/hci_rpmsg&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;But while building the project from the cmd line I am getting this error:&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="color:#ff0000;"&gt;ncs_1_5_1/ncs/nrf/samples/bluetooth/central_uart/prj.conf:48: warning: attempt to assign the value &amp;#39;251&amp;#39; to the undefined symbol BT_BUF_ACL_RX_SIZE&lt;br /&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="color:#000000;"&gt;Please note that in my throughput example also I am not able to find &amp;quot;ACL&amp;quot; related stuff&amp;nbsp;in any conf file.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="color:#000000;"&gt;For your information, I am using ncs v1.5.1&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Please help to guide me.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Best Regards,&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Sanket Chadawar&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Not able to transmit more than 20bytes with sample application "central_uart"</title><link>https://devzone.nordicsemi.com/thread/325864?ContentTypeID=1</link><pubDate>Fri, 20 Aug 2021 08:30:47 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:b9e8ccc1-194c-4866-8a6e-50243d112cbd</guid><dc:creator>ovrebekk</dc:creator><description>&lt;p&gt;Hi Sanket&lt;/p&gt;
&lt;p&gt;I would recommend taking a look at the throughput example:&lt;br /&gt;nrf/samples/bluetooth/throughput&lt;/p&gt;
&lt;p&gt;If you copy the configuration from this example into your own you should be able to get better throughput.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;For the nRF5340 app you need the following configuration (as show in prj_nrf5340dk_nrf5340_cpuapp.conf):&lt;/p&gt;
&lt;p&gt;&lt;em&gt;CONFIG_BT_BUF_ACL_RX_SIZE=251&lt;/em&gt;&lt;br /&gt;&lt;em&gt;#CONFIG_BT_GATT_CLIENT=y&amp;nbsp;&lt;/em&gt;&lt;br /&gt;&lt;em&gt;CONFIG_BT_ATT_PREPARE_COUNT=2&lt;/em&gt;&lt;br /&gt;&lt;em&gt;CONFIG_BT_CONN_TX_MAX=10&lt;/em&gt;&lt;br /&gt;&lt;em&gt;CONFIG_BT_L2CAP_TX_BUF_COUNT=10&lt;/em&gt;&lt;br /&gt;&lt;em&gt;CONFIG_BT_L2CAP_TX_MTU=247&lt;/em&gt;&lt;br /&gt;&lt;em&gt;CONFIG_BT_BUF_ACL_RX_SIZE=251&lt;/em&gt;&lt;br /&gt;&lt;em&gt;CONFIG_BT_L2CAP_DYNAMIC_CHANNEL=y&lt;/em&gt;&lt;/p&gt;
&lt;p&gt;In the child image folder you can see the config needed for the hci_rpmsg project running on the network core:&lt;/p&gt;
&lt;p&gt;&lt;em&gt;CONFIG_BT_BUF_ACL_TX_SIZE=251&lt;/em&gt;&lt;br /&gt;&lt;em&gt;CONFIG_BT_CTLR_DATA_LENGTH_MAX=251&lt;/em&gt;&lt;br /&gt;&lt;em&gt;CONFIG_BT_BUF_ACL_RX_SIZE=251&lt;/em&gt;&lt;/p&gt;
&lt;p&gt;&lt;em&gt;CONFIG_BT_MAX_CONN=2&lt;/em&gt;&lt;/p&gt;
&lt;p&gt;Best regards&lt;br /&gt;Torbjørn&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>