<?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 do you add more than 1 custom UUID?</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/75376/how-do-you-add-more-than-1-custom-uuid</link><description>Hi Nordic DevTeam, 
 So I already followed this tutorial on how to add custom service UUID. 
 https://github.com/NordicPlayground/nRF5x-custom-ble-service-tutorial 
 I have 3 services that I want to add DFU, NUS and Custom, and probably more Custom UUID</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Tue, 25 May 2021 07:48:58 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/75376/how-do-you-add-more-than-1-custom-uuid" /><item><title>RE: How do you add more than 1 custom UUID?</title><link>https://devzone.nordicsemi.com/thread/311330?ContentTypeID=1</link><pubDate>Tue, 25 May 2021 07:48:58 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:6c26ecd8-5480-4491-9ae4-ae8f74ac9e0c</guid><dc:creator>Karl Ylvisaker</dc:creator><description>[quote user="awneil"]And it would have been back in SDK v15, IIRC - so maybe things have improved now?[/quote]
&lt;p&gt;I am happy to say that yes, they have indeed improved since then! &lt;span class="emoticon" data-url="https://devzone.nordicsemi.com/cfs-file/__key/system/emoji/1f642.svg" title="Slight smile"&gt;&amp;#x1f642;&lt;/span&gt;&lt;br /&gt;You may see this particular change in nrf_sdh_ble.c, in the nrf_sdh_ble_enable function. It now has a more detailed printouts, stating exactly what you should change the RAM start to to make it work.&lt;br /&gt;&lt;br /&gt;Best regards,&lt;br /&gt;Karl&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How do you add more than 1 custom UUID?</title><link>https://devzone.nordicsemi.com/thread/311193?ContentTypeID=1</link><pubDate>Mon, 24 May 2021 00:41:42 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:6d0d7ec8-e248-48ef-b966-59680007fd3b</guid><dc:creator>coyodha</dc:creator><description>&lt;p&gt;Hi Karl,&lt;/p&gt;
&lt;p&gt;You are right, the problem is the size of the advertising data.&lt;/p&gt;
&lt;p&gt;When I just have the NUS service, the program doesn&amp;#39;t execute that error.&lt;/p&gt;
&lt;p&gt;Now, I am trying to make sense of what to put in. What&amp;#39;s the difference between advertising data and scan response?&lt;pre class="ui-code" data-mode="text"&gt;/**@brief Function for initializing the Advertising functionality.
 */
