<?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>Conditional advertising</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/83928/conditional-advertising</link><description>Hi. 
 In order to save battery in an &amp;quot;advertising only&amp;quot; peripheral, would it be possible for this module to remain in sleep status and start advertising (for a preset period, though) only when it detects a central module scanning for peripherals? Thanks</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Wed, 16 Feb 2022 18:56:30 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/83928/conditional-advertising" /><item><title>RE: Conditional advertising</title><link>https://devzone.nordicsemi.com/thread/353459?ContentTypeID=1</link><pubDate>Wed, 16 Feb 2022 18:56:30 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:8cb7f6ac-b164-4aaf-a1ed-06f32c639936</guid><dc:creator>p143</dc:creator><description>&lt;p&gt;Thanks Karl.&lt;/p&gt;
&lt;p&gt;I got it cristal clear now (There is no advertising payload on the primary channels when advertising with LE Code).&lt;/p&gt;
&lt;p&gt;Best regards.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Conditional advertising</title><link>https://devzone.nordicsemi.com/thread/352023?ContentTypeID=1</link><pubDate>Wed, 09 Feb 2022 11:10:26 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:b6de2beb-e677-4c45-9076-e2822501ffec</guid><dc:creator>Karl Ylvisaker</dc:creator><description>[quote user="p143"]I could use ADV_EXT_IND, which, as far as I understand, is a type of advertising PDU that can advertise in primary channels (that is maximum payload 29 Bytes) &amp;quot;and&amp;quot; implement LE Coded. Is that right?.[/quote]
&lt;p&gt;I am not sure that I have understood your questions correctly here, but ADV_EXT_IND packets only contains the pointer to the secondary channel and time which the payload will be transferred on. There is no advertising payload on the primary channels when advertising with LE Coded.&lt;br /&gt;The maximum advertising payload on primary channels are 32 bytes, but this also includes the 2 bytes of overhead added for each datafield - so in practice you will always be constrained to less than 32 bytes payload on primary advertising channels.&lt;br /&gt;&lt;br /&gt;Best regards,&lt;br /&gt;Karl&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Conditional advertising</title><link>https://devzone.nordicsemi.com/thread/351872?ContentTypeID=1</link><pubDate>Tue, 08 Feb 2022 15:17:34 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:9fede763-e425-4b84-b6a9-afbd8ef5cbb1</guid><dc:creator>p143</dc:creator><description>&lt;p&gt;Hi Karl.&lt;/p&gt;
&lt;p&gt;&lt;br /&gt;What I mean is that, since my app is permanently advertising, and it must use LE Coded, and my advertising payload is small, I could use ADV_EXT_IND, which, as far as I understand, is a type of advertising PDU that can advertise in primary channels (that is maximum payload 29 Bytes) &amp;quot;and&amp;quot; implement LE Coded. Is that right?.&lt;br /&gt;Thanks&lt;/p&gt;
&lt;p&gt;Best regards,&lt;br /&gt;Juan&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Conditional advertising</title><link>https://devzone.nordicsemi.com/thread/351796?ContentTypeID=1</link><pubDate>Tue, 08 Feb 2022 12:40:30 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:7a3c9eba-39e5-4c34-9e8e-1e19b8e8bcdb</guid><dc:creator>Karl Ylvisaker</dc:creator><description>&lt;p&gt;Hello Juan,&lt;/p&gt;
[quote user="p143"]Thanks for your prompt answer.[/quote]
&lt;p&gt;No problem at all, I am happy to help!&lt;/p&gt;
[quote user="p143"]And since you mention that the payload is one the choices to save battery, my adv messages are short, and I need Long Range to be implemented, I imagine that using ADV_EXT_IND to advertise only through primary channels would be a good idea. Wouldn´t it?[/quote]
&lt;p&gt;Payload length does indeed play into current consumption, because it influences how long the radio must be in use for each advertising event.&lt;br /&gt;Could you elaborate / be more specific about what you mean when you say that you need&amp;nbsp;&lt;em&gt;long range&lt;/em&gt;?&lt;br /&gt;To achieve longer range without increasing the radio TX power you could use the Coded PHY.&lt;br /&gt;&lt;br /&gt;Best regards,&lt;br /&gt;Karl&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Conditional advertising</title><link>https://devzone.nordicsemi.com/thread/351639?ContentTypeID=1</link><pubDate>Mon, 07 Feb 2022 20:21:39 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:2d36e1e8-a609-4c1b-880d-cb04891fdf25</guid><dc:creator>p143</dc:creator><description>&lt;p&gt;Hi Karl.&lt;br /&gt;Thanks for your prompt answer.&lt;br /&gt;And since you mention that the payload is one the choices to save battery, my adv messages are short, and I need Long Range to be implemented, I imagine that using ADV_EXT_IND to advertise only through primary channels would be a good idea. Wouldn&amp;acute;t it?&lt;br /&gt;Thanks&lt;/p&gt;
&lt;p&gt;Best regards&lt;br /&gt;Juan&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Conditional advertising</title><link>https://devzone.nordicsemi.com/thread/351468?ContentTypeID=1</link><pubDate>Mon, 07 Feb 2022 08:28:43 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:1a768074-bf2b-40a2-bfff-1ffb025ff590</guid><dc:creator>Karl Ylvisaker</dc:creator><description>&lt;p&gt;Hello Juan,&lt;/p&gt;
[quote user="p143"]what would improve implementing this Slow Mode versus playing with APP_ADV_INTERVAL?[/quote]
&lt;p&gt;There would be no difference between these two as long as they have the same advertising &lt;a href="https://infocenter.nordicsemi.com/topic/sdk_nrf5_v17.1.0/structble__adv__modes__config__t.html"&gt;interval and duration configured&lt;/a&gt;.&lt;br /&gt;I mentioned the Advertising library approach because I thought you were using the Advertising library directly. If you are not, you may just set the advertising interval and duration directly, like demonstrated in &lt;a href="https://infocenter.nordicsemi.com/topic/sdk_nrf5_v17.1.0/ble_sdk_app_beacon.html"&gt;the beacon example from the SDK&lt;/a&gt;.&lt;br /&gt;&lt;br /&gt;Best regards,&lt;br /&gt;Karl&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Conditional advertising</title><link>https://devzone.nordicsemi.com/thread/351404?ContentTypeID=1</link><pubDate>Fri, 04 Feb 2022 18:36:55 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:5eef5c90-671d-444f-9d79-0894e94bb57b</guid><dc:creator>p143</dc:creator><description>&lt;p&gt;Hi Karl.&lt;/p&gt;
&lt;p&gt;And what would improve implementing this Slow Mode versus playing with APP_ADV_INTERVAL?&lt;br /&gt;Thanks.&lt;/p&gt;
&lt;p&gt;Best regards.&lt;br /&gt;Juan&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Conditional advertising</title><link>https://devzone.nordicsemi.com/thread/351232?ContentTypeID=1</link><pubDate>Fri, 04 Feb 2022 07:32:30 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:2ed98ae1-bb67-40ad-9cdb-5b9559cf4777</guid><dc:creator>Karl Ylvisaker</dc:creator><description>&lt;p&gt;Hello Juan,&lt;/p&gt;
[quote user="p143"]May I ask you which &amp;quot;mode&amp;quot; you would suggest to save even more battery?[/quote]
&lt;p&gt;By modes I was here referring to &lt;a href="https://infocenter.nordicsemi.com/index.jsp?topic=%2Fsdk_nrf5_v17.1.0%2Flib_ble_advertising.html&amp;amp;anchor=adv_modes"&gt;the different advertising modes of the Advertising library&lt;/a&gt;&amp;nbsp;- The &amp;#39;slow&amp;#39; is the least energy consuming of these.&lt;br /&gt;Other than that, the two most significant parameters to save power in your continuous advertising is advertising interval and payload. These dictate the time between each radio usage, and the length of the usage, respectively.&lt;br /&gt;&lt;br /&gt;You should also make sure to power down as many peripherals as possible while your device is sleeping for a prolonged period, if you do not need them.&lt;br /&gt;&lt;br /&gt;Best regards,&lt;br /&gt;Karl&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Conditional advertising</title><link>https://devzone.nordicsemi.com/thread/351221?ContentTypeID=1</link><pubDate>Fri, 04 Feb 2022 02:21:21 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:0d7eaf8a-f622-4330-bd10-88c6d5aa3f6b</guid><dc:creator>p143</dc:creator><description>&lt;p&gt;Hi Karl.&lt;/p&gt;
&lt;p&gt;In your last comment, you mention, &amp;quot;There are many configurations you could change to reduce the advertising&amp;#39;s power consumption as well, such as advertising mode... &amp;quot;. &lt;br /&gt;In my project, I am permanently advertising, and my APP_ADV_INTERVAL is 128. My init.advdata.flags = BLE_GAP_ADV_FLAGS_LE_ONLY_GENERAL_DISC_MODE;&lt;br /&gt;May I ask you which &amp;quot;mode&amp;quot; you would suggest to save even more battery? &lt;br /&gt;Thanks.&lt;br /&gt;Best regards,&lt;/p&gt;
&lt;p&gt;Juan&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Conditional advertising</title><link>https://devzone.nordicsemi.com/thread/350144?ContentTypeID=1</link><pubDate>Fri, 28 Jan 2022 09:45:43 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:1adfba28-635e-443b-aad0-e83aea2b1b32</guid><dc:creator>Karl Ylvisaker</dc:creator><description>&lt;p&gt;Hello again, Juan&lt;/p&gt;
[quote user="p143"]1.- I understand that a module radio permanently advertising (therefore transmitting) consumes more battery than permanently scanning (therefore receiving). Am I right?[/quote]
&lt;p&gt;Not quite, because scanning is a continuous process within the configured scan window - meaning that the radio will be active continuously for the duration of the scan window - while advertisings only have the radio active for a limited time once during the advertising interval. There are many configurations you could change to reduce the advertising&amp;#39;s power consumption as well, such as advertising mode, interval and duration.&lt;br /&gt;So, advertising is in the general case less power consuming than scanning.&lt;/p&gt;
[quote user="p143"]2.- I also understand that advertising packets, if you don&amp;#39;t connect with the central module, are simply broadcasted, so no being addressed to any particular module. Okey?[/quote]
&lt;p&gt;This is also configurable - if you use&amp;nbsp;&lt;em&gt;directed advertising&amp;nbsp;&lt;/em&gt;then you are looking for a specific central device to connect. All advertisements are visible to all nearby BLE devices, however.&lt;/p&gt;
[quote user="p143"]3.- Would it be possible for the advertising module to set itself as a central scanning module A and the central module B as a permanently advertising module ONLY until module A detects the presence of B? Then, module A would set itself as a peripheral (for a preset period, though) and module B as a scanning module (for the same preset period).[/quote]
&lt;p&gt;I think my answer to the first question might have negated the need for this question, since the assumption that scanning comes with a lesser power consumption was not valid.&lt;br /&gt;In short; you could have done this like you proposed, but it would waste a lot of power for very little / no gain.&lt;br /&gt;&lt;br /&gt;Please do not hesitate to ask if any part of my answer should be unclear, so that I may elaborate.&lt;br /&gt;&lt;br /&gt;Best regards,&lt;br /&gt;Karl&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Conditional advertising</title><link>https://devzone.nordicsemi.com/thread/350070?ContentTypeID=1</link><pubDate>Thu, 27 Jan 2022 18:00:11 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:49e0ea81-6db4-49ed-8b80-296af8881a33</guid><dc:creator>p143</dc:creator><description>&lt;p&gt;Hi Karl.&lt;/p&gt;
&lt;p&gt;Thanks for your prompt answer, but just to make sure, let me, please ask you a few more questions.&lt;/p&gt;
&lt;p&gt;&lt;br /&gt;As I told you, my goal is to save even more battery in a permanently transmitting module, and I understand that online profiling would help with this, but before using this tool, I would like to have my ideas a bit more clear.&lt;/p&gt;
&lt;p&gt;&lt;br /&gt;Right now, to increase battery life, I trade with the radiated power and the advertising frequency with reasonably good results. Still, before I order sample PCBs, I want to make sure I can&amp;#39;t get any better regarding battery consumption. So my douts are:&lt;/p&gt;
&lt;p&gt;&lt;br /&gt;1.- I understand that a module radio permanently advertising (therefore transmitting) consumes more battery than permanently scanning (therefore receiving). Am I right?&lt;br /&gt;2.- I also understand that advertising packets, if you don&amp;#39;t connect with the central module, are simply broadcasted, so no being addressed to any particular module. Okey?&lt;/p&gt;
&lt;p&gt;So:&lt;/p&gt;
&lt;p&gt;3.- Would it be possible for the advertising module to set itself as a central scanning module A and the central module B as a permanently advertising module ONLY until module A detects the presence of B? Then, module A would set itself as a peripheral (for a preset period, though) and module B as a scanning module (for the same preset period).&lt;/p&gt;
&lt;p&gt;Would this make sense for you?&lt;/p&gt;
&lt;p&gt;Best regards,&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Juan&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Conditional advertising</title><link>https://devzone.nordicsemi.com/thread/349146?ContentTypeID=1</link><pubDate>Mon, 24 Jan 2022 08:30:43 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:3c57edf8-08ca-42f4-9447-2e2261cde6d4</guid><dc:creator>Karl Ylvisaker</dc:creator><description>&lt;p&gt;Hello,&lt;/p&gt;
[quote user=""]would it be possible for&amp;nbsp;this module&amp;nbsp;to remain in sleep status and start advertising (for a preset period, though) only when&amp;nbsp;it detects a central module scanning for peripherals?&amp;nbsp; Thanks.[/quote]
&lt;p&gt;No, this is not possible since it would require that the peripheral constantly uses the RADIO peripheral to listen for central scan requests (which are directed at other devices, since itself is not advertising yet).&lt;br /&gt;This would consume more energy than regular advertising.&lt;br /&gt;&lt;br /&gt;Could it be an option to have the advertising started by an external event, such as a button press or sensor reading, instead? Alternatively, what is your application&amp;#39;s requirements / constraints in regards to power consumption?&amp;nbsp;&lt;br /&gt;You could use &lt;a href="https://devzone.nordicsemi.com/power/w/opp/2/online-power-profiler-for-bluetooth-le"&gt;the Online Power Profiler&lt;/a&gt;&amp;nbsp;to estimate the power consumption of different advertising configurations, and to see how the different parameters affects your consumption.&lt;br /&gt;&lt;br /&gt;Best regards,&lt;br /&gt;Karl&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>