<?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>Question about secondary GATT services</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/26006/question-about-secondary-gatt-services</link><description>I know it&amp;#39;s not very common to use a secondary service, but I want to use it in one specific scenario. When referring to the documentation for the API sd_ble_gatts_include_add() , I see the following note: 
 &amp;quot;It is currently only possible to add an include</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Tue, 17 Oct 2017 12:46:17 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/26006/question-about-secondary-gatt-services" /><item><title>RE: Question about secondary GATT services</title><link>https://devzone.nordicsemi.com/thread/102489?ContentTypeID=1</link><pubDate>Tue, 17 Oct 2017 12:46:17 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:1007e51c-f5c2-4482-a531-83a04360b4ae</guid><dc:creator>Mohammad Afaneh</dc:creator><description>&lt;p&gt;Got it. Makes sense. Thanks!&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Question about secondary GATT services</title><link>https://devzone.nordicsemi.com/thread/102488?ContentTypeID=1</link><pubDate>Tue, 17 Oct 2017 08:42:20 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:8862be65-62ed-4566-b979-354d29a03531</guid><dc:creator>bjorn-spockeli</dc:creator><description>&lt;p&gt;It means that it only possible to add the include declaration of the secondary service to the last service that was added using sd_ble_gatts_service_add().&lt;/p&gt;
&lt;p&gt;So if you want to add a secondary service to multiple services you will have to add the services and secondary services in the following order.&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;sd_ble_gatts_service_add(&amp;lt;Service 1&amp;gt;)
sd_ble_gatts_include_add( Secondary Service)
sd_ble_gatts_service_add(&amp;lt;Service 2&amp;gt;)
sd_ble_gatts_include_add(Secondary Service)
sd_ble_gatts_service_add(&amp;lt;Service 3&amp;gt;)
sd_ble_gatts_include_add(Secondary Service)
&lt;/code&gt;&lt;/pre&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>