<?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>Result of bt_nus_get_mtu() is too small</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/100862/result-of-bt_nus_get_mtu-is-too-small</link><description>I use bt_nus_get_mtu() to g et maximum data length that can be used. But result is 20. How can I increase mtu? 
 log messages 00&amp;gt; *** Booting Zephyr OS build v3.2.99-ncs2 *** 00&amp;gt; Starting button Test example 00&amp;gt; configure AFE4900_RDY pin as input 00&amp;gt;</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Sat, 08 Jul 2023 01:17:23 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/100862/result-of-bt_nus_get_mtu-is-too-small" /><item><title>RE: Result of bt_nus_get_mtu() is too small</title><link>https://devzone.nordicsemi.com/thread/435341?ContentTypeID=1</link><pubDate>Sat, 08 Jul 2023 01:17:23 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:adc02c44-8035-4541-9d50-a972f12f07f2</guid><dc:creator>snowuyl</dc:creator><description>&lt;p&gt;Thanks for your reply!&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Result of bt_nus_get_mtu() is too small</title><link>https://devzone.nordicsemi.com/thread/435320?ContentTypeID=1</link><pubDate>Fri, 07 Jul 2023 16:32:09 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:81e37a9a-40cb-4fa3-86d4-aa8cad31b3ab</guid><dc:creator>Naeem Maroof</dc:creator><description>&lt;p&gt;Hello,&lt;/p&gt;
