<?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>CTS -- is it necessary to establish security</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/16001/cts----is-it-necessary-to-establish-security</link><description>I am trying to implement the Current Time Service in my project and had a few questions: 
 -The example requires that security be established before services can be discovered. Is security absolutely necessary? I am just interested in getting time from</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Wed, 20 Sep 2017 06:10:56 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/16001/cts----is-it-necessary-to-establish-security" /><item><title>RE: CTS -- is it necessary to establish security</title><link>https://devzone.nordicsemi.com/thread/61039?ContentTypeID=1</link><pubDate>Wed, 20 Sep 2017 06:10:56 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:84635009-f056-445b-ac61-32ee91944e80</guid><dc:creator>Petter Myhre</dc:creator><description>&lt;p&gt;Sounds correct, but I haven&amp;#39;t tested myself. Let me know if you get into trouble.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: CTS -- is it necessary to establish security</title><link>https://devzone.nordicsemi.com/thread/61038?ContentTypeID=1</link><pubDate>Wed, 20 Sep 2017 03:45:16 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:317eec8a-0cfc-43e6-ac39-68d63b2720a0</guid><dc:creator>benkokes</dc:creator><description>&lt;p&gt;Hi Petter,  Your suggestion worked really well! Thanks for the advice!&lt;/p&gt;
&lt;p&gt;I have now migrated to SDK13, it seems that there is no longer a device manager.
Based off the HRM example, it seems that the new appropriate place to put this is in the on_ble_evt(), under the BLE_GAP_EVT_CONNECTED case, correct?&lt;/p&gt;
&lt;p&gt;Cheers,
-Ben&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: CTS -- is it necessary to establish security</title><link>https://devzone.nordicsemi.com/thread/61037?ContentTypeID=1</link><pubDate>Fri, 26 Aug 2016 12:37:59 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:89b36a10-bb2c-41c2-832a-c3388911bfb9</guid><dc:creator>Petter Myhre</dc:creator><description>&lt;p&gt;I don&amp;#39;t understand why the example is implemented in this way, it seems to be that &lt;a href="https://www.bluetooth.com/specifications/gatt/viewer?attributeXmlFile=org.bluetooth.service.current_time.xml"&gt;this&lt;/a&gt; service doesn&amp;#39;t require any security.&lt;/p&gt;
&lt;p&gt;This is easy to change. It is actually the peripheral that sends the security request, it is sent by a timer that expires 4 seconds after a connection is made, see how the DM_EVT_CONNECTION event is handled in device_manager_evt_handler(). Comment out app_timer_start() to not send the security request.&lt;/p&gt;
&lt;p&gt;But if you do this, service discovery is never performed, because you will never get the DM_EVT_LINK_SECURED event, where ble_db_discovery_start() is called. So just call ble_db_discovery_start() when you get the DM_EVT_CONNECTION instead, and it should work.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>