<?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>beacon advertise interval</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/63486/beacon-advertise-interval</link><description>hello Nordic 
 
 i am working with nrf52832, sdk 6.0, softdevice s132 v7.0 
 
 i read around the forum that i can advertise a beacon packet every 20 ms 
 but in the ble_app_beacon example the interval for the advertisement is written to be minimum 100ms</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Thu, 03 Sep 2020 08:31:30 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/63486/beacon-advertise-interval" /><item><title>RE: beacon advertise interval</title><link>https://devzone.nordicsemi.com/thread/267769?ContentTypeID=1</link><pubDate>Thu, 03 Sep 2020 08:31:30 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:41eac3ab-cc2d-4488-890c-02d0915551f5</guid><dc:creator>Karl Ylvisaker</dc:creator><description>&lt;p&gt;Hello Ziv,&lt;/p&gt;
[quote user="ziv123"]i passed &amp;#39;&amp;nbsp;&lt;em&gt;NRF_RADIO_PRIORITY_NORMAL&lt;/em&gt;&lt;span&gt;&amp;nbsp;&amp;#39;&amp;nbsp;&lt;/span&gt;[/quote][quote user="ziv123"]and it fails[/quote]
&lt;p&gt;I will need to know which error is generated when a function fail, to be able to help you find the root cause. However, it here seems that you were able to resolve the issue yourself, great!&lt;/p&gt;
&lt;p&gt;[quote user="ziv123"][/quote]&lt;/p&gt;
&lt;p&gt;not sure if it works better or how much is a safe distance for a 31 bytes beacon (for now i set it to&amp;nbsp;NRF_RADIO_NOTIFICATION_DISTANCE_3620US )&amp;nbsp;&lt;/p&gt;
&lt;p&gt;i still only encode the new advdata and nothing else within the handler .. seems ok, hope no surprises later.&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;As long as you keep the event handler short ( such as&amp;nbsp;&lt;em&gt;just&lt;/em&gt; updating the advdata structure ) you should be fine - 3.6 ms is a long time.&lt;br /&gt;However, you should make sure that this update is not postponed due to some other high-priority ( application layer, non-SoftDevice ) event is being generated and processed in the meantime.&lt;/p&gt;
[quote user="ziv123"]so a lot of thanks on this long long thread for now[/quote]
&lt;p&gt;It is not problem at all, Ziv. I am happy to help!&lt;/p&gt;
[quote user="ziv123"]my fault, though i guess i am always worried that new threads takes longer time to get replied&amp;nbsp;[/quote]
&lt;p&gt;We do not prioritize new tickets over old tickets, no worries. To receive better help faster, it is key to provide all the necessary information immediately, so we quickly get up to speed on the issue and conditions you are facing.&lt;/p&gt;
[quote user="ziv123"]we can close this thread i think.. for more questions on this matter or other i will open a new one&amp;nbsp;[/quote]
&lt;p&gt;Great! Please do not hesitate to open a new ticket in the future if you should encounter any other issues or questions.&lt;br /&gt;To keep the forums tidy and easy to navigate, it is best to open a new ticket as soon as the questions diverge from the initial ticket.&lt;br /&gt;&lt;br /&gt;Good luck with your development, Ziv!&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: beacon advertise interval</title><link>https://devzone.nordicsemi.com/thread/267687?ContentTypeID=1</link><pubDate>Wed, 02 Sep 2020 16:28:46 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:ac3f1f20-e100-4c07-98fb-80e77956d42d</guid><dc:creator>ziv123</dc:creator><description>&lt;p&gt;hi Karl&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;i managed.. i copied the APP_IRQ_PRIORITY_LOW from the example and now it works.&lt;/p&gt;
&lt;p&gt;not sure if it works better or how much is a safe distance for a 31 bytes beacon (for now i set it to&amp;nbsp;NRF_RADIO_NOTIFICATION_DISTANCE_3620US )&amp;nbsp;&lt;/p&gt;
&lt;p&gt;i still only encode the new advdata and nothing else within the handler .. seems ok, hope no surprises later.&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;so a lot of thanks on this long long thread for now, my fault, though i guess i am always worried that new threads takes longer time to get replied&amp;nbsp;&lt;/p&gt;
&lt;p&gt;we can close this thread i think.. for more questions on this matter or other i will open a new one&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;best regards&lt;/p&gt;
&lt;p&gt;Ziv&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: beacon advertise interval</title><link>https://devzone.nordicsemi.com/thread/267674?ContentTypeID=1</link><pubDate>Wed, 02 Sep 2020 14:47:44 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:2799e905-a20e-4ae7-a982-240ceba0adc8</guid><dc:creator>ziv123</dc:creator><description>[quote userid="87869" url="~/f/nordic-q-a/63486/beacon-advertise-interval/267661"]Which arguments did you pass the failing function?[/quote]
&lt;p&gt;i passed &amp;#39;&amp;nbsp;&lt;em&gt;NRF_RADIO_PRIORITY_NORMAL&lt;/em&gt;&lt;span&gt;&amp;nbsp;&amp;#39;&amp;nbsp;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&lt;pre class="ui-code" data-mode="text"&gt;err_code = ble_radio_notification_init(NRF_RADIO_PRIORITY_NORMAL, NRF_RADIO_NOTIFICATION_DISTANCE_5500US 	
, data_update_timer_handler);&lt;/pre&gt;and it fails&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: beacon advertise interval</title><link>https://devzone.nordicsemi.com/thread/267661?ContentTypeID=1</link><pubDate>Wed, 02 Sep 2020 14:11:56 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:cd5cf38a-c198-4c49-ad2f-f1b3625ba545</guid><dc:creator>Karl Ylvisaker</dc:creator><description>&lt;p&gt;Hello again Ziv,&lt;/p&gt;
[quote user="ziv123"]it falls on the priority .. i don&amp;#39;t really know from where to take the priority .. it falls here:[/quote]
&lt;p&gt;What error is generated? Which arguments did you pass the failing function?&lt;br /&gt;I will need more information to help you.&lt;/p&gt;
[quote user="ziv123"]also, not sure what is the distance (second parameter for the function) units,[/quote][quote user="ziv123"]if it set to 0, can it cause some problems since i change the data transferred in the advertised packet ?[/quote]
&lt;p&gt;Please use&amp;nbsp;&lt;a href="https://infocenter.nordicsemi.com/index.jsp?topic=%2Fcom.nordic.infocenter.s140.api.v7.0.1%2Fgroup___n_r_f___s_o_c___e_n_u_m_s.html&amp;amp;anchor=ga59b1a77ef6dcb1d75833e5c5f5251d58"&gt;the defined enumerations&lt;/a&gt;. You may not configure the Radio Notification to be generated 0 us before the next Radio Event, as that would be at the start of the Radio Event itself.&lt;/p&gt;
[quote user="ziv123"]also, does it means the time from an advertise start till the handler is called?&amp;nbsp;[/quote]
&lt;p&gt;That depends, you can be notified either / both&amp;nbsp;&lt;em&gt;before&lt;/em&gt; the next Radio Event, or after. Please see &lt;a href="https://infocenter.nordicsemi.com/topic/sds_s140/SDS/s1xx/radio_notif/radio_notif.html"&gt;the Radio Notification feature documentation&lt;/a&gt;, an exempt reads:&lt;/p&gt;
&lt;p style="padding-left:30px;"&gt;&lt;em&gt;If it is enabled, the ACTIVE signal is sent before the Radio Event starts. Similarly, if the nACTIVE signal is enabled, it is sent at the end of the Radio Event. These signals can be used by the application developer to synchronize the application logic with the radio activity. For example, the ACTIVE signal can be used to switch off external devices to manage peak current drawn during periods when the radio is ON, or to trigger sensor data collection for transmission during the upcoming Radio Event.&lt;/em&gt;&lt;/p&gt;
&lt;p&gt;Best regards,&lt;br /&gt;Karl&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: beacon advertise interval</title><link>https://devzone.nordicsemi.com/thread/267626?ContentTypeID=1</link><pubDate>Wed, 02 Sep 2020 12:42:45 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:76ba0baa-5476-40cb-b4ae-d7cd67a43152</guid><dc:creator>ziv123</dc:creator><description>&lt;p&gt;hi Karl&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;it falls on the priority .. i don&amp;#39;t really know from where to take the priority .. it falls here:&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;__STATIC_INLINE uint32_t __sd_nvic_is_app_accessible_priority(uint32_t priority)
{
  if( (priority &amp;gt;= (1 &amp;lt;&amp;lt; __NVIC_PRIO_BITS))
   || (((1 &amp;lt;&amp;lt; priority) &amp;amp; __NRF_NVIC_APP_IRQ_PRIOS) == 0)
    )
  {
    return 0;
  }
  return 1;
}&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;also, not sure what is the distance (second parameter for the function) units,&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&amp;quot;&lt;span&gt;The time from an Active event until the radio is activated.&amp;quot; time in sec / ms / micro sec / nano sec ?&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;also, does it means the time from an advertise start till the handler is called?&amp;nbsp;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;if it set to 0, can it cause some problems since i change the data transferred in the advertised packet ?&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;best regards&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Ziv&amp;nbsp;&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: beacon advertise interval</title><link>https://devzone.nordicsemi.com/thread/267603?ContentTypeID=1</link><pubDate>Wed, 02 Sep 2020 11:03:27 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:4789baaf-0ae4-4a4a-8241-17c5fdfcfd22</guid><dc:creator>Karl Ylvisaker</dc:creator><description>&lt;p&gt;Hello Ziv,&lt;br /&gt;&lt;br /&gt;This is not the library that was referenced in the ticket I linked.&lt;br /&gt;The correct reference is &lt;a href="https://infocenter.nordicsemi.com/topic/sdk_nrf5_v16.0.0/group__ble__radio__notification.html"&gt;this one&lt;/a&gt;.&lt;br /&gt;&lt;br /&gt;The &lt;a href="https://infocenter.nordicsemi.com/topic/sds_s140/SDS/s1xx/radio_notif/radio_notification.html"&gt;Radio Notification feature&lt;/a&gt; is written about in the SoftDevice documentation.&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: beacon advertise interval</title><link>https://devzone.nordicsemi.com/thread/267586?ContentTypeID=1</link><pubDate>Wed, 02 Sep 2020 10:08:53 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:093dc982-f55d-4161-aeeb-0bd76a41e787</guid><dc:creator>ziv123</dc:creator><description>&lt;p&gt;hi Karl&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;the radio library you are talking about, i could not find it in the sdk 16.0, the branch is empty&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;img src="https://devzone.nordicsemi.com/resized-image/__size/320x240/__key/communityserver-discussions-components-files/4/pastedimage1599041302688v1.png" alt=" " /&gt;&lt;/p&gt;
&lt;p&gt;am i missing something ?&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;best regards&lt;/p&gt;
&lt;p&gt;Ziv&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: beacon advertise interval</title><link>https://devzone.nordicsemi.com/thread/267247?ContentTypeID=1</link><pubDate>Mon, 31 Aug 2020 12:48:25 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:7b7684ce-83c7-4026-95ff-64bd15e4b6ee</guid><dc:creator>Karl Ylvisaker</dc:creator><description>&lt;p&gt;Hello Ziv,&lt;/p&gt;
[quote user="ziv123"]i guess i am doing something wrong cause the ble_advertising_init(..) falls in here:[/quote]
&lt;p&gt;Just in case I will mention that you are calling the init with no advertising data, please see the &lt;a href="https://infocenter.nordicsemi.com/index.jsp?topic=%2Fcom.nordic.infocenter.s140.api.v7.0.1%2Fgroup___b_l_e___g_a_p___f_u_n_c_t_i_o_n_s.html&amp;amp;anchor=ga9969047f4e7485c3f856c841978cc31a"&gt;sd_ble_gap_adv_set_configure&lt;/a&gt;&amp;nbsp;API Reference.&lt;/p&gt;
[quote user="ziv123"]the ret = 7, error, i can not find what goes in the sd_ble_gap_adv_set_configure(..)&amp;nbsp;[/quote]
&lt;p&gt;Have you defined DEBUG in your preprocessor defines?&lt;br /&gt;In that case, please use APP_ERROR_CHECK instead of VERIFY_SUCCESS - verify_success only check whether the passed argument is NRF_SUCCESS and if not it only returns the error code. APP_ERROR_CHECK calls the error event handler in the case that the error code is not NRF_SUCCESS. In the default case, we will then know what caused the error by looking in the log.&lt;br /&gt;You can define DEBUG in Segger Embedded Studios as shown in the included picture:&lt;br /&gt;&lt;img alt=" " src="https://devzone.nordicsemi.com/resized-image/__size/320x240/__key/support-attachments/beef5d1b77644c448dabff31668f3a47-4b0b6a0c19444ebfaa3d1cdc1d16bcb1/enabling_5F00_debug_5F00_SES.PNG" /&gt;&lt;/p&gt;
&lt;p&gt;[quote user="ziv123"][/quote]&lt;/p&gt;
&lt;p&gt;static void advertising_init(void)&amp;nbsp;&lt;/p&gt;
&lt;p&gt;and inside it call the ble_advertising_init(..) cause it seems there is and advdata initialization with in it&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;I do not understand what you mean by this. ble_advertising_init is the init function for the Advertising Module. The general&amp;nbsp;&lt;em&gt;advertising_init&lt;/em&gt; function is doing more than just calling ble_advertising_init.&lt;/p&gt;
[quote user="ziv123"]hope you can tell me what i am doing wrong ???[/quote]
&lt;p&gt;Please call APP_ERROR_CHECK, with DEBUG defined, on the error code, so we may know which error is generated, and where it is generated.&lt;br /&gt;This will make debugging much easier. I suspect that you are providing an invalid argument to a function, or similar - this will easily be seen with the DEBUG define and APP_ERROR_CHECK.&lt;br /&gt;Furthermore, you should really always call APP_ERROR_CHECK on your functions that may return non-successfully, to ensure that you are made aware of their failing - and that you may handle it accordingly.&lt;/p&gt;
[quote user="ziv123"]another question on this matter, once we solve this, is there a way to update/change the advdata every time there is an advertise? meaning ,if advertising interval is 30ms, then after every transmit the advdata will change according to some handler without using a timer to call the advdata_update function ?[/quote]
&lt;p&gt;Yes, this is possible, as we have spoken about earlier. You will have to do this using Radio Notifications. &lt;a href="https://devzone.nordicsemi.com/f/nordic-q-a/17041/changing-advertisement-data-in-every-packet"&gt;Please see this ticket for further information&lt;/a&gt;.&lt;br /&gt;However, I must again mention that it is not guaranteed that advertisements are received by the other devices, so by transmitting data using advertisements you&amp;nbsp;&lt;em&gt;must&lt;/em&gt; anticipate some packet loss. There is also no retransmission on advertisements, so this might mean that your advertisement never is hear, and the data is lost - without any feedback.&lt;br /&gt;Based on your previous comments I am inclined to think that packet loss might be an issue in your project, and you might therefore want to send the advertisements multiple times, to increase the chance that they are received successfully.&lt;/p&gt;
&lt;p&gt;[quote user="ziv123"][/quote]&lt;/p&gt;
&lt;p&gt;without stopping and starting the advertising, then it seems to be working and changing.. i am not sure if it is a risky and unstable way and ii cant realy use the nrf app for testing it with advertising interval less then 500ms&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;what do you think of that ?&lt;/p&gt;
&lt;p&gt;&lt;br /&gt;&lt;br /&gt;If you would like to monitor the BLE Traffic ( advertisements ) more closely, I highly recommend using the &lt;a href="https://www.nordicsemi.com/Software-and-tools/Development-Tools/nRF-Sniffer-for-Bluetooth-LE"&gt;nRF Sniffer tool&lt;/a&gt;. It lets you see all advertisements and BLE communication that the Sniffer is able to intercept. It is a very powerful tool when developing with BLE.&lt;br /&gt;&lt;br /&gt;I am not sure that I understand you setup here. Do you mean that you have a timer that calls the _encode periodically?&lt;br /&gt;Have you abandoned the idea of using the _advdata_update function?&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: beacon advertise interval</title><link>https://devzone.nordicsemi.com/thread/267086?ContentTypeID=1</link><pubDate>Sun, 30 Aug 2020 08:48:44 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:a044ac70-9537-4949-9673-d195bcc0c274</guid><dc:creator>ziv123</dc:creator><description>&lt;p&gt;it strange but when using the regular advertising_init() without using the ble_advertising_init(), and setting the timer to change only the ble_advdata_encode() like this:&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;advdata_1.p_manuf_specific_data = &amp;amp;manuf_specific_data;
//    err_code = sd_ble_gap_adv_stop(m_adv_handle);
//    APP_ERROR_CHECK(err_code);
    err_code = ble_advdata_encode(&amp;amp;advdata_1, m_adv_data.adv_data.p_data, &amp;amp;m_adv_data.adv_data.len);
    app_uart_put(err_code);
    APP_ERROR_CHECK(err_code);&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;without stopping and starting the advertising, then it seems to be working and changing.. i am not sure if it is a risky and unstable way and ii cant realy use the nrf app for testing it with advertising interval less then 500ms&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;what do you think of that ?&lt;/p&gt;
