<?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>creating custom service and characteristics with Bluetooth Base UUID.</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/75416/creating-custom-service-and-characteristics-with-bluetooth-base-uuid</link><description>Hi, 
 
 Am using nrf51822 a central, i want to discover the service of anothe rble module (which is RN4871 from microship). 
 My problem here is that this RN4871 advertise a service with a different base UUID for service and for its two characteristics</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Thu, 27 May 2021 10:40:33 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/75416/creating-custom-service-and-characteristics-with-bluetooth-base-uuid" /><item><title>RE: creating custom service and characteristics with Bluetooth Base UUID.</title><link>https://devzone.nordicsemi.com/thread/312032?ContentTypeID=1</link><pubDate>Thu, 27 May 2021 10:40:33 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:54c824c9-7ce9-4cc1-a327-0c16dcd5b79f</guid><dc:creator>MokhlesAdalia</dc:creator><description>&lt;p&gt;hi&amp;nbsp;dot,&lt;/p&gt;
&lt;p&gt;yes i solved my problem, i can connect and discover, it(s just following the steps of code that i posted, and adjusting your ram and uuid.count as @Einar said.&lt;/p&gt;
&lt;p&gt;Sorry i don&amp;#39;t know PT210, didn&amp;#39;t worked on it.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: creating custom service and characteristics with Bluetooth Base UUID.</title><link>https://devzone.nordicsemi.com/thread/311968?ContentTypeID=1</link><pubDate>Thu, 27 May 2021 07:22:18 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:17f45b6a-d2ab-4003-88b9-7e91123d4013</guid><dc:creator>dot</dc:creator><description>&lt;p&gt;Hi. MokhlesAdalia&lt;br /&gt;Have you connected the PT210 product?&lt;br /&gt;How did you solve it?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: creating custom service and characteristics with Bluetooth Base UUID.</title><link>https://devzone.nordicsemi.com/thread/311919?ContentTypeID=1</link><pubDate>Thu, 27 May 2021 00:18:19 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:3997eec7-4de0-48f3-9632-5926d3a85ef4</guid><dc:creator>dot</dc:creator><description>&lt;p&gt;&lt;span class="VIiyi" lang="en"&gt;&lt;span class="JLqJ4b ChMk0b"&gt;&lt;span&gt;Did you solve the problem?&lt;/span&gt;&lt;/span&gt; &lt;span class="JLqJ4b ChMk0b"&gt;&lt;span&gt;Did you successfully connect?&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span&gt; &lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: creating custom service and characteristics with Bluetooth Base UUID.</title><link>https://devzone.nordicsemi.com/thread/311786?ContentTypeID=1</link><pubDate>Wed, 26 May 2021 12:27:36 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:d8de5d07-9ea6-47c9-99d6-fbc6b7ba346e</guid><dc:creator>MokhlesAdalia</dc:creator><description>&lt;p&gt;Yes, thank you, that&amp;#39;s what i&amp;#39;ve been doing, but i figured out my mistake, i was increasing the&amp;nbsp;vs_uuid_count in another strucrure.&lt;/p&gt;
&lt;p&gt;Thanks &lt;span class="emoticon" data-url="https://devzone.nordicsemi.com/cfs-file/__key/system/emoji/1f603.svg" title="Smiley"&gt;&amp;#x1f603;&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: creating custom service and characteristics with Bluetooth Base UUID.</title><link>https://devzone.nordicsemi.com/thread/311573?ContentTypeID=1</link><pubDate>Tue, 25 May 2021 15:51:55 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:2ec79b89-ca24-4a58-857c-dd1885357d53</guid><dc:creator>Einar Thorsrud</dc:creator><description>&lt;p&gt;Your changes to ble_nus_c.h seems sensible. This also worked when I tested on my side. Perhaps the issue is with how you configured support for more UUIDs?&lt;/p&gt;
&lt;p&gt;Referring to the NUS central sample in SDK 12.3 I did this minor change to main.c to make it work,&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="diff"&gt;diff --git a/examples/ble_central/ble_app_uart_c/main.c b/examples/ble_central/ble_app_uart_c/main.c
index ca13f2a..55bf742 100644
--- a/examples/ble_central/ble_app_uart_c/main.c
+++ b/examples/ble_central/ble_app_uart_c/main.c
@@ -494,6 +494,8 @@ static void ble_stack_init(void)
                                                     PERIPHERAL_LINK_COUNT,
                                                     &amp;amp;ble_enable_params);
     APP_ERROR_CHECK(err_code);
