<?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>Creation of a secondary service?</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/3364/creation-of-a-secondary-service</link><description>I&amp;#39;m trying to write a test service on a PCA10001 that transmits a single scalar value that is computed from a few different sensor readings. I would like this service to send a notification when the scalar is outside a set range. The set/combination of</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Mon, 11 Aug 2014 21:12:19 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/3364/creation-of-a-secondary-service" /><item><title>RE: Creation of a secondary service?</title><link>https://devzone.nordicsemi.com/thread/12256?ContentTypeID=1</link><pubDate>Mon, 11 Aug 2014 21:12:19 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:a268e0f1-8047-4e3b-a94f-b6baa849ba42</guid><dc:creator>michurin</dc:creator><description>&lt;ul&gt;
&lt;li&gt;Do you have control over the stack of the central device ? or it&amp;#39;s common central such as a phone/tablet ?&lt;/li&gt;
&lt;li&gt;It is a smartphone&lt;/li&gt;
&lt;/ul&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Creation of a secondary service?</title><link>https://devzone.nordicsemi.com/thread/12255?ContentTypeID=1</link><pubDate>Mon, 11 Aug 2014 12:53:12 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:fc6af489-328e-438e-89e1-e3149e25cd47</guid><dc:creator>Hung Bui</dc:creator><description>&lt;p&gt;@Michurin: You would need to let me know more detail on your central device. Do you have control over the stack of the central device ? or it&amp;#39;s common central such as a phone/tablet ?
As mentioned before, I don&amp;#39;t see any draw back to declare all of your service as primary service except for the longer discovery time.
If you have control over the central stack, you can reduce this discovery time by stop discovery when you has found the primary service you want.&lt;/p&gt;
&lt;p&gt;Please be noted that not all central stack have full support to automatically discovery secondary services (e.g S120 stack).&lt;/p&gt;
&lt;p&gt;So, still, my suggestion is to declare all of your services as primary services.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Creation of a secondary service?</title><link>https://devzone.nordicsemi.com/thread/12253?ContentTypeID=1</link><pubDate>Sat, 09 Aug 2014 14:03:27 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:4e12f166-a68b-4b68-a1e2-42246f288892</guid><dc:creator>michurin</dc:creator><description>&lt;p&gt;Nobody said that fixed list of primary services is a must. I was saying that one of primary services is common for entire family of devices and every family member has its unique services with logical ties to that common primary service and it MAY make sense to implement them as a secondary. Your opinions/suggestions are welcome.
Thanks.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Creation of a secondary service?</title><link>https://devzone.nordicsemi.com/thread/12252?ContentTypeID=1</link><pubDate>Sat, 09 Aug 2014 01:56:52 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:b00e5b95-081c-40d4-bd40-ab04ffe66be3</guid><dc:creator>kb</dc:creator><description>&lt;p&gt;Thanks so much for the response! That was helpful.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Creation of a secondary service?</title><link>https://devzone.nordicsemi.com/thread/12254?ContentTypeID=1</link><pubDate>Fri, 08 Aug 2014 15:35:02 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:95801f4e-4260-4987-97cf-a51a0694d0ba</guid><dc:creator>michurin</dc:creator><description>&lt;p&gt;Thank you for reply, very helpful. Just to be on the same page.
There is no requirement for the fixed list of primary services. Client always needs to know the temperature in my example. The combine temperature is different for different devices and depends upon number and location of sensors. This configuration may be requested only if needed.So, does it make sense to have various primary services if in majority cases the combine temperature is sufficient. I don&amp;#39;t have enough experience to decide and hope that you do.
Thanks again.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Creation of a secondary service?</title><link>https://devzone.nordicsemi.com/thread/12251?ContentTypeID=1</link><pubDate>Fri, 08 Aug 2014 13:52:15 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:1b6e4995-68bd-4084-94ad-77ee646b496e</guid><dc:creator>Hung Bui</dc:creator><description>&lt;p&gt;Sorry for the late response.
If it&amp;#39;s the requirement form your peer device (the client) that you must have a fixed list of primary services. Then it makes sense to have your unique services as secondary services. But for most use cases we know of, we can simply set all of the services as primary services.
There maybe one use case, I can think of, is when you want to reduce the time needed for service discovery, so that only primary service is discovered and leave the secondary to be discovered later if needed.
We do have secondary service supported with our S110 stack. When you add a service you would need to set the service type as  BLE_GATTS_SRVC_TYPE_SECONDARY when calling sd_ble_gatts_service_add() and have to refer to that service from a primary service using sd_ble_gatts_include_add(). Unfortunately, we haven&amp;#39;t got an example for that, we will try to make one.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Creation of a secondary service?</title><link>https://devzone.nordicsemi.com/thread/12250?ContentTypeID=1</link><pubDate>Wed, 06 Aug 2014 11:16:59 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:2549da0a-5cc7-41b1-b2f3-554b75c01d13</guid><dc:creator>michurin</dc:creator><description>&lt;p&gt;Let say one needs to measure temperature for different devices. Every so often a new device is added to this family. They are using different types and different number of the sensors.
Wouldn&amp;#39;t it make sense to have primary service which reports the combine temperature and is common for all family and multiple different secondary unique services for each family member?
If one will change every time primary services then how to design the application to be compatible with most family members?
Thanks.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Creation of a secondary service?</title><link>https://devzone.nordicsemi.com/thread/12249?ContentTypeID=1</link><pubDate>Wed, 06 Aug 2014 11:05:23 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:24a4d6ec-a636-4be8-b3b2-83b1dbe54f47</guid><dc:creator>michurin</dc:creator><description>&lt;p&gt;Let me ask again: is it possible to implement secondary service?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Creation of a secondary service?</title><link>https://devzone.nordicsemi.com/thread/12248?ContentTypeID=1</link><pubDate>Wed, 06 Aug 2014 07:44:42 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:e3886021-9d86-4770-bad4-0bfdb279492a</guid><dc:creator>Hung Bui</dc:creator><description>&lt;p&gt;@Michurin: Correct, there is no example for Secondary service for now. As mentioned, there is no advantage of using secondary service, as far as I am aware of.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Creation of a secondary service?</title><link>https://devzone.nordicsemi.com/thread/12247?ContentTypeID=1</link><pubDate>Tue, 05 Aug 2014 15:00:46 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:cd848f91-2ff8-4ec9-9361-f1b9a428f8be</guid><dc:creator>michurin</dc:creator><description>&lt;p&gt;Should your answer be taken as there are NO examples? Is it still possible to implement what kb wants?  If yes could you please provide simple example how? Thanks.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Creation of a secondary service?</title><link>https://devzone.nordicsemi.com/thread/12246?ContentTypeID=1</link><pubDate>Tue, 05 Aug 2014 14:05:59 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:4c2add02-a9e7-4f57-8f61-2e58a4c56406</guid><dc:creator>Hung Bui</dc:creator><description>&lt;p&gt;Hi kb,&lt;/p&gt;
&lt;p&gt;Until, now there is not much use for secondary service in the Bluetooth LE spec. You can set-up all of your services as primary service.
I don&amp;#39;t see any advantage to have secondary service.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>