<?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 to configure multiple notifications per connection event</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/47568/how-to-configure-multiple-notifications-per-connection-event</link><description>Hi, 
 
 I&amp;#39;m trying to improve throughput by increasing the notification buffer number to 6. (SD132, V 5.0.0, SDK14.2) 
 I tried to follow the sequence charts as well as use sd_ble_cfg_set() in ble_stack_init() but it does not seem to work. 
 
 What is</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Tue, 25 Jun 2019 08:55:59 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/47568/how-to-configure-multiple-notifications-per-connection-event" /><item><title>RE: How to configure multiple notifications per connection event</title><link>https://devzone.nordicsemi.com/thread/194556?ContentTypeID=1</link><pubDate>Tue, 25 Jun 2019 08:55:59 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:60227f9b-1adc-491c-9403-f1f6aaadfbce</guid><dc:creator>CheMax</dc:creator><description>&lt;p&gt;Hello,&lt;/p&gt;
&lt;p&gt;Sorry, but i don&amp;#39;t understad why need change&amp;nbsp;&lt;span&gt;&lt;strong&gt;APP_BLE_CONN_CFG_TAG&lt;/strong&gt; (default value 1 in main example)&lt;strong&gt;&amp;nbsp;&lt;/strong&gt; to&amp;nbsp;&lt;strong&gt;BLE_CONN_CFG_GATTS.&lt;/strong&gt; What improvement does it give? Where can I read more?&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Thanks,&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How to configure multiple notifications per connection event</title><link>https://devzone.nordicsemi.com/thread/188253?ContentTypeID=1</link><pubDate>Tue, 21 May 2019 12:10:14 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:11029db9-42e2-41c4-988d-13f69192c482</guid><dc:creator>Andy</dc:creator><description>&lt;p&gt;Check&amp;nbsp;&lt;a href="https://devzone.nordicsemi.com/f/nordic-q-a/47073/general-questions-about-notifications-low-level-ble-packets-and-softdevice-phy-connection-interval-connection-event-length-att-mtu-and-dle"&gt;this thread&lt;/a&gt;&amp;nbsp;out. It might help you clear up some questions.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How to configure multiple notifications per connection event</title><link>https://devzone.nordicsemi.com/thread/188250?ContentTypeID=1</link><pubDate>Tue, 21 May 2019 12:07:00 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:f5fe857a-df5e-4d40-a95b-ae55be5cfe4d</guid><dc:creator>eyalasko</dc:creator><description>&lt;p&gt;Thanks for your reply.&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;How do I increase the event length. How&amp;#39;s the event length related to the queue size ?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How to configure multiple notifications per connection event</title><link>https://devzone.nordicsemi.com/thread/188249?ContentTypeID=1</link><pubDate>Tue, 21 May 2019 12:06:48 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:2ace973d-f56b-4b04-a38f-8575ab709b0a</guid><dc:creator>Andy</dc:creator><description>&lt;p&gt;Ah, no idea.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How to configure multiple notifications per connection event</title><link>https://devzone.nordicsemi.com/thread/188248?ContentTypeID=1</link><pubDate>Tue, 21 May 2019 12:05:19 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:e5584637-a3bc-42ec-864b-915a05aa16c1</guid><dc:creator>Kenneth</dc:creator><description>&lt;p&gt;You should also make sure to increase the GAP event length, this will control the time the softdevice will reserve for the actual connection event, and will directly impact the numbers of packets can be sent.&lt;/p&gt;
&lt;p&gt;In addition you may find some pointers here on how to increase throughput:&lt;br /&gt;&lt;a href="https://infocenter.nordicsemi.com/topic/com.nordic.infocenter.sdk5.v15.3.0/ble_sdk_app_att_mtu.html?cp=5_1_4_2_1_0"&gt;https://infocenter.nordicsemi.com/topic/com.nordic.infocenter.sdk5.v15.3.0/ble_sdk_app_att_mtu.html?cp=5_1_4_2_1_0&lt;/a&gt;&amp;nbsp;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How to configure multiple notifications per connection event</title><link>https://devzone.nordicsemi.com/thread/188245?ContentTypeID=1</link><pubDate>Tue, 21 May 2019 12:04:31 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:9bb7edbd-1d39-4d07-8984-b749ad9cebe9</guid><dc:creator>eyalasko</dc:creator><description>[quote userid="15909" url="~/f/nordic-q-a/47568/how-to-configure-multiple-notifications-per-connection-event/188226"]If you increase the queue size, naturally the memory footprint will increase as well.[/quote]
&lt;p&gt;This is understood.&lt;/p&gt;
&lt;p&gt;However I didn&amp;#39;t increase the queue size. It is set to 1 and still nrf_sdh_ble_enable() fails&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How to configure multiple notifications per connection event</title><link>https://devzone.nordicsemi.com/thread/188226?ContentTypeID=1</link><pubDate>Tue, 21 May 2019 11:43:18 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:9afb73c8-edcb-4665-bd62-97a81aacf56b</guid><dc:creator>Andy</dc:creator><description>&lt;p&gt;Well the notifications need to be queued somewhere. If you increase the queue size, naturally the memory footprint will increase as well.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How to configure multiple notifications per connection event</title><link>https://devzone.nordicsemi.com/thread/188222?ContentTypeID=1</link><pubDate>Tue, 21 May 2019 11:41:31 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:ff07c155-6f7c-4510-8340-c3f5801bfe81</guid><dc:creator>eyalasko</dc:creator><description>&lt;p&gt;I&amp;#39;ve changed memory settings in the project properties page (Keil IDE)&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Nevertheless, I expect&amp;nbsp; that setting&amp;nbsp;&lt;span style="background-color:#ffffff;"&gt;hvn_tx_queue_size&lt;/span&gt;=1 which is the default value should not change the softdevice&amp;#39;s memory footprint&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How to configure multiple notifications per connection event</title><link>https://devzone.nordicsemi.com/thread/188209?ContentTypeID=1</link><pubDate>Tue, 21 May 2019 11:30:36 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:c10c6835-5461-4cff-9f85-8fb24eb274e2</guid><dc:creator>Andy</dc:creator><description>&lt;p&gt;You need to adjust your memory regions in the linker file.&amp;nbsp;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How to configure multiple notifications per connection event</title><link>https://devzone.nordicsemi.com/thread/188194?ContentTypeID=1</link><pubDate>Tue, 21 May 2019 10:55:55 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:010e9ef6-6d54-41d3-b37c-62b1aaddb46f</guid><dc:creator>eyalasko</dc:creator><description>&lt;p&gt;Thanks.&lt;/p&gt;
&lt;p&gt;I&amp;#39;ve changed to BLE_CONN_CFG_GATTS as you advised and increased APP_RAM_START (+0x100 bytes)&lt;/p&gt;
&lt;p&gt;Strangely,&amp;nbsp;&lt;span style="background-color:#ffffff;"&gt;nrf_sdh_ble_enable&lt;/span&gt;() returns &lt;span style="background-color:#ffffff;"&gt;NRF_ERROR_NO_MEM, even if I explicitly set hvn_tx_queue_size= 1...&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="c_cpp"&gt;	ble_cfg_t ble_cfg;
	ble_cfg.conn_cfg.params.gatts_conn_cfg.hvn_tx_queue_size = 1;	// Tried 6
	err_code = sd_ble_cfg_set(BLE_CONN_CFG_GATTS, &amp;amp;ble_cfg, ram_start); 
	APP_ERROR_CHECK(err_code);	

    // Enable BLE stack.
    err_code = nrf_sdh_ble_enable(&amp;amp;ram_start);  // this call returns NRF_ERROR_NO_MEM
    APP_ERROR_CHECK(err_code);
