<?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>Preventing Services From Being Discovered</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/6630/preventing-services-from-being-discovered</link><description>Hello, 
 I am currently working on a project and I would like to add some security to my device by preventing services from being discovered. Ideally when a user connects to the device they should only see a Password service with a lock and unlock characteristic</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Wed, 22 Apr 2015 13:43:15 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/6630/preventing-services-from-being-discovered" /><item><title>RE: Preventing Services From Being Discovered</title><link>https://devzone.nordicsemi.com/thread/23213?ContentTypeID=1</link><pubDate>Wed, 22 Apr 2015 13:43:15 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:cb0689ce-80e3-4900-9b66-7318e865005c</guid><dc:creator>Hung Bui</dc:creator><description>&lt;p&gt;@Cory: I agree with what Ulrich explained. Just want to attach here an example of how to update the attribute table on the fly and send service changed indication. In the example (SDK v6.1) I add the battery level service 20 seconds after connected.&lt;/p&gt;
&lt;p&gt;&lt;a href="https://devzone.nordicsemi.com/cfs-file/__key/communityserver-discussions-components-files/4/ble_5F00_app_5F00_hrs-_2D00_-ServiceChangedBond.zip"&gt;ble_app_hrs - ServiceChangedBond.zip&lt;/a&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Preventing Services From Being Discovered</title><link>https://devzone.nordicsemi.com/thread/23212?ContentTypeID=1</link><pubDate>Wed, 22 Apr 2015 11:22:57 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:38058b35-aef6-407c-9009-2d015b53cf02</guid><dc:creator>Ulrich Myhre</dc:creator><description>&lt;p&gt;Hi Cory,&lt;/p&gt;
&lt;p&gt;Unfortunately, the thing you are asking for is not allowed per the Bluetooth spec. All declarations have to be readable and not require authentication or authorization, and this is mentioned for services, includes and characteristics alike. So disallowing enumeration is not allowed. Additionally, blocking enumeration will not block peers from reading and writing to arbitrary handles.&lt;/p&gt;
&lt;p&gt;The only possible way I see for you to accomplish what you are requesting is to actually create the database after the authentication is successful. You are then, as shibshab mentions, required to include the service changed characteristic. This lets you notify the peer that you did indeed change your database so it can rediscover it. Changing the database on the fly without service changed is also against the spec, so thread carefully!&lt;/p&gt;
&lt;p&gt;The Nike Fuel Band has implemented its own protocol over two characteristic in its database (which is fully discoverable), and basically re-implement a subset of GATT through sending commands to one of the characteristics and receiving data from the other one. This is also possible with Nordic SoftDevices that implement BLE, but we do not have any examples that do this.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Preventing Services From Being Discovered</title><link>https://devzone.nordicsemi.com/thread/23211?ContentTypeID=1</link><pubDate>Wed, 22 Apr 2015 07:34:19 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:3b35bd63-9334-4059-bb8a-b5bf83393bb9</guid><dc:creator>shibshab</dc:creator><description>&lt;p&gt;When initializing the softdevice, have you set the service change bit to &amp;#39;1&amp;#39; ? This is required for the functionality you are describing at least.&lt;/p&gt;
&lt;p&gt;This is the &lt;code&gt;service_changed&lt;/code&gt; property of &lt;code&gt;ble_enable_params.gatts_enable_params&lt;/code&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>