<?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>Increase nrf5340 NUS sending data speed</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/93002/increase-nrf5340-nus-sending-data-speed</link><description>Hello Nordic team, 
 I&amp;#39;m a beginner on Nordic connect sdk, here have a question about how to increase nrf5340 sending data speed by NUS? 
 Below is what I testing model now. 
 Peripheral BLE : nrf5340 (peripheral_uart) 
 Central BLE: nrf52840 dongle </description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Thu, 27 Oct 2022 09:55:48 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/93002/increase-nrf5340-nus-sending-data-speed" /><item><title>RE: Increase nrf5340 NUS sending data speed</title><link>https://devzone.nordicsemi.com/thread/392783?ContentTypeID=1</link><pubDate>Thu, 27 Oct 2022 09:55:48 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:d891bdad-5028-4ab0-8008-ec54ec848de2</guid><dc:creator>Joakim Jakobsen</dc:creator><description>&lt;p&gt;Thanks.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Let me know if you have any further questions.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Br,&lt;br /&gt;Joakim&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Increase nrf5340 NUS sending data speed</title><link>https://devzone.nordicsemi.com/thread/392777?ContentTypeID=1</link><pubDate>Thu, 27 Oct 2022 09:35:44 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:e8da5f3e-04d3-4457-ad5f-770cb638c9f7</guid><dc:creator>allenboon</dc:creator><description>&lt;p&gt;Hi&amp;nbsp;&lt;span&gt;Joakim,&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;I have tested another slide shared code that make a good result (Both have peripheral and central code). The test throughput can achieve 1300kbps.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&amp;nbsp;&lt;a href="https://devzone.nordicsemi.com/f/nordic-q-a/84755/nrf-connect-sdk-nus-throughput-modifications-and-issues-for-peripheral_uart-central_uart-example-applications"&gt;nRF Connect SDK NUS throughput modifications and issues for peripheral_uart/central_uart example applications&lt;/a&gt;&amp;nbsp;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&lt;/span&gt;&lt;span&gt;But it only can build on v1.8.0 or less version.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;So, I tried to copy code and configuration to v2.1.0 NUS sample code.&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;It still make same result as I mentioned (only 7kbps). I do not know why this condition happened.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;If there are no other advise, I think I will use this code base to completed my project.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Many Thanks.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Allen&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Increase nrf5340 NUS sending data speed</title><link>https://devzone.nordicsemi.com/thread/392771?ContentTypeID=1</link><pubDate>Thu, 27 Oct 2022 09:03:51 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:9e5bb02e-2cae-4e4f-9b42-87a03f6d3f34</guid><dc:creator>Joakim Jakobsen</dc:creator><description>&lt;p&gt;Thanks.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Configuration looks good.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Did you test the example that Vidar linked to? As you can see from the ticket you linked, they were able to achieve around 1000kbps.&lt;/p&gt;
&lt;p&gt;Br,&amp;nbsp;&lt;br /&gt;Joakim&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Increase nrf5340 NUS sending data speed</title><link>https://devzone.nordicsemi.com/thread/392290?ContentTypeID=1</link><pubDate>Tue, 25 Oct 2022 07:02:15 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:b3e86687-b801-45b9-aea3-3250ab138668</guid><dc:creator>allenboon</dc:creator><description>&lt;p&gt;Hello &lt;span&gt;Joakim&lt;/span&gt;,&lt;/p&gt;
&lt;p&gt;&lt;span&gt;I have referenced BLE throughput sample and below Q&amp;amp;A&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&amp;nbsp;&lt;a href="https://devzone.nordicsemi.com/f/nordic-q-a/84487/ble-uart-nus-altering-mtu-and-faster-interval"&gt;https://devzone.nordicsemi.com/f/nordic-q-a/84487/ble-uart-nus-altering-mtu-and-faster-interval&lt;/a&gt;&amp;nbsp;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&amp;nbsp;&lt;a href="https://devzone.nordicsemi.com/f/nordic-q-a/86786/nrf5340-max-throughput"&gt;https://devzone.nordicsemi.com/f/nordic-q-a/86786/nrf5340-max-throughput&lt;/a&gt;&amp;nbsp;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;Now, I can set MTU size = 247bytes, &lt;span&gt;PHY data rate = 2M/S and connection interval = 400ms.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;Then, I change send data array length to 244 bytes and print the receive data on nRF 52840 dongle UART log.&lt;/p&gt;
&lt;p&gt;The testing result is 52840 dongle will get one packet data(244bytes) per 250ms.&lt;/p&gt;
&lt;p&gt;Is this result correct? or there are some other improvement method?&lt;/p&gt;
&lt;p&gt;Below is my prj.conf setting&lt;/p&gt;
&lt;p&gt;nrf5340:&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;#
# Copyright (c) 2018 Nordic Semiconductor
#
# SPDX-License-Identifier: LicenseRef-Nordic-5-Clause
#

