<?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>Difference between scan_evt_handler and ble_evt_handler, impact of a Whitelist</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/73241/difference-between-scan_evt_handler-and-ble_evt_handler-impact-of-a-whitelist</link><description>I am trying to read Manufacturer Specific Data from a non-connectable advertisement packet from a pressure sensor. 
 I followed the example in https://devzone.nordicsemi.com/f/nordic-q-a/38475/how-can-i-get-manufacturer-specific-data-in-central-with-advertising</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Wed, 31 Mar 2021 09:33:45 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/73241/difference-between-scan_evt_handler-and-ble_evt_handler-impact-of-a-whitelist" /><item><title>RE: Difference between scan_evt_handler and ble_evt_handler, impact of a Whitelist</title><link>https://devzone.nordicsemi.com/thread/302686?ContentTypeID=1</link><pubDate>Wed, 31 Mar 2021 09:33:45 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:c001f19b-c71f-4574-89b2-f4b03e1d2893</guid><dc:creator>Edvin</dc:creator><description>&lt;p&gt;It is correct that the whitelist is using hardware to filter the incoming advertisements/connection requests.&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;I don&amp;#39;t remember whether or not the whitelist is the same for the advertising and the scanning. I guess you can experiment with that. Look at some examples that uses the whitelist.&lt;/p&gt;
&lt;p&gt;peripheral/advertiser: ble_app_gls&lt;/p&gt;
&lt;p&gt;central/scanner: ble_app_hrs_c&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;If you are scanning with a whitelist, then you will not get advertisement events from devices not in your whitelist. If you want that, you need to disable the whitelist.&lt;/p&gt;
&lt;p&gt;If you think of it, if you want advertisements from all devices, is there really a point in using a whitelist?&lt;/p&gt;
&lt;p&gt;In my opinion, the only real reason to use a whitelist is when you are advertising, and you know that you only want to connect to a known device, which is in your whitelist. It is always the central/scanner who initiates connections, so the only difference between scanning with and without a whitelist is that you will get more advertising report events when you don&amp;#39;t use a whitelist.&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Best regards,&lt;/p&gt;
&lt;p&gt;Edvin&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Difference between scan_evt_handler and ble_evt_handler, impact of a Whitelist</title><link>https://devzone.nordicsemi.com/thread/302554?ContentTypeID=1</link><pubDate>Tue, 30 Mar 2021 11:30:18 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:4fd7ca78-cd5e-4c5a-abb8-8429c2d868e6</guid><dc:creator>pressure_sensor_nonconn_adv</dc:creator><description>&lt;p&gt;Thank you for the explanations.&lt;/p&gt;
&lt;p&gt;For the second question concerning the whitelist: From &lt;a href="https://devzone.nordicsemi.com/f/nordic-q-a/73269/why-is-scan_evt-params-p_not_found-used-when-we-use-the-whitelist"&gt;here&amp;nbsp;&lt;/a&gt;&amp;nbsp;I understood that when using a whitelist, the filtering is performed by hardware and &lt;span&gt;nrf_ble_scan_on_ble_evt() is only called when the scanned packet is from a device on the whitelist.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;-&amp;gt; But what about&amp;nbsp;ble_evt_handler() does it still get called for packets that are NOT on the whitelist? In my application&amp;nbsp;&lt;/span&gt;&lt;span&gt;I am using a whitelist but would like to receive&amp;nbsp;ADV_NONCONN_IND packets at the same time. Is this possible&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Difference between scan_evt_handler and ble_evt_handler, impact of a Whitelist</title><link>https://devzone.nordicsemi.com/thread/302159?ContentTypeID=1</link><pubDate>Fri, 26 Mar 2021 14:10:08 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:bfd5e210-9f26-47b6-883b-a23e9feb6830</guid><dc:creator>Edvin</dc:creator><description>&lt;p&gt;Hello,&lt;/p&gt;
&lt;p&gt;The ble_evt_handler() and scan_evt_handler() are a bit different, because the ble_evt_handler() receives events directly from the softdevice, while the scan_evt_handler()&amp;#39;s events are generated by the application (nrf_ble_scan.c).&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Basically, the nrf_scan_handler is more related to some scan events, such as scan started, scan stopped, filter matched, and so on, while all the advertising packets generate events called&amp;nbsp;BLE_GAP_EVT_ADV_REPORT which is usually handled in the nrf_ble_scan_on_ble_evt() in nrf_ble_scan.h. You could handle (or duplicate) these events in the ble_evt_handler as well, as these receive the same events. Look at how the nrf_ble_scan_on_ble_evt() in nrf_ble_scan.c is generating events for scan_evt_handler(), and how it handles the advertisement packets in the BLE_GAP_EVT_ADV_REPORT events.&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Best regards,&lt;/p&gt;
&lt;p&gt;Edvin&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>