<?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>add characteristics with distinct uuids (128-bit)</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/27237/add-characteristics-with-distinct-uuids-128-bit</link><description>Hi, 
 I have created a custom service, and now I want to add different characteristics to it but with completely different uuids, not only the 12-13 octets. 
 This service will have 23 characteristics with completely different UUIDS. I tried to implement</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Mon, 27 Nov 2017 10:04:22 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/27237/add-characteristics-with-distinct-uuids-128-bit" /><item><title>RE: add characteristics with distinct uuids (128-bit)</title><link>https://devzone.nordicsemi.com/thread/107501?ContentTypeID=1</link><pubDate>Mon, 27 Nov 2017 10:04:22 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:e4f13521-f246-4fb6-bc85-d0fa4f4429c8</guid><dc:creator>endnode</dc:creator><description>&lt;p&gt;(always good to see problem solved - and own answer accepted!;)&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: add characteristics with distinct uuids (128-bit)</title><link>https://devzone.nordicsemi.com/thread/107500?ContentTypeID=1</link><pubDate>Mon, 27 Nov 2017 09:54:58 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:4ae6e9cb-00da-455f-87fe-333eff09ecec</guid><dc:creator>Jorge</dc:creator><description>&lt;p&gt;My problem was that I didn&amp;#39;t had the correct value on the &lt;code&gt;common_enable_params.vs_uuid_count&lt;/code&gt;, after changing it to 24 (number of my unique 128-bit UUIDs) and make the necessary changes for the memory I can now advertise the correct values of the different characteristics/services.&lt;/p&gt;
