<?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 do I start and stop Bluetooth Scanning?</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/65307/how-do-i-start-and-stop-bluetooth-scanning</link><description>Hello, everyone! 
 
 I am using nRF52DK and SDK v17, and I am dealing with the example of ble_app_uart. 
 Using this example, I am testing how buttons control BLE scanning. As I was conducting the test, I realized that I could start a scan using the code</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Fri, 28 Aug 2020 13:52:30 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/65307/how-do-i-start-and-stop-bluetooth-scanning" /><item><title>RE: How do I start and stop Bluetooth Scanning?</title><link>https://devzone.nordicsemi.com/thread/267025?ContentTypeID=1</link><pubDate>Fri, 28 Aug 2020 13:52:30 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:60679251-fd4d-4ea4-9f95-e68c688a61fa</guid><dc:creator>schosdas</dc:creator><description>&lt;p&gt;Oh, I tried it again and it worked well.&lt;br /&gt;Maybe I made a mistake.&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;I can use the 3,4 buttons to start/stop advertising.&lt;/span&gt;&lt;br /&gt;&lt;span&gt;Thank you for your help&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How do I start and stop Bluetooth Scanning?</title><link>https://devzone.nordicsemi.com/thread/266962?ContentTypeID=1</link><pubDate>Fri, 28 Aug 2020 10:44:16 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:3f9469e7-6d74-4416-9a04-1c43074b3c9d</guid><dc:creator>run_ar</dc:creator><description>&lt;p&gt;Not sure understand what you mean when you say the board will stop afterwards? Do you have a means to restart advertising?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How do I start and stop Bluetooth Scanning?</title><link>https://devzone.nordicsemi.com/thread/266893?ContentTypeID=1</link><pubDate>Fri, 28 Aug 2020 08:11:12 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:c7ac4453-38d9-444d-bbb2-7a20fea1b770</guid><dc:creator>schosdas</dc:creator><description>&lt;div class="edit_box___1KtZ3 active___3VPGL" id="txtTarget"&gt;&lt;span&gt;Thank you for your answer.&lt;/span&gt;&lt;/div&gt;
&lt;div class="edit_box___1KtZ3 active___3VPGL"&gt;&lt;span&gt;I used the code below to stop adverting.&lt;/span&gt;&lt;/div&gt;
&lt;div class="edit_box___1KtZ3 active___3VPGL"&gt;&lt;span&gt;&lt;pre class="ui-code" data-mode="text"&gt;sd_ble_gap_adv_stop(m_advertising.adv_handle);&lt;/pre&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class="edit_box___1KtZ3 active___3VPGL"&gt;&lt;span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class="edit_box___1KtZ3 active___3VPGL"&gt;&lt;span&gt;I can use this code to stop the advertising, but the board will stop afterwards.&lt;/span&gt;&lt;/div&gt;
&lt;div class="edit_box___1KtZ3 active___3VPGL"&gt;&lt;span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class="edit_box___1KtZ3 active___3VPGL"&gt;&lt;span&gt;Did I use it correctly?&lt;/span&gt;&lt;/div&gt;
&lt;div class="edit_box___1KtZ3 active___3VPGL"&gt;&lt;span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class="edit_box___1KtZ3 active___3VPGL"&gt;Thank you.&lt;/div&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How do I start and stop Bluetooth Scanning?</title><link>https://devzone.nordicsemi.com/thread/266878?ContentTypeID=1</link><pubDate>Fri, 28 Aug 2020 07:25:53 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:23072aff-7930-498b-949c-209364b4f9c0</guid><dc:creator>run_ar</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;Advertising is stopped using the sd_ble_gap_adv_stop function. However ble_app_uart uses the ble_advertising module, while it seems that blinky does not. You should still be able to use the function advertising_stop but you need to provide the correct advertisement handle. Should be in m_advertising.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>