<?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>Why is GATT attribute security required to be enabled for passkey to work?</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/15349/why-is-gatt-attribute-security-required-to-be-enabled-for-passkey-to-work</link><description>This is a follow-up question from devzone.nordicsemi.com/.../ 
 I finally got passkey support to work on ble_app_uart but don&amp;#39;t quite understand the changes made to the code to get things working. 
 I had to make some changes in ble_nus.c. BLE_GAP_CONN_SEC_MODE_SET_OPEN</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Tue, 26 Jul 2016 08:03:19 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/15349/why-is-gatt-attribute-security-required-to-be-enabled-for-passkey-to-work" /><item><title>RE: Why is GATT attribute security required to be enabled for passkey to work?</title><link>https://devzone.nordicsemi.com/thread/58659?ContentTypeID=1</link><pubDate>Tue, 26 Jul 2016 08:03:19 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:18fbe412-3ae6-4ab3-a6a8-630f026d3baf</guid><dc:creator>RK</dc:creator><description>&lt;p&gt;don&amp;#39;t know why you&amp;#39;re finding this so hard. You don&amp;#39;t &amp;#39;run&amp;#39; peer manager, peer manager is a piece of code which responds to the encryption request/response callbacks from the central and sends the responses required to encrypt the lik. So you need to build it into the app and feed it ble events so it can generate the correct responses when the central starts the encryption process. What however STARTS that process is your app responding to a characteristic read with an error that the characteristic can&amp;#39;t be read without encryption, it does that because the permissions on the attribute are set not to be open but to require encryption. So you need both, attribute permissions to get the central to start encryption, peer manager (or your own version which does the same thing) to handle the callbacks which result from starting it.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Why is GATT attribute security required to be enabled for passkey to work?</title><link>https://devzone.nordicsemi.com/thread/58658?ContentTypeID=1</link><pubDate>Tue, 26 Jul 2016 07:17:34 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:c8f2223e-67df-43f2-887e-7397bc289963</guid><dc:creator>helpme</dc:creator><description>&lt;p&gt;Do you mean I need not run peer manager in ble_app_uart and the passkey feature will still work if I use BLE_GAP_CONN_SEC_MODE_SET_ENC_NO_MITM?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Why is GATT attribute security required to be enabled for passkey to work?</title><link>https://devzone.nordicsemi.com/thread/58657?ContentTypeID=1</link><pubDate>Tue, 26 Jul 2016 07:12:34 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:2e1fb281-550c-4b45-b714-4411ec0868a3</guid><dc:creator>RK</dc:creator><description>&lt;p&gt;yes peer manager has nothing to do with it. The central reads the attribute, if it gets back an error INSUFFICIENT_AUTHENTICATION (or is that authorisation, I never remember) then it starts the encryption process, else it doesn&amp;#39;t bother.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Why is GATT attribute security required to be enabled for passkey to work?</title><link>https://devzone.nordicsemi.com/thread/58656?ContentTypeID=1</link><pubDate>Tue, 26 Jul 2016 07:10:31 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:ea704169-ac7f-4920-9d0a-43da62e663be</guid><dc:creator>helpme</dc:creator><description>&lt;p&gt;I see. That is why the Android app does not prompt for a passkey when security is set to open even if peer manager is running.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Why is GATT attribute security required to be enabled for passkey to work?</title><link>https://devzone.nordicsemi.com/thread/58655?ContentTypeID=1</link><pubDate>Tue, 26 Jul 2016 07:08:28 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:f8624f18-1f0d-481b-a1af-e1785a1a6ddc</guid><dc:creator>RK</dc:creator><description>&lt;p&gt;Why? Because if the permissions are open there&amp;#39;s no encryption required so no need to encrypt the link at all  so no need for a passkey because you&amp;#39;re not encrypting.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>