<?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>NUS Central Write To Peripheral RX Characteristic Very Slow</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/111967/nus-central-write-to-peripheral-rx-characteristic-very-slow</link><description>Hello! 
 I am currently running into throughput problems while using the Nordic Uart Service (NUS). 
 I am building a project for a peripheral and wanted to test the possible throughput by using the central_uart example . I modified this example slightly</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Mon, 22 Jul 2024 13:57:40 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/111967/nus-central-write-to-peripheral-rx-characteristic-very-slow" /><item><title>RE: NUS Central Write To Peripheral RX Characteristic Very Slow</title><link>https://devzone.nordicsemi.com/thread/495046?ContentTypeID=1</link><pubDate>Mon, 22 Jul 2024 13:57:40 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:18ee5d3d-aba8-4e90-a8e3-f47240e38151</guid><dc:creator>Simonr</dc:creator><description>&lt;p&gt;Hi&lt;/p&gt;
&lt;p&gt;Hieu is now out of office, so this case has been assigned to me.&lt;/p&gt;
&lt;p&gt;Indeed, the connection interval will impact the throughput rate. This is because the interval will set how long&amp;nbsp;the connection will take, so it will leave more time for the data transmissions and less &amp;quot;down-time&amp;quot;. The only real downside will indeed be current consumption increasing, as well as the chance of finding&amp;nbsp;&lt;strong&gt;new&amp;nbsp;&lt;/strong&gt;connectable devices, as it will just keep connecting to the already existing one I believe.&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: NUS Central Write To Peripheral RX Characteristic Very Slow</title><link>https://devzone.nordicsemi.com/thread/494318?ContentTypeID=1</link><pubDate>Wed, 17 Jul 2024 10:40:39 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:e78ee2ed-bbd9-4ca7-b8ed-418486f46481</guid><dc:creator>DB_ECD</dc:creator><description>&lt;p&gt;Hello Hieu,&lt;/p&gt;
&lt;p&gt;I tried these config values at the very beginning already. I just comiled it again using these values, but it did not significantly improve the result.&lt;/p&gt;
&lt;p&gt;However, I kept changing and trying different things and found out that the connection interval value has a huge impact on the througput rate (as to be expected tbh).&amp;nbsp;&lt;/p&gt;
&lt;p&gt;How is this working exactly? Are all the messages as configured in the buffer related configuration values processed and buffered and then sent all at once on every connection event, i.e. channel hop?&lt;/p&gt;
&lt;p&gt;As a related question: is there a downside besides increased currend consumption to reducing the connection interval time to a small value of a few ms?&lt;/p&gt;
&lt;p&gt;I believe that it&amp;#39;s really coming down to chosing just the right connection as well as configuration parameters. If there just weren&amp;#39;t so many possibilities.. Anyway, thanks again for all your help so far!&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: NUS Central Write To Peripheral RX Characteristic Very Slow</title><link>https://devzone.nordicsemi.com/thread/493532?ContentTypeID=1</link><pubDate>Thu, 11 Jul 2024 22:18:50 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:ac434590-b14e-4ad6-9ca1-0c5f63c851a6</guid><dc:creator>Hieu</dc:creator><description>&lt;p&gt;I notice some of your configuration differs from that in the Throughput sample. The buffer related ones could explain the issue. Could you please add these configurations and retry?&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;CONFIG_BT_USER_DATA_LEN_UPDATE=y
CONFIG_BT_USER_PHY_UPDATE=y
CONFIG_BT_GAP_AUTO_UPDATE_CONN_PARAMS=n

CONFIG_BT_BUF_ACL_RX_SIZE=502
CONFIG_BT_ATT_PREPARE_COUNT=2
CONFIG_BT_L2CAP_TX_BUF_COUNT=10
CONFIG_BT_L2CAP_TX_MTU=498
CONFIG_BT_L2CAP_DYNAMIC_CHANNEL=y
CONFIG_BT_CONN_TX_MAX=10
CONFIG_BT_BUF_ACL_TX_COUNT=10
CONFIG_BT_BUF_ACL_TX_SIZE=502

