<?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 to implement the LESC for ble peripheral?</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/67654/how-to-implement-the-lesc-for-ble-peripheral</link><description>SDK version: SDK17.0.2 
 Product: nRF52840-DK 
 IDE: Segger 
 Role: ble peripheral 
 OS: non-os 
 Example: examples\ble_central_and_peripheral\experimental\ble_app_multirole_lesc\pca10056\s140 
 Softdevice: s140 
 Sniffer equipment: Ellisys 
 
 Hi, 
</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Fri, 30 Oct 2020 08:19:20 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/67654/how-to-implement-the-lesc-for-ble-peripheral" /><item><title>RE: How to implement the LESC for ble peripheral?</title><link>https://devzone.nordicsemi.com/thread/277737?ContentTypeID=1</link><pubDate>Fri, 30 Oct 2020 08:19:20 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:ebd1df28-5c74-46c6-82e1-9e77028a1528</guid><dc:creator>Simonr</dc:creator><description>&lt;p&gt;Yes, by setting the LESC_DEBUG_MODE define to 1 you should enable the LESC debug keys and in turn use the sniffer to inspect traffic.&lt;/p&gt;
&lt;p&gt;Best regards,&lt;/p&gt;
&lt;p&gt;Simon&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How to implement the LESC for ble peripheral?</title><link>https://devzone.nordicsemi.com/thread/277717?ContentTypeID=1</link><pubDate>Fri, 30 Oct 2020 05:56:11 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:6cb967af-9346-472d-85ab-15b9a53b74c4</guid><dc:creator>fox.tai</dc:creator><description>&lt;p&gt;Hi Simon,&lt;/p&gt;
&lt;p&gt;I found this article&amp;nbsp;&lt;a title="LESC_DEBUG_MODE define in ble_app_multirole_lesc, nRF5 SDK 15.0.0" href="https://devzone.nordicsemi.com/f/nordic-q-a/37078/lesc_debug_mode-define-in-ble_app_multirole_lesc-nrf5-sdk-15-0-0/143954#143954"&gt;LESC_DEBUG_MODE define in ble_app_multirole_lesc, nRF5 SDK 15.0.0&lt;/a&gt;, it seems that marco&amp;nbsp;&lt;strong&gt;&lt;em&gt;LESC_DEBUG_MODE&lt;/em&gt;&lt;/strong&gt;&amp;nbsp;is not used after sdk 15.0? So debug key is still available in sdk 17.02?&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Thansk,&lt;/p&gt;
&lt;p&gt;Fox Tai&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How to implement the LESC for ble peripheral?</title><link>https://devzone.nordicsemi.com/thread/277713?ContentTypeID=1</link><pubDate>Fri, 30 Oct 2020 05:38:29 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:f46c18a0-4ad3-4cc5-9083-5f5e2990c170</guid><dc:creator>fox.tai</dc:creator><description>&lt;p&gt;Hi Simon,&lt;/p&gt;
&lt;p&gt;Actually, I wonder where can I find the correct LTK in code, then I would print it out this LTK and fill into the Ellisys application to decrypt sniffer packets.&lt;/p&gt;
&lt;p&gt;Few days ago, I followed this article&amp;nbsp;&lt;a title="How can I find the long term key being currently used -peer manager" href="https://devzone.nordicsemi.com/f/nordic-q-a/18442/how-can-i-find-the-long-term-key-being-currently-used--peer-manager"&gt;How can I find the long term key being currently used -peer manager&lt;/a&gt;&amp;nbsp;to obtain LTK in function&amp;nbsp;&lt;span&gt;sec_info_request_process(). Because it said &amp;quot;&lt;strong&gt;read from flash in sec_info_request_process() with pdb_peer_data_ptr_get() when the device reconnect and re-encrypt&lt;/strong&gt;&amp;quot;, but in bonding procedure, no one called&amp;nbsp;sec_info_request_process(), which means I didn&amp;#39;t get the LTK.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;And I remind that article mentioned reconnect device and re-encrypt, program would read the LTK from flash, that&amp;#39;s why I try to connect, disconnect, then connect to get the LTK. Now I get the LTK from&amp;nbsp;peer_data.p_bonding_data-&amp;gt;own_ltk.enc_info.ltk[] in function&amp;nbsp;auth_status_success_process() after bonding, the first 16 bytes of this LTK is the same with in&amp;nbsp;sec_info_request_process(), but it&amp;#39;s weird that strlen size of&amp;nbsp;peer_data.p_bonding_data-&amp;gt;own_ltk.enc_info.ltk[] is 17 bytes, the last byte always 0x43. And I ignore the last byte and use the first 16 bytes to decrypt.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Unfortunately, this LTK&amp;nbsp;often cannot decrypt the sniffer packets. Maybe run 10 times, only 1 time can decrypt successfully. Every time I run the test, I would delete bond, and reflash the image of&amp;nbsp;&lt;a href="https://infocenter.nordicsemi.com/topic/sdk_nrf5_v17.0.2/ble_sdk_app_gls.html"&gt;the Glucose application&lt;/a&gt;.&amp;nbsp;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;B.T.W., I also try to set&amp;nbsp;LESC_DEBUG_MODE to 1 and 0. LTK usually cannot decrypt my sniffer packets. So I wonder where can I find the correct LTK in source code?&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Thanks,&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Fox Tai&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How to implement the LESC for ble peripheral?</title><link>https://devzone.nordicsemi.com/thread/277621?ContentTypeID=1</link><pubDate>Thu, 29 Oct 2020 13:50:31 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:fe56f778-6b14-49ef-9c13-c53ae862062a</guid><dc:creator>Simonr</dc:creator><description>&lt;p&gt;Hi&lt;/p&gt;
&lt;p&gt;1. Bonding and pairing are also encryption procedures, and I assume this is called &amp;quot;Encryption&amp;quot; just to ensure the user that it is still an encrypted link as well, as it can&amp;#39;t be called &amp;quot;bonding&amp;quot; when the devices are already bonded.&lt;/p&gt;
&lt;p&gt;2. Yes, you will not have to disconnect and reconnect in order to be in an encrypted connection after bonding.&lt;/p&gt;
&lt;p&gt;3.&amp;nbsp;Seeing as you&amp;#39;re using LESC, you will have to use a debug-key which is standard for all connections, or add the LTK in Ellisys (see&lt;a href="https://www.ellisys.com/technology/een_bt09.pdf"&gt; this paper&lt;/a&gt;). You can get this from the nRF by I.E. logging it from the nRF.&lt;/p&gt;
&lt;p&gt;Best regards,&lt;/p&gt;
&lt;p&gt;Simon&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How to implement the LESC for ble peripheral?</title><link>https://devzone.nordicsemi.com/thread/277544?ContentTypeID=1</link><pubDate>Thu, 29 Oct 2020 09:06:03 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:113e635b-d980-4869-8060-7f97290984cf</guid><dc:creator>fox.tai</dc:creator><description>&lt;p&gt;Hi &lt;span&gt;Simon&lt;/span&gt;,&lt;/p&gt;
&lt;p&gt;I&amp;#39;ve tried to use 2 nrf52840-DK, one to connect to &lt;strong&gt;nRF Connect Desktop&lt;/strong&gt;, another to run&amp;nbsp;&lt;a title="the Glucose application" href="https://infocenter.nordicsemi.com/index.jsp?topic=%2Fsdk_nrf5_v17.0.2%2Fble_sdk_app_gls.html"&gt;the Glucose application&lt;/a&gt;&lt;span&gt;.&amp;nbsp;When I tab the &amp;quot;&lt;strong&gt;connect&lt;/strong&gt;&amp;quot; on&amp;nbsp;&lt;strong&gt;nRF Connect Desktop&lt;/strong&gt; show the log &amp;quot;&lt;em&gt;Security updated, mode:1, level:4&lt;/em&gt;&amp;quot;.&amp;nbsp; And I find the uart print the following log, it seemed to run &lt;strong&gt;bonding&lt;/strong&gt;:&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&lt;pre class="ui-code" data-mode="text"&gt;&amp;lt;info&amp;gt; peer_manager_handler: Connection secured: role: Peripheral, conn_handle: 1, procedure: Bonding&lt;/pre&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;If I tab &amp;quot;&lt;strong&gt;disconnect&lt;/strong&gt;&amp;quot;, then &amp;quot;&lt;strong&gt;connect&lt;/strong&gt;&amp;quot;, uart would print the following log, it seemed to run &lt;em&gt;encryption&lt;/em&gt;:&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&lt;pre class="ui-code" data-mode="text"&gt;&amp;lt;info&amp;gt; peer_manager_handler: Connection secured: role: Peripheral, conn_handle: 1, procedure: Encryption&lt;/pre&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&amp;nbsp;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;So, I have some questions:&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Question 1.&amp;nbsp;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;After advertising, I tab &amp;quot;&lt;strong&gt;connect&lt;/strong&gt;&amp;quot;, it only perform bonding. Then I tab &amp;quot;&lt;strong&gt;disconnect&lt;/strong&gt;&amp;quot; and &amp;quot;&lt;strong&gt;connect&lt;/strong&gt;&amp;quot;, it would perform &amp;quot;&lt;strong&gt;encryption&lt;/strong&gt;&amp;quot;. &lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;These behavior is right?&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Question 2.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;If the program is running &lt;strong&gt;bonding&lt;/strong&gt;, that also runs the &lt;strong&gt;security connection&lt;/strong&gt;&amp;nbsp;and&amp;nbsp;&lt;strong&gt;encryption&lt;/strong&gt;?&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&amp;nbsp;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Question 3.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Could you tell me where can I find the LTK to decrypt my sniffer packets. Almost of time, my LTK cannot decrypt packets...&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Thanks,&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Fox Tai&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How to implement the LESC for ble peripheral?</title><link>https://devzone.nordicsemi.com/thread/277350?ContentTypeID=1</link><pubDate>Wed, 28 Oct 2020 10:34:36 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:abfa053b-e15e-41e8-8703-f8b81903506b</guid><dc:creator>Simonr</dc:creator><description>&lt;p&gt;1. Step 6 seems to be somewhat outdated indeed. Step 6 should be the following in nRFConnect for Desktop for example. After you have successfully connected to the Nordic Glucose example, press the settings icon and Pair... in the dropdown menu. A pop-up should appear where you can enable LESC pairing, etc. Please check the&amp;nbsp;&lt;strong&gt;Enable LE Secure Connection pairing&amp;nbsp;&lt;/strong&gt; as well as&amp;nbsp;&lt;strong&gt;Perform bonding&lt;/strong&gt; and press &amp;quot;Pair&amp;quot;. A new window prompting you to enter the passkey should appear once more. Enter it in order to pair using LESC.&lt;/p&gt;
&lt;p&gt;In order to use nRFConnect for Desktop, you will need 2 DKs, one to act as a central, and one to act as the Glucose peripheral.&lt;/p&gt;
&lt;p&gt;Step 6 for nRFConnect on Android/iOS can be skipped, as the initial pairing process trigs the LESC pairing automatically.&lt;/p&gt;
&lt;p&gt;2. I had no problems making the nRF52840 DK write I.E. its battery status to the nRFConnect app (tested with Android and Desktop apps). When disconnecting, and reconnecting to the device, the peer manager handles the bonding information, and connects again with the same encryption used when initially paired. I suggest you check out the &lt;a href="https://infocenter.nordicsemi.com/topic/sdk_nrf5_v17.0.2/lib_peer_manager.html"&gt;peer manager documentation&lt;/a&gt; for more information on this.&lt;/p&gt;
&lt;p&gt;3. This question is not entirely clear to me, can you please try to explain in detail what you mean here? Yes, the encryption uses DH keys for encryption if that&amp;#39;s what you&amp;#39;re asking.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Best regards,&lt;/p&gt;
&lt;p&gt;Simon&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How to implement the LESC for ble peripheral?</title><link>https://devzone.nordicsemi.com/thread/277276?ContentTypeID=1</link><pubDate>Wed, 28 Oct 2020 05:09:29 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:3196fe40-3231-45f8-b3f3-2e742cae71b0</guid><dc:creator>fox.tai</dc:creator><description>&lt;p&gt;Hi Simon,&lt;/p&gt;
&lt;p&gt;I just survey related &lt;a title="the Glucose application" href="https://infocenter.nordicsemi.com/index.jsp?topic=%2Fsdk_nrf5_v17.0.2%2Fble_sdk_app_gls.html"&gt;the Glucose application&lt;/a&gt;&amp;nbsp;article, should it prepare 2 nordic dk, one for connecting to &lt;a href="https://www.nordicsemi.com/Software-and-Tools/Development-Tools/nRF-Connect-for-desktop"&gt;nRF Connect for Desktop&lt;/a&gt;&amp;nbsp;as central, another one use this&amp;nbsp;&lt;a title="the Glucose application" href="https://infocenter.nordicsemi.com/index.jsp?topic=%2Fsdk_nrf5_v17.0.2%2Fble_sdk_app_gls.html"&gt;the Glucose application&lt;/a&gt; as peripheral?&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Thanks,&lt;/p&gt;
&lt;p&gt;Fox Tai&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How to implement the LESC for ble peripheral?</title><link>https://devzone.nordicsemi.com/thread/277274?ContentTypeID=1</link><pubDate>Wed, 28 Oct 2020 03:04:07 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:044bac60-255f-4c1f-985b-16f03b3a8e7c</guid><dc:creator>fox.tai</dc:creator><description>&lt;p&gt;Hi Simon,&lt;/p&gt;
&lt;p&gt;You&amp;#39;re right, I knew&amp;nbsp;&lt;span&gt;&lt;strong&gt;ble_app_multirole_lesc&lt;/strong&gt; is for &lt;strong&gt;experimental&lt;/strong&gt;, so I&amp;nbsp;hesitate to ask this question here. And I didn&amp;#39;t get any error message, but it&amp;nbsp;did nothing&amp;nbsp;after encryption. Actually, I&amp;#39;ve modified this&amp;nbsp;&lt;strong&gt;ble_app_multirole_lesc&amp;nbsp;&lt;/strong&gt;to connect to our Android APP, but it was disconnected by Android APP. I guess the&amp;nbsp;supervision timeout happened because&amp;nbsp;&lt;em&gt;LL_START_ENC_RSP&amp;nbsp;&lt;/em&gt;didn&amp;#39;t send by Android APP(central).&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Thanks for giving me another LESC example&amp;nbsp;&lt;a title="the Glucose application" href="https://infocenter.nordicsemi.com/index.jsp?topic=%2Fsdk_nrf5_v17.0.2%2Fble_sdk_app_gls.html"&gt;the Glucose application&lt;/a&gt;. And I have some questions about how to run the test and the result for this example&amp;nbsp;&lt;a title="the Glucose application" href="https://infocenter.nordicsemi.com/index.jsp?topic=%2Fsdk_nrf5_v17.0.2%2Fble_sdk_app_gls.html"&gt;the Glucose application&lt;/a&gt;&amp;nbsp;.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;I attach the &lt;a href="https://devzone.nordicsemi.com/cfs-file/__key/communityserver-discussions-components-files/4/test_5F00_example_5F00_Glucose.btt"&gt;devzone.nordicsemi.com/.../test_5F00_example_5F00_Glucose.btt&lt;/a&gt; sniffer packet for reference . Oh, this time also no any error log happened.&amp;nbsp;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Question 1:&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Step 6. in title &lt;strong&gt;Testing &amp;nbsp;&lt;a title="the Glucose application" href="https://infocenter.nordicsemi.com/index.jsp?topic=%2Fsdk_nrf5_v17.0.2%2Fble_sdk_app_gls.html"&gt;the Glucose application&lt;/a&gt;,&amp;nbsp;&lt;/strong&gt;it said to select &amp;quot;Security Settings&amp;quot; in settings, but I cannot find &amp;quot;Security Settings&amp;quot; in Android, iOS or nRF Connect desktop version, so I think this article may be old, the &lt;strong&gt;nRF Connect&lt;/strong&gt;&amp;nbsp;may already get this settings done, and I skip this step.&amp;nbsp;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&lt;pre class="ui-code" data-mode="text"&gt;Using nRF Connect, bond to the device with LESC enabled. Enter the settings, select &amp;quot;Security Settings&amp;quot;, check &amp;quot;Enable LE Secure Connection pairing&amp;quot; and &amp;quot;Perform bonding&amp;quot;, and click &amp;quot;Apply&amp;quot;&lt;/pre&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;B.T.W., I don&amp;#39;t use nRF Connect Desktop version, because it should reprogram the image in flash right? So I think my nrf52840 won&amp;#39;t run the Glucose example, right?&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Question 2:&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;After I enter the passkey, it prints the following log, it seemed to perform Bonding:&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&lt;pre class="ui-code" data-mode="text"&gt;&amp;lt;info&amp;gt; app_timer: RTC: initialized.
&amp;lt;info&amp;gt; app: Glucose example started.
&amp;lt;info&amp;gt; app: Fast advertising
&amp;lt;info&amp;gt; app: Connected
&amp;lt;info&amp;gt; app: Passkey: 146511
&amp;lt;info&amp;gt; app: BLE_GAP_EVT_LESC_DHKEY_REQUEST
&amp;lt;info&amp;gt; nrf_ble_lesc: Calling sd_ble_gap_lesc_dhkey_reply on conn_handle: 0
&amp;lt;info&amp;gt; peer_manager_handler: Connection secured: role: Peripheral, conn_handle: 0, procedure: Bonding
&amp;lt;info&amp;gt; app: Link secured. Role: 1. conn_handle: 0, Procedure: 1
&amp;lt;info&amp;gt; app: BLE_GAP_EVT_AUTH_STATUS: status=0x0 bond=0x1 lv4: 1 kdist_own:0x3 kdist_peer:0x2
&amp;lt;info&amp;gt; peer_manager_handler: Peer data updated in flash: peer_id: 0, data_id: Bonding data, action: Update
&amp;lt;info&amp;gt; peer_manager_handler: Peer data updated in flash: peer_id: 0, data_id: Peer rank, action: Update
&amp;lt;info&amp;gt; peer_manager_handler: Peer data updated in flash: peer_id: 0, data_id: Local database, action: Update
&amp;lt;info&amp;gt; peer_manager_handler: Peer data updated in flash: peer_id: 0, data_id: Central address resolution, action: Updat&lt;/pre&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Then I tab the &amp;quot;&lt;strong&gt;Read Characteristic&lt;/strong&gt;&amp;quot; or &amp;quot;&lt;strong&gt;Enable CCCDs&lt;/strong&gt;&amp;quot;, nrf52840 didn&amp;#39;t started to encrypt. So I tab the &lt;strong&gt;DISCONNECT&lt;/strong&gt;, then tab&amp;nbsp;&lt;strong&gt;CONNECT&lt;/strong&gt; on &lt;strong&gt;nRF Connect&lt;/strong&gt;&lt;/span&gt;,&amp;nbsp;it started to run the encryption and prints the following log:&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;&lt;img alt="nRF connect Disconnect" src="https://devzone.nordicsemi.com/resized-image/__size/640x480/__key/communityserver-discussions-components-files/4/Screenshot_5F00_20201028_2D00_093501.png" /&gt;&lt;/p&gt;
&lt;p&gt;From the log, it seemed to generate 2 times LTK?&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;&amp;lt;info&amp;gt; app: Connected
&amp;lt;info&amp;gt; peer_manager_smd: [sec_info_request_process:370] after call sd_ble_gap_sec_info_reply(p_gap_evt-&amp;gt;conn_handle, p_enc_info, NULL, NULL),     err_code=0x0
&amp;lt;info&amp;gt; peer_manager_smd: [sec_info_request_process:372] GOT LTK p_enc_info-&amp;gt;ltk[]
&amp;lt;info&amp;gt; peer_manager_smd: AE A4 A9 BD
&amp;lt;info&amp;gt; peer_manager_smd: C5 29 6F A9
&amp;lt;info&amp;gt; peer_manager_smd: 19 2F 63 C5
&amp;lt;info&amp;gt; peer_manager_smd: 29 20 1 4E
&amp;lt;info&amp;gt; peer_manager_handler: Connection secured: role: Peripheral, conn_handle: 0, procedure: Encryption
&amp;lt;info&amp;gt; peer_manager_handler: Peer data updated in flash: peer_id: 0, data_id: Peer rank, action: Update, no change
&amp;lt;info&amp;gt; app: Link secured. Role: 1. conn_handle: 0, Procedure: 0
&amp;lt;info&amp;gt; peer_manager_smd: [sec_info_request_process:370] after call sd_ble_gap_sec_info_reply(p_gap_evt-&amp;gt;conn_handle, p_enc_info, NULL, NULL),     err_code=0x0
&amp;lt;info&amp;gt; peer_manager_smd: [sec_info_request_process:372] GOT LTK p_enc_info-&amp;gt;ltk[]
&amp;lt;info&amp;gt; peer_manager_smd: AE A4 A9 BD
&amp;lt;info&amp;gt; peer_manager_smd: C5 29 6F A9
&amp;lt;info&amp;gt; peer_manager_smd: 19 2F 63 C5
&amp;lt;info&amp;gt; peer_manager_smd: 29 20 1 4E
&amp;lt;info&amp;gt; peer_manager_handler: Connection secured: role: Peripheral, conn_handle: 0, procedure: Encryption
&amp;lt;info&amp;gt; peer_manager_handler: Peer data updated in flash: peer_id: 0, data_id: Peer rank, action: Update, no change&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;So &lt;span&gt;example&amp;nbsp;&lt;/span&gt;&lt;a title="the Glucose application" href="https://infocenter.nordicsemi.com/index.jsp?topic=%2Fsdk_nrf5_v17.0.2%2Fble_sdk_app_gls.html"&gt;the Glucose application&lt;/a&gt;&amp;nbsp;should connect, disconnect, then connect, it would run the 2 times encryption?&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Question 3:&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;And I track the sniffer packets by Ellisys, it really needs 3 keys, 1st is generate right after bonding, 2nd and 3rd are generated right after encryption. The following picture is what I mention 3 keys:&lt;/p&gt;
&lt;p&gt;&lt;img alt="3 keys" src="https://devzone.nordicsemi.com/resized-image/__size/1280x274/__key/communityserver-discussions-components-files/4/3_5F00_key.jpg" /&gt;&lt;/p&gt;
&lt;p&gt;I wonder bonding need any key to decrypt? Is that &lt;em&gt;DHKey &lt;/em&gt;or something?&amp;nbsp;&lt;/p&gt;
&lt;p&gt;After encryption, I only got 1 LTK in&amp;nbsp;&amp;nbsp;&lt;span&gt;p_enc_info-&amp;gt;ltk[] in&amp;nbsp;sec_info_request_process(), but this LTK is not applicable on 2nd and 3rd. So is this LTK correct?&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Question 4:&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;LLCP packets&amp;nbsp;still not get the&amp;nbsp;&lt;em&gt;LL_START_ENC_RSP&lt;/em&gt;&amp;nbsp;from central (&lt;strong&gt;nRF Connect&lt;/strong&gt;), so is it normal behavior?&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Thanks,&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Fox Tai&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How to implement the LESC for ble peripheral?</title><link>https://devzone.nordicsemi.com/thread/277159?ContentTypeID=1</link><pubDate>Tue, 27 Oct 2020 13:38:36 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:be0f69e3-3b45-4a9b-b315-f3bd2d43a883</guid><dc:creator>Simonr</dc:creator><description>&lt;p&gt;Hi&lt;/p&gt;
&lt;p&gt;I&amp;#39;m sorry, but&amp;nbsp;what exactly is the problem? It seems like your BLE sniffer is the part that&amp;#39;s struggling to keep up in the different connections (please correct me if I&amp;#39;m wrong). Do you see problems in the encryption in the log on your nRFConnect app and/or the debug log of the DK?&lt;/p&gt;
&lt;p&gt;Please also note that the LESC Multirole Example is defined as an&amp;nbsp;&lt;strong&gt;experimental&amp;nbsp;&lt;/strong&gt;example, which means it has not been thoroughly tested and may have some undiscovered bugs. For a more streamlined peripheral application with LESC pairing/bonding, please check out &lt;a href="https://infocenter.nordicsemi.com/topic/sdk_nrf5_v17.0.2/ble_sdk_app_gls.html"&gt;the Glucose application&lt;/a&gt; instead.&lt;/p&gt;
&lt;p&gt;Best regards,&lt;/p&gt;
&lt;p&gt;Simon&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>