<?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>NRF52840 BLE address can&amp;#39;t be resolved</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/82595/nrf52840-ble-address-can-t-be-resolved</link><description>Hi, 
 I&amp;#39;ve designed a product based on nrf52840 soc as a central Bluetooth device. I want to pair and connect to a Bluetooth device (as a slave) that implements a whitelist. 
 when the slave is in the pairing mode, nrf52840 can successfully connect and</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Mon, 13 Dec 2021 11:29:11 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/82595/nrf52840-ble-address-can-t-be-resolved" /><item><title>RE: NRF52840 BLE address can't be resolved</title><link>https://devzone.nordicsemi.com/thread/343132?ContentTypeID=1</link><pubDate>Mon, 13 Dec 2021 11:29:11 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:f4676fc9-b1e8-4ddf-93c8-f75a637f2bd3</guid><dc:creator>Vidar Berg</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;I modified the ble_hrs_c example to connect to our ble_app_hid_keyboard example in nRF5 SDK 17.1.0 which has whitelist advertising enabled by default to see if I could replicate the problem on my end, but haven&amp;#39;t had any luck with that thus far.&lt;/p&gt;
&lt;p&gt;Here is my modified project:&lt;/p&gt;
&lt;p&gt;&lt;a href="https://devzone.nordicsemi.com/cfs-file/__key/communityserver-discussions-components-files/4/ble_5F00_app_5F00_hrs_5F00_c_5F00_privacy.zip"&gt;devzone.nordicsemi.com/.../ble_5F00_app_5F00_hrs_5F00_c_5F00_privacy.zip&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;I also tried to validate the address from you sniffer trace with the IRK exchanged during bonding. Seems like it&amp;#39;s not matching, but I need to double check that I got the endianess right.&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="c_cpp"&gt;/* Initiator address used on reconnect - packet # 199 in lesc_dynamic_connection(clear).pcapng */
    uint8_t local_addr [] = {0x39, 0x62, 0xe8, 0xe9, 0xa3, 0x73};
    ble_gap_addr_t addr;
    addr.addr_type = BLE_GAP_ADDR_TYPE_RANDOM_PRIVATE_RESOLVABLE;
    memcpy(addr.addr, local_addr, sizeof(addr.addr));
    ble_gap_irk_t irk; 
    /* Local IRK exchanged during bonding - packet #302 in lesc_dynamic_pairing */
    uint8_t local_irk [] = {0x6c, 0x7a, 0x96, 0x9c, 0x63, 0xac, 0x3a, 0xe7, 0x3d, 0xf2, 0x29, 0x5f, 0xab, 0xd6, 0xe4, 0x28};
    mempcpy(&amp;amp;irk, local_irk, sizeof(irk));
    bool match = pm_address_resolve(&amp;amp;addr, &amp;amp;irk);
    NRF_LOG_INFO(&amp;quot;IRK match address: %s&amp;quot;, (match) ? &amp;quot;True&amp;quot; : &amp;quot;False&amp;quot;);&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Update: &lt;/strong&gt;I was able to confirm that the address used on re-connect matches the IRK exchanged during bonding. The reason I didn&amp;#39;t get a match earlier is that I used the wrong byte order for the IRK (the sniffer is already displaying it as little-endian, and not in big-endian like the address).&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="c_cpp"&gt;    uint8_t local_addr [] = {0x39, 0x62, 0xe8, 0xe9, 0xa3, 0x73};
    ble_gap_addr_t addr;
    addr.addr_type = BLE_GAP_ADDR_TYPE_RANDOM_PRIVATE_RESOLVABLE;
    memcpy(addr.addr, local_addr, sizeof(addr.addr));
    ble_gap_irk_t irk; 
    uint8_t local_irk [] = {0x28, 0xe4, 0xd6, 0xab, 0x5f, 0x29, 0xf2, 0x3d, 0xe7, 0x3a, 0xac, 0x63, 0x9c, 0x96, 0x7a, 0x6c};
    mempcpy(&amp;amp;irk, local_irk, sizeof(irk));

    bool match = pm_address_resolve(&amp;amp;addr, &amp;amp;irk);

    NRF_LOG_INFO(&amp;quot;IRK match address: %s&amp;quot;, (match) ? &amp;quot;True&amp;quot; : &amp;quot;False&amp;quot;); &lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;Did you get a chance to try my example to see if it had the same connection issue?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: NRF52840 BLE address can't be resolved</title><link>https://devzone.nordicsemi.com/thread/343130?ContentTypeID=1</link><pubDate>Mon, 13 Dec 2021 11:21:37 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:737d21c1-dc35-4e39-8365-cbecc97eb1c3</guid><dc:creator>alireza sadeghpour</dc:creator><description>&lt;p&gt;To @Notdic_Developers,&lt;/p&gt;
