<?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>(BLE): How can I send more than 20bytes from a server with notify?</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/56130/ble-how-can-i-send-more-than-20bytes-from-a-server-with-notify</link><description>Project context: -------------------- Server BLE for home trainer diy Target (Bluetooth server) : Bluefruit nRF52 The feather Library : BluefruitBLE Client : nRF Connect (Android) 
 - no descriptor added 
 - work fine for an other characteristic (CyclingSpeedAndCadence</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Tue, 07 Jan 2020 14:11:43 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/56130/ble-how-can-i-send-more-than-20bytes-from-a-server-with-notify" /><item><title>RE: (BLE): How can I send more than 20bytes from a server with notify?</title><link>https://devzone.nordicsemi.com/thread/227919?ContentTypeID=1</link><pubDate>Tue, 07 Jan 2020 14:11:43 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:c78ce6d5-d438-4cc1-a051-78b2d2823bbd</guid><dc:creator>Vidar Berg</dc:creator><description>&lt;p&gt;Hi Vincent,&lt;/p&gt;
&lt;p&gt;The max. length of the notification packet may be limited by the MTU size, but since you&amp;#39;re able to read 32-byte I wonder if it might just be the way the send notify function is implemented in your FW or by in the library you use. The packet length is specified by the application, not by the MTU size.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: (BLE): How can I send more than 20bytes from a server with notify?</title><link>https://devzone.nordicsemi.com/thread/227462?ContentTypeID=1</link><pubDate>Fri, 03 Jan 2020 15:36:18 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:44e716e8-ebd8-4fe7-b63a-dd45d79424ed</guid><dc:creator>Vincent25</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;Thank you very much for your answer Vidar.&lt;/p&gt;
&lt;p&gt;I changed in the file ble_gatt.h the default value:&lt;/p&gt;
&lt;p&gt;//#define BLE_GATT_ATT_MTU_DEFAULT&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 23 changed as &amp;nbsp; #define BLE_GATT_ATT_MTU_DEFAULT&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 40&lt;/p&gt;
&lt;p&gt;and I could see that I have the good MTU value of 40 before and after the connexion with the client.&lt;/p&gt;
&lt;p&gt;But i didn&amp;#39;t change&amp;nbsp; the result on nRFConnect.&lt;/p&gt;
&lt;p&gt;After a write , see the characteristic on nRFConnect&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;&lt;img alt=" " src="https://devzone.nordicsemi.com/resized-image/__size/320x240/__key/communityserver-discussions-components-files/4/Screenshot_5F00_2020_2D00_01_2D00_03_2D00_16_2D00_30_2D00_40.png" /&gt;&lt;/p&gt;
&lt;p&gt;And after a notify:&lt;/p&gt;
&lt;p&gt;&lt;img alt=" " src="https://devzone.nordicsemi.com/resized-image/__size/320x240/__key/communityserver-discussions-components-files/4/Screenshot_5F00_2020_2D00_01_2D00_03_2D00_16_2D00_30_2D00_52.png" /&gt;&lt;/p&gt;
&lt;p&gt;the field is shown as a binary and the size is 20 bytes...&lt;/p&gt;
&lt;p&gt;Thank you very much.&lt;/p&gt;
&lt;p&gt;Vincent&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: (BLE): How can I send more than 20bytes from a server with notify?</title><link>https://devzone.nordicsemi.com/thread/227408?ContentTypeID=1</link><pubDate>Fri, 03 Jan 2020 12:55:19 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:e590e44f-8935-4ecb-b4b2-d6f206ca59fc</guid><dc:creator>Vidar Berg</dc:creator><description>&lt;p&gt;Hi&lt;/p&gt;
&lt;p&gt;The default payload length is 20 bytes,&amp;nbsp;but it can be extended after a connection is established provided both devices have support for long MTU (a majority of new phones do). In our SDK examples, we use the&amp;nbsp;&amp;nbsp;&lt;a title="Experimental: GATT Module" href="https://infocenter.nordicsemi.com/topic/sdk_nrf5_v16.0.0/lib_ble_gatt.html?cp=7_1_3_2_13"&gt;GATT Module&lt;/a&gt;&amp;nbsp;to handle the negotiation to increase the packet length, but I&amp;#39;m not sure if the&amp;nbsp;&lt;span&gt;BluefruitBLE library does the same?&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Message sequence chart for reference:&amp;nbsp;&lt;a title="GATTS ATT_MTU Exchange" href="https://infocenter.nordicsemi.com/topic/com.nordic.infocenter.s132.api.v7.0.1/group___b_l_e___g_a_t_t_s___m_t_u___e_x_c_h_a_n_g_e.html?cp=4_5_2_1_2_4_3_1"&gt;GATTS ATT_MTU Exchange&lt;/a&gt;&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>