<?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>Calling pm_address_resolve in BLE_GAP_EVT_ADV_REPORT</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/66633/calling-pm_address_resolve-in-ble_gap_evt_adv_report</link><description>Due to whitelist limitation of 8 peers, I am doing manual filtering of bonded devices. I am trying to use pm_address_resolve function to figure out whether I have previously bonded with this peer. 
 
 The application halts on sd_ble_gap_scan_start returning</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Sat, 03 Oct 2020 21:22:29 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/66633/calling-pm_address_resolve-in-ble_gap_evt_adv_report" /><item><title>RE: Calling pm_address_resolve in BLE_GAP_EVT_ADV_REPORT</title><link>https://devzone.nordicsemi.com/thread/272836?ContentTypeID=1</link><pubDate>Sat, 03 Oct 2020 21:22:29 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:aea01810-f16f-4f04-834f-dede38fa1823</guid><dc:creator>Darkenkade</dc:creator><description>&lt;p&gt;You are correct, it was indeed taking too long, also correct about sd_ble_gap_scan_start after connecting. I&amp;#39;m not sure how I would run the resolving in main context, since the the advertisment needs to be responded with connection request, but my problem is solved.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Calling pm_address_resolve in BLE_GAP_EVT_ADV_REPORT</title><link>https://devzone.nordicsemi.com/thread/272755?ContentTypeID=1</link><pubDate>Fri, 02 Oct 2020 13:38:04 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:7af8cf26-1144-47d5-b113-da056443328f</guid><dc:creator>Hung Bui</dc:creator><description>&lt;p&gt;Hi Darkenkade,&amp;nbsp;&lt;/p&gt;
&lt;p&gt;I don&amp;#39;t think&amp;nbsp;&lt;span&gt;sd_ecb_block_encrypt() can cause an issue here. However, if&amp;nbsp;try_resolve_peer_address() takes too long, it my run to&amp;nbsp;this issue: &amp;quot;- The scanner has timed out when this function is called to continue scanning.&amp;quot;&amp;nbsp;&lt;br /&gt;I would suggest to run the resolving in main context instead of inside the&amp;nbsp;on_adv_report().&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;In addition please make sure no&amp;nbsp;&lt;span&gt;sd_ble_gap_connect() is called before&amp;nbsp;sd_ble_gap_scan_start() because as far as I know if you start the connect procedure you shouldn&amp;#39;t continue scanning.&amp;nbsp;&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>