<?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>Stopping Eddystone advertisements</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/35134/stopping-eddystone-advertisements</link><description>I am using Thingy (nrf52832) to advertise Eddystone UID and TLM packets in bursts. On a given event advertising starts with an interval of 200ms, then stops after specified amount of time. This sort of works. The problem is that after stopping, TLM packets</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Thu, 07 Jun 2018 12:53:41 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/35134/stopping-eddystone-advertisements" /><item><title>RE: Stopping Eddystone advertisements</title><link>https://devzone.nordicsemi.com/thread/135164?ContentTypeID=1</link><pubDate>Thu, 07 Jun 2018 12:53:41 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:baca8ef1-da4a-4132-87a6-b9d4997e53a7</guid><dc:creator>Xaerdna</dc:creator><description>&lt;p&gt;When I call adv_stop() the default frame (which I have configured to be UID) stops. However, I&amp;#39;ve added an additional frame (TLM), and this frame is&amp;nbsp;still advertised (at a lower frequency) after calling adv_stop(). I know the chip is not resetting, as I use an RTT debugger to monitor the activity.&lt;/p&gt;
&lt;p&gt;Maybe I have added the TLM frame in the wrong way. I used the function &amp;#39;&lt;span&gt;configure_slot&lt;/span&gt;&lt;span&gt;(&lt;/span&gt;&lt;span&gt;uint8_t&lt;/span&gt;&lt;span&gt; slot_no, &lt;/span&gt;&lt;span&gt;uint8_t&lt;/span&gt;&lt;span&gt; length, &lt;/span&gt;&lt;span&gt;uint8_t&lt;/span&gt;&lt;span&gt; &lt;/span&gt;&lt;span&gt;*&lt;/span&gt;&lt;span&gt; p_frame_data) &amp;#39; to set it up.&amp;nbsp;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Anyways, I have setup the timeslot functionality instead. This works like a charm! I&amp;#39;m not going to spend more time debugging my issue with the other eddystone library, so will mark your&amp;nbsp;first reply&amp;nbsp;as the correct one.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Thanks for the help!&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Stopping Eddystone advertisements</title><link>https://devzone.nordicsemi.com/thread/135158?ContentTypeID=1</link><pubDate>Thu, 07 Jun 2018 12:38:45 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:abdf377f-00ca-42c2-9f7e-c8e49818befb</guid><dc:creator>Sigurd</dc:creator><description>&lt;p&gt;When testing this with the Eddystone example project in SDK 13.1 on the nRF52-DK, I have no problems stopping the advertising.&lt;/p&gt;
&lt;p&gt;I&amp;#39;m initializing BUTTON_2 like this:&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;static void button_init(void)
{
    ret_code_t              err_code;
    const uint8_t           buttons_cnt  = 2;
    
    static app_button_cfg_t buttons_cfgs[] =
    {
        {BUTTON_REGISTRATION, APP_BUTTON_ACTIVE_LOW, NRF_GPIO_PIN_PULLUP, button_evt_handler},
        {BUTTON_2,APP_BUTTON_ACTIVE_LOW, NRF_GPIO_PIN_PULLUP, button_evt_handler}
    };
    
         err_code = app_button_init(buttons_cfgs, buttons_cnt, APP_TIMER_TICKS(100));
    APP_ERROR_CHECK(err_code);

    err_code = app_button_enable();
    APP_ERROR_CHECK(err_code);
}&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;And the&amp;nbsp;button_evt_handler looks like this.&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;static void button_evt_handler(uint8_t pin_no, uint8_t button_action)
{
    ret_code_t              err_code;
  
    if(pin_no == BUTTON_REGISTRATION)
    {
        
        if (button_action == APP_BUTTON_PUSH &amp;amp;&amp;amp; pin_no == BUTTON_1)
        {
            nrf_ble_es_on_start_connectable_advertising();
        }
    }
    
    if(pin_no == BUTTON_2)    
    {
            err_code = sd_ble_gap_adv_stop();
            if (err_code != NRF_ERROR_INVALID_STATE)
            {
                APP_ERROR_CHECK(err_code);
            }
            es_adv_timing_stop();
    }
}&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;I also added&amp;nbsp;&lt;em&gt;#include &amp;quot;es_adv_timing.h&amp;quot;&lt;/em&gt; in main.c&lt;/p&gt;
&lt;p&gt;When I press button 2 on the DK, the advertising stops.&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Maybe you are running into the error-handler? If DEBUG is not defined as a&amp;nbsp;preprocessor symbol, the default&amp;nbsp;behavior is to reset the chip, and the advertising will then restart when the chip starts again. See &lt;a href="https://devzone.nordicsemi.com/f/nordic-q-a/10729/my-device-is-freezing-and-restarting"&gt;this post&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;If this is not the case, you will need to debug. Place a breakpoint in functions that could be starting the advertising again, e.g.&amp;nbsp;adv_start(), es_adv_timing_start(),&amp;nbsp;connectable_adv_start(), etc. Then try to stop the advertising, and if you hit one of the breakpoints, then you should look at the call-stack to see where the functions are being called from.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Stopping Eddystone advertisements</title><link>https://devzone.nordicsemi.com/thread/135136?ContentTypeID=1</link><pubDate>Thu, 07 Jun 2018 11:46:39 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:e17c4be5-66ff-495e-912b-a8755f39a509</guid><dc:creator>Xaerdna</dc:creator><description>&lt;p&gt;I have started a custom project, so not using any of the original Thingy code. Just using bits and pieces from the SDK.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Both connectable&amp;nbsp;advertising and the timeslot functionality is disabled.&lt;/p&gt;
&lt;p&gt;I am modifying the timeslot module for my purposes now, so maybe that will do the trick. Would be great however to know why I am not able to disable advertising using the eddystone library from SDK13.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Stopping Eddystone advertisements</title><link>https://devzone.nordicsemi.com/thread/135126?ContentTypeID=1</link><pubDate>Thu, 07 Jun 2018 11:16:41 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:d0d03dc3-ec2d-4cae-a308-e143e84e2ae0</guid><dc:creator>Sigurd</dc:creator><description>&lt;p&gt;In the Thingy project, we are doing regular connectable advertising, so that a phone can connect to the thingy. But as an additional feature, we are also doing Eddystone beacon advertising in-between the regular connectable advertising, using the timeslot functionality.&lt;/p&gt;
&lt;p&gt;In the Eddystone example project, and in the eddystone libraries, the main feature is the eddystone beaconing, and we are not using the timeslot approach here.&lt;/p&gt;
&lt;p&gt;I don&amp;rsquo;t know how you have implemented this, but if you have added the eddystone libraries to the Thingy project, and started Eddystone advertising with &lt;em&gt;es_adv_start_non_connctable_adv()&lt;/em&gt;, then it could be that you are doing both? In that case, you need to call both adv_stop() AND app_beacon_stop().&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Stopping Eddystone advertisements</title><link>https://devzone.nordicsemi.com/thread/135071?ContentTypeID=1</link><pubDate>Thu, 07 Jun 2018 07:42:44 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:5c92611b-67a7-481e-8670-3898a66c161a</guid><dc:creator>Xaerdna</dc:creator><description>&lt;p&gt;I will look into using the timeslot functionality for my purpose, thanks!&lt;/p&gt;
&lt;p&gt;Atm I am using the eddystone library from external/components/libraries/eddystone. Any suggestions on how I can resolve the issue with my current setup?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Stopping Eddystone advertisements</title><link>https://devzone.nordicsemi.com/thread/134988?ContentTypeID=1</link><pubDate>Wed, 06 Jun 2018 14:25:15 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:5cba55dd-c7ee-4300-89ab-71c4f6c80c36</guid><dc:creator>Sigurd</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;In Thingy project, the Eddystone beacon module is using the timeslot functionality, so when you get certain radio events, it will request a timeslot to do the advertising. If you want to stop the Eddystone beacon, I believe the correct function to use is app_beacon_stop(), that will set the m_beacon.keep_running bool to false. Take a look at the file called advertiser_beacon_timeslot.c to see the implementation.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>