<?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>How send large notification?</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/29306/how-send-large-notification</link><description>Hello,
In our project we want use a large characteristic with notification property. 
 I use a &amp;quot; ble_app_template &amp;quot; project from nRF5_SDK_14.2.0_17b948a\examples\ble_peripheral . In a project i added custom service with one characterics, it&amp;#39;s length</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Thu, 11 Jan 2018 06:15:07 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/29306/how-send-large-notification" /><item><title>RE: How send large notification?</title><link>https://devzone.nordicsemi.com/thread/116578?ContentTypeID=1</link><pubDate>Thu, 11 Jan 2018 06:15:07 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:78faf97b-aa76-4ced-9916-6a5a6d4a6f29</guid><dc:creator>CheMax</dc:creator><description>&lt;p&gt;So, BlueZ claim that they meet the specifications of 4.2, but judging by the requests in the search engines there is some problem with the long packet (DLE). Thanks for the help! As a response, the comment was adopted, after the application of which the decision was found partially.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How send large notification?</title><link>https://devzone.nordicsemi.com/thread/116577?ContentTypeID=1</link><pubDate>Wed, 10 Jan 2018 14:17:58 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:f82dc56b-c873-4f3d-80be-55ce06d4ce07</guid><dc:creator>Petter Myhre</dc:creator><description>&lt;p&gt;I see. On Ubuntu it seems you are actually not updating the ATT MTU, you see it is still 23 (ATT MTU updated to 23 bytes). Maybe configurable ATT MTU isn&amp;#39;t supported by whatever hardware you are using? Or maybe BlueZ doesn&amp;#39;t support it? I&amp;#39;m not sure if there is much to do about that.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How send large notification?</title><link>https://devzone.nordicsemi.com/thread/116583?ContentTypeID=1</link><pubDate>Wed, 10 Jan 2018 12:37:36 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:bbcb2f95-c90f-4b49-869c-fbbb015fcf3a</guid><dc:creator>CheMax</dc:creator><description>&lt;p&gt;If I connect with NRFConnect in log i see:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;&amp;lt;debug&amp;gt; nrf_sdh_ble: BLE event: 0x10.
&amp;lt;debug&amp;gt; ble_gatt: Requesting to update ATT MTU to 247 bytes on connection 0x0.
&amp;lt;debug&amp;gt; ble_gatt: Requesting to update data length to 251 on connection 0x0.
&amp;lt;info&amp;gt; app: Connected.
&amp;lt;debug&amp;gt; nrf_sdh_ble: BLE event: 0x24.
&amp;lt;debug&amp;gt; ble_gatt: Data length updated to 27 on connection 0x0.
&amp;lt;debug&amp;gt; ble_gatt: max_rx_octets: 27
&amp;lt;debug&amp;gt; ble_gatt: max_tx_octets: 27
&amp;lt;debug&amp;gt; ble_gatt: max_rx_time: 328
&amp;lt;debug&amp;gt; ble_gatt: max_tx_time: 328
&amp;lt;debug&amp;gt; nrf_sdh_ble: BLE event: 0x3A.
&amp;lt;debug&amp;gt; ble_gatt: ATT MTU updated to 247 bytes on connection 0x0 (response).
&amp;lt;debug&amp;gt; nrf_sdh_ble: BLE event: 0x23.
&amp;lt;debug&amp;gt; ble_gatt: Peer on connection 0x0 requested a data length of 251 bytes.
&amp;lt;debug&amp;gt; ble_gatt: Updating data length to 251 bytes on connection 0x0.
&amp;lt;debug&amp;gt; nrf_sdh_ble: BLE event: 0x24.
&amp;lt;debug&amp;gt; ble_gatt: Data length updated to 251 on connection 0x0.
&amp;lt;debug&amp;gt; ble_gatt: max_rx_octets: 251
&amp;lt;debug&amp;gt; ble_gatt: max_tx_octets: 251
&amp;lt;debug&amp;gt; ble_gatt: max_rx_time: 2120
&amp;lt;debug&amp;gt; ble_gatt: max_tx_time: 2120
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;and all data is notified.&lt;/p&gt;
&lt;p&gt;But if I connect with Ubuntu and send command &amp;quot;mtu 247&amp;quot; (for change mtu size) in RTT I see:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;&amp;lt;debug&amp;gt; nrf_sdh_ble: BLE event: 0x10.
&amp;lt;debug&amp;gt; ble_gatt: Requesting to update ATT MTU to 247 bytes on connection 0x0.
&amp;lt;debug&amp;gt; ble_gatt: Requesting to update data length to 251 on connection 0x0.
&amp;lt;info&amp;gt; app: Connected.
&amp;lt;debug&amp;gt; nrf_sdh_ble: BLE event: 0x24.
&amp;lt;debug&amp;gt; ble_gatt: Data length updated to 27 on connection 0x0.
&amp;lt;debug&amp;gt; ble_gatt: max_rx_octets: 27
&amp;lt;debug&amp;gt; ble_gatt: max_tx_octets: 27
&amp;lt;debug&amp;gt; ble_gatt: max_rx_time: 328
&amp;lt;debug&amp;gt; ble_gatt: max_tx_time: 328
&amp;lt;debug&amp;gt; nrf_sdh_ble: BLE event: 0x3A.
&amp;lt;debug&amp;gt; ble_gatt: ATT MTU updated to 23 bytes on connection 0x0 (response).
&amp;lt;debug&amp;gt; nrf_sdh_ble: BLE event: 0x55.
&amp;lt;debug&amp;gt; ble_gatt: Peer on connection 0x0 requested an ATT MTU of 247 bytes.
&amp;lt;debug&amp;gt; ble_gatt: Updating ATT MTU to 247 bytes (desired: 247) on connection 0x0.
&amp;lt;debug&amp;gt; nrf_sdh_ble: BLE event: 0x12.
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;I&amp;#39;m not processing the size change correctly?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How send large notification?</title><link>https://devzone.nordicsemi.com/thread/116576?ContentTypeID=1</link><pubDate>Wed, 10 Jan 2018 12:03:26 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:60038398-b8eb-43c0-9d4c-10a15161ab31</guid><dc:creator>CheMax</dc:creator><description>&lt;p&gt;I uploaded my &amp;quot;sandbox&amp;quot;.&lt;/p&gt;
&lt;p&gt;Ok, I understood about sd_ble_gatts_value_set().&lt;/p&gt;
&lt;p&gt;I comment this part and change function:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt; hvx_params.handle = p_cus-&amp;gt;custom_value_handles.value_handle;
    hvx_params.type   = BLE_GATT_HVX_NOTIFICATION;
    hvx_params.offset = 0;//gatts_value.offset;
    hvx_params.p_len  = &amp;amp;size;//&amp;amp;gatts_value.len;
    hvx_params.p_data = custom_value;//gatts_value.p_value;
