<?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>Slow / fast advertising</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/16843/slow-fast-advertising</link><description>Hi, 
 I have a question regarding fast/slow advertising 
 I&amp;#39;d like to advertise for 180s using a 100ms interval, then switch to a 1s interval, preferably for ever. I set advertise options as shown in the image. 
 When I test the software I find that</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Thu, 14 Jun 2018 07:13:55 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/16843/slow-fast-advertising" /><item><title>RE: Slow / fast advertising</title><link>https://devzone.nordicsemi.com/thread/136053?ContentTypeID=1</link><pubDate>Thu, 14 Jun 2018 07:13:55 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:542463f9-e8bb-4403-a4fe-db12093e3d2e</guid><dc:creator>FormerMember</dc:creator><description>&lt;p&gt;Yes, 18000 will give a timeout of 3 min. You can check that it works using nRF Connect and check for how long you can scan for the device.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Slow / fast advertising</title><link>https://devzone.nordicsemi.com/thread/135700?ContentTypeID=1</link><pubDate>Tue, 12 Jun 2018 09:07:17 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:01f85dfc-cf1a-4476-a1ae-8cb21dfbb002</guid><dc:creator>eduardoescarti</dc:creator><description>&lt;p&gt;According to the examples the timeout is set in units of 10ms. So you should set 18000 if you want 3 minutes timeouts.&lt;/p&gt;
&lt;p&gt;#define APP_ADV_DURATION 12000 /**&amp;lt; The advertising duration (120 seconds) in units of 10 milliseconds. */&lt;/p&gt;
&lt;p&gt;Cheers&lt;/p&gt;
&lt;pre&gt;&lt;/pre&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Slow / fast advertising</title><link>https://devzone.nordicsemi.com/thread/64484?ContentTypeID=1</link><pubDate>Tue, 07 Feb 2017 09:51:52 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:92e4189d-beab-48a0-9486-374da1a1b45c</guid><dc:creator>oneguy</dc:creator><description>&lt;p&gt;Thank you Kristin,
I got it to work. I think the problem was caused by:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;my not using the latest SDK and&lt;/li&gt;
&lt;li&gt;using the &amp;quot;nRF Connect&amp;quot; app to measure the advertising interval. In the case of 1s advertisement intervals nRF Connect reports strange results. In case of using a sniffer we find the 1s intervals are correct.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Regards
Matthias&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Slow / fast advertising</title><link>https://devzone.nordicsemi.com/thread/64485?ContentTypeID=1</link><pubDate>Mon, 06 Feb 2017 10:17:10 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:f5241512-0a81-48a0-a18b-eeda73ed44bc</guid><dc:creator>FormerMember</dc:creator><description>&lt;p&gt;I just tested advertising with scan response data here (SDK 12.2.0), and it does switch to slow advertising. How do you test the advertising?&lt;/p&gt;
&lt;p&gt;The easiest is probably to add the following in on_adv_evt(..) in main.c:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;case BLE_ADV_EVT_SLOW:
		NRF_LOG_INFO(&amp;quot;Slow advertising \r\n&amp;quot;);
		break;