# Enable the UART driver
CONFIG_UART_ASYNC_API=y
CONFIG_NRFX_UARTE0=y
CONFIG_SERIAL=y

CONFIG_GPIO=y

# Make sure printk is printing to the UART console
CONFIG_CONSOLE=y
CONFIG_UART_CONSOLE=y

CONFIG_HEAP_MEM_POOL_SIZE=2048

CONFIG_BT=y
CONFIG_BT_PERIPHERAL=y
CONFIG_BT_DEVICE_NAME=&amp;quot;Nordic_UART_Service&amp;quot;
CONFIG_BT_DEVICE_APPEARANCE=833
CONFIG_BT_MAX_CONN=1
CONFIG_BT_MAX_PAIRED=1

# Enable the NUS service
CONFIG_BT_NUS=y

# Enable bonding
CONFIG_BT_SETTINGS=y
CONFIG_FLASH=y
CONFIG_FLASH_PAGE_LAYOUT=y
CONFIG_FLASH_MAP=y
CONFIG_NVS=y
CONFIG_SETTINGS=y

# Enable DK LED and Buttons library
CONFIG_DK_LIBRARY=y

# This example requires more workqueue stack
CONFIG_SYSTEM_WORKQUEUE_STACK_SIZE=2048

# Config logger
CONFIG_LOG=y
CONFIG_USE_SEGGER_RTT=y
CONFIG_LOG_BACKEND_RTT=n
CONFIG_LOG_BACKEND_UART=y

CONFIG_ASSERT=y

CONFIG_BT_NUS_UART_BUFFER_SIZE=247
#CONFIG_BT_NUS_UART_RX_WAIT_TIME=20

CONFIG_BT_BUF_ACL_RX_SIZE=502
#CONFIG_BT_GATT_CLIENT=y
CONFIG_BT_ATT_PREPARE_COUNT=2
CONFIG_BT_CONN_TX_MAX=10
CONFIG_BT_L2CAP_TX_BUF_COUNT=10
CONFIG_BT_L2CAP_TX_MTU=498
CONFIG_BT_L2CAP_DYNAMIC_CHANNEL=y
CONFIG_BT_CTLR_PHY_2M=y
CONFIG_BT_CTLR_RX_BUFFERS=2
CONFIG_BT_BUF_ACL_TX_COUNT=10
CONFIG_BT_BUF_ACL_TX_SIZE=502
CONFIG_BT_CTLR_DATA_LENGTH_MAX=251
CONFIG_BT_USER_DATA_LEN_UPDATE=y &lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;nrf52840 dongle:&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;#
# Copyright (c) 2018 Nordic Semiconductor
#
# SPDX-License-Identifier: LicenseRef-Nordic-5-Clause
#

# Enable the UART driver
CONFIG_UART_ASYNC_API=y
CONFIG_NRFX_UARTE0=y
CONFIG_SERIAL=y
CONFIG_CONSOLE=y
CONFIG_UART_CONSOLE=y

# Enable the BLE stack with GATT Client configuration
CONFIG_BT=y
CONFIG_BT_CENTRAL=y
CONFIG_BT_SMP=y
CONFIG_BT_GATT_CLIENT=y

# Enable the BLE modules from NCS
CONFIG_BT_NUS_CLIENT=y
CONFIG_BT_SCAN=y
CONFIG_BT_SCAN_FILTER_ENABLE=y
CONFIG_BT_SCAN_UUID_CNT=1
CONFIG_BT_GATT_DM=y
CONFIG_HEAP_MEM_POOL_SIZE=2048

# This example requires more workqueue stack
CONFIG_SYSTEM_WORKQUEUE_STACK_SIZE=2048

# Enable bonding
CONFIG_BT_SETTINGS=y
CONFIG_FLASH=y
CONFIG_FLASH_PAGE_LAYOUT=y
CONFIG_FLASH_MAP=y
CONFIG_NVS=y
CONFIG_SETTINGS=y

# Config logger
CONFIG_LOG=y
CONFIG_USE_SEGGER_RTT=y
CONFIG_LOG_BACKEND_RTT=y
CONFIG_LOG_BACKEND_UART=n

CONFIG_ASSERT=y

CONFIG_BT_BUF_ACL_RX_SIZE=502
CONFIG_BT_ATT_PREPARE_COUNT=2
CONFIG_BT_CONN_TX_MAX=10
CONFIG_BT_L2CAP_TX_BUF_COUNT=10
CONFIG_BT_L2CAP_TX_MTU=498
CONFIG_BT_BUF_ACL_TX_SIZE=502
CONFIG_BT_L2CAP_DYNAMIC_CHANNEL=y
CONFIG_BT_CTLR_PHY_2M=y

