<?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>Service discovery when peripheral has the same service multiple times</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/22773/service-discovery-when-peripheral-has-the-same-service-multiple-times</link><description>My peripheral uses a generic sensor service which I use for various sensors. Most of the sensors only have one integer as value and can be abstracted the same, hence I made a generic sensor service. Now there will be cases where the peripheral has two</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Mon, 19 Jun 2017 07:29:07 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/22773/service-discovery-when-peripheral-has-the-same-service-multiple-times" /><item><title>RE: Service discovery when peripheral has the same service multiple times</title><link>https://devzone.nordicsemi.com/thread/89526?ContentTypeID=1</link><pubDate>Mon, 19 Jun 2017 07:29:07 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:3c18059b-9e2b-407d-b94e-bb9db4b7011d</guid><dc:creator>Rick</dc:creator><description>&lt;p&gt;I suppose it would be easier to change my services in that case. Thanks for the answer.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Service discovery when peripheral has the same service multiple times</title><link>https://devzone.nordicsemi.com/thread/89525?ContentTypeID=1</link><pubDate>Thu, 15 Jun 2017 17:04:00 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:a2a151cf-b9ba-4296-ac1d-f168b82e7c48</guid><dc:creator>FormerMember</dc:creator><description>&lt;p&gt;My first thought is that the problem is related to how the db_discovery module works on the central side, it does only look for the services and the number of services it expects to find, see &lt;code&gt;on_srv_disc_completion()&lt;/code&gt;, the variable &lt;code&gt;p_db_discovery-&amp;gt;discoveries_count&lt;/code&gt;and the variable &lt;code&gt;m_num_of_handlers_reg&lt;/code&gt;.&lt;/p&gt;
&lt;p&gt;To make the central look for the &amp;quot;duplicate&amp;quot; service, you would need to make sure that the central  looks for one more service than it currently does. And possibly also associate the extra service discovery with a UUID. (Note: I haven&amp;#39;t tested this..)&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Service discovery when peripheral has the same service multiple times</title><link>https://devzone.nordicsemi.com/thread/89528?ContentTypeID=1</link><pubDate>Thu, 15 Jun 2017 09:06:18 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:7063339f-e2ec-4b7e-be68-b66c1589220a</guid><dc:creator>endnode</dc:creator><description>&lt;p&gt;OK, you seems to be right, that&amp;#39;s what BT spec says. It doesn&amp;#39;t make much sense to me (because on GATT you cannot do any straight forward enumeration) but you probably can do it if you want. However if ble_db module works on UUID level it&amp;#39;s no surprise it cannot handle it. To be sure it is limitation/bug in that module you can either wait for someone else to answer (I&amp;#39;m not using it, I prefer custom Service Discovery mechanism done by my code) or get BLE RF sniffer log and verify that really both services were &amp;quot;discovered&amp;quot; on radio but you got triggered only once.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Service discovery when peripheral has the same service multiple times</title><link>https://devzone.nordicsemi.com/thread/89529?ContentTypeID=1</link><pubDate>Thu, 15 Jun 2017 07:10:45 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:5303a3c9-23c4-42ae-86a2-00d2c13746e7</guid><dc:creator>Rick</dc:creator><description>&lt;p&gt;They don&amp;#39;t, it&amp;#39;s the same UUID. I thought it was allowed because of this in the Core Spec Vol 3 Part G 3.1 Service Definition: &lt;code&gt;A device or higher level specification may have multiple service definitions and may have multiple service definitions with the same service UUID.&lt;/code&gt;. I thought this meant it was fine to implement the exact same service twice.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Service discovery when peripheral has the same service multiple times</title><link>https://devzone.nordicsemi.com/thread/89527?ContentTypeID=1</link><pubDate>Wed, 14 Jun 2017 21:10:56 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:0589d143-9c1c-4eb0-8e9d-386ec5a17984</guid><dc:creator>endnode</dc:creator><description>&lt;p&gt;Do I understand it correctly that your two primary services (representing two sensors) have different UUIDs (because that&amp;#39;s what BT SIG demands)?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>