CONFIG_BT_CTLR_DATA_LENGTH_MAX=251
CONFIG_BT_CTLR_PHY_2M=y
CONFIG_BT_CTLR_PHY_CODED=y
CONFIG_BT_CTLR_SDC_MAX_CONN_EVENT_LEN_DEFAULT=4000000&lt;/pre&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: NUS Central Write To Peripheral RX Characteristic Very Slow</title><link>https://devzone.nordicsemi.com/thread/493112?ContentTypeID=1</link><pubDate>Wed, 10 Jul 2024 09:56:43 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:33713f16-d8b2-4663-895d-09f7d08fb429</guid><dc:creator>DB_ECD</dc:creator><description>&lt;p&gt;Thanks for your reply and sorry for my delay as well, I was on a short vacation the last week.&lt;/p&gt;
&lt;p&gt;The log and Sniffer did come from the same test.&lt;/p&gt;
&lt;p&gt;I ran the test again, this time using 20 packets (where the first byte of every packet is used as a package counter), the data of which you&amp;#39;ll find here:&lt;/p&gt;
&lt;p&gt;&lt;a href="https://devzone.nordicsemi.com/cfs-file/__key/communityserver-discussions-components-files/4/5340.2024_2D00_07_2D00_10_5F00_DataRateTest2.zip"&gt;devzone.nordicsemi.com/.../5340.2024_2D00_07_2D00_10_5F00_DataRateTest2.zip&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Here, I encountered basically all the same things as before:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;on the peripheral side: a 4-4-4-5-3 spread&lt;br /&gt;(as seen in the Log_peripheral, Uart_peripheral and sniffer-pcap files)&lt;/li&gt;
&lt;li&gt;on the central side: a 4-4-4-4-4 spread&lt;br /&gt;(as seen in the Log_central file)&lt;/li&gt;
&lt;/ul&gt;
[quote userid="9456" url="~/f/nordic-q-a/111967/nus-central-write-to-peripheral-rx-characteristic-very-slow/491684"]P.s:&amp;nbsp;You can also try increasing&amp;nbsp;&lt;a href="https://docs.nordicsemi.com/bundle/ncs-2.6.1/page/kconfig/index.html#CONFIG_BT_CTLR_SDC_MAX_CONN_EVENT_LEN_DEFAULT"&gt;CONFIG_BT_CTLR_SDC_MAX_CONN_EVENT_LEN_DEFAULT&lt;/a&gt;. It is probably a good idea to increase it by just a little bit to experimentally verify it is working first.[/quote]
&lt;p&gt;I actually already did that on the central side, increasing this number to the maximum value of 4.000.000. This was used in the test above as well. Changing this value did not seem to improve/worsen the result.&lt;/p&gt;
&lt;p&gt;I have to admit that I am kind of lost here.&lt;/p&gt;
&lt;p&gt;PS: here are the prj.conf files for peripheral and central, if you need them.&lt;/p&gt;
&lt;p&gt;&lt;a href="https://devzone.nordicsemi.com/cfs-file/__key/communityserver-discussions-components-files/4/prj_5F00_configs.zip"&gt;devzone.nordicsemi.com/.../prj_5F00_configs.zip&lt;/a&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: NUS Central Write To Peripheral RX Characteristic Very Slow</title><link>https://devzone.nordicsemi.com/thread/491684?ContentTypeID=1</link><pubDate>Mon, 01 Jul 2024 19:42:50 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:ceadc777-7ead-4270-9533-6893e7166faf</guid><dc:creator>Hieu</dc:creator><description>&lt;p&gt;P.s:&amp;nbsp;You can also try increasing&amp;nbsp;&lt;a href="https://docs.nordicsemi.com/bundle/ncs-2.6.1/page/kconfig/index.html#CONFIG_BT_CTLR_SDC_MAX_CONN_EVENT_LEN_DEFAULT"&gt;CONFIG_BT_CTLR_SDC_MAX_CONN_EVENT_LEN_DEFAULT&lt;/a&gt;. It is probably a good idea to increase it by just a little bit to experimentally verify it is working first.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: NUS Central Write To Peripheral RX Characteristic Very Slow</title><link>https://devzone.nordicsemi.com/thread/491680?ContentTypeID=1</link><pubDate>Mon, 01 Jul 2024 19:15:24 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:f4cc7979-c863-4312-8aa3-bf89356feaaa</guid><dc:creator>Hieu</dc:creator><description>&lt;p&gt;Hello DB_ECD,&lt;/p&gt;
&lt;p&gt;I am very sorry for the delay.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;The sniffer log show that the transfer was done over three connection events.&amp;nbsp;4 chunks in the first connection event at t~=7.49; 5 chunks in the next event, and 1 chunk in the last one. So overall, it matches up with your observation of that the transmission took 800ms.&lt;/p&gt;
&lt;p&gt;&lt;img style="max-height:240px;max-width:320px;" src="https://devzone.nordicsemi.com/resized-image/__size/640x480/__key/communityserver-discussions-components-files/4/pastedimage1719860546788v1.png" alt=" " /&gt;&lt;/p&gt;
&lt;p&gt;It mismatches with the log a little, where the chunks are sent in a 4-4-2 spread. Do the log and the sniffer come from the same test?&amp;nbsp;&lt;/p&gt;
&lt;p&gt;This is a little&amp;nbsp;important because I think this might be Connection Event Length Extension at work, where the SoftDevice Controller increase the Connection Event Length if there are more data to send, but only by one TX-RX pair at a time. See&amp;nbsp;&lt;a href="https://docs.nordicsemi.com/bundle/ncs-2.6.1/page/nrfxlib/softdevice_controller/doc/scheduling.html"&gt;Scheduling (nordicsemi.com)&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;The 4-5-1 spread matches that behavior, but the 4-4-2 one doesn&amp;#39;t.&lt;/p&gt;
&lt;p&gt;Do you mind repeating this experiment with more chunks?&lt;/p&gt;
&lt;p&gt;Also, it might be a little helpful with reading the sniffer log to add some manner of ASCII counter in the payload.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: NUS Central Write To Peripheral RX Characteristic Very Slow</title><link>https://devzone.nordicsemi.com/thread/490869?ContentTypeID=1</link><pubDate>Wed, 26 Jun 2024 12:16:15 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:61fadbda-042b-4476-9f85-287616d16796</guid><dc:creator>DB_ECD</dc:creator><description>&lt;p&gt;Hello Hieu,&lt;/p&gt;
&lt;p&gt;do you have any updates for me?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: NUS Central Write To Peripheral RX Characteristic Very Slow</title><link>https://devzone.nordicsemi.com/thread/489902?ContentTypeID=1</link><pubDate>Fri, 21 Jun 2024 09:38:39 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:8c3a0f4d-3d80-4503-9315-c2945734ee5f</guid><dc:creator>DB_ECD</dc:creator><description>&lt;p&gt;Hello Hieu,&lt;/p&gt;
&lt;p&gt;I&amp;#39;m sorry for my late reply, I had some urgent work issues to address.&lt;/p&gt;
&lt;p&gt;Now I tried my communication chain again with the same outcome. The attached .zip-file contains the following:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Logs of both the central as well as the peripheral (where you can see the timestamps with the delay)&lt;/li&gt;
&lt;li&gt;&amp;nbsp;A screenshot of the uart output of the peripheral, where you can see that all 2440 bytes were received and transmitted in 820 ms&lt;/li&gt;
&lt;li&gt;the wireshark capture of these events&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;a href="https://devzone.nordicsemi.com/cfs-file/__key/communityserver-discussions-components-files/4/DataRateTest.zip"&gt;devzone.nordicsemi.com/.../DataRateTest.zip&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;The only thing I can detect right now is that there is a change in the &amp;quot;Channel index&amp;quot; every time there is this time delay.&lt;/p&gt;
&lt;p&gt;I hope, this will give you further information to work with. If you need anything else please let me know.&lt;/p&gt;
&lt;p&gt;Thanks!&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: NUS Central Write To Peripheral RX Characteristic Very Slow</title><link>https://devzone.nordicsemi.com/thread/488354?ContentTypeID=1</link><pubDate>Tue, 11 Jun 2024 13:44:31 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:9038ab07-2012-40b2-91af-ad7160d52d02</guid><dc:creator>DB_ECD</dc:creator><description>&lt;p&gt;Hi Hieu,&lt;/p&gt;
[quote userid="9456" url="~/f/nordic-q-a/111967/nus-central-write-to-peripheral-rx-characteristic-very-slow/488348"]lright, but SystemView is quite valuable when trying to debug&amp;nbsp;issues regarding threads and OS timing, so perhaps this need to be looked into someday.[/quote]
&lt;p&gt;It sounded good to me too and I was kind of bummed out it crashed every time. I&amp;#39;ll look into that when I have a little bit more time.&lt;/p&gt;
[quote userid="9456" url="~/f/nordic-q-a/111967/nus-central-write-to-peripheral-rx-characteristic-very-slow/488348"]&lt;p&gt;Your log says the MTU size is 244, and the data you are trying to send is also 244.&lt;/p&gt;
&lt;p&gt;3 bytes are necessary for the ATT Opcode and Handle, so you only have 241 bytes for each packet.&amp;nbsp;Your 244 bytes then will be split into two packets.&lt;/p&gt;
&lt;p&gt;Each of them when write with response will take one connection interval.&amp;nbsp;This means that the worst case wait time is two connection intervals. Because your interval is 320ms, the worst case is 640ms. Does this sound right?&lt;/p&gt;[/quote]
&lt;p&gt;Not quite right. I Set the MTU in the prj.conf file (both on central and peripheral) with CONFIG_BT_L2CAP_TX_MTU=247 while the Log you see in the original post is created using &lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="c_cpp"&gt;uint16_t payload_mtu =
	bt_gatt_get_mtu(conn) - 3; // 3 bytes used for Attribute headers.
