<?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>Increasing the size of attribute table</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/54966/increasing-the-size-of-attribute-table</link><description>Hi, 
 I&amp;#39;m using SDK v15.3.0 which has s132 6.1.1 to program an nRF521832. I had a single custom service on my stack and that was working well. I added a second service and I got ERROR 4 [NRF_ERROR_NO_MEM]. I understand that this is caused by the attribute</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Fri, 29 Nov 2019 15:11:50 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/54966/increasing-the-size-of-attribute-table" /><item><title>RE: Increasing the size of attribute table</title><link>https://devzone.nordicsemi.com/thread/222858?ContentTypeID=1</link><pubDate>Fri, 29 Nov 2019 15:11:50 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:ad79f04e-3944-43f5-9240-b30f0d8889a1</guid><dc:creator>Kenan</dc:creator><description>&lt;p&gt;Will do.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Increasing the size of attribute table</title><link>https://devzone.nordicsemi.com/thread/222702?ContentTypeID=1</link><pubDate>Fri, 29 Nov 2019 07:26:31 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:01a49d41-8839-4772-bdf9-299096c20134</guid><dc:creator>Simonr</dc:creator><description>&lt;p&gt;Hi&lt;/p&gt;
&lt;p&gt;Can you please create a new ticket on this, as we strive to keep each ticket to one specific subject here on DevZone.&lt;/p&gt;
&lt;p&gt;Best regards,&lt;/p&gt;
&lt;p&gt;Simon&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Increasing the size of attribute table</title><link>https://devzone.nordicsemi.com/thread/222666?ContentTypeID=1</link><pubDate>Thu, 28 Nov 2019 18:59:26 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:f6d6265f-f753-4244-b73f-3efb8b7b649d</guid><dc:creator>Kenan</dc:creator><description>&lt;p&gt;I Fixed the problem by changing&amp;nbsp;NRF_SDH_BLE_VS_UUID_COUNT to 2.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Now I&amp;#39;m getting&amp;nbsp;ERROR 12 upon calling ble_advertising_init. I understand that this is caused by exceeding the advertising packet max payload of 31 bytes. What options do I have to solve this? Is there a way to increase it? &lt;br /&gt;Please note that I don&amp;#39;t need to be transmitting all services and characteristics at the same time, so maybe I could activate and deactivate services/characteristics accordingly.&amp;nbsp;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Increasing the size of attribute table</title><link>https://devzone.nordicsemi.com/thread/222665?ContentTypeID=1</link><pubDate>Thu, 28 Nov 2019 18:06:42 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:3a5ec076-c2d0-4533-a02a-98698ee42faa</guid><dc:creator>Kenan</dc:creator><description>&lt;p&gt;I just figured that ERROR 4 is being returned upon calling&amp;nbsp;sd_ble_uuid_vs_add&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Increasing the size of attribute table</title><link>https://devzone.nordicsemi.com/thread/222663?ContentTypeID=1</link><pubDate>Thu, 28 Nov 2019 17:19:30 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:2411923c-8e79-4d73-a7d9-8510a219ec26</guid><dc:creator>Kenan</dc:creator><description>&lt;p&gt;I&amp;#39;m not redefining BLE_GATTS_ATTR_TAB_SIZE_DEFAULT. I&amp;#39;m using&lt;span&gt;&amp;nbsp;&lt;/span&gt;&lt;a href="https://infocenter.nordicsemi.com/index.jsp?topic=%2Fcom.nordic.infocenter.s132.api.v6.1.1%2Fgroup___b_l_e___c_o_m_m_o_n___f_u_n_c_t_i_o_n_s.html&amp;amp;anchor=ga4edae2bac8c68b672c0fa101ed2c687f"&gt;sd_ble_cfg_set()&lt;/a&gt;&amp;nbsp;to set the attribute table size. I do it after using&amp;nbsp;nrf_sdh_ble_default_cfg_set and it has been working well for me in configuring queue size. I figured I was not passing the correct config ID to sd_ble_cfg_set and I changed it to&amp;nbsp;BLE_GATTS_CFG_ATTR_TAB_SIZE but still no luck. This is my ble_stack_init function after the fixes:&lt;br /&gt;&lt;pre class="ui-code" data-mode="c_cpp"&gt;static void ble_stack_init(void)
{
    ret_code_t err_code;

    err_code = nrf_sdh_enable_request();
    APP_ERROR_CHECK(err_code);

    // Configure the BLE stack using the default settings.
    // Fetch the start address of the application RAM.
    uint32_t ram_start = 0;
    err_code = nrf_sdh_ble_default_cfg_set(APP_BLE_CONN_CFG_TAG, &amp;amp;ram_start);
    APP_ERROR_CHECK(err_code);

    ble_cfg_t ble_cfg;
    memset(&amp;amp;ble_cfg, 0, sizeof ble_cfg);
    ble_cfg.conn_cfg.conn_cfg_tag = APP_BLE_CONN_CFG_TAG;
    ble_cfg.conn_cfg.params.gatts_conn_cfg.hvn_tx_queue_size = 13;
    err_code = sd_ble_cfg_set(BLE_CONN_CFG_GATTS, &amp;amp;ble_cfg, ram_start);
    APP_ERROR_CHECK(err_code);
    
    ble_cfg.gatts_cfg.attr_tab_size.attr_tab_size = 3000;
    err_code = sd_ble_cfg_set(BLE_GATTS_CFG_ATTR_TAB_SIZE, &amp;amp;ble_cfg, ram_start);
    APP_ERROR_CHECK(err_code);

    // Enable BLE stack.
    err_code = nrf_sdh_ble_enable(&amp;amp;ram_start);
    APP_ERROR_CHECK(err_code);

    // Register a handler for BLE events.
    NRF_SDH_BLE_OBSERVER(m_ble_observer, APP_BLE_OBSERVER_PRIO, ble_evt_handler, NULL);
}&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;I don&amp;#39;t think that attribute table size of 3000 is not enough. The second service is smaller than the first as I mentioned previously, and 3000 is more than the double of the previous size. &lt;br /&gt;For reference, I tried only changing&amp;nbsp;&lt;span&gt;BLE_GATTS_ATTR_TAB_SIZE_DEFAULT in sdk_config.h but still no luck - same ERROR 4.&amp;nbsp;&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Increasing the size of attribute table</title><link>https://devzone.nordicsemi.com/thread/222589?ContentTypeID=1</link><pubDate>Thu, 28 Nov 2019 10:37:05 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:337fcf20-ad93-4b6b-9245-3c6aae19ec6c</guid><dc:creator>Simonr</dc:creator><description>&lt;p&gt;Hi&lt;/p&gt;
&lt;p&gt;Please check out &lt;a href="https://devzone.nordicsemi.com/f/nordic-q-a/32750/error-add-multi-characteristic-to-service"&gt;this case&lt;/a&gt;, which explains how to properly set the attribute table size. The BLE_GATTS_ATTR_TAB_SIZE_DEFAULT define is from a SoftDevice header and does not change anything if you redefine it to another value.&lt;/p&gt;
&lt;p&gt;Best regards,&lt;/p&gt;
&lt;p&gt;Simon&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>