<?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>I can&amp;#39;t add more than 4 characteristics</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/54836/i-can-t-add-more-than-4-characteristics</link><description>Hi everyone ! 
 I have 3 services and 13 characteristics in my project. Until today, 3 characteristics were working fine. But i added rest of the characteristics and my project stop working. (There is no build error). I tried to set breakpoint on sd_ble_gatts_characteristic_add</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Tue, 03 Dec 2019 15:44:01 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/54836/i-can-t-add-more-than-4-characteristics" /><item><title>RE: I can't add more than 4 characteristics</title><link>https://devzone.nordicsemi.com/thread/223403?ContentTypeID=1</link><pubDate>Tue, 03 Dec 2019 15:44:01 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:cb71c356-56a1-494a-9180-e651f69c73ed</guid><dc:creator>Sigurd</dc:creator><description>&lt;p&gt;Great! My guess, without looking at the code, would be that some of the&amp;nbsp;&lt;span&gt;characteristics/services init code used saadc to something, and therefore required saadc_init() to be run before&amp;nbsp;service_init().&amp;nbsp;&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: I can't add more than 4 characteristics</title><link>https://devzone.nordicsemi.com/thread/223196?ContentTypeID=1</link><pubDate>Tue, 03 Dec 2019 06:18:06 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:d1be2ca3-303a-44a2-b04f-28f8e1389cf0</guid><dc:creator>Caner Celiktas</dc:creator><description>&lt;p&gt;Problem solved ! It is not about parameters. I tried what you say yesterday. &amp;quot;cccd_md_9.vloc = BLE_GATTS_VLOC_STACK&amp;quot; already defined in my other characteristic functions but they were also don&amp;#39;t work. I debug again after i recieve your reply and when i add other characteristics i&amp;nbsp;realize&amp;nbsp;my mcu start to stuck at &amp;quot;&lt;strong&gt;nrf_saadc_event_check&lt;/strong&gt;&amp;quot; function in&amp;nbsp;&lt;strong&gt;nrf_saadc.h&lt;/strong&gt;. So in my&amp;nbsp;&lt;strong&gt;main&amp;nbsp;&lt;/strong&gt;function&amp;nbsp;&lt;strong&gt;&lt;/strong&gt;i moved&amp;nbsp;&lt;strong&gt;saadc_init&amp;nbsp;&lt;/strong&gt;before&amp;nbsp;&lt;strong&gt;service_init&lt;/strong&gt; function and it start to work. Yes we solved the problem but what caused this ? I really want to know. Thank you for your help Sigurd !&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: I can't add more than 4 characteristics</title><link>https://devzone.nordicsemi.com/thread/223152?ContentTypeID=1</link><pubDate>Mon, 02 Dec 2019 17:42:12 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:c9515db0-4e1a-4477-9fbd-330161dbc5a9</guid><dc:creator>Sigurd</dc:creator><description>&lt;p&gt;It took a quick look at the code, it seems like you are missing this:&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;cccd_md_9.vloc = BLE_GATTS_VLOC_STACK;&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;in your&amp;nbsp;motor2_control_register_char_add() function.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: I can't add more than 4 characteristics</title><link>https://devzone.nordicsemi.com/thread/222938?ContentTypeID=1</link><pubDate>Mon, 02 Dec 2019 06:46:11 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:f404ce26-d9ff-4c8f-9faa-1a0892b54891</guid><dc:creator>Caner Celiktas</dc:creator><description>&lt;p&gt;I checked my paramters. I used same params like other working characteristics. I couldn&amp;#39;t understand what&amp;#39;s going on. I think my SoftDevice doesn&amp;#39;t has enough size. I&amp;#39;m using nRF52810.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: I can't add more than 4 characteristics</title><link>https://devzone.nordicsemi.com/thread/222844?ContentTypeID=1</link><pubDate>Fri, 29 Nov 2019 14:22:18 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:6f4e7f7b-8410-47ca-a940-0157f83144d5</guid><dc:creator>Sigurd</dc:creator><description>&lt;p&gt;You can find the documentation for sd_ble_gatts_characteristic_add() &lt;a href="https://infocenter.nordicsemi.com/topic/com.nordic.infocenter.s112.api.v6.1.1/group___b_l_e___g_a_t_t_s___f_u_n_c_t_i_o_n_s.html?cp=4_5_0_2_2_4_2_1#ga9ee07ea4b96dcca1537b01ff9a7692ba"&gt;here&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;NRF_ERROR_INVALID_PARAM&amp;nbsp;is here&amp;nbsp;described as &amp;quot;Invalid parameter(s) supplied, service handle, Vendor Specific UUIDs, lengths, and permissions need to adhere to the constraints.&amp;quot;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: I can't add more than 4 characteristics</title><link>https://devzone.nordicsemi.com/thread/222822?ContentTypeID=1</link><pubDate>Fri, 29 Nov 2019 13:10:43 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:97a9f629-8a59-4ddc-9e21-ba298b66cdf0</guid><dc:creator>Caner Celiktas</dc:creator><description>&lt;p&gt;I actived the 5th characteristics and i got error but it&amp;#39;s not &amp;quot;fatal error&amp;quot;. And i hit the NRF_BREAKPOINT_COND end of debug.&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;&amp;lt;error&amp;gt; app: ERROR 7 [NRF_ERROR_INVALID_PARAM] at /Nordic/nRF5_SDK_15.0.0_a53641a/nRF5_SDK_15.0.0_a53641a/examples/ble_peripheral/ble_app_Nordic_TEKNOGON/pca10040e/s112/ses/our_service.c:657
