<?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 enable/disable automatic advertising after GPIO Pin state?</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/16101/how-do-i-enable-disable-automatic-advertising-after-gpio-pin-state</link><description>I want to advertise only when GPIO pin is High. It should not Advertise when GPIO pin is Low.</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Thu, 08 Sep 2016 06:11:03 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/16101/how-do-i-enable-disable-automatic-advertising-after-gpio-pin-state" /><item><title>RE: How do I enable/disable automatic advertising after GPIO Pin state?</title><link>https://devzone.nordicsemi.com/thread/61400?ContentTypeID=1</link><pubDate>Thu, 08 Sep 2016 06:11:03 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:b0851f72-39a4-4456-bd31-11173683cfbf</guid><dc:creator>Einar Thorsrud</dc:creator><description>&lt;p&gt;If the device is getting reset, it is likely due to an error that is caught by a &lt;code&gt;APP_ERROR_CHECK()&lt;/code&gt;. If &lt;code&gt;DEBUG&lt;/code&gt; is not defined for your project, the default error handler will trigger a reset. If you define &lt;code&gt;DEBUG&lt;/code&gt; for your project and disable optimization, you can use a debugger to see where the error occurred and with what error code. &lt;a href="https://devzone.nordicsemi.com/blogs/821"&gt;This blog post&lt;/a&gt; describes the process in detail.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How do I enable/disable automatic advertising after GPIO Pin state?</title><link>https://devzone.nordicsemi.com/thread/61399?ContentTypeID=1</link><pubDate>Wed, 07 Sep 2016 06:23:06 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:4bcaeee8-23c9-4f8c-b8c5-bf5b77cdbfec</guid><dc:creator>koustubhavachat</dc:creator><description>&lt;p&gt;On sd_ble_gap_adv_stop() device is getting restart. Following steps i am doing&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Advertising&lt;/li&gt;
&lt;li&gt;Connect&lt;/li&gt;
&lt;li&gt;GET Command from nus&lt;/li&gt;
&lt;li&gt;Change state of GPIO-1 which changes GPIO-2 state&lt;/li&gt;
&lt;li&gt;If GPIO-2 is True then sd_ble_gap_adv_start() and If GPIO-2 is False then sd_ble_gap_adv_stop()&lt;/li&gt;
&lt;/ul&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How do I enable/disable automatic advertising after GPIO Pin state?</title><link>https://devzone.nordicsemi.com/thread/61398?ContentTypeID=1</link><pubDate>Wed, 31 Aug 2016 12:11:25 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:c9f86112-da36-48a4-bb71-eea3600e9095</guid><dc:creator>Einar Thorsrud</dc:creator><description>&lt;p&gt;You can do this by triggering an interrupt on a pin change, and call &lt;code&gt;sd_ble_gap_adv_start()&lt;/code&gt; or &lt;code&gt;sd_ble_gap_adv_stop()&lt;/code&gt; as appropriate in the interrupt handler.&lt;/p&gt;
&lt;p&gt;You could probably make a simple demonstration by basing your code on for example the &lt;a href="http://infocenter.nordicsemi.com/topic/com.nordic.infocenter.sdk5.v11.0.0/ble_sdk_app_beacon.html?cp=6_0_0_4_2_2_2"&gt;Beacon Transmitter Sample Application&lt;/a&gt; and looking at the &lt;a href="http://infocenter.nordicsemi.com/topic/com.nordic.infocenter.sdk5.v11.0.0/pin_change_int_example.html?cp=6_0_0_4_5_12"&gt;Pin Change Interrupt Example&lt;/a&gt;.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>