&lt;p&gt;This case may cause the failure of my project and is very crucial,&lt;/p&gt;
&lt;p&gt;Is there any way to be sure that the address is resolvable with the indicated IRK?&lt;/p&gt;
&lt;p&gt;Is there any central example with the random resolvable address which help me to solve the problem?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: NRF52840 BLE address can't be resolved</title><link>https://devzone.nordicsemi.com/thread/342989?ContentTypeID=1</link><pubDate>Fri, 10 Dec 2021 17:22:54 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:da90a973-646e-4838-96e6-e051c98558c9</guid><dc:creator>alireza sadeghpour</dc:creator><description>&lt;p&gt;thanks for your reply,&amp;nbsp;&lt;/p&gt;
&lt;p&gt;I applied it but I&amp;#39;ve got the same result. I&amp;#39;ve attached the sniffer trace for it (for simplicity the IRK is =0x0102030405060708090a0b0c0d0e0f10)&lt;/p&gt;
&lt;p&gt;&lt;a href="https://devzone.nordicsemi.com/cfs-file/__key/communityserver-discussions-components-files/4/pair.pcapng"&gt;devzone.nordicsemi.com/.../pair.pcapng&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&lt;a href="https://devzone.nordicsemi.com/cfs-file/__key/communityserver-discussions-components-files/4/conection.pcapng"&gt;devzone.nordicsemi.com/.../conection.pcapng&lt;/a&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: NRF52840 BLE address can't be resolved</title><link>https://devzone.nordicsemi.com/thread/342986?ContentTypeID=1</link><pubDate>Fri, 10 Dec 2021 16:30:57 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:2c7c085a-5b3e-4c42-9b8a-a1c3896960e6</guid><dc:creator>Vidar Berg</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;Please try to call &lt;span&gt;&lt;a title="pm_privacy_set" href="https://infocenter.nordicsemi.com/topic/sdk_nrf5_v17.1.0/group__peer__manager.html?cp=8_1_6_2_16_65#ga097a70106c2c2cdd1d34f710e6a9258c"&gt;pm_privacy_set&lt;/a&gt;&lt;/span&gt;() with the same parameters right after pm_init() instead of calling sd_ble_gap_privacy_set() directly. Also make sure you are *not* calling &lt;span style="text-decoration:line-through;"&gt;&lt;a title="pm_privacy_set" href="https://infocenter.nordicsemi.com/topic/sdk_nrf5_v17.1.0/group__peer__manager.html?cp=8_1_6_2_16_65#ga097a70106c2c2cdd1d34f710e6a9258c"&gt;pm_privacy_set&lt;/a&gt;()&amp;nbsp;&lt;/span&gt;&lt;a class="elRef" href="https://infocenter.nordicsemi.com/topic/com.nordic.infocenter.s140.api.v7.2.0/group___b_l_e___g_a_p___f_u_n_c_t_i_o_n_s.html#gaef69dc212534adf4b78d211edce2267b"&gt;sd_ble_gap_addr_set&lt;/a&gt;() anywhere in your code as noted in the &lt;span&gt;&lt;a title="pm_privacy_set" href="https://infocenter.nordicsemi.com/topic/sdk_nrf5_v17.1.0/group__peer__manager.html?cp=8_1_6_2_16_65#ga097a70106c2c2cdd1d34f710e6a9258c"&gt;pm_privacy_set&lt;/a&gt;&lt;/span&gt;() documentation.&lt;/p&gt;
&lt;p&gt;Best regards,&lt;/p&gt;
&lt;p&gt;Vidar&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Edit: &lt;/strong&gt;Sorry, I meant to say &lt;a class="elRef" href="https://infocenter.nordicsemi.com/topic/com.nordic.infocenter.s140.api.v7.2.0/group___b_l_e___g_a_p___f_u_n_c_t_i_o_n_s.html#gaef69dc212534adf4b78d211edce2267b"&gt;sd_ble_gap_addr_set&lt;/a&gt;() not &lt;span&gt;&lt;a title="pm_privacy_set" href="https://infocenter.nordicsemi.com/topic/sdk_nrf5_v17.1.0/group__peer__manager.html?cp=8_1_6_2_16_65#ga097a70106c2c2cdd1d34f710e6a9258c"&gt;pm_privacy_set&lt;/a&gt;&lt;/span&gt;(). See edit above.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>