<?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>Advertisment not stopping</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/29365/advertisment-not-stopping</link><description>after connecting and disconnecting advertisment not stopping when i try to stop it ( sdk 11). Without establishing connection i am able to stop it. Nrf51822</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Thu, 11 Jan 2018 12:42:27 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/29365/advertisment-not-stopping" /><item><title>RE: Advertisment not stopping</title><link>https://devzone.nordicsemi.com/thread/116819?ContentTypeID=1</link><pubDate>Thu, 11 Jan 2018 12:42:27 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:7bd93c81-5b3c-4dd6-a497-f1276a9e6983</guid><dc:creator>endnode</dc:creator><description>&lt;p&gt;Firstly if your Nordic device starts advertising right after disconnection then it is written as FEATURE in the firmware. If it is your firmware the you wrote it (or blindly used some library/black-box module, still it&amp;#39;s your firmware). Secondly how does button relate to this? Don&amp;#39;t mix topics, solve one by one and open new ticket if you have further (unrelated) questions.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Advertisment not stopping</title><link>https://devzone.nordicsemi.com/thread/116815?ContentTypeID=1</link><pubDate>Thu, 11 Jan 2018 11:47:30 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:6b19aa6e-b5b2-4942-a671-5dea0c948027</guid><dc:creator>DMS</dc:creator><description>&lt;p&gt;button event handle is not triggering , have any idea ?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Advertisment not stopping</title><link>https://devzone.nordicsemi.com/thread/116817?ContentTypeID=1</link><pubDate>Thu, 11 Jan 2018 11:43:49 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:efe05d2f-03a0-49ae-91a4-a37754c508e5</guid><dc:creator>DMS</dc:creator><description>&lt;p&gt;if connection is established between device, advertising stops . Soon after disconnecting it starts advertising. I want to stop advertising on some event occurance&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Advertisment not stopping</title><link>https://devzone.nordicsemi.com/thread/116816?ContentTypeID=1</link><pubDate>Thu, 11 Jan 2018 10:18:01 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:d1520363-0d4d-42dc-bb86-ad405cf42d4a</guid><dc:creator>endnode</dc:creator><description>&lt;p&gt;Once the connection is established, the advertising stops automatically. Even if you disconnect later there is no advertising running so nothing to be stopped. If you start it again then you can stop any time later. What part of this isn&amp;#39;t your experience?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Advertisment not stopping</title><link>https://devzone.nordicsemi.com/thread/116818?ContentTypeID=1</link><pubDate>Thu, 11 Jan 2018 10:14:44 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:af26b188-5fcd-42f6-b314-12fb12f15c5b</guid><dc:creator>DMS</dc:creator><description>&lt;p&gt;Without out connecting and disconnecting , i am able to turn off advertising. When connection is established and later disconnected, then if i try to stop advertising i am not able to stop it.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Advertisment not stopping</title><link>https://devzone.nordicsemi.com/thread/116814?ContentTypeID=1</link><pubDate>Thu, 11 Jan 2018 10:05:16 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:684fc5f5-e036-45f2-a060-78c36db56b41</guid><dc:creator>endnode</dc:creator><description>&lt;p&gt;If you are using Nordic stack aka Soft Device there is no way it would &amp;quot;automatically&amp;quot; advertise unless you use API to request it. Once the connection is established the advertising stops automatically (that is required by BT SIG specification) meaning if you want to advertise along existing connection you need to start new advertising activity (GAP &amp;quot;slot&amp;quot;). However once connection ends the advertising isn&amp;#39;t started unless you call &lt;code&gt;sd_ble_gap_adv_start&lt;/code&gt;.&lt;/p&gt;
&lt;p&gt;In case you get &lt;code&gt;BLE_GAP_EVT_CONNECTED&lt;/code&gt; event then advertising is already stopped. If you try to stop it by AD API call then it will throw error back. So you either don&amp;#39;t do it at all or (e.g. if you do this in some distant module - which is illogical but can be;) you need to set some global flag and not do it in case that connection is ongoing or you should be more careful how you assert return codes from that &lt;code&gt;sd_ble_gap_adv_stop&lt;/code&gt; function call.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>