<?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>Enabling the 2MB Phy to increase nus throughput : nRF connect sdk 2.4.0</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/102672/enabling-the-2mb-phy-to-increase-nus-throughput-nrf-connect-sdk-2-4-0</link><description>Hi, 
 We have developed the application based on NRF52840 using nrf Connect SDK 2.4.0 in which we are transferring the data via nus to ble uart, 
 Everything is working fine but the data transfer rate is very slow. 
 I need to increase the data transmission</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Mon, 28 Aug 2023 12:32:04 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/102672/enabling-the-2mb-phy-to-increase-nus-throughput-nrf-connect-sdk-2-4-0" /><item><title>RE: Enabling the 2MB Phy to increase nus throughput : nRF connect sdk 2.4.0</title><link>https://devzone.nordicsemi.com/thread/443373?ContentTypeID=1</link><pubDate>Mon, 28 Aug 2023 12:32:04 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:bc88eea1-f5fe-4259-814d-e739abd97c94</guid><dc:creator>Einar Thorsrud</dc:creator><description>&lt;p&gt;Hi. I am glad this was resolved.&amp;nbsp;To close a public ticket that has been answered you may click the &amp;quot;Verify answer&amp;quot; button on the reply that solved the case. This updates the ticket by setting it to &amp;quot;Verified answer&amp;quot;.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Enabling the 2MB Phy to increase nus throughput : nRF connect sdk 2.4.0</title><link>https://devzone.nordicsemi.com/thread/443372?ContentTypeID=1</link><pubDate>Mon, 28 Aug 2023 12:26:39 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:ecb8c7f3-cb8e-41b4-a0c6-e6769ebb835e</guid><dc:creator>Ramachandra Reddy</dc:creator><description>&lt;p&gt;Hi Thorsrud,&lt;/p&gt;