&lt;p&gt;and also would appreciate answering the other 2 reply&amp;#39;s :)&amp;nbsp;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;best regards&lt;/p&gt;
&lt;p&gt;Ziv&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: beacon advertise interval</title><link>https://devzone.nordicsemi.com/thread/267074?ContentTypeID=1</link><pubDate>Sat, 29 Aug 2020 19:17:22 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:8d90543a-4b5a-4078-b05d-c5af9d4a50f3</guid><dc:creator>ziv123</dc:creator><description>&lt;p&gt;hi Karl&lt;/p&gt;
&lt;p&gt;another question on this matter, once we solve this, is there a way to update/change the advdata every time there is an advertise? meaning ,if advertising interval is 30ms, then after every transmit the advdata will change according to some handler without using a timer to call the advdata_update function ?&lt;/p&gt;
&lt;p&gt;&amp;nbsp;best regards&lt;/p&gt;
&lt;p&gt;Ziv&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: beacon advertise interval</title><link>https://devzone.nordicsemi.com/thread/267050?ContentTypeID=1</link><pubDate>Fri, 28 Aug 2020 22:47:49 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:f37ad483-4415-4ca8-8891-b447e69156a6</guid><dc:creator>ziv123</dc:creator><description>&lt;p&gt;hi Karl&lt;/p&gt;
&lt;p&gt;i guess i am doing something wrong cause the ble_advertising_init(..) falls in here:&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt; ret = sd_ble_gap_adv_set_configure(&amp;amp;p_advertising-&amp;gt;adv_handle, NULL, &amp;amp;p_advertising-&amp;gt;adv_params);
    VERIFY_SUCCESS(ret);
