<?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>Is there any difference between bluetooth.h and scan.h?</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/120383/is-there-any-difference-between-bluetooth-h-and-scan-h</link><description>I use NCS2.5.0，and I noticed that there are two files(bluetooth.h and scan.h) can help to set scan parameters.Is there any difference betwen these two files?Can I call the interfaces in scan.h while also calling the interfaces in bluetooth.h to configure</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Wed, 02 Apr 2025 12:06:36 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/120383/is-there-any-difference-between-bluetooth-h-and-scan-h" /><item><title>RE: Is there any difference between bluetooth.h and scan.h?</title><link>https://devzone.nordicsemi.com/thread/530227?ContentTypeID=1</link><pubDate>Wed, 02 Apr 2025 12:06:36 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:0b715055-6814-49b0-bed8-31bbbbb4a770</guid><dc:creator>Allen23122452121</dc:creator><description>&lt;p&gt;Thanks for your reply.&lt;/p&gt;
&lt;p&gt;How do I configure the scan timeout callback when using &lt;code data-start="56" data-end="69"&gt;bluetooth.h&lt;/code&gt;? I see that &lt;code data-start="82" data-end="106"&gt;bt_le_scan_cb_register&lt;/code&gt; is provided in &lt;code data-start="122" data-end="135"&gt;bluetooth.h&lt;/code&gt;. If I register multiple scan callbacks using &lt;code data-start="181" data-end="205"&gt;bt_le_scan_cb_register&lt;/code&gt;, how can I execute a specific callback under different conditions?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Is there any difference between bluetooth.h and scan.h?</title><link>https://devzone.nordicsemi.com/thread/530224?ContentTypeID=1</link><pubDate>Wed, 02 Apr 2025 11:58:22 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:4d69aaa4-a9de-4480-b814-08b03b9e82ea</guid><dc:creator>Kenneth</dc:creator><description>&lt;p&gt;The two files you&amp;#39;re referring to represent different levels of abstraction for BLE scanning functionality:&lt;/p&gt;
&lt;p&gt;- bluetooth.h (from Zephyr) provides the lower-level, core Bluetooth scanning functionality with functions like bt_le_scan_start() and macros like BT_LE_SCAN_ACTIVE.&lt;/p&gt;
&lt;p&gt;- scan.h (from Nordic) is a higher-level abstraction built on top of the Zephyr Bluetooth API, providing simplified scanning functionality with functions like bt_scan_start() and bt_scan_init().&lt;/p&gt;
&lt;p&gt;Regarding using both APIs together, you need to be careful. While technically possible, it&amp;#39;s not recommended to mix them because:&amp;nbsp;The Nordic scanning module registers its own callback with the Zephyr scanner, and calling bt_scan_init() multiple times can lead to improper operation due to multiple registrations of the same callback.&lt;/p&gt;
&lt;p&gt;Kenneth&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>