+    
+    ble_enable_params.common_enable_params.vs_uuid_count = 3;
 
     //Check the ram settings against the used number of links
     CHECK_RAM_START_ADDR(CENTRAL_LINK_COUNT,PERIPHERAL_LINK_COUNT);
&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;And in the Keil project I configure the IRAM1 start address to&amp;nbsp;0x20002800 and size to&amp;nbsp;0x1800 (could perhaps be optimized).&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: creating custom service and characteristics with Bluetooth Base UUID.</title><link>https://devzone.nordicsemi.com/thread/311566?ContentTypeID=1</link><pubDate>Tue, 25 May 2021 15:33:26 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:95df0b75-b796-43ce-b449-e760cfdeaa2f</guid><dc:creator>MokhlesAdalia</dc:creator><description>&lt;p&gt;Can anyone help please ?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: creating custom service and characteristics with Bluetooth Base UUID.</title><link>https://devzone.nordicsemi.com/thread/311119?ContentTypeID=1</link><pubDate>Fri, 21 May 2021 15:58:17 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:e7fcddc8-8425-4146-9a80-2fcd76c9766a</guid><dc:creator>MokhlesAdalia</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;when i use&amp;nbsp;&lt;span&gt;sd_ble_uuid_vs_add() only one time for the service , err_code will be 0x00 meaning NRF_SUCCESS..&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;wheni use&amp;nbsp;sd_ble_uuid_vs_add() for 3 times err_code will be 0x04 meanning NRF_ERROR_NO_MEM&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;by &amp;quot;Stucks&amp;quot; i mean when i call&amp;nbsp;sd_ble_uuid_vs_add() for the second time for the characteristic the APP_ERROR_CHECK&amp;nbsp;(err_code) leads directly to the end of the function, it means that an error has occured, i think err_code = 0x04 which is NRF_ERROR_NO_MEM i told you.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;i think i have a memory problem although i thought i&amp;#39;ve well adjusted it after reading some information.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;the&amp;nbsp;below presents my RAM area :&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;RAM1 :&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;starts :&amp;nbsp;0x20002800 -- size: 0xDDE0 (using Keil)&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;i hope am close to solve this issue.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;ble_nus_c.c (modified)&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&lt;pre class="ui-code" data-mode="c_cpp"&gt;uint32_t ble_nus_c_init(ble_nus_c_t * p_ble_nus_c, ble_nus_c_init_t * p_ble_nus_c_init)
{
    uint32_t      err_code;
    ble_uuid_t    uart_uuid;
    ble_uuid128_t nus_base_uuid = NUS_BASE_UUID;
    ble_uuid128_t char1_base_uuid = CHAR1_BASE_UUID;
    ble_uuid128_t char2_base_uuid = CHAR2_BASE_UUID;
    VERIFY_PARAM_NOT_NULL(p_ble_nus_c);
    VERIFY_PARAM_NOT_NULL(p_ble_nus_c_init);

		err_code = sd_ble_uuid_vs_add(&amp;amp;char1_base_uuid, &amp;amp;p_ble_nus_c-&amp;gt;uuid_type);
    //VERIFY_SUCCESS(err_code);
		APP_ERROR_CHECK (err_code);
		uart_uuid.type = p_ble_nus_c-&amp;gt;uuid_type;
    uart_uuid.uuid = BLE_UUID_NUS_TX_CHARACTERISTIC;



    err_code = sd_ble_uuid_vs_add(&amp;amp;char2_base_uuid, &amp;amp;p_ble_nus_c-&amp;gt;uuid_type);
    //VERIFY_SUCCESS(err_code);
		APP_ERROR_CHECK (err_code);
		uart_uuid.type = p_ble_nus_c-&amp;gt;uuid_type;
    uart_uuid.uuid = BLE_UUID_NUS_RX_CHARACTERISTIC;
	
	
    err_code = sd_ble_uuid_vs_add(&amp;amp;nus_base_uuid, &amp;amp;p_ble_nus_c-&amp;gt;uuid_type);
    VERIFY_SUCCESS(err_code);
		//APP_ERROR_CHECK (err_code);
    uart_uuid.type = p_ble_nus_c-&amp;gt;uuid_type;
    uart_uuid.uuid = BLE_UUID_NUS_SERVICE;

    p_ble_nus_c-&amp;gt;conn_handle           = BLE_CONN_HANDLE_INVALID;
    p_ble_nus_c-&amp;gt;evt_handler           = p_ble_nus_c_init-&amp;gt;evt_handler;
    p_ble_nus_c-&amp;gt;handles.nus_rx_handle = BLE_GATT_HANDLE_INVALID;
    p_ble_nus_c-&amp;gt;handles.nus_tx_handle = BLE_GATT_HANDLE_INVALID;

    return ble_db_discovery_evt_register(&amp;amp;uart_uuid);
}
&lt;/pre&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;ble_nus_c.h (modified)&lt;pre class="ui-code" data-mode="c_cpp"&gt;#define NUS_BASE_UUID									 {{0x55, 0xE4, 0x05, 0xD2, 0xAF, 0x9F, 0xA9, 0x8F, 0xE5, 0x4A, 0x7D, 0xFE, 0x43, 0x53, 0x53, 0x49}} //Used vendor specific UUID. 

