<?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>How could I use NUS without service discover?</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/13635/how-could-i-use-nus-without-service-discover</link><description>Hi. 
 I want to make a device which can connect each others and communicate with NUS.
I need not to use any other service without NUS.
I made nus_c service which is a central side service to use NUS which is peripheral side service.
It works good</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Wed, 04 May 2016 10:58:02 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/13635/how-could-i-use-nus-without-service-discover" /><item><title>RE: How could I use NUS without service discover?</title><link>https://devzone.nordicsemi.com/thread/52071?ContentTypeID=1</link><pubDate>Wed, 04 May 2016 10:58:02 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:e0f403dc-d428-4fb2-80e1-25744579e3a6</guid><dc:creator>FormerMember</dc:creator><description>&lt;p&gt;Great.&lt;/p&gt;
&lt;p&gt;I will not change the sd_ble_gatts_service_add() sequence in my project.
In this case, the handle value will be always the same.&lt;/p&gt;
&lt;p&gt;And I will try to add bonding and caching scenario to follow proper way.&lt;/p&gt;
&lt;p&gt;Thanks&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How could I use NUS without service discover?</title><link>https://devzone.nordicsemi.com/thread/52070?ContentTypeID=1</link><pubDate>Wed, 04 May 2016 10:45:01 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:00761a8e-04f8-49a9-9500-a8eafa875c85</guid><dc:creator>Petter Myhre</dc:creator><description>&lt;blockquote&gt;
&lt;p&gt;Searching and connection is done
within 2 second. but Service Discover
is too long, it takes a over 5
seconds. I think,I need not discover
the service because I already know the
service which I use - NUS. And Service
Discover tell me only the cccd, rx, tx
handle.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;The proper way to avoid doing service discovery on every connection is to cache attributes, but then you should be bonded. If you are using the Device Manager please see &lt;a href="https://devzone.nordicsemi.com/question/43446/s120-central-bonding-with-s110-peripheral/"&gt;this&lt;/a&gt; for more information. If you are using the Peer Manager, you can see from the &lt;a href="http://infocenter.nordicsemi.com/topic/com.nordic.infocenter.sdk5.v11.0.0/lib_peer_manager.html?cp=4_0_0_3_1_11"&gt;documentation&lt;/a&gt; that it is capable of caching GATT attributes.&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;But I cannot find where this value is
made? Is this value is fixed for all
device ?&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;The server on the peripheral has an attribute table with attribute handles. What attibute handle an attribute (service/characteristic/descriptor) is assigned depends on the order it is added to the attribute table. So if you for example add hrs and nus, nus will get different attribute handles depending if you add it before or after hrs. When you add nus the attribute handle is returned sd_ble_gatts_service_add(BLE_GATTS_SRVC_TYPE_PRIMARY, &amp;amp;ble_uuid, &lt;strong&gt;&amp;amp;p_nus-&amp;gt;service_handle&lt;/strong&gt;);&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How could I use NUS without service discover?</title><link>https://devzone.nordicsemi.com/thread/52073?ContentTypeID=1</link><pubDate>Wed, 04 May 2016 07:58:49 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:c796e7fd-b41e-4021-995f-1bbe69e33b21</guid><dc:creator>FormerMember</dc:creator><description>&lt;p&gt;Thanks for your help.&lt;/p&gt;
&lt;p&gt;Actually I have test as your suggest. fixed hanlde. it works.
I want to know how could I get the fixed handle.
I can get it by some test, but I can&amp;#39;t findout why this handle is fixed.
Could you tell me where I can find out NUS&amp;#39;s rx,tx,cccd?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How could I use NUS without service discover?</title><link>https://devzone.nordicsemi.com/thread/52072?ContentTypeID=1</link><pubDate>Wed, 04 May 2016 05:07:48 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:556b0296-7c08-47c6-88e7-25149af54c39</guid><dc:creator>Milan</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;I think this will &lt;a href="https://devzone.nordicsemi.com/question/48633/is-it-possible-to-bypass-service-discovery-in-s120-if-uuids-and-characteristics-of-peripheral-are-known/"&gt;help&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;Regards,&lt;/p&gt;
&lt;p&gt;Milan Joshi&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>