&lt;p&gt;&amp;nbsp; Thanks for the support, please let me know how to close the ticket&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&amp;nbsp;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Enabling the 2MB Phy to increase nus throughput : nRF connect sdk 2.4.0</title><link>https://devzone.nordicsemi.com/thread/440484?ContentTypeID=1</link><pubDate>Wed, 09 Aug 2023 11:53:23 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:0eecfa4f-4902-4771-9169-2f00a1ceff1b</guid><dc:creator>Ramachandra Reddy</dc:creator><description>&lt;p&gt;thanks a lot it works....&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Enabling the 2MB Phy to increase nus throughput : nRF connect sdk 2.4.0</title><link>https://devzone.nordicsemi.com/thread/440481?ContentTypeID=1</link><pubDate>Wed, 09 Aug 2023 11:48:10 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:bbed6324-9241-4cd8-ab41-37106588d572</guid><dc:creator>Einar Thorsrud</dc:creator><description>&lt;p&gt;Hi Ram,&lt;/p&gt;
[quote user="Ramachandra Reddy"]also i tried to do the configuration as&amp;nbsp; suggested, but i am gettign the dependencies error as shown below[/quote]
&lt;p&gt;That is odd, when I tested the NUS smaples sample from NCS 2.4 with just the described change on my end&amp;nbsp;CONFIG_BT_PHY_UPDATE got automatically set. But if not, you can set it manually&amp;nbsp; (CONFIG_BT_PHY_UPDATE=y). The same with any other dependencies.&lt;/p&gt;
[quote user="Ramachandra Reddy"]1. can Phy changing to 2MB improves the nus data transmission speed.?[/quote]
&lt;p&gt;That will double the (theoretical) capacity of the Bluetooth link, so assuming you also do other adjustments (longer packet, larger buffers so you can send many packet per connection event etc), then yes. But if the bottle-neck is somewhere else (due to missing other relevant configs as mentioned, or for instance if you use physical UART), then it might not help.&lt;/p&gt;
[quote user="Ramachandra Reddy"]2. How do i monitor in the mobile nrf app to check if the phy layer got changed ..?[/quote]
&lt;p&gt;You cannot see that (at lest not on iOS). So I would suggest checking with a sniffer or logging as I suggested in my initial post (that diff is for the NUS central sample but you can use the exact same method with the peripheral as well).&lt;/p&gt;
&lt;p&gt;Einar&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Enabling the 2MB Phy to increase nus throughput : nRF connect sdk 2.4.0</title><link>https://devzone.nordicsemi.com/thread/440447?ContentTypeID=1</link><pubDate>Wed, 09 Aug 2023 09:28:14 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:9c7cef3e-0c4a-4985-8088-c0dbdc9fdce6</guid><dc:creator>Ramachandra Reddy</dc:creator><description>&lt;p&gt;Hi Einar,&lt;/p&gt;
&lt;p&gt;Thanks a lot for quick response.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Yes i have taken care of ATT MTU configuration and i am able to receive 240 bytes of data , there is no issue with data&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Currently my device is a peripheral device where it need to communicate with the mobile application using nus service.&lt;/p&gt;
&lt;p&gt;Current drawback back is the data transfer rate is too slow, and need to improve the speed by increasing the phy to 2MB ..&lt;/p&gt;
&lt;p&gt;1. can Phy changing to 2MB improves the nus data transmission speed.?&lt;/p&gt;
&lt;p&gt;2. How do i monitor in the mobile nrf app to check if the phy layer got changed ..?&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;also i tried to do the configuration as&amp;nbsp; suggested, but i am gettign the dependencies error as shown below&lt;/p&gt;
&lt;p&gt;&lt;span&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/pastedimage1691573196850v1.png" alt=" " /&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;Please let me know should i enable all the depencies which is mentioned in the error&lt;/p&gt;
&lt;p&gt;1. CONFIG_BT_PHY_UPDATE=y&lt;/p&gt;
&lt;p&gt;2. CONFIG_BT_CONN=y&lt;/p&gt;
&lt;p&gt;3. CONFIG_BT_HCI_HOST=y&lt;/p&gt;
&lt;p&gt;4. CONFIG_BT_RPC_STACK=y&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Regards.&lt;/p&gt;
&lt;p&gt;Ram&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Enabling the 2MB Phy to increase nus throughput : nRF connect sdk 2.4.0</title><link>https://devzone.nordicsemi.com/thread/440425?ContentTypeID=1</link><pubDate>Wed, 09 Aug 2023 08:24:31 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:70884bd7-d2c4-401f-8d03-6473359a094d</guid><dc:creator>Einar Thorsrud</dc:creator><description>&lt;p&gt;Hi Ram,&lt;/p&gt;
&lt;p&gt;To use 2 Mbps PHY you can add the following configs:&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;CONFIG_BT_CTLR_PHY_2M=y
CONFIG_BT_AUTO_PHY_UPDATE=y&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;To&amp;nbsp;see what happens in the log&amp;nbsp;you can also add&amp;nbsp;CONFIG_BT_USER_PHY_UPDATE=y so that you will get a callback when the PHY is updated. Then you could also make the following changes to main.c (from the central in this case) to get the PHY update printed:&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="diff"&gt;diff --git a/samples/bluetooth/central_uart/src/main.c b/samples/bluetooth/central_uart/src/main.c
index be4c1f0ae..5d869364f 100644
--- a/samples/bluetooth/central_uart/src/main.c
+++ b/samples/bluetooth/central_uart/src/main.c
@@ -437,10 +437,29 @@ static void security_changed(struct bt_conn *conn, bt_security_t level,
        gatt_discover(conn);
 }
 
+static const char *phy2str(uint8_t phy)
+{
+       switch (phy) {
+       case 0: return &amp;quot;No packets&amp;quot;;
+       case BT_GAP_LE_PHY_1M: return &amp;quot;LE 1M&amp;quot;;
+       case BT_GAP_LE_PHY_2M: return &amp;quot;LE 2M&amp;quot;;
+       case BT_GAP_LE_PHY_CODED: return &amp;quot;LE Coded&amp;quot;;
+       default: return &amp;quot;Unknown&amp;quot;;
+       }
+}
+
+static void le_phy_updated(struct bt_conn *conn,
+                          struct bt_conn_le_phy_info *param)
+{
+       LOG_INF(&amp;quot;LE PHY updated: TX PHY %s, RX PHY %s\n&amp;quot;,
+              phy2str(param-&amp;gt;tx_phy), phy2str(param-&amp;gt;rx_phy));
+}
+
 BT_CONN_CB_DEFINE(conn_callbacks) = {
        .connected = connected,
        .disconnected = disconnected,
-       .security_changed = security_changed
+       .security_changed = security_changed,
+       .le_phy_updated = le_phy_updated,
 };
 
 static void scan_filter_match(struct bt_scan_device_info *device_info,&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;Note that to improve the throughput you may also want to make other changes, like increase the ATT MTU. You can refer to the &lt;a href="https://developer.nordicsemi.com/nRF_Connect_SDK/doc/2.4.1/nrf/samples/bluetooth/throughput/README.html"&gt;Throughput sample&lt;/a&gt; implementation (particularly prj.conf) for that and other throughput related changes you may want to make).&lt;/p&gt;
&lt;p&gt;Einar&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>