<?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 can i disable a beacon</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/21255/how-can-i-disable-a-beacon</link><description>Im doing a porject using nRF51 DK,nRF51822 Bluetooth Smart Beacon Kit and nRF51 Dongle, with Termite 3,2 to view data. There&amp;#39;s a few questions i want to ask. 
 
 
 My program repeat running, i want to stop it with my code, but it stop itself even when</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Fri, 21 Apr 2017 09:10:31 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/21255/how-can-i-disable-a-beacon" /><item><title>RE: How can i disable a beacon</title><link>https://devzone.nordicsemi.com/thread/83197?ContentTypeID=1</link><pubDate>Fri, 21 Apr 2017 09:10:31 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:84b31700-ed25-4a46-a971-5e73dc6810f7</guid><dc:creator>J&amp;#248;rgen Holmefjord</dc:creator><description>&lt;p&gt;Yes, this was just meant as an example. In our SDK examples we use the following to set correct modes and start advertising:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;err_code = ble_advertising_start(BLE_ADV_MODE_FAST);
APP_ERROR_CHECK(err_code);
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;You can use similar in your uart handler.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How can i disable a beacon</title><link>https://devzone.nordicsemi.com/thread/83198?ContentTypeID=1</link><pubDate>Fri, 21 Apr 2017 03:27:39 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:43bc8a6a-0a33-4b08-8740-c73508ec589b</guid><dc:creator>yumiko</dc:creator><description>&lt;p&gt;Tried using the code but there&amp;#39;s a error which i couldn&amp;#39;t solve.
There&amp;#39;s a error with sd_ble_gap_adv_start(), and the error was -- &amp;quot;too few arguments in function call&amp;quot; .
Can you please advise me on this part?
Thankyou!&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How can i disable a beacon</title><link>https://devzone.nordicsemi.com/thread/83201?ContentTypeID=1</link><pubDate>Tue, 18 Apr 2017 09:00:42 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:d9cd3624-7bb6-496f-9fe5-3aa72c2356f1</guid><dc:creator>J&amp;#248;rgen Holmefjord</dc:creator><description>&lt;p&gt;It sounds like you want to stop/start advertising. You need to receive the command in  your UART event handler, and call relevant softdevice functions when a valid command is received. An example of how this can be done is shown in &lt;code&gt;uart_event_handler&lt;/code&gt; in the &lt;a href="http://infocenter.nordicsemi.com/topic/com.nordic.infocenter.sdk5.v13.0.0/ble_sdk_app_nus_eval.html?cp=4_0_0_4_1_2_17"&gt;BLE UART example&lt;/a&gt;. You can use something like this to achieve what you want:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;case APP_UART_DATA_READY:
	UNUSED_VARIABLE(app_uart_get(&amp;amp;data_array[index]));
	index++;

	if (data_array[index - 1] == &amp;#39;\n&amp;#39;)
	{
		if(strcmp(data_array,&amp;quot;ACTIVATE&amp;quot;) == 0 )
		{
			sd_ble_gap_adv_start();
		}
		else if(strcmp(data_array,&amp;quot;DEACTIVATE&amp;quot;) == 0 )
		{
			sd_ble_gap_adv_stop()
		}

		index = 0;
	}
	break;
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Note that you should check if advertising is already activated/deactivated before making the softdevice calls.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How can i disable a beacon</title><link>https://devzone.nordicsemi.com/thread/83200?ContentTypeID=1</link><pubDate>Mon, 17 Apr 2017 02:20:45 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:b85e9c7a-0553-4932-8840-b0890c3c24be</guid><dc:creator>yumiko</dc:creator><description>&lt;ol start="2"&gt;
&lt;li&gt;i want it to stop whenever i want and start whenever i want by sending &amp;#39;deactivate&amp;#39; and &amp;#39;activate&amp;#39; respectively. So im not very sure if is sleep mode or stop advertising. I&amp;#39;m using nrf Uart with Vision studio C#&lt;/li&gt;
&lt;/ol&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How can i disable a beacon</title><link>https://devzone.nordicsemi.com/thread/83199?ContentTypeID=1</link><pubDate>Tue, 11 Apr 2017 08:42:36 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:0a021856-0e4a-44f0-8bea-d8ba2eb6701b</guid><dc:creator>J&amp;#248;rgen Holmefjord</dc:creator><description>&lt;ol&gt;
&lt;li&gt;
&lt;p&gt;Can you post code of your loop?&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;What do you mean by &amp;quot;disable my beacon&amp;quot;? Do you want to put it in sleep mode? Stop advertising?&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;It should be possible to log both UART and RTT to file. You will have to get it from the file to your SQL database somehow, but this is not something we support or provide examples for.&lt;/p&gt;
&lt;/li&gt;
&lt;/ol&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>