<?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>Data transfer to a characteristic is limited to 20 bytes</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/88461/data-transfer-to-a-characteristic-is-limited-to-20-bytes</link><description>Hallo, 
 we are using an nrf5340 SOC together with the SDK v1.9.0. 
 When running the sample &amp;quot;ncs_ble_tutorial_part1&amp;quot; from here 
 https://devzone.nordicsemi.com/guides/nrf-connect-sdk-guides/b/getting-started/posts/ncs-ble-tutorial-part-1-custom-service</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Wed, 01 Jun 2022 14:12:46 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/88461/data-transfer-to-a-characteristic-is-limited-to-20-bytes" /><item><title>RE: Data transfer to a characteristic is limited to 20 bytes</title><link>https://devzone.nordicsemi.com/thread/370487?ContentTypeID=1</link><pubDate>Wed, 01 Jun 2022 14:12:46 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:3616b6eb-294e-481f-bd17-cc683d98265e</guid><dc:creator>Georg</dc:creator><description>&lt;p&gt;Hello Vidar,&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;thank you very much for your support.&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Best regards&lt;/p&gt;
&lt;p&gt;Georg&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Data transfer to a characteristic is limited to 20 bytes</title><link>https://devzone.nordicsemi.com/thread/370472?ContentTypeID=1</link><pubDate>Wed, 01 Jun 2022 13:31:40 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:f8f25467-c40c-438a-b49a-0d17a4da586e</guid><dc:creator>Vidar Berg</dc:creator><description>&lt;p&gt;Hallo,&lt;/p&gt;
&lt;p&gt;With the default kconfig settings the Bluetooth zephyr host and Softdevice controller will give you an ATT_MTU size of 23 bytes which limits your effective payload to 20 bytes after you account for the GATT header.&lt;/p&gt;
&lt;p&gt;With the following configuration you should be able to write up to 244 byte of payload in one write command:&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;&amp;lt;project_dir&amp;gt;/child_image/hci_rpmsg.conf &lt;/strong&gt;&lt;/p&gt;
&lt;div style="background-color:rgba(30, 30, 30, 1);color:rgba(212, 212, 212, 1);font-family:&amp;#39;Droid Sans Mono&amp;#39;, &amp;#39;monospace&amp;#39;, monospace;font-size:14px;font-weight:normal;line-height:19px;white-space:pre;"&gt;
&lt;div&gt;&lt;span style="color:rgba(86, 156, 214, 1);"&gt;CONFIG_BT_BUF_ACL_TX_SIZE&lt;/span&gt;&lt;span style="color:rgba(212, 212, 212, 1);"&gt;=251&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span style="color:rgba(86, 156, 214, 1);"&gt;CONFIG_BT_CTLR_DATA_LENGTH_MAX&lt;/span&gt;&lt;span style="color:rgba(212, 212, 212, 1);"&gt;=251&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span style="color:rgba(86, 156, 214, 1);"&gt;CONFIG_BT_BUF_ACL_RX_SIZE&lt;/span&gt;&lt;span style="color:rgba(212, 212, 212, 1);"&gt;=251&lt;/span&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;p&gt;&lt;strong&gt;&amp;lt;project_dir&amp;gt;/prj.conf&lt;/strong&gt;&lt;/p&gt;
&lt;div style="background-color:rgba(30, 30, 30, 1);color:rgba(212, 212, 212, 1);font-family:&amp;#39;Droid Sans Mono&amp;#39;, &amp;#39;monospace&amp;#39;, monospace;font-size:14px;font-weight:normal;line-height:19px;white-space:pre;"&gt;
&lt;div&gt;&lt;span style="color:rgba(86, 156, 214, 1);"&gt;CONFIG_BT_L2CAP_TX_MTU&lt;/span&gt;&lt;span style="color:rgba(212, 212, 212, 1);"&gt;=247&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span style="color:rgba(86, 156, 214, 1);"&gt;CONFIG_BT_BUF_ACL_TX_SIZE&lt;/span&gt;&lt;span style="color:rgba(212, 212, 212, 1);"&gt;=251&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span style="color:rgba(86, 156, 214, 1);"&gt;CONFIG_BT_BUF_ACL_RX_SIZE&lt;/span&gt;&lt;span style="color:rgba(212, 212, 212, 1);"&gt;=251&lt;/span&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;p&gt;&lt;strong&gt;Project from tutorial with the updated configuration settings above:&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;&lt;a href="https://devzone.nordicsemi.com/cfs-file/__key/communityserver-discussions-components-files/4/0116.ncs_5F00_ble_5F00_tutorial_5F00_part1_5F00_long_5F00_mtu_5F00_1.9.1.zip"&gt;devzone.nordicsemi.com/.../0116.ncs_5F00_ble_5F00_tutorial_5F00_part1_5F00_long_5F00_mtu_5F00_1.9.1.zip&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;Best regards,&lt;/p&gt;
&lt;p&gt;Vidar&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Edit: &lt;/strong&gt;here&amp;#39;s another thread with a similar question : &lt;a href="https://devzone.nordicsemi.com/f/nordic-q-a/87829/updating-mtu-size-for-tx-and-rx-with-android-ble-client"&gt;https://devzone.nordicsemi.com/f/nordic-q-a/87829/updating-mtu-size-for-tx-and-rx-with-android-ble-client&lt;/a&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>