<?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>nrf52832 notification limitations</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/41490/nrf52832-notification-limitations</link><description>I am unable to get 6 notifications per connection event. I am connecting two nrf32832&amp;#39;s, one as a central, one as a peripheral. To make this as simple as possible, I limited the setup to just one peripheral though in reality I have many. 
 #########################################################</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Thu, 20 Dec 2018 09:51:21 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/41490/nrf52832-notification-limitations" /><item><title>RE: nrf52832 notification limitations</title><link>https://devzone.nordicsemi.com/thread/162619?ContentTypeID=1</link><pubDate>Thu, 20 Dec 2018 09:51:21 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:ef932a2e-dbfe-4689-9158-e2f173861881</guid><dc:creator>AndreasF</dc:creator><description>&lt;p&gt;Hi.&lt;/p&gt;
&lt;p&gt;Could you try to &lt;a href="http://infocenter.nordicsemi.com/index.jsp?topic=%2Fcom.nordic.infocenter.s132.api.v5.0.0%2Fstructble__gatts__conn__cfg__t.html&amp;amp;anchor=ae2a1156d8b06a6ccc70696f2372226cc"&gt;force &lt;/a&gt;the minimum guaranteed number of Handle Value Notifications that can be queued for transmission?&lt;/p&gt;
&lt;p&gt;And also set &lt;strong&gt;offset = 0 &lt;/strong&gt;for hvx_params?&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="c_cpp"&gt;
        ble_gatts_hvx_params_t hvx_params;
		ble_gatts_conn_cfg_t 		queue_size;
        memset(&amp;amp;hvx_params, 0, sizeof(hvx_params));
		memset(&amp;amp;queue_size, 0, sizeof(queue_size));
        len = sizeof(uint8_t);
				
		queue_size.hvn_tx_queue_size = 6;
        ble_gatts_hvx_params_t hvx_params =                                     
        {                                                                       
            .handle = get_value_handle(),                  
            .type = BLE_GATT_HVX_NOTIFICATION,
            .offset = 0,                                 
            .p_len = &amp;amp;len,                                                      
            .p_data = (uint8_t *)&amp;amp;test_data,                                    
        };                                                                      
             &lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;Best regards,&lt;/p&gt;
&lt;p&gt;Andreas&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nrf52832 notification limitations</title><link>https://devzone.nordicsemi.com/thread/162392?ContentTypeID=1</link><pubDate>Wed, 19 Dec 2018 00:01:23 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:f0432da0-7f8c-463a-9ed8-899af8e5583f</guid><dc:creator>ryan</dc:creator><description>&lt;p&gt;Hi Andreas -&amp;nbsp;&lt;br /&gt;&lt;br /&gt;yes, this is my approach. heres a snippet of my code.&lt;/p&gt;
&lt;p&gt;just to reiterate, my question is, why can i only put 4 elements into the HVX queue?&lt;/p&gt;
&lt;p&gt;thanks,&lt;/p&gt;
&lt;p&gt;Ryan&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="c_cpp"&gt;struct test_data {                                                                 
    uint8_t data[18];                                                              
};                                                                                 
                                                                                   
void send_data(void)                                                               
{                                                                                  
                                                                                   
    static uint32_t count = 0;                                                     
    struct test_data test_data;                                                    
    memset(&amp;amp;test_data, 0, sizeof(test_data));                                      
                                                                                   
    while(1)                                                                       
    {                                                                              
                                                                                   
        test_data.data[0] = count &amp;amp; 255;                                           
                                                                                   
        uint16_t len = sizeof(struct test_data);                                
        ble_gatts_hvx_params_t hvx_params =                                     
        {                                                                       
            .handle = get_value_handle(),                  
            .type = BLE_GATT_HVX_NOTIFICATION,                                  
            .p_len = &amp;amp;len,                                                      
            .p_data = (uint8_t *)&amp;amp;test_data,                                    
        };                                                                      
                                                                                
                                                                                
        uint32_t ret = sd_ble_gatts_hvx(conn_handle, &amp;amp;hvx_params);              
                                                                                
        if (ret == NRF_SUCCESS)                                                 
        {   
            static uint32_t last_update_sec = 0;                                
            static uint32_t last_update_count = 0;                              
                                               
            /* get ms since boot */                                                                    
            uint32_t time = ms_counter_get_ticks();                             
                                                                                
            if ((time / 1000) != last_update_sec)                               
            {                                                                   
                NRF_LOG_INFO(&amp;quot;%d samples sent in last second\n&amp;quot;,                
                             count - last_update_count);                        
                                                                                
                last_update_sec = time / 1000;                                  
                last_update_count = count;                                      
            }                                                                   
                                                                                
            count++;                                                            
        }                                                                       
        else                                                                    
        {                                                                       
            //NRF_LOG_INFO(&amp;quot;buffer full? [%d]\n&amp;quot;, ret);                         
            break;                                                              
        }                                                                       
    }                                                                           
}                                                    
                                                            