&lt;/code&gt;&lt;/pre&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Slow / fast advertising</title><link>https://devzone.nordicsemi.com/thread/64483?ContentTypeID=1</link><pubDate>Fri, 03 Feb 2017 10:40:22 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:0f6b5f76-8a03-4ccc-b34c-94c5afdf7d77</guid><dc:creator>oneguy</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;I have done some more work on this and discovered the following:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;when calling ble_advertising_init WITHOUT scan response data then advertising DOES switch from fast to slow&lt;/li&gt;
&lt;li&gt;when calling ble_advertising_init WITH scan response data, then advertising DOES NOT switch from fast to slow.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Is there anything I can do to have both scan response data and variable advertising intervals?&lt;/p&gt;
&lt;p&gt;Thank you&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Slow / fast advertising</title><link>https://devzone.nordicsemi.com/thread/64482?ContentTypeID=1</link><pubDate>Fri, 04 Nov 2016 13:39:07 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:8e6ef576-f1cc-4fd3-966a-7af9b91de1a9</guid><dc:creator>FormerMember</dc:creator><description>&lt;p&gt;If you want to advertise indefinitely, advertising timeout should be set to &amp;#39;0&amp;#39;. When I test your advertising parameters for slow advertising, sd_ble_gap_adv_start(..) returns success.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Slow / fast advertising</title><link>https://devzone.nordicsemi.com/thread/64481?ContentTypeID=1</link><pubDate>Wed, 26 Oct 2016 13:02:07 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:43ed53d2-de94-4dfb-a240-ac537f0e74cd</guid><dc:creator>oneguy</dc:creator><description>&lt;p&gt;Yes but why? Which parameter is incorrect, or in other words: why can&amp;#39;t I advertise at intervals of 1s for 1000s?&lt;/p&gt;
&lt;p&gt;Can I advertise indefinitely?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Slow / fast advertising</title><link>https://devzone.nordicsemi.com/thread/64480?ContentTypeID=1</link><pubDate>Wed, 26 Oct 2016 12:37:39 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:d431dad8-373b-4109-acfd-83e3bee996f3</guid><dc:creator>FormerMember</dc:creator><description>&lt;p&gt;Good that you found the source of the error!&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Slow / fast advertising</title><link>https://devzone.nordicsemi.com/thread/64479?ContentTypeID=1</link><pubDate>Wed, 26 Oct 2016 12:17:48 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:85582a10-5f49-4437-95d8-9ddbb2357a47</guid><dc:creator>oneguy</dc:creator><description>&lt;p&gt;Hello Kristin,&lt;/p&gt;
&lt;p&gt;thank you for your help. I have found the following (refer to file ble_advertising.c, function ble_advertising_start, line 360):&lt;/p&gt;
&lt;p&gt;if (m_adv_mode_current != BLE_ADV_MODE_IDLE)
{
err_code = sd_ble_gap_adv_start(&amp;amp;adv_params);
VERIFY_SUCCESS(err_code);
}&lt;/p&gt;
&lt;p&gt;--&amp;gt; err_code is set to 7 (NRF_ERROR_INVALID_PARAM).&lt;/p&gt;
&lt;p&gt;adv_params are set as follows:
interval          1600
timeout           1000&lt;/p&gt;
&lt;p&gt;By the way, we&amp;#39;re using SDK_11 and softdevice 2.01.&lt;/p&gt;
&lt;p&gt;Thank you again for your help!&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Slow / fast advertising</title><link>https://devzone.nordicsemi.com/thread/64478?ContentTypeID=1</link><pubDate>Fri, 21 Oct 2016 13:46:22 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:e7f7497a-9800-44e9-95ce-23ffc64f83ed</guid><dc:creator>FormerMember</dc:creator><description>&lt;p&gt;The advertising_init(..) function looks fine. Could you run the chip in debug mode and put a breakpoint in on_timeout(..), adv_mode_next_avail_get(..), and ble_advertising_start(..) all in ble_advertising.c, just to check if you can get some useful information form that.
Could you also upload your main.c here? Which SDK and softdevice do you use?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Slow / fast advertising</title><link>https://devzone.nordicsemi.com/thread/64477?ContentTypeID=1</link><pubDate>Tue, 18 Oct 2016 14:24:11 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:ad9c1035-04f6-4bf7-91bd-90d6db449a8b</guid><dc:creator>oneguy</dc:creator><description>&lt;p&gt;Like you have suggested I have tried out your ANCS example. It turns out the example works as I would expect. Here is how I setup advertising, what do I do wrong?&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;#define APP_ADV_FAST_ENABLED             true        
#define APP_ADV_FAST_INTERVAL             160    /* (corresponding to 100ms) */
#define APP_ADV_FAST_TIMEOUT_IN_SECONDS   180            /* Adv. timeout [s] */

