<?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>Best flow for notifications</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/44185/best-flow-for-notifications</link><description>HI, I have a custom service with customs characteristics and I need the maximum speed posible. 
 I have one service for write without response and another service only with notifications. 
 I have the min_conn_interval and the max_conn_interval at 7.5</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Fri, 15 Mar 2019 12:14:58 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/44185/best-flow-for-notifications" /><item><title>RE: Best flow for notifications</title><link>https://devzone.nordicsemi.com/thread/176384?ContentTypeID=1</link><pubDate>Fri, 15 Mar 2019 12:14:58 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:0b67f778-07c1-4852-98a9-5e18ebed2a10</guid><dc:creator>run_ar</dc:creator><description>&lt;p&gt;There is an example in the our SDK: nRF5_SDK_15.2.0_9412b96\examples\ble_central_and_peripheral\experimental\ble_app_att_mtu_throughput&lt;/p&gt;
&lt;p&gt;Look at amts.c line:220. The while loop starts at line 249.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Best flow for notifications</title><link>https://devzone.nordicsemi.com/thread/173839?ContentTypeID=1</link><pubDate>Sun, 03 Mar 2019 16:44:54 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:c1970977-99d9-4d59-b23d-503a1679c176</guid><dc:creator>navarrocantero</dc:creator><description>&lt;p&gt;Could I see the correct flow in one example ??&amp;nbsp;&lt;br /&gt;&lt;br /&gt;I still lossig data packets or if I do a &amp;#39; do while &amp;#39; with the sd_ble_gatts_hvx function I get repeated packets of data !&amp;nbsp;&lt;br /&gt;&lt;br /&gt;&lt;/p&gt;
&lt;p&gt;Wich advertisal time its better&amp;nbsp;for this proposal , now its setted and 7,5 both, min and max&amp;nbsp;&lt;/p&gt;
&lt;p&gt;In the ble_hrs for example the hvx add data function its used on&amp;nbsp;ble_hrs_heart_rate_measurement_send, and these function its called in the main.c file, inside the&amp;nbsp;hrs_c_evt_handler function. And its used one time.&lt;br /&gt;&lt;br /&gt;edit: solved with a delay, no data loss&amp;nbsp;&lt;br /&gt;&lt;br /&gt; do {&lt;br /&gt; nrf_delay_ms(25);&lt;br /&gt; err_code = sd_ble_gatts_hvx(p_cus-&amp;gt;conn_handle, &amp;amp;hvx_params);&lt;br /&gt; } while (err_code != NRF_SUCCESS);&lt;/p&gt;
&lt;p&gt;But its slower.&amp;nbsp;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Best flow for notifications</title><link>https://devzone.nordicsemi.com/thread/173415?ContentTypeID=1</link><pubDate>Thu, 28 Feb 2019 09:38:48 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:e9b90f1a-08e2-4ea7-b62e-106b5ee1aff0</guid><dc:creator>run_ar</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;For maximum throughput you need to check if there is tx buffers left. So call sd_ble_gatts_hvx and place data in the tx buffers until you get the error: &lt;a title="Not enough resources for operation." href="http://infocenter.nordicsemi.com/topic/com.nordic.infocenter.s132.api.v6.1.0/group__nrf__error.html#gac94383171545e604e8347a044e8be13f"&gt;NRF_ERROR_RESOURCES&lt;/a&gt;, When this happens you have to wait for a &lt;a href="http://infocenter.nordicsemi.com/topic/com.nordic.infocenter.s132.api.v6.1.0/group___b_l_e___g_a_t_t_s___e_n_u_m_e_r_a_t_i_o_n_s.html#ggae537647902af1b05c1e32f12d6b401c7afab96bfa9918017082235f7664919f9d"&gt;BLE_GATTS_EVT_HVN_TX_COMPLETE&lt;/a&gt; event and retry. If you do not check that you have succesfully placed data in the tx buffers you will lose data.&lt;/p&gt;
&lt;p&gt;Message sequence chart &lt;a href="http://infocenter.nordicsemi.com/topic/com.nordic.infocenter.s132.api.v6.1.0/group___b_l_e___g_a_t_t_s___h_v_n___m_s_c.html?cp=2_3_1_1_0_2_4_3_5"&gt;here&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;Notice that it might be possible to transfer data faster by using a longer connection interval and DLE. See &lt;a href="https://www.nordicsemi.com/DocLib/Content/SoftDevice_Spec/s132/latest/SDS/s1xx/ble_data_throughput/ble_data_throughput"&gt;SD documentation&lt;/a&gt;.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>