<?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 solve an error which happened for registration of many BLE services</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/34366/how-to-solve-an-error-which-happened-for-registration-of-many-ble-services</link><description>As shown in subject, I tried to register many BLE services, DIS, BAS, HTS, and Custom Service. Then nRF52832(and nrf52840 preview) has stopped by an error of NRF_ERROR_NO_MEM. I guess the system has not enough memory for registration of many BLE service</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Tue, 23 Apr 2019 15:23:54 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/34366/how-to-solve-an-error-which-happened-for-registration-of-many-ble-services" /><item><title>RE: how to solve an error which happened for registration of many BLE services</title><link>https://devzone.nordicsemi.com/thread/183202?ContentTypeID=1</link><pubDate>Tue, 23 Apr 2019 15:23:54 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:79fdc12b-1fe6-4b17-a645-cea6103a244e</guid><dc:creator>weightwatcherphil</dc:creator><description>&lt;p&gt;Hello Bjorn,&lt;/p&gt;
&lt;p&gt;this saved me!!!&amp;nbsp; I consider it the greatest HINT of all time when dealing with adding custom services.&lt;/p&gt;
&lt;p&gt;thank you!!!!!&lt;br /&gt;Phil&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: how to solve an error which happened for registration of many BLE services</title><link>https://devzone.nordicsemi.com/thread/132630?ContentTypeID=1</link><pubDate>Tue, 22 May 2018 06:10:03 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:fc4a220c-6685-48ff-bf3d-e000abeca765</guid><dc:creator>bjorn-spockeli</dc:creator><description>&lt;p&gt;Happy to help!&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: how to solve an error which happened for registration of many BLE services</title><link>https://devzone.nordicsemi.com/thread/132366?ContentTypeID=1</link><pubDate>Thu, 17 May 2018 01:03:20 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:a6f939f9-ac9d-404a-b1f3-b99453490aeb</guid><dc:creator>Yoshihiro Goto</dc:creator><description>&lt;p&gt;Hello Bjorn,&lt;/p&gt;
&lt;p&gt;Great! Finally I have solved this problem.&amp;nbsp;it&amp;nbsp;changes the value of NRF_SDH_BLE_GATTS_ATTR_TAB_SIZE from 1408(default) to 2000.&lt;/p&gt;
&lt;p&gt;Thanks for your splendid advice.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: how to solve an error which happened for registration of many BLE services</title><link>https://devzone.nordicsemi.com/thread/132339?ContentTypeID=1</link><pubDate>Wed, 16 May 2018 17:11:53 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:fedc3ad5-b4f8-4980-b922-4e44a2f87eda</guid><dc:creator>bjorn-spockeli</dc:creator><description>&lt;p&gt;Hi Yoshihiro,&amp;nbsp;&lt;/p&gt;
&lt;p&gt;could you state which function specifically that returns NRF_ERROR_NO_MEM?&lt;/p&gt;
&lt;p&gt;If its&amp;nbsp;&lt;a href="http://infocenter.nordicsemi.com/topic/com.nordic.infocenter.s132.api.v6.0.0/group___b_l_e___c_o_m_m_o_n___f_u_n_c_t_i_o_n_s.html#ga265b4251110a15120d0aa97e5152163b"&gt;sd_ble_uuid_vs_add&lt;/a&gt;&amp;nbsp;that returns&amp;nbsp;NRF_ERROR_NO_MEM then there are no more free VS UUID slots.&amp;nbsp; If you&amp;#39;re adding a custom service then you have to make sure that the Vendor Specific UUID count in sdk_config.h,&amp;nbsp;NRF_SDH_BLE_VS_UUID_COUNT , is set to the number of custom services you are adding.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;If it is &lt;a href="http://infocenter.nordicsemi.com/topic/com.nordic.infocenter.s132.api.v6.0.0/group___b_l_e___g_a_t_t_s___f_u_n_c_t_i_o_n_s.html#ga39fea660228e4b2e788af7018a83927a"&gt;sd_ble_gatts_service_add&lt;/a&gt;&amp;nbsp;or&amp;nbsp;&lt;a href="http://infocenter.nordicsemi.com/topic/com.nordic.infocenter.s132.api.v6.0.0/group___b_l_e___g_a_t_t_s___f_u_n_c_t_i_o_n_s.html#ga9ee07ea4b96dcca1537b01ff9a7692ba"&gt;sd_ble_gatts_characteristic_add&lt;/a&gt;&amp;nbsp;or&amp;nbsp;&lt;a href="http://infocenter.nordicsemi.com/topic/com.nordic.infocenter.s132.api.v6.0.0/group___b_l_e___g_a_t_t_s___f_u_n_c_t_i_o_n_s.html#ga0e1478bd565ad99f998671e3baf9847d"&gt;sd_ble_gatts_descriptor_add&lt;/a&gt;&amp;nbsp;that returns&amp;nbsp;NRF_ERROR_NO_MEM, then&amp;nbsp;you&amp;#39;re likely exceeding the default GATT table size set in the sdk_config.h file,&amp;nbsp;NRF_SDH_BLE_GATTS_ATTR_TAB_SIZE. Try increasing it, but remember to adjust the&amp;nbsp;RAM_START and&amp;nbsp;RAM_SIZE accordingly.&lt;/p&gt;
&lt;p&gt;SoftDevice will actually tell you if you have allocated to little RAM, i.e. it will return the application RAM start address. You can start a debug session with a breakpoint after the sd_ble_enable() call in nrf_sdh_ble_enable() in nrf_sdh_ble.c&lt;/p&gt;
&lt;p&gt;If you have RTT logging enabled( should be enabled by default in the ble_app_template example) then the RTT output will be displayed in the Debug Terminal in Segger Embedded Studio or in Segger RTT Viewer if your using another IDE.&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;&amp;lt;warning&amp;gt; nrf_sdh_ble: Insufficient RAM allocated for the SoftDevice.
&amp;lt;warning&amp;gt; nrf_sdh_ble: Change the RAM start location from 0x20002210 to 0x20002220.
&amp;lt;warning&amp;gt; nrf_sdh_ble: Maximum RAM size for application is 0xDDE0.
&amp;lt;error&amp;gt; nrf_sdh_ble: sd_ble_enable() returned NRF_ERROR_NO_MEM.
&amp;lt;error&amp;gt; app: ERROR 4 [NRF_ERROR_NO_MEM] at C:\Nordic_Semiconductor\SDK_Repository\nRF5_SDK\nRF5_SDK_15.0.0_a53641a\examples\ble_peripheral\custom_ble_service_example\main.c:663
PC at: 0x0002EF37&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;It is also possible to use the UART backend instead of the RTT backend by setting&lt;br /&gt;NRF_LOG_BACKEND_RTT_ENABLED to 0 and NRF_LOG_BACKEND_UART_ENABLED to 1 in sdk_config.h.&lt;br /&gt;In both cases you&amp;#39;ll see the following output in the Debug Terminal/Serial TErminal/RTT Viewer if you have allocated to little RAM for the SoftDevice.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>