<?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>Characteristic&amp;#39;s base UUID different from Service&amp;#39;s base UUID</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/15208/characteristic-s-base-uuid-different-from-service-s-base-uuid</link><description>Dear all 
 I have a service with an UUID. Let&amp;#39;s say 11111111-2222-3333-4444-555555555555 
 I also have two characteristics that belong to this service: 
 66666666-7777-8888-9999-AAAAAAAAAAA A 
 66666666-7777-8888-9999-AAAAAAAAAAA B 
 I know that</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Tue, 26 Feb 2019 17:38:26 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/15208/characteristic-s-base-uuid-different-from-service-s-base-uuid" /><item><title>RE: Characteristic's base UUID different from Service's base UUID</title><link>https://devzone.nordicsemi.com/thread/173113?ContentTypeID=1</link><pubDate>Tue, 26 Feb 2019 17:38:26 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:c9ce2ce7-7ba5-40da-9c14-d59b8dd89b95</guid><dc:creator>Hannu Hirvonen</dc:creator><description>&lt;p&gt;Is this for Server side or do we need to do this &amp;quot;trick&amp;quot; also for Client side (Central) before discovering services and characteristics form Peripheral/Server ?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Characteristic's base UUID different from Service's base UUID</title><link>https://devzone.nordicsemi.com/thread/58073?ContentTypeID=1</link><pubDate>Tue, 19 Jul 2016 09:46:25 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:a74d3caf-997b-4540-a9bb-147860a91591</guid><dc:creator>atune</dc:creator><description>&lt;p&gt;Adding UUID bases with &lt;code&gt;sd_ble_uuid_vs_add&lt;/code&gt; return an unique uuid_type for each custom UUID and yes, it is used with &lt;code&gt;sd_ble_gatts_characteristic_add&lt;/code&gt;, passed in p_attr_char_value. All you need to do is add a new UUID base for each of your characteristics since you&amp;#39;re changing the base part.&lt;/p&gt;
&lt;p&gt;So for your example the following snipped should illustrate how to do it the SD way:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;ble_uuid_t uuidA = { .uuid = 0x6666 };
ble_uuid128_t uuidA_base = { 0xAA, 0xAA, 0xAA, 0xAA, 
										0xAA, 0xAA, 0x99, 0x99, 
										0x88, 0x88, 0x77, 0x77, 
										0x00, 0x00, 0x66, 0x66 };
sd_ble_uuid_vs_add(&amp;amp;uuidA_base, &amp;amp;uuidA.type);
// uuidA is now 66666666-7777-8888-9999-AAAAAAAAAAAA

ble_uuid_t uuidB = { .uuid = 0x6666 };
ble_uuid128_t uuidB_base = { 0xAB, 0xAA, 0xAA, 0xAA, 
										0xAA, 0xAA, 0x99, 0x99, 
										0x88, 0x88, 0x77, 0x77, 
										0x00, 0x00, 0x66, 0x66 };
sd_ble_uuid_vs_add(&amp;amp;uuidB_base, &amp;amp;uuidB.type);
// uuidB is now 66666666-7777-8888-9999-AAAAAAAAAAAB

...
ble_gatts_attr_t uuidA_gatts_attr;
...
ble_gatts_attr_t uuidB_gatts_attr;
...
uuidA_gatts_attr.p_uuid = &amp;amp;uuidA;
....
uuidB_gatts_attr.p_uuid = &amp;amp;uuidB;
...
sd_ble_gatts_characteristics_add(x, y, &amp;amp;uuidA_gatts_attr, z);
sd_ble_gatts_characteristics_add(x, y, &amp;amp;uuidB_gatts_attr, z);
&lt;/code&gt;&lt;/pre&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>