<?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>BLE Advertisement interval 10ms-20ms</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/107099/ble-advertisement-interval-10ms-20ms</link><description>I am using the nRF Connect SDK broadcaster example on the nRF52840. The default advertisement interval was set to &amp;quot;BT_GAP_ADV_FAST_INT_MIN_2 = 0x00a0&amp;quot; (100ms) to &amp;quot;BT_GAP_ADV_FAST_INT_MAX_2 = 0x00f0&amp;quot; (150ms), resulting in a 100ms interval. I then changed</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Fri, 05 Jan 2024 12:58:48 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/107099/ble-advertisement-interval-10ms-20ms" /><item><title>RE: BLE Advertisement interval 10ms-20ms</title><link>https://devzone.nordicsemi.com/thread/462889?ContentTypeID=1</link><pubDate>Fri, 05 Jan 2024 12:58:48 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:7578176d-0728-4331-ab19-b4b440e4f059</guid><dc:creator>Karl Ylvisaker</dc:creator><description>&lt;p&gt;Hello,&lt;br /&gt;&lt;br /&gt;Thank you for the clarifications.&lt;br /&gt;&lt;br /&gt;Please note that the advertising interval is defined as N*0.625 ms, which in your case places the min and max at 5-10ms, which is lower than the lower boundary for advertising intervals (except for high-duty directed advertising) which is 20 ms.&lt;br /&gt;There will also be added a random delay of 0-10 ms to your advertising interval, to avoid repeated collisions, which you can see in the power profiler trace.&lt;br /&gt;&lt;br /&gt;This slipped my mind earlier, apologies for any confusion this might have caused! :)&amp;nbsp;&lt;br /&gt;&lt;br /&gt;Still it is strange that you did not see any returned error codes, however - perhaps the logging is not set up correctly.&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: BLE Advertisement interval 10ms-20ms</title><link>https://devzone.nordicsemi.com/thread/462661?ContentTypeID=1</link><pubDate>Thu, 04 Jan 2024 11:46:26 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:000e47ea-399f-4bfd-ab35-ab52dcb01afc</guid><dc:creator>hari</dc:creator><description>&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;CONFIG_GPIO=y
CONFIG_BT=y
CONFIG_BT_BROADCASTER=y
CONFIG_BT_HCI_VS_EXT=y
CONFIG_BT_HCI=y
CONFIG_SERIAL=y&lt;/pre&gt;&lt;/p&gt;
[quote userid="87869" url="~/f/nordic-q-a/107099/ble-advertisement-interval-10ms-20ms/462624"]Was this the only change you made to the project?[/quote]
&lt;p&gt;Yes! this is my pro.conf&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
[quote userid="87869" url="~/f/nordic-q-a/107099/ble-advertisement-interval-10ms-20ms/462624"]What was the returned error code from the&amp;nbsp;bt_le_adv_start call to start advertising?[/quote]
&lt;p&gt;&lt;span&gt;Currently, no error code is being returned. Additionally, I am unable to observe any advertisement packets on the NRF52840 dongle Bluetooth sniffer.&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;pre class="ui-code" data-mode="text"&gt;#define BT_GAP_ADV_FAST_INT_MIN_1_10ms 0x0008
#define BT_GAP_ADV_FAST_INT_MIN_1_20ms 0x0016


#define BT_LE_ADV_NCONN_30 BT_LE_ADV_PARAM(BT_LE_ADV_OPT_USE_IDENTITY, BT_GAP_ADV_FAST_INT_MIN_1_10ms, \
                                           BT_GAP_ADV_FAST_INT_MIN_1_20ms, NULL)

void my_func(void)
{
   int err;

   err = bt_enable(NULL);

   if (err)
   {
     printk(&amp;quot;Bluetooth init failed (err %d)\n&amp;quot;, err);
     return;
   }
   err = bt_le_adv_start(BT_LE_ADV_NCONN_30, ad, ARRAY_SIZE(ad),
                              NULL, 0);
   if (err)
   {
     printk(&amp;quot; Advertisement failed (err %d)\n&amp;quot;, err);
     return;
   }
   k_sleep(K_MSEC(100)); 

   err = bt_le_adv_stop();
   if (err)
   {
     printk(&amp;quot;Advertising failed to stop (err %d)\n&amp;quot;, err);
     return;
   }

   err = bt_disable();
   if (err)
   {
     printk(&amp;quot;Bluetooth disable failed (err %d)\n&amp;quot;, err);
     return;
   }  
}



int main(void)
{
  /*other logics*/
  while (1)
  {
    my_func();
    k_sleep(K_MSEC(2000));
  }
	return 0;
}&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;&lt;br /&gt;&lt;span&gt;1.This is my observation from the power profiler, and I have attached an image from the power profiler for your reference.&lt;/span&gt;&lt;br /&gt;which is&amp;nbsp;&lt;br /&gt;&lt;br /&gt;&lt;img style="max-height:119px;max-width:323px;" alt=" " height="119" src="https://devzone.nordicsemi.com/resized-image/__size/646x238/__key/communityserver-discussions-components-files/4/WhatsApp-Image-2024_2D00_01_2D00_04-at-4.57.16-PM.jpeg_2D00_640x480.jpg" width="323" /&gt;&lt;/p&gt;
[quote userid="124389" url="~/f/nordic-q-a/107099/ble-advertisement-interval-10ms-20ms"]&amp;quot;BT_GAP_ADV_FAST_INT_MIN_1 = 0x0030&amp;quot; and &amp;quot;BT_GAP_ADV_FAST_INT_MAX_1 = 0x0060,&amp;quot;[/quote]
&lt;p&gt;&lt;br /&gt;2.After changing this value i get this&amp;nbsp;&lt;/p&gt;
[quote userid="124389" url="~/f/nordic-q-a/107099/ble-advertisement-interval-10ms-20ms"]&amp;quot;BT_GAP_ADV_FAST_INT_MIN_1_10ms = 0x0008&amp;quot; and &amp;quot;BT_GAP_ADV_FAST_INT_MIN_1_20ms = 0x0016,&amp;quot;[/quote]
&lt;p&gt;&lt;img alt=" " height="137" src="https://devzone.nordicsemi.com/resized-image/__size/642x274/__key/communityserver-discussions-components-files/4/WhatsApp-Image-2024_2D00_01_2D00_04-at-4.46.06-PM.jpeg_2D00_640x480.jpg" width="321" /&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: BLE Advertisement interval 10ms-20ms</title><link>https://devzone.nordicsemi.com/thread/462624?ContentTypeID=1</link><pubDate>Thu, 04 Jan 2024 08:23:29 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:21eda9ba-fd69-4ca2-8e85-92adadb35d5a</guid><dc:creator>Karl Ylvisaker</dc:creator><description>&lt;p&gt;Hello,&lt;/p&gt;
[quote user=""]Now, I want to set the advertisement interval to 10ms-20ms. I attempted to use custom definitions such as &amp;quot;BT_GAP_ADV_FAST_INT_MIN_1_10ms = 0x0008&amp;quot; and &amp;quot;BT_GAP_ADV_FAST_INT_MIN_1_20ms = 0x0016,&amp;quot; but it did not work; there was no advertisement occurring.[/quote]
&lt;p&gt;Was this the only change you made to the project?&lt;br /&gt;&lt;br /&gt;What was the returned error code from the&amp;nbsp;bt_le_adv_start call to start advertising?&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>