<?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>Maximum bytes sent in a characteristic indicate function</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/68236/maximum-bytes-sent-in-a-characteristic-indicate-function</link><description>Hi, I need to send data larger than 16 bytes on a characteristic. I see that the maximum number of bytes I can send using the indicate function is limited to 16 bytes. 
 
 Ideally, I need sm[] to be between 32 bytes and 64 bytes. Is there a way to increase</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Thu, 12 Nov 2020 09:24:16 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/68236/maximum-bytes-sent-in-a-characteristic-indicate-function" /><item><title>RE: Maximum bytes sent in a characteristic indicate function</title><link>https://devzone.nordicsemi.com/thread/279652?ContentTypeID=1</link><pubDate>Thu, 12 Nov 2020 09:24:16 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:5209361d-20ce-4d69-894a-c6046190c7f9</guid><dc:creator>Hung Bui</dc:creator><description>&lt;p&gt;Hi,&amp;nbsp;&lt;/p&gt;
&lt;p&gt;To get a high throughput you should try to achieve the maximum ATT_MTU and longest data length extension CONFIG_BT_CTLR_DATA_LENGTH_MAX (usually set = ATT_MTU+4)&amp;nbsp;.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;If the size is still smaller than the amount of data you want to send, you would need to segment it to multiple trunks and send one by one.&amp;nbsp;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Maximum bytes sent in a characteristic indicate function</title><link>https://devzone.nordicsemi.com/thread/279618?ContentTypeID=1</link><pubDate>Thu, 12 Nov 2020 05:57:56 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:54144186-bb50-426f-9fe5-1390902c9449</guid><dc:creator>JPSvanderWalt</dc:creator><description>&lt;p&gt;Hi &lt;a href="https://devzone.nordicsemi.com/members/hungbui"&gt;Hung Bui&lt;/a&gt;.&amp;nbsp; Thank you for your reply.&amp;nbsp; I will be dealing with large amounts of sample outputs from sensors.&amp;nbsp; If notifications/indications are not meant for large amounts of data, how would I go about sending large amounts of data?&lt;/p&gt;
&lt;p&gt;I did double-check and the maximum amount of bytes that I can send over a notification is indeed 20 bytes.&amp;nbsp; I will try and increase the MTU size.&amp;nbsp;&amp;nbsp;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Maximum bytes sent in a characteristic indicate function</title><link>https://devzone.nordicsemi.com/thread/279554?ContentTypeID=1</link><pubDate>Wed, 11 Nov 2020 15:41:43 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:cb764ab1-bb93-494f-90fe-374b189fe66b</guid><dc:creator>Hung Bui</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;As defined in Bluetooth spec, you can&amp;#39;t do &amp;quot;long&amp;quot; notification/indication. So indication/notification can only sent as one single BLE packet. The ATT_MTU would decide the max size of a notification/indication you can send. For example if you set&amp;nbsp;CONFIG_BT_L2CAP_TX_MTU = 23 bytes, you can send maximum&amp;nbsp;CONFIG_BT_L2CAP_TX_MTU - 3 = 20 bytes payload (3 bytes overhead including opcode &amp;amp; handle value).&amp;nbsp;&lt;/p&gt;
&lt;p&gt;What you mentioned about 16 bytes maximum sounds a little bit strange, most likely it should be 20 bytes if the&amp;nbsp;CONFIG_BT_L2CAP_TX_MTU is minimum at 23 bytes.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;If you want to send larger indication/notification you would need to increase the&amp;nbsp;CONFIG_BT_L2CAP_TX_MTU size. But please note that the actual ATT_MTU used in a connection depends on both sides. So if your peer device doesn&amp;#39;t support large ATT_MTU you will receive &amp;quot;No ATT channel for MTU&amp;quot; warning when you send larger than limit indication as you already observed.&amp;nbsp;&lt;br /&gt;&lt;br /&gt;You can use&amp;nbsp;bt_gatt_get_mtu() to get the actual mtu of a connection.&amp;nbsp;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>