<?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>Infinite advertising with SD 8.0.0</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/7320/infinite-advertising-with-sd-8-0-0</link><description>Hi, 
 Recently I updated my SoftDevice on beacon from 7.1.0 to 8.0.0. Unfortunately, I met the same problem with advertising timeout which I faced with in SD 7.1.0, but the solution which worked for the older SD: devzone.nordicsemi.com/.../ 
doesn&amp;#39;t</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Mon, 21 Dec 2015 06:29:17 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/7320/infinite-advertising-with-sd-8-0-0" /><item><title>RE: Infinite advertising with SD 8.0.0</title><link>https://devzone.nordicsemi.com/thread/25921?ContentTypeID=1</link><pubDate>Mon, 21 Dec 2015 06:29:17 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:f7cbd0ce-b0ee-4c6e-8208-865f54492a30</guid><dc:creator>Aparna</dc:creator><description>&lt;p&gt;is ble_advertising.c compiled as part of the application image? I am still not clear. Advertising is as follows for me, utimately calling sd_ble_gap_adv_start(), which in turns calls a routine in the soft device binary (which I cannot change). So how can I change it?&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;uint32_t             err_code;
ble_gap_adv_params_t adv_params;

// Start advertising
memset(&amp;amp;adv_params, 0, sizeof(adv_params));
adv_params.type        = BLE_GAP_ADV_TYPE_ADV_IND;
adv_params.p_peer_addr = NULL;
adv_params.fp          = BLE_GAP_ADV_FP_ANY;
adv_params.interval    = APP_ADV_INTERVAL;
adv_params.timeout     = APP_ADV_TIMEOUT_IN_SECONDS; 

