<?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>Enabling BLE security mode 4 only on BLE and not on BLE-Mesh</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/96659/enabling-ble-security-mode-4-only-on-ble-and-not-on-ble-mesh</link><description>Hello, 
 I wanted to enable L4 security on my BLE connection, 
 
 /** Level 4: Authenticated Secure Connections and 128-bit key. */ 
 BT_SECURITY_L4 , 
 Hence added the param in my prj.conf as : 
 
 
 
 
 CONFIG_BT_SMP_SC_ONLY=y 
 
 
 
 
 CONFIG_BT_TINYCRYPT_ECC</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Wed, 15 Feb 2023 09:02:28 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/96659/enabling-ble-security-mode-4-only-on-ble-and-not-on-ble-mesh" /><item><title>RE: Enabling BLE security mode 4 only on BLE and not on BLE-Mesh</title><link>https://devzone.nordicsemi.com/thread/410001?ContentTypeID=1</link><pubDate>Wed, 15 Feb 2023 09:02:28 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:216f108f-5964-4205-b57a-00eb27c77182</guid><dc:creator>Hieu</dc:creator><description>&lt;p&gt;Hi Hitesh,&lt;/p&gt;
&lt;p&gt;My apology, last time I&amp;nbsp;misunderstood your code as&amp;nbsp;the code of the central for some reasons, and missed something obvious.&lt;/p&gt;
&lt;p&gt;On the peripheral,&amp;nbsp;your code effectively trigger a security request right after connection is established. &lt;br /&gt;On the other hand, the provisioning using the nRF Mesh app is done via a (BLE) GATT connection (using the GATT Bearer, PB-GATT). &lt;br /&gt;As such, when provisioning starts, the GATT connection is established, then your peripheral/provisionee device requests security, and finally&amp;nbsp;the central device accepts by starting the pairing process.&lt;/p&gt;
&lt;p&gt;So, this is normal behavior.&lt;/p&gt;
&lt;p&gt;If you want to see that the pairing did not become &amp;quot;tangled&amp;quot; with mesh operation, you provision the device using the Advertising Bearer (PB-ADV), there would be no GATT connection, and you would see that there&amp;nbsp;is no pairing involved.&lt;br /&gt;The&amp;nbsp;&lt;a href="https://developer.nordicsemi.com/nRF_Connect_SDK/doc/2.2.0/zephyr/samples/bluetooth/mesh_provisioner/README.html"&gt;Bluetooth: Mesh Provisioner&lt;/a&gt;&amp;nbsp;sample does provisioning using&amp;nbsp;PB-ADV if you wish to try it.&lt;/p&gt;
&lt;p&gt;You can read more about peripheral requesting security in &lt;a href="https://devzone.nordicsemi.com/f/nordic-q-a/86794/how-to-initiate-ble-pairing-manually/362833"&gt;this DevZone answer by my colleague Vidar&lt;/a&gt;. There he also explains that if you wish, you can setup your GATT Profile so that security is only request&amp;nbsp;when certain Characteristics or Descriptors are accessed by the Central, which will remove this behavior.&lt;/p&gt;
&lt;p&gt;Hieu&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Enabling BLE security mode 4 only on BLE and not on BLE-Mesh</title><link>https://devzone.nordicsemi.com/thread/409844?ContentTypeID=1</link><pubDate>Tue, 14 Feb 2023 12:27:31 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:ff26a06f-7233-4942-bbc7-8e87a0722a43</guid><dc:creator>hiteshk014</dc:creator><description>&lt;p&gt;Hi Hieu,&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;When we enabled this security layer,&lt;/p&gt;
&lt;p&gt;Prior to provisioning, when we select the respective device for provisioning from the list, pairing happens in nRF Mesh app, during that time it ask for passkey (as mentioned in attached screenshot)&lt;br /&gt;this passkey mechanism is enabled from&amp;nbsp;smp.c from nRF Connect SDK.&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;&lt;img style="max-height:240px;max-width:320px;" src="https://devzone.nordicsemi.com/resized-image/__size/640x480/__key/communityserver-discussions-components-files/4/pastedimage1676377752133v1.png" alt=" " /&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Enabling BLE security mode 4 only on BLE and not on BLE-Mesh</title><link>https://devzone.nordicsemi.com/thread/409832?ContentTypeID=1</link><pubDate>Tue, 14 Feb 2023 11:57:23 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:23f51f78-9b66-45b6-a9f1-d8978e977fc3</guid><dc:creator>Hieu</dc:creator><description>&lt;p&gt;Hi Hitesh,&lt;/p&gt;
&lt;p&gt;Could you please provide more details on &lt;br /&gt;- What is prompting you to enter the key?&lt;br /&gt;- What exact steps were you doing when the key was requested?&lt;br /&gt;- What key was requested?&lt;/p&gt;
&lt;p&gt;Passkey is not a Bluetooth Mesh feature and is not a part of any Bluetooth Mesh procedures. &lt;br /&gt;In BLE,&amp;nbsp;passkey prompts should only happen during pairing.&amp;nbsp;&lt;br /&gt;During Bluetooth Mesh provisioning, the network key will be required, this is normal.&lt;/p&gt;
&lt;p&gt;Best regards,&lt;/p&gt;
&lt;p&gt;Hieu&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>