<?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>Proper Api to stop adv in sdk 17.</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/69690/proper-api-to-stop-adv-in-sdk-17</link><description>Hi Sir, 
 How we can stop the adv of beacon. i tried with sd_ble_gap_adv_stop(m_adv_handle); its not working can you suggest correct api. 
 
 Thanks 
 Madhu</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Mon, 04 Jan 2021 12:32:32 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/69690/proper-api-to-stop-adv-in-sdk-17" /><item><title>RE: Proper Api to stop adv in sdk 17.</title><link>https://devzone.nordicsemi.com/thread/287216?ContentTypeID=1</link><pubDate>Mon, 04 Jan 2021 12:32:32 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:7a17a5b5-fd72-4d7e-9d06-e7eda5f56383</guid><dc:creator>tesc</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;I am sorry for the delayed answer over the holidays.&lt;/p&gt;
&lt;p&gt;sd_ble_gap_adv_stop() is an API call for the SoftDevice, but if the project is based on an nRF5 SDK example then it is probably not using the SoftDevice directly. Rather it uses the &lt;a href="https://infocenter.nordicsemi.com/topic/sdk_nrf5_v17.0.2/lib_ble_advertising.html"&gt;Advertising Module&lt;/a&gt;, which has its own API for controlling the advertising. Therefore it may be necessary to put the advertising module in the correct state as well. Have you tried calling ble_advertising_start() with BLE_ADV_MODE_IDLE as the advertising_mode parameter?&lt;/p&gt;
&lt;p&gt;If you let me know what exact example you are using then I can have a closer look. Also, if you have modified the example, please provide the modified code.&lt;/p&gt;
&lt;p&gt;Regards,&lt;br /&gt;Terje&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>