PC at: 0x0001E7AD
&amp;lt;error&amp;gt; app: End of error report&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;Relevant section:&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="c_cpp"&gt;err_code = sd_ble_gatts_characteristic_add(p_our_service-&amp;gt;service_handle_3, 
                                    &amp;amp;char_md_9, &amp;amp;attr_char_value_9, 
                                    &amp;amp;p_our_service-&amp;gt;char_handles_9);

APP_ERROR_CHECK(err_code); //LINE 657&lt;/pre&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: I can't add more than 4 characteristics</title><link>https://devzone.nordicsemi.com/thread/222809?ContentTypeID=1</link><pubDate>Fri, 29 Nov 2019 12:42:46 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:2199b201-595f-43de-912d-0d79b061d07d</guid><dc:creator>Sigurd</dc:creator><description>[quote user="Caner Celiktas"]I added but still can&amp;#39;t see any error message.[/quote]
&lt;p&gt;Are you still seeing &amp;quot;Fatal error&amp;quot; being printed ? Do you hit the&amp;nbsp;NRF_BREAKPOINT_COND in&amp;nbsp;app_error_fault_handler() ?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: I can't add more than 4 characteristics</title><link>https://devzone.nordicsemi.com/thread/222513?ContentTypeID=1</link><pubDate>Thu, 28 Nov 2019 07:02:34 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:96c4d94a-59a2-451a-a826-dd9991703cda</guid><dc:creator>Caner Celiktas</dc:creator><description>&lt;p&gt;I added but still can&amp;#39;t see any error message.&lt;/p&gt;
&lt;p&gt;&lt;img alt=" " src="https://devzone.nordicsemi.com/resized-image/__size/320x240/__key/communityserver-discussions-components-files/4/Screenshot-from-2019_2D00_11_2D00_28-10_2D00_01_2D00_18.png" /&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: I can't add more than 4 characteristics</title><link>https://devzone.nordicsemi.com/thread/222445?ContentTypeID=1</link><pubDate>Wed, 27 Nov 2019 16:57:10 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:871431ad-19cf-4d95-902f-120a64dab138</guid><dc:creator>Sigurd</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;Likely because there is not enough room in the advertising packet to advertise the UUID of all services. But you don&amp;#39;t really need to put all UUIDs in the advertising packet anyway, the central will discover them when it connects.&lt;/p&gt;
[quote user="Caner Celiktas"]i got&amp;nbsp;&lt;strong&gt;fatal error.&lt;/strong&gt;[/quote]
&lt;p&gt;&amp;nbsp;You should then use the Debug configuration, the error-code should then be printed:&lt;br /&gt;&lt;img height="83" src="https://devzone.nordicsemi.com/resized-image/__size/320x240/__key/support-attachments/beef5d1b77644c448dabff31668f3a47-44e78ccbe1bf42c1a9dc0e940ed9e7ed/pastedimage1574873656963v1.png" width="98" alt=" " /&gt;&lt;/p&gt;
&lt;p&gt;If you don&amp;#39;t have a Debug configuration, then add&amp;nbsp;DEBUG as a Preprocessor define in the project settings.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: I can't add more than 4 characteristics</title><link>https://devzone.nordicsemi.com/thread/222214?ContentTypeID=1</link><pubDate>Wed, 27 Nov 2019 06:08:07 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:6ac592c1-dec7-4a8d-a026-0bf82150182f</guid><dc:creator>Caner Celiktas</dc:creator><description>&lt;p&gt;Hi Sigurd,&lt;/p&gt;
&lt;p&gt;When i works with 4 characteristics the output is :&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;&amp;lt;debug&amp;gt; nrf_sdh: State request: 0x00000000
&amp;lt;debug&amp;gt; nrf_sdh: Notify observer 0x0001FA74 =&amp;gt; ready
&amp;lt;debug&amp;gt; nrf_sdh: State change: 0x00000000
&amp;lt;debug&amp;gt; nrf_sdh: State change: 0x00000001
&amp;lt;debug&amp;gt; nrf_sdh_ble: RAM starts at 0x20001C18
&amp;lt;debug&amp;gt; nrf_sdh_ble: RAM start location can be adjusted to 0x20001BD8.
&amp;lt;debug&amp;gt; nrf_sdh_ble: RAM size for application can be adjusted to 0x4428.&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;There is no output if&amp;nbsp; i open other characteristics. I changed the ram start 0x20001C18 to 0x20001BD8 and ram size to&amp;nbsp;0x4428. Nothing change.&lt;/p&gt;
&lt;p&gt;Edit : If i do like this, my 3 services and 4 characteristics work fine.&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="c_cpp"&gt;static ble_uuid_t m_adv_uuids[] =                                               /**&amp;lt; Universally unique service identifiers. */
{
    {BLE_UUID_OUR_SERVICE_UUID, BLE_UUID_TYPE_VENDOR_BEGIN}
//    {BLE_UUID_OUR_SERVICE_UUID_2,BLE_UUID_TYPE_VENDOR_BEGIN},
//    {BLE_UUID_OUR_SERVICE_UUID_3, BLE_UUID_TYPE_VENDOR_BEGIN}
};&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;When i uncomment other two services, i got&amp;nbsp;&lt;strong&gt;fatal error.&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;&lt;img alt=" " src="https://devzone.nordicsemi.com/resized-image/__size/320x240/__key/communityserver-discussions-components-files/4/7343.error.png" /&gt;&lt;/strong&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: I can't add more than 4 characteristics</title><link>https://devzone.nordicsemi.com/thread/222095?ContentTypeID=1</link><pubDate>Tue, 26 Nov 2019 13:02:51 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:84f1e038-19ae-4cb0-80a1-e7f1763f0326</guid><dc:creator>Sigurd</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;How does your nrf_log output look like, any errors printed ?&amp;nbsp;&lt;span&gt;(either via UART or Segger RTT backend)&amp;nbsp;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;If you are not getting any RTT logs, you might need to set&amp;nbsp;NRF_FPRINTF_FLAG_AUTOMATIC_CR_ON_LF_ENABLED to 0 in sdk_config.h&lt;/p&gt;
&lt;p&gt;Your&amp;nbsp;RAM_START value seems a bit low, but nrf_log should output the correct value for you in case it&amp;#39;s not correct.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>