<?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>Spacing between advertising packets</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/63668/spacing-between-advertising-packets</link><description>Hi, 
 I am working on a design of very low power sensor, based on nRF52833. Most of the time my device spends advertising only, with sensor data transmitted within advertising packet Manufacturers data field. 
 When I enable advertising with advertising</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Tue, 04 Aug 2020 10:30:39 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/63668/spacing-between-advertising-packets" /><item><title>RE: Spacing between advertising packets</title><link>https://devzone.nordicsemi.com/thread/262956?ContentTypeID=1</link><pubDate>Tue, 04 Aug 2020 10:30:39 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:d9e12c9c-9761-4913-a3e9-457d47621cd8</guid><dc:creator>Edvin</dc:creator><description>&lt;p&gt;Indeed. I have seen that before as well. If I remove one of the channels, the sniffer will stop because it is waiting for that packet. If you set up a central project that will scan without connecting, and you print the advertisement channel of the received packets (you may want to add some custom filter of the address or packet, to print only advertisements from one particular device). The advertising report will contain information on what advertising channel the packet was picked up on. Not ideal for sniffing, because you can&amp;#39;t follow into a connection, but you can use it to&amp;nbsp;verify that you are only advertising on the channels that you are supposed to.&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Best regards,&lt;/p&gt;
&lt;p&gt;Edvin&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Spacing between advertising packets</title><link>https://devzone.nordicsemi.com/thread/262945?ContentTypeID=1</link><pubDate>Tue, 04 Aug 2020 10:01:20 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:e89c4977-595d-44a2-a8a7-9e5d0d2aa9b8</guid><dc:creator>deknoob</dc:creator><description>&lt;p&gt;You are right Edvin, it was the issue with nRF sniffer. With some tricks I am now able to capture two advertising packets on ch37 followed by ch38 and then it gets stuck because ch39 is masked.&lt;br /&gt;Thank you for your help&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Spacing between advertising packets</title><link>https://devzone.nordicsemi.com/thread/262807?ContentTypeID=1</link><pubDate>Mon, 03 Aug 2020 13:04:08 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:bd0627ea-8239-4ae0-a4f4-d4af8dc2b9ec</guid><dc:creator>Edvin</dc:creator><description>&lt;p&gt;Hello,&lt;/p&gt;
&lt;p&gt;How do you determine that you don&amp;#39;t receive any advertisements at all? I don&amp;#39;t think you will be able to see any advertisements using the nRF Sniffer, because it will be waiting for an advertisement on channel 37 before it switches to channel 38, and then 39.&lt;/p&gt;
&lt;p&gt;Does the log indicate that you are starting the advertisement? what does&amp;nbsp;sd_ble_gap_adv_set_configure() return? What does&amp;nbsp;sd_ble_gap_adv_start() return?&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;BR,&lt;/p&gt;
&lt;p&gt;Edvin&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Spacing between advertising packets</title><link>https://devzone.nordicsemi.com/thread/262634?ContentTypeID=1</link><pubDate>Sat, 01 Aug 2020 06:28:08 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:9c778c96-6bf9-4e4d-8fd5-496c58efff04</guid><dc:creator>deknoob</dc:creator><description>&lt;p&gt;Hello,&lt;/p&gt;
&lt;p&gt;I am trying now to change advertising channel map. I use fresh install of SDK17, sd140 and blinky example for evaluation.&lt;/p&gt;
&lt;p&gt;When I insert this line in&amp;nbsp;advertising_init&amp;nbsp;&lt;/p&gt;
&lt;pre&gt;    adv_params.channel_mask[4] = 0x80;