&lt;p&gt;It would purely depend&amp;nbsp;upon your application and needs&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Result of bt_nus_get_mtu() is too small</title><link>https://devzone.nordicsemi.com/thread/434559?ContentTypeID=1</link><pubDate>Wed, 05 Jul 2023 01:30:24 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:f0cf74a9-7861-4fce-bef9-e9ca799f27eb</guid><dc:creator>snowuyl</dc:creator><description>&lt;p&gt;Do you have suggested value of MTU?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Result of bt_nus_get_mtu() is too small</title><link>https://devzone.nordicsemi.com/thread/434536?ContentTypeID=1</link><pubDate>Tue, 04 Jul 2023 17:56:45 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:c1a578b4-7aae-4a00-8dd1-da2d5c76ce41</guid><dc:creator>Naeem Maroof</dc:creator><description>[quote user="snowuyl"]_gBtNusMtu=244[/quote]
&lt;p&gt;Is that not what you wanted to get?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Result of bt_nus_get_mtu() is too small</title><link>https://devzone.nordicsemi.com/thread/434147?ContentTypeID=1</link><pubDate>Mon, 03 Jul 2023 09:51:48 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:e79c9b6a-761c-4529-a10e-78f3faab5836</guid><dc:creator>snowuyl</dc:creator><description>&lt;p&gt;Thanks for your reply! I have added more configuration in prj.conf to fix this issue.&lt;/p&gt;
&lt;p&gt;CONFIG_BT_BUF_ACL_RX_SIZE=251&lt;br /&gt;CONFIG_BT_ATT_PREPARE_COUNT=2&lt;br /&gt;CONFIG_BT_L2CAP_TX_MTU=247&lt;br /&gt;CONFIG_BT_BUF_ACL_TX_COUNT=10&lt;br /&gt;CONFIG_BT_BUF_ACL_TX_SIZE=251&lt;br /&gt;CONFIG_BT_CTLR_DATA_LENGTH_MAX=251&lt;br /&gt;CONFIG_BT_CTLR_RX_BUFFERS=2&lt;/p&gt;
&lt;p&gt;Log message is as follows.&lt;/p&gt;
&lt;p&gt;_gBtNusMtu=244&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Result of bt_nus_get_mtu() is too small</title><link>https://devzone.nordicsemi.com/thread/434133?ContentTypeID=1</link><pubDate>Mon, 03 Jul 2023 09:22:05 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:055e1f0c-f062-4dee-bedf-3e5fd32feb35</guid><dc:creator>Naeem Maroof</dc:creator><description>&lt;p&gt;The project you have send is not compiling&lt;/p&gt;
&lt;p&gt;As you have provided no other information except the zip file, I opened the project in VS Code and built with NCS 2.3.0 for the 52840DK; it produced so many errors.&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/pastedimage1688376122570v1.png" alt=" " /&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Result of bt_nus_get_mtu() is too small</title><link>https://devzone.nordicsemi.com/thread/433354?ContentTypeID=1</link><pubDate>Wed, 28 Jun 2023 05:38:49 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:7b4b75db-a4cb-4bd7-a7e7-065e290feae5</guid><dc:creator>snowuyl</dc:creator><description>&lt;p&gt;You can see prj.conf after you unzipped minimal_log_nus.zip file.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Result of bt_nus_get_mtu() is too small</title><link>https://devzone.nordicsemi.com/thread/433353?ContentTypeID=1</link><pubDate>Wed, 28 Jun 2023 05:37:12 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:5efddfd6-dc54-435b-ba98-a932f1711ca8</guid><dc:creator>snowuyl</dc:creator><description>&lt;p&gt;&lt;a href="https://devzone.nordicsemi.com/cfs-file/__key/communityserver-discussions-components-files/4/5684.minimal_5F00_log_5F00_nus.zip"&gt;devzone.nordicsemi.com/.../5684.minimal_5F00_log_5F00_nus.zip&lt;/a&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Result of bt_nus_get_mtu() is too small</title><link>https://devzone.nordicsemi.com/thread/433352?ContentTypeID=1</link><pubDate>Wed, 28 Jun 2023 05:36:28 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:a540897f-84cd-43d1-818f-4724a22fa356</guid><dc:creator>snowuyl</dc:creator><description>&lt;p&gt;&lt;a href="https://devzone.nordicsemi.com/cfs-file/__key/communityserver-discussions-components-files/4/2084.custom_5F00_nrf52832.zip"&gt;devzone.nordicsemi.com/.../2084.custom_5F00_nrf52832.zip&lt;/a&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Result of bt_nus_get_mtu() is too small</title><link>https://devzone.nordicsemi.com/thread/433350?ContentTypeID=1</link><pubDate>Wed, 28 Jun 2023 04:03:42 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:ed8a5230-1328-49a0-8d59-e4b6b0156980</guid><dc:creator>snowuyl</dc:creator><description>&lt;p&gt;Thanks for your reply! I have set CONFIG_BT_L2CAP_TX_MTU=128 in prj.conf. But result of bt_nus_get_mtu() is still 20.&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;The following are log messages of RTT.&lt;/p&gt;
&lt;p&gt;# SEGGER J-Link RTT Viewer V6.32i Terminal Log File&lt;br /&gt;# Compiled: 15:22:50 on Jul 24 2018&lt;br /&gt;# Logging started @ 28 Jun 2023 13:29:48&lt;br /&gt; 0&amp;gt; *** Booting Zephyr OS build v3.2.99-ncs2 ***&lt;br /&gt; 0&amp;gt; btInit() e&lt;br /&gt; 0&amp;gt; bt_passkey_set(123456)&lt;br /&gt; 0&amp;gt; _btReady(0) e&lt;br /&gt; 0&amp;gt; Bluetooth initialized&lt;br /&gt; 0&amp;gt; _btReady(0) x&lt;br /&gt; 0&amp;gt; btInit() x&lt;br /&gt; 0&amp;gt; button pressed&lt;br /&gt; 0&amp;gt; power up&lt;br /&gt; 0&amp;gt; connected() e&lt;br /&gt; 0&amp;gt; Connected 48:41:0F:B4:93:23 (random)&lt;br /&gt; 0&amp;gt; _gCurrentConn=0x20001e38&lt;br /&gt; 0&amp;gt; bt_nus_get_mtu(0x20001e38)=20&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Result of bt_nus_get_mtu() is too small</title><link>https://devzone.nordicsemi.com/thread/431459?ContentTypeID=1</link><pubDate>Fri, 16 Jun 2023 11:00:10 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:fcbb4830-32d0-40f6-9d8e-e89773252468</guid><dc:creator>Naeem Maroof</dc:creator><description>&lt;p&gt;Hello,&lt;/p&gt;
&lt;p&gt;Thank you for contacting DevZone at NordicSemi.&lt;/p&gt;
&lt;p&gt;Please have a look at kconfig&amp;nbsp;&lt;span&gt;&lt;span style="font-family:&amp;#39;courier new&amp;#39;, courier;"&gt;CONFIG_BT_L2CAP_TX_MTU&lt;/span&gt; to set mtu size.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;You would like to meet the dependencies of the option.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;At the end after compiling, it is good idea to check values of configurations in the /build/zephyr/.config file for confirmation.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Regards,&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Naeem&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Result of bt_nus_get_mtu() is too small</title><link>https://devzone.nordicsemi.com/thread/431176?ContentTypeID=1</link><pubDate>Thu, 15 Jun 2023 08:45:24 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:17afeae7-56b6-4fe0-9865-36b47b257329</guid><dc:creator>snowuyl</dc:creator><description>&lt;p&gt;&lt;a href="https://devzone.nordicsemi.com/cfs-file/__key/communityserver-discussions-components-files/4/1586.minimal_5F00_log_5F00_nus.zip"&gt;devzone.nordicsemi.com/.../1586.minimal_5F00_log_5F00_nus.zip&lt;/a&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Result of bt_nus_get_mtu() is too small</title><link>https://devzone.nordicsemi.com/thread/431175?ContentTypeID=1</link><pubDate>Thu, 15 Jun 2023 08:45:04 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:1d62d870-6119-4929-b757-b0a7c4c01fe1</guid><dc:creator>snowuyl</dc:creator><description>&lt;p&gt;&lt;a href="https://devzone.nordicsemi.com/cfs-file/__key/communityserver-discussions-components-files/4/3362.custom_5F00_nrf52832.zip"&gt;devzone.nordicsemi.com/.../3362.custom_5F00_nrf52832.zip&lt;/a&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>