<?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>manual advertising</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/20469/manual-advertising</link><description>Hi, 
 I&amp;#39;m using the SDK 12.2 with the sd 132 3.1.0, and actually I&amp;#39;m trying to send two separate advertisements wich I&amp;#39;m swapping every &amp;quot;radio notification event&amp;quot;, but I noticed that after changing it and starting the transmission with &amp;quot;ble_advertising_start</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Fri, 17 Mar 2017 10:01:15 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/20469/manual-advertising" /><item><title>RE: manual advertising</title><link>https://devzone.nordicsemi.com/thread/79826?ContentTypeID=1</link><pubDate>Fri, 17 Mar 2017 10:01:15 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:f200f88b-db51-443b-9134-9fdcfe00acb8</guid><dc:creator>run_ar</dc:creator><description>&lt;p&gt;Ok, In that case, yes, you might as well use a timer to controll this as you proposed.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: manual advertising</title><link>https://devzone.nordicsemi.com/thread/79821?ContentTypeID=1</link><pubDate>Fri, 17 Mar 2017 09:23:40 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:32dd5c2e-7440-41aa-8eaa-2f09b489af18</guid><dc:creator>vea45</dc:creator><description>&lt;p&gt;This is exactly what I&amp;#39;m doing now, but this way I can&amp;#39;t set one advertisement to be sent every X seconds and the other one every Y seconds without using a timer...&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: manual advertising</title><link>https://devzone.nordicsemi.com/thread/79827?ContentTypeID=1</link><pubDate>Thu, 16 Mar 2017 15:39:15 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:87c866ab-1b1d-4ebc-b6e9-fa757223283b</guid><dc:creator>run_ar</dc:creator><description>&lt;p&gt;If you need to know the exact number of advertisement sent, sure. If you don&amp;#39;t I would just call sd_ble_gap_adv_data_set on each radio notificaiton inactive events.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: manual advertising</title><link>https://devzone.nordicsemi.com/thread/79830?ContentTypeID=1</link><pubDate>Wed, 15 Mar 2017 12:13:15 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:a6225838-7a86-4298-84f5-f516136c0d80</guid><dc:creator>vea45</dc:creator><description>&lt;p&gt;So maybe the best option I have is to continue doing what I&amp;#39;m doing, but including a couple of timers that emulate the advertising_interval calling the ble_x_start functions on each timer handler...&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: manual advertising</title><link>https://devzone.nordicsemi.com/thread/79829?ContentTypeID=1</link><pubDate>Wed, 15 Mar 2017 11:44:29 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:a4837431-3007-499a-803d-6661e1b3b955</guid><dc:creator>run_ar</dc:creator><description>&lt;p&gt;You can find advertiser examples in this &lt;a href="https://github.com/NordicSemiconductor/nRF51-multi-role-conn-observer-advertiser/tree/Advertiser-With-and-Without-Timeslot"&gt;github project&lt;/a&gt;. Note that even though there is some conformance testing done on this (see different branch) this is not a qualified implementation, so I would recommend using the Softdevice if possible.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: manual advertising</title><link>https://devzone.nordicsemi.com/thread/79828?ContentTypeID=1</link><pubDate>Wed, 15 Mar 2017 11:34:14 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:3eea72dc-a016-47b1-99c6-5471f9239c46</guid><dc:creator>run_ar</dc:creator><description>&lt;p&gt;The time from when you call sd_ble_gap_adv_start until the first adv packet is sent will have a random delay between 0-10 ms added to it.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: manual advertising</title><link>https://devzone.nordicsemi.com/thread/79825?ContentTypeID=1</link><pubDate>Tue, 14 Mar 2017 22:08:34 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:ca9f9194-5eba-4f47-b036-b57da05fa5ec</guid><dc:creator>vea45</dc:creator><description>&lt;p&gt;All is working perfectly, but what I can see there is that when I call some of the ble_X_start functions the device inmediately sends a packet... And the next one is after the configured interval. So I want to know if this is what I say, and also if there is some easier way to do this.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: manual advertising</title><link>https://devzone.nordicsemi.com/thread/79824?ContentTypeID=1</link><pubDate>Tue, 14 Mar 2017 21:39:44 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:c758c3c0-e674-4d7e-8141-f03dead24a25</guid><dc:creator>endnode</dc:creator><description>&lt;p&gt;So radio notifications work and the only problem is, that it doesn&amp;#39;t give you interrupt before the first packet(s)? You can call it bug but I guess Nordic will call it feature (ending packets out fast looks like more important then waiting for some notification interrupt). If you really have problem with counting then simply start from 1. Am I missing something?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: manual advertising</title><link>https://devzone.nordicsemi.com/thread/79823?ContentTypeID=1</link><pubDate>Tue, 14 Mar 2017 20:46:35 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:65e65c1b-19f3-4fe3-9b7f-f905bdc5a2c8</guid><dc:creator>vea45</dc:creator><description>&lt;p&gt;I have configured the radio notification to be callen on active and inactive radio events. So the handler is called during and after a radio event, this way I can know when a packet is sent (In my case I&amp;#39;m turning on a LED during the active radio period and turning off when the radio is innactive). And what I see is that the packet is sent inmediately after the ble_X_start functions...&amp;quot;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: manual advertising</title><link>https://devzone.nordicsemi.com/thread/79822?ContentTypeID=1</link><pubDate>Tue, 14 Mar 2017 20:04:39 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:8c51917b-9110-4612-9b1a-bed30fd858d8</guid><dc:creator>endnode</dc:creator><description>&lt;p&gt;Well this contradicts my experience: after calling &lt;code&gt;sd_ble_gap_adv_start&lt;/code&gt; you get called only when radio is being deactivated (= adv. packet has been already sent) and on each next event you get called before packets are sent (boolean &lt;code&gt;radio_active&lt;/code&gt; parameter is true) and then after it (&lt;code&gt;radio_active&lt;/code&gt; is false). With this knowledge you can easily count everything, can&amp;#39;t you?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: manual advertising</title><link>https://devzone.nordicsemi.com/thread/79820?ContentTypeID=1</link><pubDate>Tue, 14 Mar 2017 19:21:47 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:18dbde8c-65b0-4631-9e31-4af79ecdbc21</guid><dc:creator>vea45</dc:creator><description>&lt;p&gt;Well the problem is that the radio notification handler is called exactly after calling &amp;quot;ble_advertising_start&amp;quot; so this indicates that a packet is sent just after calling it... So another one is sent when the interval time is reached.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: manual advertising</title><link>https://devzone.nordicsemi.com/thread/79819?ContentTypeID=1</link><pubDate>Tue, 14 Mar 2017 18:56:01 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:095677a3-d37a-4a60-9953-1982541ba606</guid><dc:creator>endnode</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;When you use radio notification events with SD S13x it gives you first interrupt after first ADV_xxx packet is sent. So you need to start counting from there. Also remember that SDK library will call your radio notification handler twice per each interval (once before and once after) - you can detect that with bool parameter of the handler - and also note that depending on adv. channel map soft device sends 1, 2 or 3 packets during every interval. Does this solves your counting? If not could you paste your code to see where is the problem?&lt;/p&gt;
&lt;p&gt;To your question: sure you can do advertisement &amp;quot;manually&amp;quot;. Either by running custom applicative timer and using adv. start and stop or by not using Soft Device at all. Just bare in mind that a) advertisement interval should have jitter (mandated by BT SIG to prevent collisions) and b) that start/stop of advertising activity through Soft Device API isn&amp;#39;t guaranteed to start immediately so there can be pretty random inaccuracy (on top of your timer) which can go up to +-10ms (at least this is what I&amp;#39;ve measured with S13x V2 but it might be caused by other things then Soft Device processing).&lt;/p&gt;
&lt;p&gt;Cheers Jan&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>