<?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 use nRF sniffer with LE Secure connection?</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/97035/how-to-use-nrf-sniffer-with-le-secure-connection</link><description>Dear Support, 
 I successfully use the nRF sniffer with LE Secure connection providing the LTK key. This works just perfectly for any reconnection. 
 However now I&amp;#39;d like to sniff also the pairing and bonding sequence with exchanges occurring immediately</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Tue, 07 Mar 2023 12:58:22 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/97035/how-to-use-nrf-sniffer-with-le-secure-connection" /><item><title>RE: How to use nRF sniffer with LE Secure connection?</title><link>https://devzone.nordicsemi.com/thread/413823?ContentTypeID=1</link><pubDate>Tue, 07 Mar 2023 12:58:22 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:bf513a8b-1547-45a8-941e-f2581a74a9b1</guid><dc:creator>Jiri Husak</dc:creator><description>&lt;p&gt;dear Amanda,&lt;/p&gt;
&lt;p&gt;thanks for your tip. I had to refactor a bit the example to SDK15, but it works!!!&amp;nbsp;&lt;/p&gt;
&lt;p&gt;too bad it was removed in my opinion.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;this is how I modified it&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="c_cpp"&gt;#if LESC_DEBUG_MODE
    UNUSED_VARIABLE(m_ecc_keygen_context);
    NRF_LOG_WARNING(&amp;quot;Using debug ECC key pair&amp;quot;);
    static const uint8_t LESC_DEBUG_KEY[32] = {0x3f, 0x49, 0xf6, 0xd4, 0xa3, 0xc5, 0x5f, 0x38,
                                               0x74, 0xc9, 0xb3, 0xe3, 0xd2, 0x10, 0x3f, 0x50,
                                               0x4a, 0xff, 0x60, 0x7b, 0xeb, 0x40, 0xb7, 0x99,
                                               0x58, 0x99, 0xb8, 0xa6, 0xcd, 0x3c, 0x1a, 0xbd};

    err_code = nrf_crypto_ecc_private_key_from_raw(&amp;amp;g_nrf_crypto_ecc_secp256r1_curve_info,
                                                   &amp;amp;m_local_private_key,
                                                   LESC_DEBUG_KEY,
                                                   sizeof(LESC_DEBUG_KEY));
    VERIFY_SUCCESS(err_code);

    nrf_crypto_ecc_public_key_calculate_context_t calc_context;
    err_code = nrf_crypto_ecc_public_key_calculate(
    &amp;amp;calc_context, &amp;amp;m_local_private_key, &amp;amp;m_local_public_key.public_key);
    VERIFY_SUCCESS(err_code);

#else

    err_code = nrf_crypto_ecc_key_pair_generate(&amp;amp;m_ecc_keygen_context,
                                                &amp;amp;g_nrf_crypto_ecc_secp256r1_curve_info,
                                                &amp;amp;m_local_private_key,
                                                &amp;amp;m_local_public_key.public_key);
    VERIFY_SUCCESS(err_code);
#endif&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;Thanks a lot for your support!&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How to use nRF sniffer with LE Secure connection?</title><link>https://devzone.nordicsemi.com/thread/412552?ContentTypeID=1</link><pubDate>Tue, 28 Feb 2023 14:24:47 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:28b12b5a-c7c5-4eb8-af6d-fb0eaf08d00a</guid><dc:creator>Amanda Hsieh</dc:creator><description>&lt;p&gt;Hi,&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&lt;span dir="ltr"&gt;Our expert thinks using the Debug key is the easiest, my colleague Daniel and another user posted some code on how to do it here: &lt;a title="https://devzone.nordicsemi.com/f/nordic-q-a/37078/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" rel="noopener noreferrer" target="_blank"&gt;https://devzone.nordicsemi.com/f/nordic-q-a/37078/lesc_debug_mode-define-in-ble_app_multirole_lesc-nrf5-sdk-15-0-0&lt;/a&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&lt;span dir="ltr"&gt;-Amanda H.&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How to use nRF sniffer with LE Secure connection?</title><link>https://devzone.nordicsemi.com/thread/412064?ContentTypeID=1</link><pubDate>Fri, 24 Feb 2023 20:18:10 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:4ce87f85-e520-4fac-82db-1431e60f0d46</guid><dc:creator>Jiri Husak</dc:creator><description>&lt;p&gt;Dear Amanda,&amp;nbsp;&lt;/p&gt;
&lt;p&gt;thanks, ok so only option 2 remains. How do I get the private key out of the SDK / SD ? I use the peer manager from the SDK.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;I didn&amp;#39;t find any suitable API to use.&lt;/p&gt;
&lt;p&gt;Thanks,&lt;/p&gt;
&lt;p&gt;Jiri&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How to use nRF sniffer with LE Secure connection?</title><link>https://devzone.nordicsemi.com/thread/412040?ContentTypeID=1</link><pubDate>Fri, 24 Feb 2023 15:40:00 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:f0003e2d-6dc0-44cb-8d6d-817aa250e180</guid><dc:creator>Amanda Hsieh</dc:creator><description>&lt;p&gt;Hi,&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;1. In the earlier versions of the nRF5 SDK, we included the option to use the Debug key for the LESC, but in later SDKs, this was removed. I am not sure why.&amp;nbsp;We didn&amp;#39;t receive many complaints about this, so whether or not it has been much used I am not sure.&amp;nbsp;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;2. See&amp;nbsp;&lt;a title="Sniffing the pairing procedure of a connection" href="https://infocenter.nordicsemi.com/topic/ug_sniffer_ble/UG/sniffer_ble/action_paired.html?cp=11_5_5_3"&gt;Sniffing the pairing procedure of a connection&lt;/a&gt;:&lt;/span&gt;&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;For connections that use LE Secure Connections with a private key:
&lt;ol&gt;
&lt;li&gt;Before the devices initiate pairing, select&lt;span&gt;&amp;nbsp;&lt;/span&gt;&lt;span&gt;SC Private Key&lt;/span&gt;&lt;span&gt;&amp;nbsp;&lt;/span&gt;as input key and type the 32-byte Diffie-Hellman private key of your device in big-endian, hexadecimal format with a leading &amp;quot;0x&amp;quot; into the input field in&lt;span&gt;&amp;nbsp;&lt;/span&gt;&lt;a title="A free software tool that captures wireless traffic and reproduces it in a readable format. It is a cross-platform network protocol analyzer that can be used to view, analyze, and troubleshoot packets sent over a data network." href="https://infocenter.nordicsemi.com/topic/ug_sniffer_ble/dita_common/glossary/glossary.html#wireshark"&gt;&lt;dfn&gt;Wireshark&lt;/dfn&gt;&lt;/a&gt;.&lt;/li&gt;
&lt;li&gt;Initiate pairing between the devices if it does not happen automatically.&lt;/li&gt;
&lt;/ol&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Regards,&lt;br /&gt;Amanda H.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>