err_code = sd_ble_gap_adv_start(&amp;amp;adv_params);
APP_ERROR_CHECK(err_code);
&lt;/code&gt;&lt;/pre&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Infinite advertising with SD 8.0.0</title><link>https://devzone.nordicsemi.com/thread/25922?ContentTypeID=1</link><pubDate>Tue, 15 Dec 2015 07:09:38 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:891ba634-c66d-46d6-b800-40d6eeb4a206</guid><dc:creator>H&amp;#229;vard</dc:creator><description>&lt;p&gt;Aparna, Konrad probably refers to ble_advertising.c.
should be located in components\ble\ble_advertising.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Infinite advertising with SD 8.0.0</title><link>https://devzone.nordicsemi.com/thread/25920?ContentTypeID=1</link><pubDate>Mon, 14 Dec 2015 13:46:47 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:880f9bc9-c1f2-4499-b7e4-261dc3d5e1a3</guid><dc:creator>Aparna</dc:creator><description>&lt;p&gt;Where is this &amp;quot;advertising manager code&amp;quot;?  I am trying to advertise forever, but I get error code 0x07. I am using SD 7.1.0. I tried both BLE_GAP_ADV_FLAGS_LE_ONLY_GENERAL_DISC_MODE and BLE_GAP_ADV_FLAGS_LE_ONLY_LIMITED_DISC_MODE, but both give me error code 0x07&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Infinite advertising with SD 8.0.0</title><link>https://devzone.nordicsemi.com/thread/25926?ContentTypeID=1</link><pubDate>Sat, 10 Oct 2015 13:11:55 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:ea0685cd-8815-4474-917c-3ac6e7ad43dc</guid><dc:creator>shin</dc:creator><description>&lt;p&gt;Hi. One more comment. Fast advertising plus soft advertising occurs advertising timeout. That is, the above code is useful to infinite advertising by using this timeout. Thanks.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Infinite advertising with SD 8.0.0</title><link>https://devzone.nordicsemi.com/thread/25925?ContentTypeID=1</link><pubDate>Sat, 10 Oct 2015 12:08:13 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:a01919a5-285d-455a-85ee-eea92831d374</guid><dc:creator>shin</dc:creator><description>&lt;p&gt;Hi. I added RTT_printf as the first statement in ble_evt_dispatch function because of tracing ble events. As result, when advertising timeout with APP_ADV_TIMEOUT_IN_SECONDS happened, the ble_evt_dispatch function was not called back. So, infinite advertising cannot be configured with the above code. Please let me know how to get advertising timeout event. Thanks.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Infinite advertising with SD 8.0.0</title><link>https://devzone.nordicsemi.com/thread/25924?ContentTypeID=1</link><pubDate>Thu, 04 Jun 2015 09:15:16 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:568bfe9b-e0b2-409c-833f-21583c4a6004</guid><dc:creator>Emil</dc:creator><description>&lt;p&gt;Thanks a lot Konrad, this worked.&lt;/p&gt;
&lt;p&gt;Code:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;static void ble_evt_dispatch(ble_evt_t * p_ble_evt)
{
    ble_conn_params_on_ble_evt(p_ble_evt);
    ble_nus_on_ble_evt(&amp;amp;m_nus, p_ble_evt);
    on_ble_evt(p_ble_evt);

	if (p_ble_evt-&amp;gt;header.evt_id == BLE_GAP_EVT_TIMEOUT)
		ble_advertising_start(BLE_ADV_MODE_FAST);
	else
		ble_advertising_on_ble_evt(p_ble_evt);
    bsp_btn_ble_on_ble_evt(p_ble_evt);
}
&lt;/code&gt;&lt;/pre&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Infinite advertising with SD 8.0.0</title><link>https://devzone.nordicsemi.com/thread/25917?ContentTypeID=1</link><pubDate>Mon, 01 Jun 2015 11:42:14 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:ca2171a6-a8a0-4f52-9808-6bb519bd3e56</guid><dc:creator>Konrad Traczyk</dc:creator><description>&lt;p&gt;If I understand it correctly, you should call the ble_advertising_on_ble_evt function in ble_evt_dispatch. There you will find in switch the case BLE_GAP_EVT_TIMEOUT. In this case is another switch with current advertising mode. In each of these cases there should ble_advertising_start function which restarts advertising in the mode passed to this function.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Infinite advertising with SD 8.0.0</title><link>https://devzone.nordicsemi.com/thread/25919?ContentTypeID=1</link><pubDate>Mon, 01 Jun 2015 11:10:41 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:a0d0eac3-690c-4cca-8f1f-00af02b3910b</guid><dc:creator>H&amp;#229;vard</dc:creator><description>&lt;p&gt;Thanks for bringing this to our attention. We will fix it for the next release.
In the meantime, both of the workarounds you posted are fine. :)&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Infinite advertising with SD 8.0.0</title><link>https://devzone.nordicsemi.com/thread/25916?ContentTypeID=1</link><pubDate>Fri, 29 May 2015 14:47:11 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:65d78f13-c46b-4e47-9554-dbb6f577801f</guid><dc:creator>Emil</dc:creator><description>&lt;p&gt;ble_adv_evt_t only has this:&lt;/p&gt;
&lt;p&gt;BLE_ADV_EVT_IDLE,&lt;br /&gt;
BLE_ADV_EVT_DIRECTED,&lt;br /&gt;
BLE_ADV_EVT_FAST,&lt;br /&gt;
BLE_ADV_EVT_SLOW,&lt;br /&gt;
BLE_ADV_EVT_FAST_WHITELIST,&lt;br /&gt;
BLE_ADV_EVT_SLOW_WHITELIST,&lt;br /&gt;
BLE_ADV_EVT_WHITELIST_REQUEST,
BLE_ADV_EVT_PEER_ADDR_REQUEST&lt;/p&gt;
&lt;p&gt;So if the advertising times out, it goes to idle? And what function should I call to restart advertising in that case? ble_advertising_start() again?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Infinite advertising with SD 8.0.0</title><link>https://devzone.nordicsemi.com/thread/25923?ContentTypeID=1</link><pubDate>Thu, 28 May 2015 14:21:04 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:3004aa6a-bce9-4a30-a17e-57913923b432</guid><dc:creator>Dan Danknick</dc:creator><description>&lt;p&gt;I also agree with RK, modify the timeout handler code to do what you wish. Currently it falls back to slow advertising which you didn&amp;#39;t configure so it stops.&lt;/p&gt;
&lt;p&gt;I don&amp;#39;t believe connectable advertising was intended to go on forever as BLE was expected to run off a CR-2032 coin cell. Much has changed in the practical world (like stirring paint with a screwdriver) but the concepts in the protocols and their implementation have not.&lt;/p&gt;
&lt;p&gt;Dan&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Infinite advertising with SD 8.0.0</title><link>https://devzone.nordicsemi.com/thread/25915?ContentTypeID=1</link><pubDate>Thu, 28 May 2015 13:38:23 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:809d1f1d-751f-4b13-889b-0c3756f4e106</guid><dc:creator>Konrad Traczyk</dc:creator><description>&lt;p&gt;Ok, thanks for your help :)&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Infinite advertising with SD 8.0.0</title><link>https://devzone.nordicsemi.com/thread/25914?ContentTypeID=1</link><pubDate>Thu, 28 May 2015 13:36:13 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:915989e2-4a2e-4566-9513-1e6660d2cef6</guid><dc:creator>RK</dc:creator><description>&lt;p&gt;Yes - that one the one passed in as &amp;#39;evt_handler&amp;#39;- should call you back when it goes idle and that deals with the cases it&amp;#39;s connected, disconnected, advertised, timed out .. anything. As long as it calls you back with the ENUM value then you start advertising again and don&amp;#39;t care how you got there. I&amp;#39;m assuming that callback is reliable - should be.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Infinite advertising with SD 8.0.0</title><link>https://devzone.nordicsemi.com/thread/25913?ContentTypeID=1</link><pubDate>Thu, 28 May 2015 13:31:11 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:92152c99-328a-491e-8e04-c14e7bd424e5</guid><dc:creator>Konrad Traczyk</dc:creator><description>&lt;p&gt;Yeah, I think that the RK&amp;#39;s solution is the best. By Advertising menager did you mean:
static void on_adv_evt(ble_adv_evt_t ble_adv_evt) function?&lt;/p&gt;
&lt;p&gt;Sorry, I think I found it - ble_advertising_init in ble_advertising.c, right?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Infinite advertising with SD 8.0.0</title><link>https://devzone.nordicsemi.com/thread/25912?ContentTypeID=1</link><pubDate>Thu, 28 May 2015 13:26:25 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:1734bc5f-99fd-4333-b883-9d3af8032bf7</guid><dc:creator>RK</dc:creator><description>&lt;p&gt;Why bother? The advertising module will call you back when it stops advertising, you just turn it back on again, no need for an extra timer or having to synchronise a timer and the actual module.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Infinite advertising with SD 8.0.0</title><link>https://devzone.nordicsemi.com/thread/25911?ContentTypeID=1</link><pubDate>Thu, 28 May 2015 13:20:27 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:246b3f01-8cfe-4fc2-9243-ff1f59af037a</guid><dc:creator>Wojtek</dc:creator><description>&lt;p&gt;You also can set timer that will repeatedly start advertising in ex. 1min intervals and set adv. timeout to 59secs or something like that.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Infinite advertising with SD 8.0.0</title><link>https://devzone.nordicsemi.com/thread/25910?ContentTypeID=1</link><pubDate>Thu, 28 May 2015 13:05:40 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:7a643993-2105-464d-8fe4-a91930d715eb</guid><dc:creator>RK</dc:creator><description>&lt;p&gt;If you read the documentation for ble_gap_adv_params_t you&amp;#39;ll see the limitations there.&lt;/p&gt;
&lt;p&gt;personally I&amp;#39;d just fix the advertising manager code and remove the zero check then you can set it to zero and do what you want.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Infinite advertising with SD 8.0.0</title><link>https://devzone.nordicsemi.com/thread/25909?ContentTypeID=1</link><pubDate>Thu, 28 May 2015 13:03:46 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:38828319-46b7-436e-b0fe-996b54d6723a</guid><dc:creator>Konrad Traczyk</dc:creator><description>&lt;p&gt;Ok, thanks a lot. Why set it to 0x3fff? I can&amp;#39;t see any limitation in docs and it is 32bit variable&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Infinite advertising with SD 8.0.0</title><link>https://devzone.nordicsemi.com/thread/25918?ContentTypeID=1</link><pubDate>Thu, 28 May 2015 12:55:56 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:8dd17019-1778-4644-ace2-a1125c2a8a7b</guid><dc:creator>RK</dc:creator><description>&lt;p&gt;Yep - that&amp;#39;s exactly what I thought would happen. Unfortunately setting it to zero, which ought to turn off the timeout, just turns off the mode completely. You can set it to 0x3fff and get about 4 hours, then I suppose you could re-enable it when it goes off. Or you can edit the advertising manager code and remove the line which turns the mode off if you give it the zero timeout.&lt;/p&gt;
&lt;p&gt;I still think that&amp;#39;s a bug.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Infinite advertising with SD 8.0.0</title><link>https://devzone.nordicsemi.com/thread/25908?ContentTypeID=1</link><pubDate>Thu, 28 May 2015 12:52:43 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:a2292996-01c5-44b0-91cc-1321cf03c131</guid><dc:creator>Konrad Traczyk</dc:creator><description>&lt;p&gt;When I set it to 180, the advertising stopped after 3 minutes, when I set it to 20, it stopped after 20secs. The last value I&amp;#39;ve tried was 0, but the advertising didn&amp;#39;t start.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Infinite advertising with SD 8.0.0</title><link>https://devzone.nordicsemi.com/thread/25907?ContentTypeID=1</link><pubDate>Thu, 28 May 2015 12:45:31 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:02ac39d3-91e8-42b5-85eb-3c6beca21458</guid><dc:creator>RK</dc:creator><description>&lt;p&gt;what&amp;#39;s APP_ADV_TIMEOUT_IN_SECONDS set to? That&amp;#39;s the timeout value.&lt;/p&gt;
&lt;p&gt;Looking at the advertising manager code it seems impossible to set the timeout to zero which would disable timeout because setting timeout to zero, disables the mode. That seems to me to be a bug.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>