void inertial_data_evt_handler(ble_evt_t *p_ble_evt)                            
{                                                                               
    uint16_t evt_id = p_ble_evt-&amp;gt;header.evt_id;                                 
                                                                                
    switch (evt_id)                                                             
    {              
        // ...
        
        case BLE_GATTS_EVT_HVN_TX_COMPLETE:                                     
            if (notifications_enabled)                                          
            {                                                                   
                send_data();   
            }
            break;
            
        // ...
    }
}
        &lt;/pre&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nrf52832 notification limitations</title><link>https://devzone.nordicsemi.com/thread/161984?ContentTypeID=1</link><pubDate>Mon, 17 Dec 2018 06:45:56 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:4a038c33-bd60-427a-9529-0b51e8531939</guid><dc:creator>AndreasF</dc:creator><description>&lt;p&gt;Hi.&lt;/p&gt;
&lt;p&gt;Sorry for the late answer. Have you gotten any any returns when you &amp;quot;maxed&amp;quot; out the queue? If the queue is full you should get the return &lt;strong&gt;NRF_ERROR_RESOURCES&lt;/strong&gt;.&lt;/p&gt;
&lt;p&gt;The application can keep track of the available queue element count for notifications by following the procedure below:&lt;br /&gt;&lt;br /&gt;- Store initial queue element count in a variable.&lt;br /&gt;- Decrement the variable, which stores the currently available queue element count, by one when a call to this function returns &lt;strong&gt;NRF_SUCCESS&lt;/strong&gt;.&lt;br /&gt;- Increment the variable, which stores the current available queue element count, by the count variable in &lt;strong&gt;BLE_GATTS_EVT_HVN_TX_COMPLETE&lt;/strong&gt; event.&lt;/p&gt;
&lt;p&gt;Best regards,&lt;/p&gt;
&lt;p&gt;Andreas&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nrf52832 notification limitations</title><link>https://devzone.nordicsemi.com/thread/161566?ContentTypeID=1</link><pubDate>Thu, 13 Dec 2018 00:56:34 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:1117b914-dcf3-4636-b226-28920877a9f4</guid><dc:creator>ryan</dc:creator><description>&lt;p&gt;I have read this question before posting. It does not answer my fundamental question.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;according to &lt;a href="http://infocenter.nordicsemi.com/pdf/S132_SDS_v5.0.pdf"&gt;this&lt;/a&gt; document, in section 15.10 I see the following&amp;nbsp;&lt;/p&gt;
&lt;div class="page" title="Page 72"&gt;
&lt;div class="layoutArea"&gt;
&lt;div class="column"&gt;
&lt;p&gt;&lt;span&gt;&amp;quot;When long Link Layer Data Channel PDUs are in use, it is recommended to increase the event length of a connection. For example, Link Layer Data Channel PDUs are by default 27 bytes in size. With an event length of 3.75 ms, it is possible to send three full sized packet pairs on LE 1M PHY in one connection event. &amp;quot;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;If its&amp;nbsp;possible for a 3.75ms window to send 3 27 byte packets then a 62.5 ms window should be easily able to send 6 packets.&amp;nbsp;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;I tested earlier and confirmed. with my gap event length at 7.5 ms&amp;nbsp;I can place 4 items in the queue and&amp;nbsp;I see an effective bandwidth of ~60 packets per second. when&amp;nbsp;I increase my gap event length to the aforementioned 62.5ms&amp;nbsp;I see no difference in bandwidth.&amp;nbsp;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;So&amp;nbsp;why am&amp;nbsp;I maxed out a 4 packets in my queue? Are there any other levers I can pull in software?&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nrf52832 notification limitations</title><link>https://devzone.nordicsemi.com/thread/161435?ContentTypeID=1</link><pubDate>Wed, 12 Dec 2018 12:43:22 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:d6bd9421-cbb4-4732-8c38-35a98cff3083</guid><dc:creator>AndreasF</dc:creator><description>&lt;p&gt;Hi.&lt;/p&gt;
&lt;p&gt;Try to increase the &lt;span&gt;NRF_SDH_BLE_&lt;/span&gt;&lt;span&gt;GAP_EVENT&lt;/span&gt;&lt;span&gt;_LENGTH, as explained in &lt;a href="https://devzone.nordicsemi.com/f/nordic-q-a/28616/how-to-set-the-queue-size-of-notification/113427#113427"&gt;this &lt;/a&gt;question.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Best regards,&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Andreas&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>