static void advertising_init(void)
{
    uint32_t               err_code;
    ble_advertising_init_t init;

    memset(&amp;amp;init, 0, sizeof(init));


    init.advdata.name_type          = BLE_ADVDATA_SHORT_NAME;
    init.advdata.short_name_len     = 3; // Advertise only first 3 letters of name
    init.advdata.include_appearance = true;
    init.advdata.flags              = BLE_GAP_ADV_FLAGS_LE_ONLY_GENERAL_DISC_MODE;// BLE_GAP_ADV_FLAGS_LE_ONLY_LIMITED_DISC_MODE;
    
    init.advdata.uuids_complete.uuid_cnt = 1;
    init.advdata.uuids_complete.p_uuids  = &amp;amp;m_adv_uuids[0];

    init.srdata.uuids_more_available.uuid_cnt = 1;
    init.srdata.uuids_more_available.p_uuids = &amp;amp;m_adv_uuids[1];

    init.config.ble_adv_fast_enabled = true;
    init.config.ble_adv_fast_interval = APP_ADV_INTERVAL;

    advertising_config_get(&amp;amp;init.config);

    init.evt_handler = on_adv_evt;

    err_code = ble_advertising_init(&amp;amp;m_advertising, &amp;amp;init);
    APP_ERROR_CHECK(err_code);

    ble_advertising_conn_cfg_tag_set(&amp;amp;m_advertising, APP_BLE_CONN_CFG_TAG);
}&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;The code above works in my case, but I am actually not sure what I am doing. I can see all the UUID Service in nRF Connect.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;How&amp;#39;s the structure for advertising data and scan response?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How do you add more than 1 custom UUID?</title><link>https://devzone.nordicsemi.com/thread/311104?ContentTypeID=1</link><pubDate>Fri, 21 May 2021 14:47:53 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:0e6ceef1-29b8-498c-a13c-cb8a6c63e602</guid><dc:creator>awneil</dc:creator><description>[quote userid="87869" url="~/f/nordic-q-a/75376/how-do-you-add-more-than-1-custom-uuid/311095#311095"]Could you elaborate on what you are referring to here?&lt;br /&gt;[/quote]
&lt;p&gt;I was referring to the&amp;nbsp;RAM required for extra Services &amp;amp; Characteristics.&lt;/p&gt;
&lt;p&gt;And it would have been back in SDK v15, IIRC - so maybe things have improved now?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How do you add more than 1 custom UUID?</title><link>https://devzone.nordicsemi.com/thread/311095?ContentTypeID=1</link><pubDate>Fri, 21 May 2021 14:24:06 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:bc5d055a-b468-40fa-9a24-c052ec8226c8</guid><dc:creator>Karl Ylvisaker</dc:creator><description>[quote user="awneil"]IME, finding the right memory size is rather hit and miss: there&amp;#39;s no guidance - just a matter of trying more until it&amp;nbsp;works![/quote]
&lt;p&gt;Could you elaborate on what you are referring to here?&lt;br /&gt;I think the issue with the NRF_ERROR_DATA_SIZE error that coyodha is seeing here might be with the size of the dataset they are trying to advertise.&lt;br /&gt;&lt;br /&gt;When it comes to setting the right RAM start address we&amp;#39;ve taken some steps in the nrf_sdh_ble.c to make this a little easier by having the debug logging output what you should change the RAM start address to. If you start out by setting the RAM start address&amp;nbsp;unnaturally high before compiling and running it, you&amp;#39;ll get the appropriate start address written to the logger, and then you can change it from there. Have you experienced some issues with this?&lt;br /&gt;&lt;br /&gt;I would also argue that calculating the required flash on the one hand is also pretty straight forward, since the size of the SoftDevice is given in its particular specification. On the other hand you will also need to keep control yourself on what else your application uses the flash for.&lt;br /&gt; There is indeed no guidance for the latter, but it might be helpful to have a look at &lt;a href="https://infocenter.nordicsemi.com/index.jsp?topic=%2Fsdk_nrf5_v17.0.2%2Flib_bootloader.html&amp;amp;anchor=lib_bootloader_memory"&gt;the device memory layout&lt;/a&gt;&amp;nbsp;when working with this, or checking out the FDS / flash storage examples.&lt;br /&gt;&lt;br /&gt;I would love to hear any input or feedback you might have on this, @awneil !&lt;br /&gt;&lt;br /&gt;Best regards,&lt;br /&gt;Karl&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How do you add more than 1 custom UUID?</title><link>https://devzone.nordicsemi.com/thread/310943?ContentTypeID=1</link><pubDate>Fri, 21 May 2021 08:06:37 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:4be5f0a8-f94a-411d-8a68-e4b3142294da</guid><dc:creator>awneil</dc:creator><description>[quote userid="103238" url="~/f/nordic-q-a/75376/how-do-you-add-more-than-1-custom-uuid/310877#310877"]I already adjusted the RAM when the debug terminal asks too, but I still get this message[/quote]
&lt;p&gt;IME, finding the right memory size is rather hit and miss: there&amp;#39;s no guidance - just a matter of trying more until it&amp;nbsp;works!&lt;/p&gt;
&lt;p&gt;&lt;span class="emoticon" data-url="https://devzone.nordicsemi.com/cfs-file/__key/system/emoji/1f61e.svg" title="Disappointed"&gt;&amp;#x1f61e;&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How do you add more than 1 custom UUID?</title><link>https://devzone.nordicsemi.com/thread/310935?ContentTypeID=1</link><pubDate>Fri, 21 May 2021 07:49:41 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:ec7c9e5a-6c62-47bc-9484-bd43166ccb0a</guid><dc:creator>Karl Ylvisaker</dc:creator><description>&lt;p&gt;Hello,&lt;/p&gt;
[quote user="coyodha"]I already adjusted the RAM when the debug terminal asks too, but I still get this message[/quote]
&lt;p&gt;I see. What is the size of your advertising data? What is the total byte size you are trying to put into the scan response?&lt;br /&gt;From the included code snippet I am only able to see that you intend to advertise with the full name, and that you are placing the uuid&amp;#39;s in the scan reponse - but I am unable to see the size of the name or uuids.&lt;br /&gt;Try removing one or two of the UUID&amp;#39;s from the scan response for instance, does this negate the error? If so, it very likely stems from the advertising data being too big.&lt;br /&gt;If this is the case, you can evaluate if you need to advertise all uuid&amp;#39;s, or if there is anything else you can cut down on to get within the size limit of the advertising data.&lt;br /&gt;&lt;br /&gt;ERROR 12 [NRF_ERROR_DATA_SIZE] at C:\...\ble_app_libUARTE_dfu\main.c:1984&lt;br /&gt;&lt;br /&gt;Just to make sure, could you confirm which function is being called on line 1984 of your main.c program?&lt;br /&gt;There is no way for me to check this myself, unfortunately.&lt;br /&gt;&lt;br /&gt;Looking forward to resolving this issue together!&lt;br /&gt;&lt;br /&gt;Best regards,&lt;br /&gt;Karl&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How do you add more than 1 custom UUID?</title><link>https://devzone.nordicsemi.com/thread/310877?ContentTypeID=1</link><pubDate>Thu, 20 May 2021 23:27:03 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:0c6d54bb-abd6-47f4-88e0-4ef16f9ede1f</guid><dc:creator>coyodha</dc:creator><description>&lt;p&gt;Hi Karl,&lt;/p&gt;
&lt;p&gt;I already adjusted the RAM when the debug terminal asks too, but I still get this message&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="c_cpp"&gt;&amp;lt;debug&amp;gt; nrf_sdh_ble: RAM starts at 0x20002D68
&amp;lt;info&amp;gt; app: 12
&amp;lt;error&amp;gt; app: ERROR 12 [NRF_ERROR_DATA_SIZE] at C:\...\ble_app_libUARTE_dfu\main.c:1984
PC at: 0x0002F369
&amp;lt;error&amp;gt; app: End of error report&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;I followed all these threads but I still don&amp;#39;t quite get it :&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;a href="https://devzone.nordicsemi.com/f/nordic-q-a/59712/error-code-12-in-advertising-tutorial"&gt;https://devzone.nordicsemi.com/f/nordic-q-a/59712/error-code-12-in-advertising-tutorial&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&lt;a href="https://devzone.nordicsemi.com/f/nordic-q-a/39697/custom-service-proximity-example-merge---error-12-nrf_error_data_size-in-ble-advertising-init"&gt;https://devzone.nordicsemi.com/f/nordic-q-a/39697/custom-service-proximity-example-merge---error-12-nrf_error_data_size-in-ble-advertising-init&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&lt;a href="https://github.com/bjornspockeli/custom_ble_service_example/issues/7"&gt;https://github.com/bjornspockeli/custom_ble_service_example/issues/7&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&lt;a href="https://devzone.nordicsemi.com/f/nordic-q-a/52390/understanding-advertisement-of-multiple-128-bit-custom-uuid"&gt;https://devzone.nordicsemi.com/f/nordic-q-a/52390/understanding-advertisement-of-multiple-128-bit-custom-uuid&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;and I referred to this project example&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;a href="https://devzone.nordicsemi.com/cfs-file/__key/communityserver-discussions-components-files/4/8623.custom_5F00_ble_5F00_service_5F00_example_5F00_multiple_5F00_vs_5F00_bases.zip"&gt;/cfs-file/__key/communityserver-discussions-components-files/4/8623.custom_5F00_ble_5F00_service_5F00_example_5F00_multiple_5F00_vs_5F00_bases.zip&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;I still have the same problem even putting them separately under like this&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt; memset(&amp;amp;init, 0, sizeof(init));


