<?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>LE security on nRF DFU - nRF52840 S140</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/84155/le-security-on-nrf-dfu---nrf52840-s140</link><description>Hi All. My task is simple. I want to implement LE secure connections on DFU. I have seen the ble_gls example. It has a passkey for bonding, I am looking into that too. I ran it and observed the peer manager and BLE evt prints. I also compared the two</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Tue, 08 Feb 2022 19:27:43 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/84155/le-security-on-nrf-dfu---nrf52840-s140" /><item><title>RE: LE security on nRF DFU - nRF52840 S140</title><link>https://devzone.nordicsemi.com/thread/351925?ContentTypeID=1</link><pubDate>Tue, 08 Feb 2022 19:27:43 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:5316ab26-ed03-4fd5-bb10-c8f215a099d4</guid><dc:creator>AliMahmood123</dc:creator><description>&lt;p&gt;This was solved here:&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;&lt;a href="https://devzone.nordicsemi.com/f/nordic-q-a/84034/soft-device-enable-and-disable---dfu-disconnected-by-the-remote-device/351345#351345"&gt;devzone.nordicsemi.com/.../351345&lt;/a&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: LE security on nRF DFU - nRF52840 S140</title><link>https://devzone.nordicsemi.com/thread/350527?ContentTypeID=1</link><pubDate>Mon, 31 Jan 2022 20:29:53 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:85163841-b400-4199-b74a-bc56c3964c72</guid><dc:creator>AliMahmood123</dc:creator><description>&lt;p&gt;Hi&lt;br /&gt;I&amp;#39;ve made some progress and now I can ask some to the point questions. I would be very grateful if you can read all and provide me with detailed answer.&lt;br /&gt;I have referred to &lt;a href="https://infocenter.nordicsemi.com/index.jsp?topic=%2Fcom.nordic.infocenter.s132.api.v7.2.0%2Fgroup___b_l_e___g_a_p___p_e_r_i_p_h___s_e_c___m_s_c.html&amp;amp;cp=4_7_3_1_2_1_5_10"&gt;https://infocenter.nordicsemi.com/index.jsp?topic=%2Fcom.nordic.infocenter.s132.api.v7.2.0%2Fgroup___b_l_e___g_a_p___p_e_r_i_p_h___s_e_c___m_s_c.html&amp;amp;cp=4_7_3_1_2_1_5_10&lt;/a&gt; for the logs that I see.&lt;br /&gt;&lt;br /&gt;So I have two situations&lt;br /&gt;&lt;strong&gt;1) Bond forwarding&lt;/strong&gt; - I have managed to encrypt the link and do bond forwarding as well. I did that by adding LESC crypto libraries separately. I got BLE_GAP_EVT_LESC_DHKEY_REQUEST and the whole flowchart as expected. I am still a bit confused as to how the default example (bond forwarding) could be encrypted without adding LESC and crypto support. That&amp;#39;s just my curiosity. &lt;br /&gt;&lt;br /&gt;Anyways for the above situation, the LTK is generated and it&amp;#39;s being used in DFU.&lt;strong&gt; My question here&lt;/strong&gt; is that when the device goes into DFU Mode, is the session still encrypted? &lt;br /&gt;&lt;br /&gt;&lt;strong&gt;Another question here&lt;/strong&gt; is regarding bond deletion, I get really weird behaviour when I delete bonds, it wasnt working with simply deleting from app in this case 1). I had to delete bonds from peer as well. I have still more testing to do but since we have a few days gap in replies that&amp;#39;s why I prefer to ask everything up front&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;2) Without bond forwarding&lt;/strong&gt; - &lt;strong&gt;Only LESC&lt;/strong&gt; - I disabled bond forwarding and bonding and just did pairing (No BLE pairing phase 3 of key exchange which is bonding). I also added CONN_JUST_WORKS on DFU characteristics.&lt;br /&gt;DFU works fine. &lt;br /&gt;&lt;strong&gt;My question here &lt;/strong&gt;also is that when the device goes into DFU Mode, is the session still encrypted? &lt;br /&gt;&lt;br /&gt;&lt;strong&gt;Another question here&lt;/strong&gt; is that when I do DFU with LESC and no bond forwarding, the device says &amp;quot;Bonded&amp;quot;. That doesn&amp;#39;t make any sense. I think this is a bug as I have not bonded in the first place. So on the upgraded firmware I simply forget the bonds and use the updated application. I dont have much problem with this but I just dont get the concept. I realize its due to adding just works on DFU characteristic. But I clearly &amp;quot;Pairing&amp;quot; logs as the role from peer manager. Then why does it say bonded?&lt;br /&gt;&lt;br /&gt;Please answer me clear cut on this so I can compare the above two situations to what I want&lt;br /&gt;And please answer all questions for easiness for you and me both. Thanks a lot in advance for hearing me out&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: LE security on nRF DFU - nRF52840 S140</title><link>https://devzone.nordicsemi.com/thread/350477?ContentTypeID=1</link><pubDate>Mon, 31 Jan 2022 14:58:33 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:6d603754-7594-421e-a9fc-94b9273df83c</guid><dc:creator>AliMahmood123</dc:creator><description>&lt;p&gt;Hi Sigurd&lt;br /&gt;I have managed to do it over the weekend&lt;br /&gt;&lt;br /&gt;I have encrypted the link of the buttonless app, without bonding. I am thinking not to use Bonding per se. protected the DFU write characteristic with Just Works.&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;I have a question now, the link will stay encrypted when going into DFU Mode too, right? Or is bonding the only way, please guide&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: LE security on nRF DFU - nRF52840 S140</title><link>https://devzone.nordicsemi.com/thread/350475?ContentTypeID=1</link><pubDate>Mon, 31 Jan 2022 14:55:46 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:2047994d-1bc1-41d8-8f5a-bc8aa0fca3d4</guid><dc:creator>Sigurd</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
[quote user=""]I also compared the two projects. NRF_CRYPTO_ENABLED is 1 in gls project, alongside PM_LESC_ENABLED is also 1. These are 0 or not present in the DFU example.[/quote][quote user=""]Also trying out bond forwarding with SEC_PARAM_LESC set to 1 in main did not encrypt the channel.[/quote][quote user=""]Does a guide exist on shifting any gatt service / BLE connection to LE connections and encryption? Any help would be appreciated and we are in a bit of a hurry as well.[/quote]
&lt;p&gt;Unfortunately there is no guide for this. You would need to compare an example that uses LESC(e.g. ble_app_hrs) and see what&amp;#39;s missing in&amp;nbsp;ble_app_buttonless_dfu. I believe you would need to e.g. add the crypto libraries, and you need to call nrf_ble_lesc_request_handler() in the main loop to respond to LESC-related BLE events.&lt;/p&gt;
&lt;p&gt;Set&amp;nbsp;NRF_DFU_BLE_BUTTONLESS_SUPPORTS_BONDS to 1 in the sdk_config.h in the app, and in the bootloader set&amp;nbsp;&lt;span&gt;NRF_DFU_BLE_REQUIRES_BONDS&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>