LOG_INF(&amp;quot;New MTU: %d bytes&amp;quot;, payload_mtu);&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;Therfore it should be possible to send 244 bytes in one packet, right? Also, the interval number in the Log is the value from conn.h:&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="c_cpp"&gt;/** Connection parameters for LE connections */
struct bt_le_conn_param {
	uint16_t interval_min;
	uint16_t interval_max;
	uint16_t latency;
	uint16_t timeout;
};&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;The actual time should be interval * 1.25ms = 320 * 1.25 = 400 ms. Is this correct? However, I just used these Connection Parameter values because they resultet in a good data rate in the Thoughput example. Is there a way to figure out optimum values based on packet length etc. (i.e. actual values from my project)?&lt;/p&gt;
[quote userid="9456" url="~/f/nordic-q-a/111967/nus-central-write-to-peripheral-rx-characteristic-very-slow/488348"]Can you get me a sniffer trace of all the cases that you want to analyze?[/quote]
&lt;p&gt;I&amp;#39;ll do that tomorrow!&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: NUS Central Write To Peripheral RX Characteristic Very Slow</title><link>https://devzone.nordicsemi.com/thread/488348?ContentTypeID=1</link><pubDate>Tue, 11 Jun 2024 13:14:57 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:49a075ad-0a73-420c-8074-fa975ef526ca</guid><dc:creator>Hieu</dc:creator><description>&lt;p&gt;Hi DB_ECD,&lt;/p&gt;
[quote user="DB_ECD"]Thank you for your reply. However, SystemView crashes immediately every time it is supposed to capture the data. I tried it for some time now, sorry to say that this seems like wasted time to me.[/quote]
&lt;p&gt;Alright, but SystemView is quite valuable when trying to debug&amp;nbsp;issues regarding threads and OS timing, so perhaps this need to be looked into someday.&lt;/p&gt;
&lt;p&gt;But that qualifies for a dedicated case of its own. For&amp;nbsp;this topic, we can try another approach.&lt;/p&gt;
[quote user=""]I know that the Throughput example uses &lt;code&gt;bt_gatt_write_withous_response()&lt;/code&gt; while the &lt;code&gt;nus_client uses bt_gatt_write()&lt;/code&gt; which, if I&amp;#39;m correct, has an acknowledge in the link layer included. But I don&amp;#39;t think that this would cause this huge delay...[/quote]
&lt;p&gt;Your log says the MTU size is 244, and the data you are trying to send is also 244.&lt;/p&gt;
&lt;p&gt;3 bytes are necessary for the ATT Opcode and Handle, so you only have 241 bytes for each packet.&amp;nbsp;Your 244 bytes then will be split into two packets.&lt;/p&gt;
&lt;p&gt;Each of them when write with response will take one connection interval.&amp;nbsp;This means that the worst case wait time is two connection intervals. Because your interval is 320ms, the worst case is 640ms. Does this sound right?&lt;/p&gt;
&lt;p&gt;If not, we might want to take a sniffer log and examine the data.&lt;/p&gt;
[quote user="DB_ECD"]&lt;p&gt;Simple stuff basically, no delay or sleep or anything. However, in the LOG output I notice that the sending is happening in some kind of time chunks, as you can see here:&lt;/p&gt;
&lt;p&gt;...&lt;/p&gt;
&lt;p&gt;Between Blocks 4/5 and 8/9, there is again a delay of 250/400ms respectively.&lt;/p&gt;
&lt;p&gt;Now I don&amp;#39;t really understand why this is happening. Shouldn&amp;#39;t &lt;code&gt;bt_gatt_write_without_response&lt;/code&gt;() send out the data as fast as possible? What is the cause of the delay here?&lt;/p&gt;[/quote]
&lt;p&gt;It could be that the connection event is being ended prematurely. We will need to look into the sniffer trace to see why though.&lt;/p&gt;
&lt;p&gt;Can you get me a sniffer trace of all the cases that you want to analyze?&lt;/p&gt;
&lt;p&gt;Hieu&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: NUS Central Write To Peripheral RX Characteristic Very Slow</title><link>https://devzone.nordicsemi.com/thread/488244?ContentTypeID=1</link><pubDate>Tue, 11 Jun 2024 08:19:07 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:9a9a329b-d28b-4ba4-801d-c5796f3d7ec2</guid><dc:creator>DB_ECD</dc:creator><description>&lt;p&gt;Hello again,&lt;/p&gt;
&lt;p&gt;I changed some things around that I&amp;#39;d like to let you know:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;within the central_uart.c &lt;code&gt;main&lt;/code&gt;() function, &lt;code&gt;bt_nus_client_send&lt;/code&gt;() is called&lt;/li&gt;
&lt;li&gt;this function in turn (within nus_client.c) calls &lt;code&gt;bt_gatt_write&lt;/code&gt;() (which than again should promt the callback that causes the above mentioned delay)&lt;/li&gt;
&lt;li&gt;I now changed the &lt;code&gt;bt_gatt_write&lt;/code&gt;() to &lt;code&gt;bt_gatt_write_without_response&lt;/code&gt;(), as this is used withing the Throughput example.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Now, within the &lt;code&gt;main&lt;/code&gt;() of central_uart.c I call the &lt;code&gt;bt_nus_client_send&lt;/code&gt;() in a loop like so:&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="c_cpp"&gt;int main(void)
{
    // ...
    // INITIALIZATIONS
    // ...

	for (int i = 0; i &amp;lt; 10; i++) 
	{
		uint8_t pucBuf[UART_BUF_SIZE] = 
		{
			// DUMMY DATA; e.g.:
			0x00, 0x01, 0x02, 0x03
		};

		LOG_DBG(&amp;quot;Sending data block no %d&amp;quot;, i + 1);

		err = bt_nus_client_send(&amp;amp;nus_client, pucBuf, sizeof(pucBuf));
		if (err) 
		{
			LOG_WRN(&amp;quot;Failed to send data over BLE connection&amp;quot;
				&amp;quot;(err %d)&amp;quot;, err);
		}
	}
}&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;with the changed bt_nus_client_send() in nus_client.c&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="c_cpp"&gt;int bt_nus_client_send(struct bt_nus_client *nus_c, const uint8_t *data,
		       uint16_t len)
{
	int err;

	if (!nus_c-&amp;gt;conn) {
		return -ENOTCONN;
	}
    
    // COMMENT THIS OUT IN ORDER TO RUN THIS SEND FUNCTION MULTIPLE TIMES
	// LOG_INF(&amp;quot;Trying to set atomic bit for NUS_C_RX_WRITE_PENDING&amp;quot;);
	// if (atomic_test_and_set_bit(&amp;amp;nus_c-&amp;gt;state, NUS_C_RX_WRITE_PENDING)) {
	// 	return -EALREADY;
	// }
	// LOG_INF(&amp;quot;Atomic Bit set for NUS_C_RX_WRITE_PENDING, value: %d&amp;quot;, atomic_test_bit(&amp;amp;nus_c-&amp;gt;state, NUS_C_RX_WRITE_PENDING));

	nus_c-&amp;gt;rx_write_params.func = on_sent;
	nus_c-&amp;gt;rx_write_params.handle = nus_c-&amp;gt;handles.rx;
	nus_c-&amp;gt;rx_write_params.offset = 0;
	nus_c-&amp;gt;rx_write_params.data = data;
	nus_c-&amp;gt;rx_write_params.length = len;

    // INITIALLY THIS BLOCK IS CALLED
	// err = bt_gatt_write(nus_c-&amp;gt;conn, &amp;amp;nus_c-&amp;gt;rx_write_params);
	// if (err) {
	// 	atomic_clear_bit(&amp;amp;nus_c-&amp;gt;state, NUS_C_RX_WRITE_PENDING);
	// }

    // --&amp;gt; CHANGED THIS TO TEST THROUGHPUT INCREASE
	err = bt_gatt_write_without_response(nus_c-&amp;gt;conn, nus_c-&amp;gt;handles.rx, data, len, false);


	return err;
}&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;Simple stuff basically, no delay or sleep or anything. However, in the LOG output I notice that the sending is happening in some kind of time chunks, as you can see here:&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;[00:00:11.731,994] &amp;lt;dbg&amp;gt; central_uart: main: Sending data block no 1
[00:00:11.732,635] &amp;lt;dbg&amp;gt; central_uart: main: Sending data block no 2
[00:00:11.733,276] &amp;lt;dbg&amp;gt; central_uart: main: Sending data block no 3
[00:00:11.733,947] &amp;lt;dbg&amp;gt; central_uart: main: Sending data block no 4
[00:00:11.984,008] &amp;lt;dbg&amp;gt; central_uart: main: Sending data block no 5
[00:00:11.985,565] &amp;lt;dbg&amp;gt; central_uart: main: Sending data block no 6
[00:00:11.987,213] &amp;lt;dbg&amp;gt; central_uart: main: Sending data block no 7
[00:00:11.987,854] &amp;lt;dbg&amp;gt; central_uart: main: Sending data block no 8
[00:00:12.384,002] &amp;lt;dbg&amp;gt; central_uart: main: Sending data block no 9
[00:00:12.385,559] &amp;lt;dbg&amp;gt; central_uart: main: Sending data block no 10&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;Between Blocks 4/5 and 8/9, there is again a delay of 250/400ms respectively.&lt;/p&gt;
&lt;p&gt;Now I don&amp;#39;t really understand why this is happening. Shouldn&amp;#39;t &lt;code&gt;bt_gatt_write_without_response&lt;/code&gt;() send out the data as fast as possible? What is the cause of the delay here?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: NUS Central Write To Peripheral RX Characteristic Very Slow</title><link>https://devzone.nordicsemi.com/thread/488162?ContentTypeID=1</link><pubDate>Mon, 10 Jun 2024 14:06:35 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:36abda20-2fc9-4435-a241-5d8d3e35d764</guid><dc:creator>DB_ECD</dc:creator><description>&lt;p&gt;Thank you for your reply. However, SystemView crashes immediately every time it is supposed to capture the data. I tried it for some time now, sorry to say that this seems like wasted time to me.&lt;/p&gt;
&lt;p&gt;Still, it seems to me that the 800ms delay that I am encountering is way too high to be normal behaviour. Is there no general idea what could be the cause/solution of/for this?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: NUS Central Write To Peripheral RX Characteristic Very Slow</title><link>https://devzone.nordicsemi.com/thread/488150?ContentTypeID=1</link><pubDate>Mon, 10 Jun 2024 13:13:06 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:584d3fa7-9df2-4e57-a2fa-8666da8b416c</guid><dc:creator>Susheel Nuguru</dc:creator><description>&lt;p&gt;Haven&amp;#39;t tried those configurations myself, but you can try &lt;a href="https://www.zephyrproject.org/tracing-zephyr-applications-with-segger-systemview/"&gt;SystemView&lt;/a&gt;&amp;nbsp;and get a better idea on the context where that ~800ms delay (wait) is happening. After getting the context of that delay, we would have more info to calibrate on reducing that delay. SystemView is free to try on Nordic products, so please give it a try.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>