#define APP_ADV_SLOW_ENABLED             true
#define APP_ADV_SLOW_INTERVAL            1600    /* (corresponding to 1s)    */
#define APP_ADV_SLOW_TIMEOUT_IN_SECONDS  1000            /* Adv. timeout [s] */

    static void  initAdvertising (void)
    {
        uint32_t                err_code;
        ble_advdata_t           adv_data, scan_data;
        ble_uuid_t              adv_list, scan_list;
        ble_adv_modes_config_t  adv_opts;
    
                             /* Build advertising and scan response UUID lists:- */
        adv_list.uuid  = 0;        /* Byte 12/13 -&amp;gt; zero&amp;#39;ed out (= service UUID) */
        adv_list.type  = BLE_UUID_TYPE_VENDOR_BEGIN + 4;   /* service[4] = MIDAS */
    
        scan_list.uuid = 0;        /* Byte 12/13 -&amp;gt; zero&amp;#39;ed out (= service UUID) */
        scan_list.type = BLE_UUID_TYPE_VENDOR_BEGIN + 3;   /* service[3] = MDC   */
                                                       /* Configure advertising: */
        memset (&amp;amp;adv_data, 0, sizeof (adv_data));
        adv_data.name_type               = BLE_ADVDATA_FULL_NAME;
        adv_data.flags                   = BLE_GAP_ADV_FLAGS_LE_ONLY_LIMITED_DISC_MODE;
        adv_data.uuids_complete.uuid_cnt = 1;
        adv_data.uuids_complete.p_uuids  = &amp;amp;adv_list;
                                                     /* Configure scan response: */
        memset (&amp;amp;scan_data, 0, sizeof (scan_data));
        scan_data.uuids_complete.uuid_cnt = 1;
        scan_data.uuids_complete.p_uuids  = &amp;amp;scan_list;
                                                           /* Configure options: */
        memset (&amp;amp;adv_opts, 0, sizeof (adv_opts));
        adv_opts.ble_adv_fast_enabled  = BLE_ADV_FAST_ENABLED;
        adv_opts.ble_adv_fast_interval = APP_ADV_FAST_INTERVAL;
        adv_opts.ble_adv_fast_timeout  = APP_ADV_FAST_TIMEOUT_IN_SECONDS;
        adv_opts.ble_adv_slow_enabled  = BLE_ADV_SLOW_ENABLED;
        adv_opts.ble_adv_slow_interval = APP_ADV_SLOW_INTERVAL;
        adv_opts.ble_adv_slow_timeout  = APP_ADV_SLOW_TIMEOUT_IN_SECONDS;
    
        err_code = ble_advertising_init (&amp;amp;adv_data, &amp;amp;scan_data, &amp;amp;adv_opts, onAdvertisingEvent, NULL);
        APP_ERROR_CHECK (err_code);
    }
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Thank you
Matthias&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Slow / fast advertising</title><link>https://devzone.nordicsemi.com/thread/64475?ContentTypeID=1</link><pubDate>Tue, 04 Oct 2016 14:12:41 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:e9b3e88b-5986-4563-98f1-d47f9ea30c8b</guid><dc:creator>FormerMember</dc:creator><description>&lt;p&gt;Do you see the same problem if you use the same advertising parameters in one of our SDK examples?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Slow / fast advertising</title><link>https://devzone.nordicsemi.com/thread/64476?ContentTypeID=1</link><pubDate>Tue, 04 Oct 2016 12:09:05 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:5c84e626-cbe5-4cb7-8706-18180c0f3199</guid><dc:creator>oneguy</dc:creator><description>&lt;p&gt;No, advertising just stops. The application keeps running.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Slow / fast advertising</title><link>https://devzone.nordicsemi.com/thread/64474?ContentTypeID=1</link><pubDate>Tue, 04 Oct 2016 11:34:31 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:53c7916d-0205-4b9e-9746-e085e4348c30</guid><dc:creator>FormerMember</dc:creator><description>&lt;p&gt;If you run the chip in debug mode, could you check if there is an assert or a hardfault that occurs after approximately 3s? (For how to debug, it can be useful to take a look at &lt;a href="https://devzone.nordicsemi.com/question/60125/my-device-is-freezing-and-restarting/?answer=60126#post-id-60126"&gt;this&lt;/a&gt; post.)&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>