#define CHAR1_BASE_UUID                {{0xB3, 0x9B, 0x72, 0x34, 0xBE, 0xEC, 0xD4, 0xA8, 0xF4, 0x43, 0x41, 0x88, 0x43, 0x53, 0x53, 0x49}} // Used vendor specific UUID.
#define CHAR2_BASE_UUID                {{0x16, 0x96, 0x24, 0x47, 0xC6, 0x23, 0x61, 0xBA, 0xD9, 0x4B, 0x4D, 0x1E, 0x43, 0x53, 0x53, 0x49}} // Used vendor specific UUID.

#define BLE_UUID_NUS_SERVICE                 0x5343                      // The UUID of the Nordic UART Service. 
#define BLE_UUID_NUS_TX_CHARACTERISTIC       0x5344                      // The UUID of the Characteristic1. 
#define BLE_UUID_NUS_RX_CHARACTERISTIC       0x5343                      // The UUID of the Characteristic2. &lt;/pre&gt;&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: creating custom service and characteristics with Bluetooth Base UUID.</title><link>https://devzone.nordicsemi.com/thread/311090?ContentTypeID=1</link><pubDate>Fri, 21 May 2021 14:10:41 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:541381b5-5bd6-4e3b-9483-0dc238601d70</guid><dc:creator>Einar Thorsrud</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
[quote user=""]after each use of &amp;quot;sd_ble_uuid_vs_add&amp;quot; a&amp;nbsp;VERIFY_SUCCESS(err_code); is used, but is stucks after the first use of&amp;nbsp;sd_ble_uuid_vs_add().[/quote]
&lt;p&gt;Can you elaborate on what you mean by &amp;quot;stucks&amp;quot;? Do you get any errors returned from the call to &lt;span&gt;sd_ble_uuid_vs_add() or any other&amp;nbsp;&lt;/span&gt;function? What is the state of your application? Is any APP_ERROR_CHECK hit? What have you found by debugging?&lt;/p&gt;
[quote user=""]PS3: i adjusted&amp;nbsp; &amp;nbsp;the uuid count with :&amp;nbsp; p_ble_enable_params-&amp;gt;common_enable_params.vs_uuid_count = 3 in function&amp;nbsp;ble_stack_init(void)&lt;br /&gt;&amp;nbsp;since am using SDk 12.3.0 ( don&amp;#39;t has&amp;nbsp;&lt;em&gt;NRF_SDH_BLE_VS_UUID_COUNT in it&amp;#39;s sdk_config.h)&lt;/em&gt;[/quote]
&lt;p&gt;This should be good.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>