err_code = sd_ble_gatts_hvx(p_cus-&amp;gt;conn_handle, &amp;amp;hvx_params);
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;after in NRFConnect I receive all 200 byte by notification. mystique ...&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How send large notification?</title><link>https://devzone.nordicsemi.com/thread/116582?ContentTypeID=1</link><pubDate>Wed, 10 Jan 2018 11:32:29 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:2eb894f5-24d6-4da3-99e0-6d8947215245</guid><dc:creator>Petter Myhre</dc:creator><description>&lt;ol start="2"&gt;
&lt;li&gt;
&lt;p&gt;Then you should post another question describing your issues.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Do you see the same behavior with nRF Connect and Win8?&lt;/p&gt;
&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;Because it is not necessary to call sd_ble_gatts_value_set() to send a notification. You provide the data you want in the notification when you call sd_ble_gatts_hvx()&lt;/p&gt;
&lt;p&gt;I can also test your project here if you want to, then you need to upload your complete project to the question.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How send large notification?</title><link>https://devzone.nordicsemi.com/thread/116580?ContentTypeID=1</link><pubDate>Wed, 10 Jan 2018 10:26:41 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:811ac2ab-71df-4af6-a99a-a0a59ccde38a</guid><dc:creator>CheMax</dc:creator><description>&lt;ol&gt;
&lt;li&gt;yes, it&amp;#39;s return success;&lt;/li&gt;
&lt;li&gt;with sniffer i have another problem (The sniffer does not capture packets (the shark does not show anything, after a long pause produces an error) or stops sending data to the shark after a short recording of the advertisement packets. I tried both versions and different boards, the behavior is the same).&lt;/li&gt;
&lt;li&gt;No, I test only with ubuntu (blueZ, gatttool) and nrfconnect (win8)&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;why I shouldd&amp;#39;t call sd_ble_gatts_value_set() first?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How send large notification?</title><link>https://devzone.nordicsemi.com/thread/116584?ContentTypeID=1</link><pubDate>Wed, 10 Jan 2018 10:13:50 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:dc3fe3f2-1ad6-474b-8da8-dbb0204ceb16</guid><dc:creator>Petter Myhre</dc:creator><description>&lt;p&gt;You don&amp;#39;t need to callsd_ble_gatts_value_set() first. Anyways, looks okay. And sd_ble_gatts_hvx() returns 0x00000000 (NRF_SUCCESS)? Do you have sniffer trace of the communication that I can look at? Have you tested with any other centrals?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How send large notification?</title><link>https://devzone.nordicsemi.com/thread/116581?ContentTypeID=1</link><pubDate>Wed, 10 Jan 2018 09:51:29 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:11602fab-9cb7-48e2-a51c-3caa50d37a7a</guid><dc:creator>CheMax</dc:creator><description>&lt;p&gt;I changed example &lt;a href="https://github.com/bjornspockeli/custom_ble_service_example"&gt;add custom service&lt;/a&gt;. the next part of the code is used for sending&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;gatts_value.len     = 200;
    gatts_value.offset  = 0;
    gatts_value.p_value = custom_value;

    // Update database.
err_code = sd_ble_gatts_value_set(p_cus-&amp;gt;conn_handle,
                                  p_cus-&amp;gt;custom_value_handles.value_handle,
                                  &amp;amp;gatts_value);

hvx_params.handle = p_cus-&amp;gt;custom_value_handles.value_handle;
    hvx_params.type   = BLE_GATT_HVX_NOTIFICATION;
    hvx_params.offset = gatts_value.offset;
    hvx_params.p_len  = &amp;amp;gatts_value.len;
    hvx_params.p_data = gatts_value.p_value;
    err_code = sd_ble_gatts_hvx(p_cus-&amp;gt;conn_handle, &amp;amp;hvx_params);
&lt;/code&gt;&lt;/pre&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How send large notification?</title><link>https://devzone.nordicsemi.com/thread/116579?ContentTypeID=1</link><pubDate>Wed, 10 Jan 2018 09:41:57 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:9feb894b-552e-4893-a9fb-71a8ebb08076</guid><dc:creator>Petter Myhre</dc:creator><description>&lt;p&gt;How are you sending the notification? Are you sure you are not sending 20 bytes?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>