init.advdata.name_type          = BLE_ADVDATA_FULL_NAME;
init.advdata.include_appearance = true;
init.advdata.flags              = BLE_GAP_ADV_FLAGS_LE_ONLY_GENERAL_DISC_MODE;// BLE_GAP_ADV_FLAGS_LE_ONLY_LIMITED_DISC_MODE;
init.srdata.uuids_complete.uuid_cnt = sizeof(m_adv_uuids) / sizeof(m_adv_uuids[0]);
init.srdata.uuids_complete.p_uuids  = m_adv_uuids;

m_adv_uuids_more[0].type = m_cus.uuid_type;
init.srdata.uuids_more_available.uuid_cnt = sizeof(m_adv_uuids_more)/sizeof(m_adv_uuids_more[0]);
init.srdata.uuids_more_available.p_uuids = m_adv_uuids_more;
&lt;/pre&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How do you add more than 1 custom UUID?</title><link>https://devzone.nordicsemi.com/thread/310804?ContentTypeID=1</link><pubDate>Thu, 20 May 2021 14:18:49 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:4a84a1f9-0723-42aa-bb69-434a343a36b2</guid><dc:creator>Karl Ylvisaker</dc:creator><description>&lt;p&gt;Hello,&lt;br /&gt;&lt;br /&gt;@awneil is right - you will need to increase your SoftDevice memory.&amp;nbsp;&lt;br /&gt;As a supplement to his comment, please see &lt;a href="https://devzone.nordicsemi.com/nordic/short-range-guides/b/getting-started/posts/adjustment-of-ram-and-flash-memory"&gt;this excellent guide by my colleague Andreas on how to adjust RAM and flash memory&lt;/a&gt;&amp;nbsp;for a walkthrough of how to change this.&lt;br /&gt;&lt;br /&gt;Pleas also make sure that DEBUG is defined in your preprocessor defines, like shown in the included image.&lt;br /&gt;&lt;img alt=" " src="https://devzone.nordicsemi.com/resized-image/__size/640x480/__key/communityserver-discussions-components-files/4/2402.enabling_5F00_debug_5F00_SES.PNG" /&gt;&lt;br /&gt;This will make a detailed error message be printed to your logger output when a non-NRF_SUCCESS error code is passed to an APP_ERROR_CHECK.&lt;br /&gt;&lt;br /&gt;Please do this, and let us know what the logger outputs when this error occurs.&lt;br /&gt;&lt;br /&gt;Best regards,&lt;br /&gt;Karl&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How do you add more than 1 custom UUID?</title><link>https://devzone.nordicsemi.com/thread/310631?ContentTypeID=1</link><pubDate>Thu, 20 May 2021 08:02:33 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:e127a1dd-1ee2-49c7-94e1-c75b26bf2d5d</guid><dc:creator>awneil</dc:creator><description>[quote userid="103238" url="~/f/nordic-q-a/75376/how-do-you-add-more-than-1-custom-uuid"]NRF_ERROR_DATA_SIZE[/quote]
&lt;p&gt;Sounds like you need to update your project&amp;#39;s memory settings - to allocate more memory to the SoftDevice&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>