&lt;p&gt;Thank you for the help&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: add characteristics with distinct uuids (128-bit)</title><link>https://devzone.nordicsemi.com/thread/107496?ContentTypeID=1</link><pubDate>Fri, 24 Nov 2017 14:41:46 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:adbf6716-813a-4fba-8e3f-b466569fbeda</guid><dc:creator>endnode</dc:creator><description>&lt;p&gt;You are right, it&amp;#39;s not said what is maximum for S130 V2.0.1 (please stick to the Soft Device versions and forget the HW for the moment;) My understanding is that a) it&amp;#39;s restricted just by global amount of RAm available on  nRF51 chip (there are 16kB and 32kB variants) or b) it&amp;#39;s the same as S132 (where documentation was updated to explicitly mention it). In every case it&amp;#39;s pretty strange that it would be limited to exactly 17 or that it would have 17 as default (not 10 as said in the document).&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: add characteristics with distinct uuids (128-bit)</title><link>https://devzone.nordicsemi.com/thread/107495?ContentTypeID=1</link><pubDate>Fri, 24 Nov 2017 14:27:04 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:42b74a4c-d65f-40af-984c-7db47aaddeb4</guid><dc:creator>Jorge</dc:creator><description>&lt;p&gt;The maximum is defined only on the nRF52, for my chip and softdevice this is not defined, that is why I didn&amp;#39;t knew if it was the same value.
I will check the guides on how to do this then.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: add characteristics with distinct uuids (128-bit)</title><link>https://devzone.nordicsemi.com/thread/107494?ContentTypeID=1</link><pubDate>Fri, 24 Nov 2017 14:03:35 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:3ed4bd3c-364c-4697-832a-2aa837ec3318</guid><dc:creator>endnode</dc:creator><description>&lt;p&gt;Hi Jorge, I&amp;#39;m afraid there is still some small misunderstanding:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;As you can see in the documentation the default ATT VS UUID table size is 10. If you are able to fit 17 it means that Soft Device uses some RAM allocated for other structures/layers or that some of these UUIDs are equal.&lt;/li&gt;
&lt;li&gt;Also from the documentation it&amp;#39;s evident that maximum number is 254 so there is no confusion about it.&lt;/li&gt;
&lt;li&gt;Once you change max ATT VS UUID count you need to adjust RAM limits for SD (like if you change any other parameter, e.g. count of concurrent links/GAP roles, their bandwidth etc.!!!) There are many guides how to make this properly depending on what toolchain you use (it must be present at the time of linking and because each ANSI C compiler/linked does it differently - Keil in project settings, GCC in LD script etc. - you need to find guidelines specific for your choice).&lt;/li&gt;
&lt;/ul&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: add characteristics with distinct uuids (128-bit)</title><link>https://devzone.nordicsemi.com/thread/107485?ContentTypeID=1</link><pubDate>Fri, 24 Nov 2017 11:13:01 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:53c8ac7a-8e15-4ac9-a996-18ceadefba48</guid><dc:creator>Jorge</dc:creator><description>&lt;p&gt;Ok, I think I have abetter idea on the problem.
I tried to mess around with the &lt;code&gt;common_enable_params.vs_uuid_count&lt;/code&gt; value and the maximum i can set with the default memory settings is 17, after that I get the error NO_MEM.&lt;/p&gt;
&lt;p&gt;I tried to add more RAM memory by increasing the size on the &amp;quot;options for Target&amp;quot; and then &amp;quot;Target&amp;quot; Tab, but it didn&amp;#39;t seem to help since I still have the same error. Do you know if 17 is the maximum number for the vs_uuid_count? Since I don&amp;#39;t find that information.
Or to add memory space I need to do it another way.&lt;/p&gt;
&lt;p&gt;And the worst thing is at the moment I only need 18 different 128-bit uuids so I am only missing one.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: add characteristics with distinct uuids (128-bit)</title><link>https://devzone.nordicsemi.com/thread/107492?ContentTypeID=1</link><pubDate>Tue, 21 Nov 2017 14:51:38 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:d7c10f38-ec29-4b55-8def-9a89605927ef</guid><dc:creator>endnode</dc:creator><description>&lt;p&gt;Oh sorry I&amp;#39;ve missed that you use S130 (V2.0.1 I assume). &lt;a href="http://infocenter.nordicsemi.com/topic/com.nordic.infocenter.s130.sds/dita/softdevices/s130/mem_usage/UUID_mem_usage.html?resultof=%22%73%64%5f%62%6c%65%5f%65%6e%61%62%6c%65%22%20"&gt;Still the mechanism works the same way: you should put your number through &lt;code&gt;ble_common_enable_parameters_t&lt;/code&gt; structure in &lt;code&gt;sd_ble_enable&lt;/code&gt; function call&lt;/a&gt;. Default number is 10, if you have more custom bases you need to set more.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: add characteristics with distinct uuids (128-bit)</title><link>https://devzone.nordicsemi.com/thread/107493?ContentTypeID=1</link><pubDate>Tue, 21 Nov 2017 14:44:20 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:b974f235-6b5f-466d-8046-2243303e878a</guid><dc:creator>Jorge</dc:creator><description>&lt;p&gt;I think this is a memory problem, but I will still need to debug it.&lt;/p&gt;
&lt;p&gt;I am using the softdevice 130 so on the link it only has a minimum and a default value.&lt;/p&gt;
&lt;p&gt;I am not sure what this means?! Does this means that it will only allow me one specific Vendor UUID? and for maximum the 10 deefault? or can I change this number to allow the 254 ?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: add characteristics with distinct uuids (128-bit)</title><link>https://devzone.nordicsemi.com/thread/107491?ContentTypeID=1</link><pubDate>Tue, 21 Nov 2017 14:29:41 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:d772f7d3-18a6-49bd-967c-092fbaeccb71</guid><dc:creator>endnode</dc:creator><description>&lt;p&gt;Thanks a lot, this code looks OK to me. I would debug return value of &lt;code&gt;sd_ble_uuid_vs_add&lt;/code&gt; and also I would print out for debugging purposes value of &lt;code&gt;p_service-&amp;gt;uuid_type&lt;/code&gt; after that call and both values of &lt;code&gt;ble_uuid.type&lt;/code&gt; and &lt;code&gt;ble_uuid.uuid&lt;/code&gt; before calling &lt;code&gt;sd_ble_gatts_characteristic_add&lt;/code&gt;.&lt;/p&gt;
&lt;p&gt;To potential memory problems: yes, ATT UUID table size is subject of configuration during Soft Device init because it needs RAM space. See &lt;code&gt;common_enable_params.vs_uuid_count&lt;/code&gt; (in S13x/S140/S112 versions prior to v4.0.3) or &lt;code&gt;BLE_COMMON_CFG_VS_UUID&lt;/code&gt; (since V4.0.3) parameters. &lt;a href="http://infocenter.nordicsemi.com/topic/com.nordic.infocenter.s332.api.v5.0.0/group___b_l_e___u_u_i_d___v_s___c_o_u_n_t_s.html#ga7681a25f4adabd8e368ba8671a270928"&gt;It seems that default size in S132/140/112 V5.0.x is 10 and maximum 254&lt;/a&gt;.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: add characteristics with distinct uuids (128-bit)</title><link>https://devzone.nordicsemi.com/thread/107490?ContentTypeID=1</link><pubDate>Tue, 21 Nov 2017 14:05:44 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:8272f822-d3f9-4746-97f9-23d06bb1b21e</guid><dc:creator>Jorge</dc:creator><description>&lt;p&gt;What I don&amp;#39;t understand is why after the second characteristic this doesn&amp;#39;t work, if I call a copy of every function, just change the base UUIDs, the 16-bit UUIDs and some properties on the characteristic. I will try to debug the error code, if any, from the &lt;code&gt;sd_ble_uuid_vs_add&lt;/code&gt; function.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: add characteristics with distinct uuids (128-bit)</title><link>https://devzone.nordicsemi.com/thread/107489?ContentTypeID=1</link><pubDate>Tue, 21 Nov 2017 13:41:37 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:9daa7fbb-5b16-45c7-8fc8-731ccf786be9</guid><dc:creator>endnode</dc:creator><description>&lt;p&gt;Also could you employ some debug print-out and show what UUID base indexes are returned by SD after call of &lt;code&gt;sd_ble_uuid_vs_add&lt;/code&gt;, how you assemble &lt;code&gt;ble_gatts_attr_t&lt;/code&gt; instance, you don&amp;#39;t check any error code return from SD function calls... so many things to try and improve!:)&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: add characteristics with distinct uuids (128-bit)</title><link>https://devzone.nordicsemi.com/thread/107486?ContentTypeID=1</link><pubDate>Tue, 21 Nov 2017 13:35:37 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:83a891a1-24fc-4910-a440-7a59c75cf899</guid><dc:creator>endnode</dc:creator><description>&lt;p&gt;No need to zip, just show how exactly you assemble UUID structures and how you add services/characteristics to the stack. I guess that should be 5-10 lines of code.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: add characteristics with distinct uuids (128-bit)</title><link>https://devzone.nordicsemi.com/thread/107487?ContentTypeID=1</link><pubDate>Tue, 21 Nov 2017 13:33:21 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:cf9d5210-9a28-4bb8-94e2-54b5d78f01db</guid><dc:creator>Jorge</dc:creator><description>&lt;p&gt;I assemble the new UUID on the Char#_value_char_add functions, each one as their own base and 16- bit value.
This is done by adding the 16-bit UUID to the p_uuid paramater of the ble_gatts_attr_t structure.&lt;/p&gt;
&lt;p&gt;I need different base UUIDs for every characteristic, what I see is that the 16-bit UUIDs are changed but not the base UUID for each different characteristic.&lt;/p&gt;
&lt;p&gt;Let me know if I am not being clear on what I intend to achieve or if I am not explaining the error that is occurring.&lt;/p&gt;
&lt;p&gt;I can make a zip file that has some parts of my code with different data if you need.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: add characteristics with distinct uuids (128-bit)</title><link>https://devzone.nordicsemi.com/thread/107488?ContentTypeID=1</link><pubDate>Tue, 21 Nov 2017 13:12:27 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:459af16d-2c30-4756-9215-05587dbc7078</guid><dc:creator>endnode</dc:creator><description>&lt;p&gt;But that&amp;#39;s not how UUID bae index works in Nordic Soft Device API! You should not invent and assign your values, you should always populate it through passing pointer to &lt;code&gt;sd_ble_uuid_vs_add&lt;/code&gt; function call (after return the new UUID base is assigned). Then you should use it to assemble new UUID (by combining with some 16-bit value into structure) and use it in other calls like service or characteristic add. Maybe you are doing it but from this code snippet it&amp;#39;s definitely not visible.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: add characteristics with distinct uuids (128-bit)</title><link>https://devzone.nordicsemi.com/thread/107499?ContentTypeID=1</link><pubDate>Tue, 21 Nov 2017 09:02:14 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:a2ea087d-b22c-4b26-b6b0-16ac96784b5e</guid><dc:creator>Jorge</dc:creator><description>&lt;p&gt;Only now I had time to check this.
I checked on the nrf Connect (mobile app) and on the Master Control Panel (Windows tool) to check if the UUIDS were correct.&lt;/p&gt;
&lt;p&gt;I can see that the 2 first UUIDs have the correct values but after the second one every UUID has the same base, only the 12-13 octects are correct.&lt;/p&gt;
&lt;p&gt;I edited on my question the code that I have to do this.&lt;/p&gt;
&lt;p&gt;But I don&amp;#39;t understand why it works for the first two and not for the rest...
Could it be a memory problem?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: add characteristics with distinct uuids (128-bit)</title><link>https://devzone.nordicsemi.com/thread/107498?ContentTypeID=1</link><pubDate>Fri, 10 Nov 2017 13:15:26 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:6460cec7-fe58-4767-9224-202b166074e8</guid><dc:creator>Jorge</dc:creator><description>&lt;p&gt;I am using the same way for every characteristic, so it should work for every one.
I will try to get a BLE Sniffer and check the data that I see there.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: add characteristics with distinct uuids (128-bit)</title><link>https://devzone.nordicsemi.com/thread/107497?ContentTypeID=1</link><pubDate>Fri, 10 Nov 2017 12:56:24 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:0ec520dc-05c3-406a-a068-0fe06a960ffe</guid><dc:creator>endnode</dc:creator><description>&lt;p&gt;If you are sure that you store &amp;quot;indexes&amp;quot; of each UUID base provisioned to the stack by &lt;code&gt;sd_ble_uuid_vs_add()&lt;/code&gt; function and that you use it properly in &lt;code&gt;sd_ble_gatts_characteristic_add()&lt;/code&gt; function call then just use BLE sniffer or similar radio analyzer to observe GATT Service discovery procedure from Client side and you can verify UUIDs yourself.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>