CONFIG_BT_USER_DATA_LEN_UPDATE=y
CONFIG_BT_USER_PHY_UPDATE=y
CONFIG_BT_GAP_AUTO_UPDATE_CONN_PARAMS=n&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;In the other hand, I find document is about throughput maximum on nRF52.&lt;/p&gt;
&lt;p&gt;Is this test result is as same as nRF5340?&lt;/p&gt;
&lt;p&gt;&lt;a href="https://infocenter.nordicsemi.com/index.jsp?topic=%2Fsds_s140%2FSDS%2Fs1xx%2Fble_data_throughput%2Fble_data_throughput.html"&gt;https://infocenter.nordicsemi.com/index.jsp?topic=%2Fsds_s140%2FSDS%2Fs1xx%2Fble_data_throughput%2Fble_data_throughput.html&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Waiting for you suggestions.&lt;/p&gt;
&lt;p&gt;Many Thanks&lt;/p&gt;
&lt;p&gt;Allen&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;div id="gtx-trans" style="left:-55px;position:absolute;top:822px;"&gt;
&lt;div class="gtx-trans-icon"&gt;&lt;/div&gt;
&lt;/div&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Increase nrf5340 NUS sending data speed</title><link>https://devzone.nordicsemi.com/thread/392043?ContentTypeID=1</link><pubDate>Mon, 24 Oct 2022 08:08:09 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:6f2146a9-b08b-4c80-acf3-60f9c2e09a4b</guid><dc:creator>Joakim Jakobsen</dc:creator><description>&lt;p&gt;Thanks.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;You could also try to increase the transmit buffer. That could help improve the throughput.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;I would suggest that you take a look at our throughput example in the SDK. This could give you some good advice on how to increase the throughput for your application.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Br,&amp;nbsp;&lt;br /&gt;Joakim&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Increase nrf5340 NUS sending data speed</title><link>https://devzone.nordicsemi.com/thread/391584?ContentTypeID=1</link><pubDate>Thu, 20 Oct 2022 08:45:39 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:5439ca25-b5c4-4122-85f8-bef4f9fdb12b</guid><dc:creator>allenboon</dc:creator><description>&lt;p&gt;Hi Joakim,&lt;/p&gt;
&lt;p&gt;Thanks for your reply.&lt;/p&gt;
&lt;p&gt;I guess you mean central_uart (nrf52840 dongle) connection interval?&lt;/p&gt;
&lt;p&gt;On central_uart sample code do not have define connection interval (maybe I do not know where to change)?&lt;/p&gt;
&lt;p&gt;So, I add below code to change connection interval.(min 7.5ms, max 30ms)&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;static const struct bt_le_conn_param conn_params = BT_LE_CONN_PARAM_INIT(
	7.5, 30, 10, 400);

static int scan_init(void)
{
	int err;
	struct bt_scan_init_param scan_init = {
		.scan_param = NULL,
		.conn_param = &amp;amp;conn_params,
		.connect_if_match = 1,

	};

	bt_scan_init(&amp;amp;scan_init);
	bt_scan_cb_register(&amp;amp;scan_cb);

	err = bt_scan_filter_add(BT_SCAN_FILTER_TYPE_UUID, BT_UUID_NUS_SERVICE);
	if (err) {
		LOG_ERR(&amp;quot;Scanning filters cannot be set (err %d)&amp;quot;, err);
		return err;
	}

	err = bt_scan_filter_enable(BT_SCAN_UUID_FILTER, false);
	if (err) {
		LOG_ERR(&amp;quot;Filters cannot be turned on (err %d)&amp;quot;, err);
		return err;
	}

	LOG_INF(&amp;quot;Scan module initialized&amp;quot;);
	return err;
}&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;Then, the transfer speed still 50ms.&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Allen&lt;/p&gt;
&lt;p&gt;Thanks&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Increase nrf5340 NUS sending data speed</title><link>https://devzone.nordicsemi.com/thread/391582?ContentTypeID=1</link><pubDate>Thu, 20 Oct 2022 08:27:37 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:08d4c2f6-e05b-4ad6-b5f9-d5602bde656a</guid><dc:creator>Joakim Jakobsen</dc:creator><description>&lt;p&gt;Hi!&lt;/p&gt;
&lt;p&gt;What is your connection interval defined as?&lt;/p&gt;
&lt;p&gt;Maybe you could try to decrease the connection interval? So that you can send data more often.&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Br, &lt;br /&gt;Joakim&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>