just before&lt;/pre&gt;
&lt;pre&gt;    err_code = sd_ble_gap_adv_set_configure(&amp;amp;m_adv_handle, &amp;amp;m_adv_data, &amp;amp;adv_params);
&lt;/pre&gt;
&lt;p&gt;I don&amp;#39;t get any advertising at all. To double check, I comment that line and then it works as it should.&lt;/p&gt;
&lt;p&gt;What am I doing wrong here.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Spacing between advertising packets</title><link>https://devzone.nordicsemi.com/thread/260009?ContentTypeID=1</link><pubDate>Wed, 15 Jul 2020 02:44:02 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:ab9a7693-866d-432f-ab86-9ea2d78634b5</guid><dc:creator>deknoob</dc:creator><description>&lt;p&gt;Thanks, I see what you mean. I will experiment and hopefully figure out how to set it up.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Spacing between advertising packets</title><link>https://devzone.nordicsemi.com/thread/259933?ContentTypeID=1</link><pubDate>Tue, 14 Jul 2020 13:57:17 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:eebb58e9-5498-49c1-b230-395424cb52c2</guid><dc:creator>Edvin</dc:creator><description>&lt;p&gt;Hello,&lt;/p&gt;
&lt;p&gt;You can only have one active advertisement set at the time, so it is not possible to have 3 of these in parallel. You can have one that times out and then update it, as you describe, but I believe that the softdevice will give you the timeout when the last advertising packet has been transmitted (but I am not sure). So you may need to use an additional app_timer for this.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;One alternative is of course to not use the softdevice, but set up your own advertisements. Although it may be a bit more work on checking how to properly put together the advertising packets, you will have full control of the radio at all times. However, if your advertisements include a scan response, this is quite a bit more complex, because that would also require scanning and replying to scan responses.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Best regards,&lt;br /&gt;Edvin&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Spacing between advertising packets</title><link>https://devzone.nordicsemi.com/thread/259777?ContentTypeID=1</link><pubDate>Tue, 14 Jul 2020 02:45:41 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:af8e6e44-d8b5-4513-8e99-1b06812e5b01</guid><dc:creator>deknoob</dc:creator><description>&lt;p&gt;Hello,&lt;/p&gt;
&lt;p&gt;My device will be advertising with around 10 second advertising interval. I just realised I could set channel map to ch. 37 and then start&amp;nbsp;advertising with 3.1 second interval and advertising duration of 3 second. Then do the same for ch. 38 and so on. Would this work? Or will soft device not allow duration shorter than interval?&lt;/p&gt;
&lt;p&gt;Thanks&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Spacing between advertising packets</title><link>https://devzone.nordicsemi.com/thread/259755?ContentTypeID=1</link><pubDate>Mon, 13 Jul 2020 17:03:01 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:6043aedf-c87b-4677-ae1b-400c0b879202</guid><dc:creator>deknoob</dc:creator><description>&lt;p&gt;Thank you for quick answer. &lt;br /&gt;Yes, I can see it&amp;#39;s hardly justifiable to do it outside the soft device. And this method could result in higher power consumption due to increased CPU activity and timer run. But good to know anyway.&lt;br /&gt;Best regards.&amp;nbsp;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Spacing between advertising packets</title><link>https://devzone.nordicsemi.com/thread/259708?ContentTypeID=1</link><pubDate>Mon, 13 Jul 2020 13:48:44 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:fc17e6c3-c7fd-4b59-869e-6b8bd2febf04</guid><dc:creator>Edvin</dc:creator><description>&lt;p&gt;Hello,&lt;/p&gt;
&lt;p&gt;Using the softdevice that is not possible without configuring this between each advertising event. You can set a channel map for your advertising, but this remains unchanged until you manually change this channel map. This means that you need to configure the advertising setup every 300ms.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;If you want to set a channel mask, you need to adjust some functions in ble_advertising.c.&lt;/p&gt;
&lt;p&gt;The reason for this is that the channel mask is stored in p_advertising-&amp;gt;adv_params.channel_mask, and p_advertising is set to 0 inside&amp;nbsp;ble_advertising_init(). Add something like:&lt;/p&gt;
&lt;p&gt;p_advertising-&amp;gt;adv_params.channel_mask = MY_CHANNEL_MASK;&lt;/p&gt;
&lt;p&gt;before sd_ble_gap_adv_set_configure().&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Then you can e.g. use a timer to trigger&amp;nbsp;ble_advertising_advdata_update(), which you need to call before you call advertising_start() again. You possibly also need to call advertising_stop before both of these.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Remember to also change ble_advertising_advdata_update() to set the new channel mask.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Best regards,&lt;/p&gt;
&lt;p&gt;Edvin&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>