&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;the ret = 7, error, i can not find what goes in the sd_ble_gap_adv_set_configure(..)&amp;nbsp;&lt;/p&gt;
&lt;p&gt;also, it is not clear to me if i need to also use the&amp;nbsp;&lt;/p&gt;
&lt;p&gt;static void advertising_init(void)&amp;nbsp;&lt;/p&gt;
&lt;p&gt;and inside it call the ble_advertising_init(..) cause it seems there is and advdata initialization with in it&lt;/p&gt;
&lt;p&gt;anyway .. this is what i have tried&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;static void advertising_init(void)
{
    uint32_t      err_code;
    //ble_advdata_t advdata;
    uint8_t       flags = BLE_GAP_ADV_FLAG_BR_EDR_NOT_SUPPORTED;

    //ble_adv_modes_config_t ble_adv_mode = true;
    //ble_advdata_manuf_data_t manuf_specific_data;
    ble_adv_init.config.ble_adv_fast_enabled = true;

    ble_adv_init.advdata.flags = flags;
    ble_adv_init.advdata.name_type = BLE_ADVDATA_NO_NAME;
    ble_adv_init.advdata.p_manuf_specific_data = &amp;amp;manuf_specific_data;

    //ble_adv_init.srdata = NULL;
    ble_adv_init.error_handler = NULL;
    ble_adv_init.evt_handler = NULL;

    ble_advertising_init(&amp;amp;ble_adv, &amp;amp;ble_adv_init);
    manuf_specific_data.company_identifier = APP_COMPANY_IDENTIFIER;

#if defined(USE_UICR_FOR_MAJ_MIN_VALUES)
    // If USE_UICR_FOR_MAJ_MIN_VALUES is defined, the major and minor values will be read from the
    // UICR instead of using the default values. The major and minor values obtained from the UICR
    // are encoded into advertising data in big endian order (MSB First).
    // To set the UICR used by this example to a desired value, write to the address 0x10001080
    // using the nrfjprog tool. The command to be used is as follows.
    // nrfjprog --snr &amp;lt;Segger-chip-Serial-Number&amp;gt; --memwr 0x10001080 --val &amp;lt;your major/minor value&amp;gt;
    // For example, for a major value and minor value of 0xabcd and 0x0102 respectively, the
    // the following command should be used.
    // nrfjprog --snr &amp;lt;Segger-chip-Serial-Number&amp;gt; --memwr 0x10001080 --val 0xabcd0102
    uint16_t major_value = ((*(uint32_t *)UICR_ADDRESS) &amp;amp; 0xFFFF0000) &amp;gt;&amp;gt; 16;
    uint16_t minor_value = ((*(uint32_t *)UICR_ADDRESS) &amp;amp; 0x0000FFFF);

    uint8_t index = MAJ_VAL_OFFSET_IN_BEACON_INFO;

    m_beacon_info[index++] = MSB_16(major_value);
    m_beacon_info[index++] = LSB_16(major_value);

    m_beacon_info[index++] = MSB_16(minor_value);
    m_beacon_info[index++] = LSB_16(minor_value);
#endif

///ziv addition:
  //  static uint8_t i = 4;
  //  if( i &amp;gt;= SET_VALUES_ARRAY )
  //  {
  //      i = 0;
  //  }
   // uint8_t idx = i++;
   m_beacon_info[12] = spin_angle[3];
   m_beacon_info[13] = (spin_direction[3] | speed[3]);

// ziv addition end  

    manuf_specific_data.data.p_data = (uint8_t *) m_beacon_info;
    manuf_specific_data.data.size   = APP_BEACON_INFO_LENGTH;

    // Build and set advertising data.
    memset(&amp;amp;advdata_1, 0, sizeof(advdata_1));
    memset(&amp;amp;advdata_2, 0, sizeof(advdata_2));

    advdata_1.name_type        = BLE_ADVDATA_NO_NAME;//BLE_ADVDATA_SHORT_NAME;//BLE_ADVDATA_NO_NAME;
    advdata_2.name_type        = BLE_ADVDATA_NO_NAME;
    advdata_1.flags            = flags;
    advdata_2.flags            = flags;
    advdata_1.p_manuf_specific_data = &amp;amp;manuf_specific_data;
    advdata_2.p_manuf_specific_data = &amp;amp;manuf_specific_data;

    // Initialize advertising parameters (used when starting advertising).
    memset(&amp;amp;m_adv_params, 0, sizeof(m_adv_params));

    m_adv_params.properties.type = BLE_GAP_ADV_TYPE_NONCONNECTABLE_NONSCANNABLE_UNDIRECTED;
    m_adv_params.p_peer_addr     = NULL;    // Undirected advertisement.
    m_adv_params.filter_policy   = BLE_GAP_ADV_FP_ANY;
    m_adv_params.interval        = NON_CONNECTABLE_ADV_INTERVAL;
    m_adv_params.duration        = 0;       // Never time out.

    err_code = ble_advdata_encode(&amp;amp;advdata_1, m_adv_data.adv_data.p_data, &amp;amp;m_adv_data.adv_data.len);
    APP_ERROR_CHECK(err_code);
    err_code = ble_advdata_encode(&amp;amp;advdata_2, m_adv_data.adv_data.p_data, &amp;amp;m_adv_data.adv_data.len);
    APP_ERROR_CHECK(err_code);

    err_code = sd_ble_gap_adv_set_configure(&amp;amp;m_adv_handle, &amp;amp;m_adv_data, &amp;amp;m_adv_params);
    APP_ERROR_CHECK(err_code);
}
&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;hope you can tell me what i am doing wrong ???&lt;/p&gt;
&lt;p&gt;best regards&lt;/p&gt;
&lt;p&gt;Ziv&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: beacon advertise interval</title><link>https://devzone.nordicsemi.com/thread/266928?ContentTypeID=1</link><pubDate>Fri, 28 Aug 2020 09:27:09 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:c26eb3ab-b310-4575-813c-2d39426ea688</guid><dc:creator>Karl Ylvisaker</dc:creator><description>&lt;p&gt;Hello Ziv,&lt;/p&gt;
&lt;p&gt;[quote user="ziv123"][/quote]&lt;/p&gt;
&lt;p&gt;ble_advertising_init(&amp;amp;ble_adv, ???);&lt;/p&gt;
&lt;p&gt;may be you can help me understand the datasheet better ?&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;The &lt;a href="https://infocenter.nordicsemi.com/index.jsp?topic=%2Fsdk_nrf5_v16.0.0%2Fgroup__ble__advertising.html&amp;amp;anchor=gabbdf62a76d64fc8d5e5b0d183d3c0fa7"&gt;ble_advertising_init API Reference&lt;/a&gt;&amp;nbsp;details what the second parameter must be, for the call to be successful. In essence, the second parameter is a &lt;a href="https://infocenter.nordicsemi.com/topic/sdk_nrf5_v16.0.0/structble__advertising__init__t.html"&gt;ble_advertising_init_t&lt;/a&gt; struct, which contains all the information the module needs to start advertising, including config, event- and error-handler.&lt;br /&gt;&lt;br /&gt;Please let me know if there is anything in particular which is unclear in the documentation so I may explain.&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: beacon advertise interval</title><link>https://devzone.nordicsemi.com/thread/266918?ContentTypeID=1</link><pubDate>Fri, 28 Aug 2020 09:05:55 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:ec98764e-1fe1-4021-a4f8-199c5d5d8c0f</guid><dc:creator>ziv123</dc:creator><description>&lt;p&gt;hi Karl&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;well it returns an error from here:&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;if (p_advertising-&amp;gt;initialized == false)
    {
        return NRF_ERROR_INVALID_STATE;
    }&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;and indeed i did not initialize the :&lt;/p&gt;