&lt;/pre&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How to configure multiple notifications per connection event</title><link>https://devzone.nordicsemi.com/thread/188190?ContentTypeID=1</link><pubDate>Tue, 21 May 2019 10:19:51 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:3c2eea91-71ea-4399-a47c-6087a386e37e</guid><dc:creator>Andy</dc:creator><description>&lt;p&gt;Mm it seems you&amp;#39;re right. However, if you queue a new notification as soon as you get the tx complete event, you shouldn&amp;#39;t have any issues.&lt;/p&gt;
&lt;p&gt;In any case what you&amp;#39;re doing is alright, but you need to change&amp;nbsp;APP_BLE_CONN_CFG_TAG to&amp;nbsp;BLE_CONN_CFG_GATTS.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How to configure multiple notifications per connection event</title><link>https://devzone.nordicsemi.com/thread/188189?ContentTypeID=1</link><pubDate>Tue, 21 May 2019 10:09:35 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:ee4599c0-2c46-44ce-8b82-16a5f12cf023</guid><dc:creator>eyalasko</dc:creator><description>&lt;p&gt;Hi Andy,&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Thanks for your prompt response.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Unfortunately I think that the default queue depth is 1 which severely limits the throughput...&amp;nbsp;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How to configure multiple notifications per connection event</title><link>https://devzone.nordicsemi.com/thread/188188?ContentTypeID=1</link><pubDate>Tue, 21 May 2019 10:06:35 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:2adc8357-f59c-45b1-a6bc-b39c56963001</guid><dc:creator>Andy</dc:creator><description>&lt;p&gt;You don&amp;#39;t really have to increase the queue size. Just queue the notifications using sd_ble_gatts_hvx() until you fill the queue. The soft device will take care of sending as many notifications as&amp;nbsp;possible on each connection event.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>