<?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>Configuration of advertising channel</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/100797/configuration-of-advertising-channel</link><description>Hi 
 we want to utilize the advertising operation to transfer a message as 25bytes. 
 now we meet an issue, because the advertising may select channel 37, 38 and 39 randomly, and receiving is also selecting them randomly, which mean even the scanning</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Thu, 20 Jul 2023 03:09:07 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/100797/configuration-of-advertising-channel" /><item><title>RE: Configuration of advertising channel</title><link>https://devzone.nordicsemi.com/thread/437378?ContentTypeID=1</link><pubDate>Thu, 20 Jul 2023 03:09:07 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:4c4d7145-1397-48e9-ae71-1c87fd7af49d</guid><dc:creator>Poplar</dc:creator><description>&lt;p&gt;A fantastic answer!&lt;/p&gt;
&lt;p&gt;thanks a lot for such detail explanation.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Configuration of advertising channel</title><link>https://devzone.nordicsemi.com/thread/437360?ContentTypeID=1</link><pubDate>Wed, 19 Jul 2023 18:26:30 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:7b2ba4e2-c110-46cb-92f3-91d838225149</guid><dc:creator>tesc</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
[quote user="Poplar"]1. is that possible to change the stack to control the order of advertising channel?[/quote]
&lt;p&gt;Not to my knowledge, no. Further, I do not quite see how that would really change things, neither with regards to power consumption nor with regards to connection setup.&lt;/p&gt;
[quote user="Poplar"]2. the shorter advertising interval, we have utilized already. but not so short as you suggested 20ms. our test shown too short advertising interval may lead the devices which are trying to re-establish the connection fail to do so or take longer time to complete. do you think such phenomena is normal?[/quote]
&lt;p&gt;Well, if you have a lot of devices all advertising, then you could potentially get more collisions. I would still expect the main contributor to slow connection to be the scanning, and/or parameters for scanning and advertising to not work optimally.&lt;/p&gt;
&lt;p&gt;If you are not only advertising, but also doing a connection, then there are some additional details. The typical implementation for the central is to scan, then get an advertisement, decide whether or not to connect, and if deciding to connect call the API for connecting to that given address. The resulting behavior is that for getting a connection, the central must get two advertising events. First one for the initial knowledge that the node exists, then one for actually responding with a connect attempt. You could try having the scan window slightly longer than two advertising intervals, to allow for those two advertisements to be received within the same scan event. But from what I understand you are not connecting for transferring those 25 bytes, but rather sending them directly in the advertisement data, presumably as manufacturer specific data?&lt;/p&gt;
[quote user="Poplar"]3. the advertising interval can be short in any value since we initiate it when required event happens. but scan interval can not be too short, this is a key contributor to total power consumption. no matter the scan window length or scan interval, in my understanding, they will be transformed to total scan ratio finally. the current acceptable ratio is about 0.3% in our power system. is there other parameters we can play with?[/quote]
&lt;p&gt;I am afraid the parameters that you have to play with, are basically limited to scan window, scan interval, advertising interval. You should find the balance that best suits your needs, with regards to power consumption, time to get a connection, etc.&lt;/p&gt;
&lt;p&gt;0.3 %, or 3 ‰, is a very small number. This means no matter what values you go for, you will inevitably get a large latency. To get that duty cycle while also guaranteeing overlap with advertisement, even at advertising at 20 ms duty cycle you would need 30 ms scan window which to reach 3 ‰ means 10 seconds scan interval.&lt;/p&gt;
&lt;p&gt;Also, correction: Since for advertising there is a 0 to 10 ms random delay between each advertising event, you risk 10 ms longer time between two advertisements than the advertising interval, so an advertising interval of 20 ms will give a maximum (worst case) interval of 30 ms. Maybe this may explain some of what you see?&lt;/p&gt;
&lt;p&gt;Regards,&lt;br /&gt;Terje&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Configuration of advertising channel</title><link>https://devzone.nordicsemi.com/thread/435209?ContentTypeID=1</link><pubDate>Fri, 07 Jul 2023 11:11:11 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:6ada3c11-4db8-4432-bfff-372b2e3f281e</guid><dc:creator>Poplar</dc:creator><description>&lt;p&gt;Hi Terje&lt;/p&gt;
&lt;p&gt;thanks for the suggestions.&lt;/p&gt;
&lt;p&gt;1. is that possible to change the stack to control the order of advertising channel?&lt;/p&gt;
&lt;p&gt;2. the shorter advertising interval, we have utilized already. but not so short as you suggested 20ms. our test shown too short advertising interval may lead the devices which are trying to re-establish the connection fail to do so or take longer time to complete. do you think such phenomena is normal?&lt;/p&gt;
&lt;p&gt;3. the advertising interval can be short in any value since we initiate it when required event happens. but scan interval can not be too short, this is a key contributor to total power consumption. no matter the scan window length or scan interval, in my understanding, they will be transformed to total scan ratio finally. the current acceptable ratio is about 0.3% in our power system. is there other parameters we can play with?&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;thanks again.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Configuration of advertising channel</title><link>https://devzone.nordicsemi.com/thread/435041?ContentTypeID=1</link><pubDate>Thu, 06 Jul 2023 14:59:21 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:eca45d15-fd63-4d47-af66-aef6d293a68b</guid><dc:creator>tesc</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;First of all I am sorry for the long delay.&lt;/p&gt;
[quote user="Poplar"]1. as you said, the short advertising is sent out on each of the three channels, can we manage the sequence of this sending action?[/quote]
&lt;p&gt;It is possible to use only one or two advertising channels, but the order is decided by the stack. Please note that for each and every advertising event, advertisements are sent on all advertising channels, right after each other.&lt;/p&gt;
[quote user="Poplar"]2. same question on scanning, can we control the sequence of scanned channel?[/quote]
&lt;p&gt;No. Scanning will always happen on all three advertising channels.&lt;/p&gt;
[quote user="Poplar"]3. for the overlap of scanning and advertising, is there a ratio between them, for example, 10ms advertising and 50ms scanning, thus the success ratio can be improved significantly?[/quote]
&lt;p&gt;You want to make sure that scanning and advertising will overlap.&lt;/p&gt;
&lt;p&gt;One way to do that is to have a short advertising interval (for instance 20 ms), a long scan interval (for instance 100 ms), and scan window slightly larger than the advertising interval (for instance 25 ms). With those settings, you can guarantee that for every scan event, there will be at least one overlapping advertising event.&lt;/p&gt;
&lt;p&gt;Another alternative may be to scan at 100 % duty cycle, and advertise seldom. In that case most advertising events will happen at a time when the scanner is active. Please note that in that case, you do risk advertisements to be sent at just the moment when scan is switching channel (once every scan interval.) This uses more power at the scanner and less power at the advertiser.&lt;/p&gt;
&lt;p&gt;Regards,&lt;br /&gt;Terje&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Configuration of advertising channel</title><link>https://devzone.nordicsemi.com/thread/431139?ContentTypeID=1</link><pubDate>Thu, 15 Jun 2023 05:40:50 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:ef893bfe-5384-4ef1-b83b-93960e9b9b37</guid><dc:creator>Poplar</dc:creator><description>&lt;p&gt;Hi Terje&lt;/p&gt;
&lt;p&gt;more questions:&lt;/p&gt;
&lt;p&gt;1. as you said, the short advertising is sent out on each of the three channels, can we manage the sequence of this sending action?&lt;/p&gt;
&lt;p&gt;2. same question on scanning, can we control the sequence of scanned channel?&lt;/p&gt;
&lt;p&gt;3. for the overlap of scanning and advertising, is there a ratio between them, for example, 10ms advertising and 50ms scanning, thus the success ratio can be improved significantly?&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;thanks.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Configuration of advertising channel</title><link>https://devzone.nordicsemi.com/thread/431035?ContentTypeID=1</link><pubDate>Wed, 14 Jun 2023 13:31:25 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:2078aba1-76af-42a6-8b2d-79fcac445af2</guid><dc:creator>tesc</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
[quote user=""]now we meet an issue, because the advertising may select channel 37, 38 and 39 randomly, and receiving is also selecting them randomly, which mean even the scanning window for receiving the advertising message &amp;quot;hit&amp;quot; the advertising, but they are on different channel, so the advertising message is still failed after several times.[/quote]
&lt;p&gt;BLE advertising and scanning is designed to be robust, through the use of three different channels. Every advertising interval, during the advertising event, one short advertising is sent on each of the three channels. Scanning is done in longer intervals, usually much longer, where each scan scans on the same channel and which channel is scanned changes every scan interval. What this means in practice, is that during a scan, if the scanned channel is free of interference, the scanner should pick up the advertising. If you fail repeatedly to receive advertisements, then you either are in an environment with bad radio performance, and/or you can improve scan parameters.&lt;/p&gt;
&lt;p&gt;Values for advertising and scanning should be chosen in such a way that you can guarantee an overlap within a reasonable amount of time. This may involve scanning with 100 % duty cycle, or scan on low duty cycle but with large enough scan windows that two advertising events will fit within one scan window, guaranteeing at least one overlap for each scan event.&lt;/p&gt;
[quote user=""]To save power and increase the success rate of such action, can we configure the software to limit the channel for both advertising and receiving in a fixed one? For example, keep it in channel 37.[/quote]
&lt;p&gt;While this may save some power, depending on the situation, the success rate is not likely to improve since if you are in bad luck and the chosen channel is poor then you will not be saved by the redundancy provided by the other channels.&lt;/p&gt;
&lt;p&gt;From what I understand, advertising can be configured to operate on one or two channels only, but scanning cannot. I do however need to check the details, as I have not found the correct method to do so. Let me know if you have any progress on the matter.&lt;/p&gt;
&lt;p&gt;Regards,&lt;br /&gt;Terje&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>