&lt;p&gt;ble_advertising_t ble_adv;&lt;/p&gt;
&lt;p&gt;i asked about it before and then i didn&amp;#39;t do it eventually.. but now after going over the links you sent, i am not sure what values should be in the second parameter of the init function:&lt;/p&gt;
&lt;p&gt;ble_advertising_init(&amp;amp;ble_adv, ???);&lt;/p&gt;
&lt;p&gt;may be you can help me understand the datasheet better ?&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;best regards&lt;/p&gt;
&lt;p&gt;Ziv&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: beacon advertise interval</title><link>https://devzone.nordicsemi.com/thread/266891?ContentTypeID=1</link><pubDate>Fri, 28 Aug 2020 08:06:18 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:4465ed11-ce74-4028-91dd-ad52685a4dab</guid><dc:creator>Karl Ylvisaker</dc:creator><description>&lt;p&gt;Hello Ziv,&lt;br /&gt;&lt;br /&gt;Could you do an error check on the return value of the ble_advertising_advdata_update call?&lt;br /&gt;When you do not check the error code, you will not be made aware if the function fails - you should always check the returned error code.&lt;br /&gt;When checking the return value, are you getting any errors?&lt;br /&gt;Remember to define DEBUG in your preprocessor defines, to see the error output message in the log.&lt;br /&gt;&lt;br /&gt;Also, by calling ble_advdata_encode twice with the same destination you will override the data placed there by the first function upon return of the second function call.&lt;br /&gt;I would ask you to try this again, but this time - for simplicity - really differentiate the two buffers you are keeping. I.e separate them by name, to make things easier. Ideally, have zero overlap between the two namespaces and usage.&lt;/p&gt;
[quote user="ziv123"]it will be best if we would find out why this is not working but i wonder if it&amp;nbsp;will&amp;nbsp;not be easier to just download sdk 17, maybe there is such an example working in that sdk, of updating message data while advertising ?[/quote]
&lt;p&gt;There is unfortunately not such an example in the SDK 17, but using the _advdata_update function will be straight forward there - no need to keep two buffers.&lt;br /&gt;In essence, you can then just call the function with the updated advertising data, and have the new data begin advertising.&lt;br /&gt;You could modify the beacon example in SDK 17 to do this, to see for yourself how it is to use.&lt;/p&gt;
[quote user="ziv123"]though i would prefer staying with sdk 16 for now and solv it but i am late on this project and pulled to other projects every few days so .. hopefuly you can help me with that[/quote]
&lt;p&gt;I too hope that my above suggestions helps resolve this issue.&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: beacon advertise interval</title><link>https://devzone.nordicsemi.com/thread/266773?ContentTypeID=1</link><pubDate>Thu, 27 Aug 2020 13:49:33 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:48c9ec4b-b8fd-4229-8b07-29b326edc46e</guid><dc:creator>ziv123</dc:creator><description>&lt;p&gt;hi Karl&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;it did not solve (unless i did something wrong.. here is my code for init advertising with setting the 2 instances:&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;    // Build and set advertising data.
    memset(&amp;amp;advdata[0], 0, sizeof(advdata[0]));
    memset(&amp;amp;advdata[1], 0, sizeof(advdata[1]));

    advdata[0].name_type        = BLE_ADVDATA_NO_NAME;//BLE_ADVDATA_SHORT_NAME;//BLE_ADVDATA_NO_NAME;
    advdata[1].name_type        = BLE_ADVDATA_NO_NAME;
    advdata[0].flags            = flags;
    advdata[1].flags            = flags;
    advdata[0].p_manuf_specific_data = &amp;amp;manuf_specific_data;
    advdata[1].p_manuf_specific_data = &amp;amp;manuf_specific_data;

    // Initialize advertising parameters (used when starting advertising).
    memset(&amp;amp;m_adv_params, 0, sizeof(m_adv_params));

    m_adv_params.properties.type = BLE_GAP_ADV_TYPE_NONCONNECTABLE_NONSCANNABLE_UNDIRECTED;
    m_adv_params.p_peer_addr     = NULL;    // Undirected advertisement.
    m_adv_params.filter_policy   = BLE_GAP_ADV_FP_ANY;
    m_adv_params.interval        = NON_CONNECTABLE_ADV_INTERVAL;
    m_adv_params.duration        = 0;       // Never time out.

    err_code = ble_advdata_encode(&amp;amp;advdata[0], m_adv_data.adv_data.p_data, &amp;amp;m_adv_data.adv_data.len);
    APP_ERROR_CHECK(err_code);
    err_code = ble_advdata_encode(&amp;amp;advdata[1], m_adv_data.adv_data.p_data, &amp;amp;m_adv_data.adv_data.len);
    APP_ERROR_CHECK(err_code);

    err_code = sd_ble_gap_adv_set_configure(&amp;amp;m_adv_handle, &amp;amp;m_adv_data, &amp;amp;m_adv_params);
    APP_ERROR_CHECK(err_code);
}&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;and here is the code for the timer handler:&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;static void data_update_timer_handler(void* p_context)
{
    ret_code_t err_code;
//    err_code = sd_ble_gap_adv_stop(m_adv_handle);
//    APP_ERROR_CHECK(err_code);

    static uint8_t i = 0;
    if( i &amp;gt;= SET_VALUES_ARRAY )
    {
        i = 0;
    }
    uint8_t idx = i++;
    m_beacon_info[12] = spin_angle[idx];
    m_beacon_info[13] = (spin_direction[idx] | speed[idx]);
    NRF_LOG_INFO(&amp;quot;%d&amp;quot;,m_beacon_info[12]);

    manuf_specific_data.data.p_data = (uint8_t *) m_beacon_info;
    manuf_specific_data.data.size   = APP_BEACON_INFO_LENGTH;

    if(0 == advdata_idx ) advdata_idx = 1;
    else if( 1 == advdata_idx) advdata_idx = 0;

    advdata[advdata_idx].p_manuf_specific_data = &amp;amp;manuf_specific_data;
    
    ble_advertising_advdata_update(&amp;amp;ble_adv ,&amp;amp;advdata[advdata_idx], NULL /*&amp;amp;advdata[advdata_next_idx]*/);
    //advdata_idx = advdata_next_idx;

//    sd_ble_gap_adv_stop(m_adv_handle);
//    err_code = ble_advdata_encode(&amp;amp;advdata[advdata_idx], m_adv_data.adv_data.p_data, &amp;amp;m_adv_data.adv_data.len);
//    APP_ERROR_CHECK(err_code);
//    err_code = sd_ble_gap_adv_set_configure(&amp;amp;m_adv_handle, &amp;amp;m_adv_data, &amp;amp;m_adv_params);
//    APP_ERROR_CHECK(err_code);
//    err_code = sd_ble_gap_adv_start(m_adv_handle, APP_BLE_CONN_CFG_TAG);
//    APP_ERROR_CHECK(err_code);
//    advdata_idx = advdata_next_idx;
}&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;it will be best if we would find out why this is not working but i wonder if it&amp;nbsp;will&amp;nbsp;not be easier to just download sdk 17, maybe there is such an example working in that sdk, of updating message data while advertising ?&lt;/p&gt;
&lt;p&gt;though i would prefer staying with sdk 16 for now and solv it but i am late on this project and pulled to other projects every few days so .. hopefuly you can help me with that&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;best regards&lt;/p&gt;
&lt;p&gt;Ziv&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: beacon advertise interval</title><link>https://devzone.nordicsemi.com/thread/266663?ContentTypeID=1</link><pubDate>Thu, 27 Aug 2020 09:11:07 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:4bcadd7b-a205-48c9-a5d1-440dd52c8fab</guid><dc:creator>Karl Ylvisaker</dc:creator><description>&lt;p&gt;Hello Ziv,&lt;/p&gt;
[quote user="ziv123"]which to my understanding copies all the defines and configs of one instance to the other&amp;nbsp; (not sure it is semantically correct to say it but you understood i belive)[/quote]
&lt;p&gt;This might be the issue here, I do not think this is correct.&lt;br /&gt;What you are doing here is creating a shallow copy of the advdata struct. So, you are in fact just using the same single buffer.&lt;br /&gt;If you would like to check this, please try to print out the value of the advdata[advdata_idx] and advdata[advdata_next_idx] pointers following this line of code and see what they point to.&lt;br /&gt;If you are to do your updates like this, please ensure that you are making a deep copy of the advdata struct.&lt;br /&gt;Do this, and see if you then are able to update your advertising data using the _advdata_update function. I look forward to hearing if this resolves your issue!&lt;br /&gt;&lt;br /&gt;Please see &lt;a href="https://stackoverflow.com/questions/15278194/shallow-copy-and-deep-copy-in-c"&gt;this stackoverflow thread for a detailed explanation&lt;/a&gt;&amp;nbsp;on shallow vs deep copying.&lt;/p&gt;
&lt;p&gt;Best regards,&lt;br /&gt;Karl&amp;nbsp;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: beacon advertise interval</title><link>https://devzone.nordicsemi.com/thread/266525?ContentTypeID=1</link><pubDate>Wed, 26 Aug 2020 13:50:48 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:6761d69d-9063-4e62-9ba4-8581c0f5367c</guid><dc:creator>ziv123</dc:creator><description>&lt;p&gt;hi Karl&amp;nbsp;&lt;/p&gt;
[quote userid="87869" url="~/f/nordic-q-a/63486/beacon-advertise-interval/265924"]This might be a long-shot, but could you attempt to split the advdata buffers entirely?&lt;br /&gt;I do not know how they are initialized, so I say this to ensure that there are nothing shared between the buffers.[/quote]
&lt;p&gt;what do you mean by split the advdata buffers entirely ? ??&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;ble_advdata_t advdata[2];&lt;/pre&gt;this is how they are first declaired&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;static void advertising_init(void)
{
    uint32_t      err_code;
    //ble_advdata_t advdata;
    uint8_t       flags = BLE_GAP_ADV_FLAG_BR_EDR_NOT_SUPPORTED;

    //ble_advdata_manuf_data_t manuf_specific_data;

    manuf_specific_data.company_identifier = APP_COMPANY_IDENTIFIER;

#if defined(USE_UICR_FOR_MAJ_MIN_VALUES)
    // If USE_UICR_FOR_MAJ_MIN_VALUES is defined, the major and minor values will be read from the
    // UICR instead of using the default values. The major and minor values obtained from the UICR
    // are encoded into advertising data in big endian order (MSB First).
    // To set the UICR used by this example to a desired value, write to the address 0x10001080
    // using the nrfjprog tool. The command to be used is as follows.
    // nrfjprog --snr &amp;lt;Segger-chip-Serial-Number&amp;gt; --memwr 0x10001080 --val &amp;lt;your major/minor value&amp;gt;
    // For example, for a major value and minor value of 0xabcd and 0x0102 respectively, the
    // the following command should be used.
    // nrfjprog --snr &amp;lt;Segger-chip-Serial-Number&amp;gt; --memwr 0x10001080 --val 0xabcd0102
    uint16_t major_value = ((*(uint32_t *)UICR_ADDRESS) &amp;amp; 0xFFFF0000) &amp;gt;&amp;gt; 16;
    uint16_t minor_value = ((*(uint32_t *)UICR_ADDRESS) &amp;amp; 0x0000FFFF);

    uint8_t index = MAJ_VAL_OFFSET_IN_BEACON_INFO;

    m_beacon_info[index++] = MSB_16(major_value);
    m_beacon_info[index++] = LSB_16(major_value);

    m_beacon_info[index++] = MSB_16(minor_value);
    m_beacon_info[index++] = LSB_16(minor_value);
#endif

///ziv addition:
  //  static uint8_t i = 4;
  //  if( i &amp;gt;= SET_VALUES_ARRAY )
  //  {
  //      i = 0;
  //  }
   // uint8_t idx = i++;
   m_beacon_info[12] = spin_angle[3];
   m_beacon_info[13] = (spin_direction[3] | speed[3]);

// ziv addition end  

    manuf_specific_data.data.p_data = (uint8_t *) m_beacon_info;
    manuf_specific_data.data.size   = APP_BEACON_INFO_LENGTH;

    // Build and set advertising data.
    memset(&amp;amp;advdata[advdata_idx], 0, sizeof(advdata[advdata_idx]));

    advdata[advdata_idx].name_type             = BLE_ADVDATA_NO_NAME;//BLE_ADVDATA_SHORT_NAME;//BLE_ADVDATA_NO_NAME;
    advdata[advdata_idx].flags                 = flags;
    advdata[advdata_idx].p_manuf_specific_data = &amp;amp;manuf_specific_data;

    // Initialize advertising parameters (used when starting advertising).
    memset(&amp;amp;m_adv_params, 0, sizeof(m_adv_params));

    m_adv_params.properties.type = BLE_GAP_ADV_TYPE_NONCONNECTABLE_NONSCANNABLE_UNDIRECTED;
    m_adv_params.p_peer_addr     = NULL;    // Undirected advertisement.
    m_adv_params.filter_policy   = BLE_GAP_ADV_FP_ANY;
    m_adv_params.interval        = NON_CONNECTABLE_ADV_INTERVAL;
    m_adv_params.duration        = 0;       // Never time out.

    err_code = ble_advdata_encode(&amp;amp;advdata[advdata_idx], m_adv_data.adv_data.p_data, &amp;amp;m_adv_data.adv_data.len);
    APP_ERROR_CHECK(err_code);

    err_code = sd_ble_gap_adv_set_configure(&amp;amp;m_adv_handle, &amp;amp;m_adv_data, &amp;amp;m_adv_params);
    APP_ERROR_CHECK(err_code);
}&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;this is the advertising init func, in which i initiate only one of them, and after that, in the timer handler which i sent before i do this:&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;advdata[advdata_next_idx] = advdata[advdata_idx];&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;which to my understanding copies all the defines and configs of one instance to the other&amp;nbsp; (not sure it is semantically correct to say it but you understood i belive)&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;best regards&lt;/p&gt;
&lt;p&gt;Ziv&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: beacon advertise interval</title><link>https://devzone.nordicsemi.com/thread/265924?ContentTypeID=1</link><pubDate>Mon, 24 Aug 2020 09:42:40 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:aa2e9daf-d7a7-4342-ab6a-3b72b38bf185</guid><dc:creator>Karl Ylvisaker</dc:creator><description>&lt;p&gt;Hello again Ziv,&lt;/p&gt;
[quote user="ziv123"]yes, i checked the zip file i downloaded, and working with -&amp;gt; &amp;quot;nRF5_SDK_16.0.0_98a08e2.zip&amp;quot;[/quote]
&lt;p&gt;Great, thank you for confirming this.&lt;br /&gt;&lt;br /&gt;In SDK 16 you still need the two instances of the advertising struct, for the update function to work - as you have.&lt;br /&gt;The reason for this can be seen in the &lt;a href="https://infocenter.nordicsemi.com/index.jsp?topic=%2Fcom.nordic.infocenter.s140.api.v6.1.1%2Fgroup___b_l_e___g_a_p___f_u_n_c_t_i_o_n_s.html&amp;amp;anchor=ga9969047f4e7485c3f856c841978cc31a"&gt;sd_ble_gap_adv_set_configure&lt;/a&gt;&amp;nbsp;API reference.&lt;br /&gt;In SDK 17 this in handled by the advdata_update function internally.&lt;br /&gt;&lt;br /&gt;This might be a long-shot, but could you attempt to split the advdata buffers entirely?&lt;br /&gt;I do not know how they are initialized, so I say this to ensure that there are nothing shared between the buffers.&lt;/p&gt;
[quote user="ziv123"]YES, when using the commented lines instead of the advdata_update function then i see change in data in the nrf_connect_app on my cell phone. but when i am using the function as shown in the code i added i don&amp;#39;t see a change in the data in the same app on my cell phone[/quote]
&lt;p&gt;Yes, I would expect the commented out lines to work on their own, as this is a sure-fire way of changing the advertising data.&amp;nbsp;&amp;nbsp;&lt;/p&gt;
[quote user="ziv123"]i will open a new topic on the dongle issue[/quote]
&lt;p&gt;Great.&lt;br /&gt;&lt;br /&gt;Looking forward to resolving this issue together.&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: beacon advertise interval</title><link>https://devzone.nordicsemi.com/thread/265723?ContentTypeID=1</link><pubDate>Fri, 21 Aug 2020 09:57:58 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:a8adb042-e7e3-47e7-84a1-56178122aced</guid><dc:creator>ziv123</dc:creator><description>&lt;p&gt;hi Karl&lt;/p&gt;
[quote userid="87869" url="~/f/nordic-q-a/63486/beacon-advertise-interval/265710"]Could you confirm for me that you are working with SDK 16[/quote]
&lt;p&gt;yes, i checked the zip file i downloaded, and working with -&amp;gt; &amp;quot;nRF5_SDK_16.0.0_98a08e2.zip&amp;quot;&lt;/p&gt;
[quote userid="87869" url="~/f/nordic-q-a/63486/beacon-advertise-interval/265710"]Are you saying that the code as you have shared it does nothing to change the advertising data, except if you include the commented part at the end?[/quote]
&lt;p&gt;YES, when using the commented lines instead of the advdata_update function then i see change in data in the nrf_connect_app on my cell phone. but when i am using the function as shown in the code i added i don&amp;#39;t see a change in the data in the same app on my cell phone&lt;/p&gt;
&lt;p&gt;i will open a new topic on the dongle issue&lt;/p&gt;
&lt;p&gt;hope to read from you soon&lt;/p&gt;
&lt;p&gt;best regards&lt;/p&gt;
&lt;p&gt;Ziv&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: beacon advertise interval</title><link>https://devzone.nordicsemi.com/thread/265710?ContentTypeID=1</link><pubDate>Fri, 21 Aug 2020 09:17:13 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:a932d340-496b-4568-a9bc-87b8ac53d698</guid><dc:creator>Karl Ylvisaker</dc:creator><description>&lt;p&gt;Hello Ziv,&lt;/p&gt;
[quote user="ziv123"]hopefully we can resolve this before the end of this week&amp;nbsp;[/quote]
&lt;p&gt;Yes, hopefully we will resolve this before the weekend.&lt;/p&gt;
[quote user="ziv123"]thanks, it compiles now&amp;nbsp;[/quote]
&lt;p&gt;That it good. Are you experiencing any unexpected behavior since switching to the advertising module?&lt;/p&gt;
&lt;p&gt;[quote user="ziv123"][/quote]&lt;/p&gt;
&lt;p&gt;how ever, is there an example that uses the advertising library to get a better sense of needed configuration for the ble_advertising_t element ?&lt;/p&gt;
&lt;p&gt;if not, how should it be configured and will the 2 libraries work together ?&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Unfortunately no, none of the SDK examples currently use the advertising library - however, you could take a look at &lt;a href="https://infocenter.nordicsemi.com/index.jsp?topic=%2Fsdk_nrf5_v17.0.0%2Flib_ble_advertising.html&amp;amp;anchor=interaction"&gt;the &amp;quot;Usage&amp;quot; section of the library documentation&lt;/a&gt;&amp;nbsp;to get started. You can also see the description of each &lt;a href="https://infocenter.nordicsemi.com/topic/sdk_nrf5_v17.0.0/structble__adv__modes__config__t.html"&gt;config parameter here&lt;/a&gt;.&lt;br /&gt;Fortunately, the advdata structure and advertising module goes well together, there is no problem at all using both.&lt;/p&gt;
[quote user="ziv123"]... WELL i have tried to implement it but i see no change in the nrf scan app, and after looking some more to the function it&amp;#39;s not clear to me why i need 2 instances since one is for scanned data and i am working with beacon&amp;nbsp;[/quote]
&lt;p&gt;Could you confirm for me that you are working with SDK 16, or if you have upgraded to SDK 17 since we last spoke about it?&lt;br /&gt;If you are using SDK 17 then you do not need to have two advertising data structures, you can just work with a single one.&lt;br /&gt;You do not need to provide scan response data.&lt;/p&gt;
[quote user="ziv123"]here my code, its a bit messy cause it&amp;#39;s just to see its working , you can see the commented lines which do give change in data packets via nrf scan app[/quote]
&lt;p&gt;Are you saying that the code as you have shared it does nothing to change the advertising data, except if you include the commented part at the end?&lt;br /&gt;The advdata_update function handles the necessary encoding and configuration as well, please take a look in the advertising library source code.&lt;br /&gt;&lt;br /&gt;[quote user="ziv123"][/quote]&lt;/p&gt;
&lt;p&gt;another&amp;nbsp;thing, maybe i will open a new topic for that, regarding the nrf52840 dongle.. is it possible to program it to do the following via the nrf programmer (from the pc app):&lt;/p&gt;
&lt;p&gt;receive data via usb as uart and advertise it in a way that if no new data is arriving via uart the dongle keeps on advertising every 30ms (basically to receive data and update the advdata every time new data is received, or send each received mesage for several times in shortest intervals (30ms) unless new data arrives (also is it possible to program it to change some part of the data by itself each time it receives data from uart(meaning send the same data 10 times for instance, each time with one byte change in the data)&lt;/p&gt;
&lt;p&gt;that is instead of programming it via some development boards debugger ?&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;In short; yes, this is possible. You can either program the Dongle directly as you would have programmed a DK, or you can create a desktop application using the &lt;a href="https://github.com/NordicSemiconductor/pc-ble-driver"&gt;pc-ble-driver&lt;/a&gt;&amp;nbsp;that controls the dongle. However, please open a new ticket for this subject if you require more information about this, as it is diverging from your initial ticket.&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: beacon advertise interval</title><link>https://devzone.nordicsemi.com/thread/265708?ContentTypeID=1</link><pubDate>Fri, 21 Aug 2020 09:13:25 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:09437152-5b92-4853-b926-2de4d0f5d55f</guid><dc:creator>ziv123</dc:creator><description>&lt;p&gt;?? sorry for nagging but i really need help with that and i am on a tight scheduled&amp;nbsp;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: beacon advertise interval</title><link>https://devzone.nordicsemi.com/thread/265501?ContentTypeID=1</link><pubDate>Thu, 20 Aug 2020 09:49:21 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:c7b11ab0-12d6-4f14-b592-85d007a79e25</guid><dc:creator>ziv123</dc:creator><description>&lt;p&gt;hopefully we can resolve this before the end of this week&amp;nbsp;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: beacon advertise interval</title><link>https://devzone.nordicsemi.com/thread/265333?ContentTypeID=1</link><pubDate>Wed, 19 Aug 2020 13:05:06 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:33e76894-7dbd-4689-9dd9-d1598adbef48</guid><dc:creator>ziv123</dc:creator><description>&lt;p&gt;hi Karl&lt;/p&gt;
&lt;p&gt;thanks, it compiles now&amp;nbsp;&lt;/p&gt;
&lt;p&gt;how ever, is there an example that uses the advertising library to get a better sense of needed configuration for the ble_advertising_t element ?&lt;/p&gt;
&lt;p&gt;if not, how should it be configured and will the 2 libraries work together ?&amp;nbsp;&lt;/p&gt;
&lt;p&gt;... WELL i have tried to implement it but i see no change in the nrf scan app, and after looking some more to the function it&amp;#39;s not clear to me why i need 2 instances since one is for scanned data and i am working with beacon&amp;nbsp;&lt;/p&gt;
&lt;p&gt;here my code, its a bit messy cause it&amp;#39;s just to see its working , you can see the commented lines which do give change in data packets via nrf scan app&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;static void data_update_timer_handler(void* p_context)
{
    ret_code_t err_code;
    static uint8_t advdata_next_idx = 0;

    static uint8_t i = 0;
    if( i &amp;gt;= SET_VALUES_ARRAY )
    {
        i = 0;
    }
    uint8_t idx = i++;
    m_beacon_info[12] = spin_angle[idx];
    m_beacon_info[13] = (spin_direction[idx] | speed[idx]);
    NRF_LOG_INFO(&amp;quot;%d&amp;quot;,m_beacon_info[12]);

    manuf_specific_data.data.p_data = (uint8_t *) m_beacon_info;
    manuf_specific_data.data.size   = APP_BEACON_INFO_LENGTH;

    if(0 == advdata_idx ) advdata_next_idx = 1;
    else if( 1 == advdata_idx)  advdata_next_idx = 0;
    advdata[advdata_idx].p_manuf_specific_data = &amp;amp;manuf_specific_data;
    
    advdata[advdata_next_idx] = advdata[advdata_idx];
    ble_advertising_advdata_update(&amp;amp;ble_adv ,&amp;amp;advdata[advdata_next_idx], NULL /*&amp;amp;advdata[advdata_next_idx]*/);
    advdata_idx = advdata_next_idx;

//    sd_ble_gap_adv_stop(m_adv_handle);
//    err_code = ble_advdata_encode(&amp;amp;advdata[advdata_idx], m_adv_data.adv_data.p_data, &amp;amp;m_adv_data.adv_data.len);
//    APP_ERROR_CHECK(err_code);
//    err_code = sd_ble_gap_adv_set_configure(&amp;amp;m_adv_handle, &amp;amp;m_adv_data, &amp;amp;m_adv_params);
//    APP_ERROR_CHECK(err_code);
//    err_code = sd_ble_gap_adv_start(m_adv_handle, APP_BLE_CONN_CFG_TAG);
//    APP_ERROR_CHECK(err_code);
//    advdata_idx = advdata_next_idx;
}
#define EVERY_ONE_SECOND (200) // milli second
APP_TIMER_DEF(data_change_timer);&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;another&amp;nbsp;thing, maybe i will open a new topic for that, regarding the nrf52840 dongle.. is it possible to program it to do the following via the nrf programmer (from the pc app):&lt;/p&gt;
&lt;p&gt;receive data via usb as uart and advertise it in a way that if no new data is arriving via uart the dongle keeps on advertising every 30ms (basically to receive data and update the advdata every time new data is received, or send each received mesage for several times in shortest intervals (30ms) unless new data arrives (also is it possible to program it to change some part of the data by itself each time it receives data from uart(meaning send the same data 10 times for instance, each time with one byte change in the data)&lt;/p&gt;
&lt;p&gt;that is instead of programming it via some development boards debugger ?&amp;nbsp;&lt;/p&gt;
&lt;p&gt;best regards&lt;/p&gt;
&lt;p&gt;Ziv&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: beacon advertise interval</title><link>https://devzone.nordicsemi.com/thread/265294?ContentTypeID=1</link><pubDate>Wed, 19 Aug 2020 11:44:45 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:d6e3e089-300c-4535-a619-4aea070b9795</guid><dc:creator>Karl Ylvisaker</dc:creator><description>&lt;p&gt;Hello Ziv,&lt;/p&gt;
[quote user="ziv123"]however, the&amp;nbsp;&lt;span&gt;&amp;nbsp;ble_advertising.h is not called, i think, because BLE_ADVERTISING is not set&lt;/span&gt;[/quote][quote user="ziv123"]where is the right place to define it if that&amp;#39;s the solution ?[/quote]
&lt;p&gt;That could very well be the case. If so, please check that BLE_ADVERTISING_ENABLED is defined to 1 in the sdk_config.&lt;br /&gt;Please try this, and see if the undefined reference error is resolved.&lt;/p&gt;
[quote user="ziv123"]but again, why it would not be configured in a build in beacon example ???&amp;nbsp;&amp;nbsp;[/quote]
&lt;p&gt;The Beacon example from the SDK does not use the advertising library - it uses the ble_advdata library and direct calls to the SoftDevice API.&lt;br /&gt;&lt;br /&gt;Best regards,&lt;br /&gt;Karl&amp;nbsp;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: beacon advertise interval</title><link>https://devzone.nordicsemi.com/thread/265289?ContentTypeID=1</link><pubDate>Wed, 19 Aug 2020 11:11:01 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:e787434e-572b-4562-a9b0-6e7799936dcc</guid><dc:creator>ziv123</dc:creator><description>&lt;p&gt;hi Karl&lt;/p&gt;
&lt;p&gt;ok, there is progress, yes adding #include .. is important&amp;nbsp;&lt;/p&gt;
&lt;p&gt;however, the&amp;nbsp;&lt;span&gt;&amp;nbsp;ble_advertising.h is not called, i think, because BLE_ADVERTISING is not set&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&lt;pre class="ui-code" data-mode="text"&gt;#if NRF_MODULE_ENABLED(BLE_ADVERTISING)
#include &amp;quot;ble_advdata.h&amp;quot;
#include &amp;quot;ble_advertising.h&amp;quot;
#include &amp;quot;nrf_soc.h&amp;quot;
#include &amp;quot;nrf_log.h&amp;quot;
#include &amp;quot;sdk_errors.h&amp;quot;
#include &amp;quot;nrf_sdh_ble.h&amp;quot;&lt;/pre&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;but again, why it would not be configured in a build in beacon example ???&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;and anyway, where is the right place to define it if that&amp;#39;s the solution ?&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;best regards&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Ziv&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>