<?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>GATT client (ANCS example) : adding ANCS UUIDs on the client app</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/7347/gatt-client-ancs-example-adding-ancs-uuids-on-the-client-app</link><description>Hi, 
 I&amp;#39;m exploring the ANCS example with SD130 SDK 8.1.0 ... 
 The application acts as a GATT client to receive notification from GATT server on the iPhone.
I see in the service_init function that the code calls 4 times the sd_ble_uuid_vs_add function</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Sun, 07 Jun 2015 09:21:52 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/7347/gatt-client-ancs-example-adding-ancs-uuids-on-the-client-app" /><item><title>RE: GATT client (ANCS example) : adding ANCS UUIDs on the client app</title><link>https://devzone.nordicsemi.com/thread/26023?ContentTypeID=1</link><pubDate>Sun, 07 Jun 2015 09:21:52 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:779be6e5-516a-4e11-855c-b153466c05fa</guid><dc:creator>Hung Bui</dc:creator><description>&lt;p&gt;@Paolo: Have the answer from ppartierno and endnode answered your question ? If they did, please accept them as answered.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: GATT client (ANCS example) : adding ANCS UUIDs on the client app</title><link>https://devzone.nordicsemi.com/thread/26025?ContentTypeID=1</link><pubDate>Sun, 31 May 2015 00:22:30 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:72274aed-578d-4875-92fc-1110b405b0e8</guid><dc:creator>endnode</dc:creator><description>&lt;p&gt;Looks like &lt;a href="https://devzone.nordicsemi.com/question/15930/s130-custom-uuid-service-discovery/"&gt;this&lt;/a&gt; thread has some answers;) Cheers Jan&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: GATT client (ANCS example) : adding ANCS UUIDs on the client app</title><link>https://devzone.nordicsemi.com/thread/26024?ContentTypeID=1</link><pubDate>Fri, 29 May 2015 21:43:03 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:27e68050-97bf-42ed-a3e3-f6bd3a5062f3</guid><dc:creator>Bill Siever</dc:creator><description>&lt;p&gt;In order to know which service you are connecting to you will need UUIDs.  If you take a look at &lt;code&gt;service_disc_req_send()&lt;/code&gt; (in ble_ancs.c) you will see that it uses &lt;code&gt;BLE_UUID_TYPE_VENDOR_BEGIN&lt;/code&gt;, which was set by the first &lt;code&gt;sd_ble_uuid_vs_add()&lt;/code&gt;.&lt;/p&gt;
&lt;p&gt;(I think the dependencies between the &lt;code&gt;main()&lt;/code&gt;/driver and the ble_ancs module are a little messy, since the ancs module depends on the main module setting the ANCS UUID before any others.  Maybe it would be better if there were a function to add a new UUID and also get its offset. Then modules, like ancs, could add their own vendor UUIDS and know the index of them)&lt;/p&gt;
&lt;p&gt;(an update: I didn&amp;#39;t address the last three &lt;code&gt;ble_vs_uuids_assign()&lt;/code&gt;s originally)&lt;br /&gt;
Some of the other gattc call backs that are used by ancs (for characteristic discovery &amp;amp; service discovery) will return a type of &lt;code&gt;BLE_UUID_TYPE_UNKNOWN&lt;/code&gt; if the corresponding UUIDs don&amp;#39;t match anything that&amp;#39;s already in &lt;code&gt;ble_vs_uuids_assign()&lt;/code&gt;. Although the documentation isn&amp;#39;t clear, this probably means that the shortened 16-bit identifier wouldn&amp;#39;t be valid, which would prevent the if-statements in the ancs module from correctly identifying the characteristics/services that have been discovered. (Given the way UUIDs are represented in the Nordic implementation, returning &amp;quot;UNKNOWN&amp;quot; this is a reasonable restriction that avoids any ambiguity)&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>