<?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>How many retries in Eddystone beacon advertisement ?</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/41096/how-many-retries-in-eddystone-beacon-advertisement</link><description>Hello Everyone, 
 
 We have 2 devices. 1st device is flashed with the Eddystone example &amp;amp; sending TLM info. The 2nd device is flashed with a modified version of the ble_app_hrs_c example. We a added printout in ble_evt_handler for BLE_GAP_EVT_ADV_REPORT</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Tue, 04 Dec 2018 16:51:15 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/41096/how-many-retries-in-eddystone-beacon-advertisement" /><item><title>RE: How many retries in Eddystone beacon advertisement ?</title><link>https://devzone.nordicsemi.com/thread/160251?ContentTypeID=1</link><pubDate>Tue, 04 Dec 2018 16:51:15 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:b3746a39-efa9-41c7-b4c4-b7877fb7c25e</guid><dc:creator>Sigurd</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;Q1) The TLM information is by default updated every 10 sec. (&lt;a href="https://infocenter.nordicsemi.com/topic/com.nordic.infocenter.sdk5.v15.2.0/group__eddystone__app__config.html#ga95e552cc8ff3e4b6c98369150729399d"&gt;APP_CONFIG_TLM_TEMP_VBATT_UPDATE_INTERVAL_SECONDS&lt;/a&gt; in es_app_config.h).&lt;/p&gt;
&lt;p&gt;Information about temperature and battery voltage is updated every 30 sec(&lt;a href="https://infocenter.nordicsemi.com/topic/com.nordic.infocenter.sdk5.v15.2.0/group__eddystone__app__config.html#ga485fe21140ca28d2cbf76ea678427e2f"&gt;APP_CONFIG_TLM_TEMP_INTERVAL_SECONDS&lt;/a&gt;/ &lt;a href="https://infocenter.nordicsemi.com/topic/com.nordic.infocenter.sdk5.v15.2.0/group__eddystone__app__config.html#gacd0880d5acf73dcc6ba12b7f510a7e4d"&gt;APP_CONFIG_TLM_VBATT_INTERVAL_SECONDS&lt;/a&gt;).&lt;/p&gt;
&lt;p&gt;We send a packet(one packet&amp;nbsp;across 3 advertising channels) each &lt;a href="https://infocenter.nordicsemi.com/topic/com.nordic.infocenter.sdk5.v15.2.0/group__eddystone__app__config.html#ga72be8d93a7ea17ba4618a12fd5c4244b"&gt;APP_CFG_NON_CONN_ADV_INTERVAL_MS&lt;/a&gt;(default value 1000). When&amp;nbsp;investigating this some more, I figured out that the&amp;nbsp;&lt;span&gt;SoftDevice expects this to be in 625 us units when calling&amp;nbsp;&lt;em&gt;sd_ble_gap_adv_set_configure&lt;/em&gt;(), and we&amp;nbsp;unfortunately don&amp;#39;t do this in&amp;nbsp;adv_start() function in the file es_adv.c.&amp;nbsp;&lt;/span&gt;This mismatch will affect the ADV_COUNT, so we should fix this.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;The function &lt;span&gt;adv_start() in&amp;nbsp;es_adv.c&amp;nbsp;&lt;/span&gt;with the fix should look like this:&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;static void adv_start(ble_gap_adv_params_t * p_adv_params)
{
    ret_code_t err_code = NRF_SUCCESS;

    es_tlm_adv_cnt_inc();

    uint32_t interval_0625 = MSEC_TO_UNITS(p_adv_params-&amp;gt;interval,UNIT_0_625_MS);

    p_adv_params-&amp;gt;interval = interval_0625;

    err_code = sd_ble_gap_adv_set_configure(mp_adv_handle, &amp;amp;m_adv_data, p_adv_params);
    APP_ERROR_CHECK(err_code);

    err_code = sd_ble_gap_adv_start(*mp_adv_handle, BLE_CONN_CFG_TAG_DEFAULT);

    if (err_code != NRF_ERROR_BUSY &amp;amp;&amp;amp; err_code != NRF_SUCCESS)
    {
        APP_ERROR_CHECK(err_code);
    }
}&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;The ADV_COUNT is not the numbers of retries per say, it&amp;#39;s just an incremented counter that is incremented for every&amp;nbsp;&lt;a href="https://infocenter.nordicsemi.com/topic/com.nordic.infocenter.sdk5.v15.2.0/group__eddystone__app__config.html#gae517725b106535d8550494f48a135672"&gt;APP_CONFIG_TLM_ADV_INTERLEAVE_RATIO &lt;/a&gt;packets that are sent.(default value 5).&lt;/p&gt;
&lt;p&gt;Q2) A packet will be send every&amp;nbsp;APP_CFG_NON_CONN_ADV_INTERVAL_MS, and&amp;nbsp;&lt;span&gt;ADV_COUNT is increment when you have sent&amp;nbsp;APP_CONFIG_TLM_ADV_INTERLEAVE_RATIO numbers of packet(s).&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;Q3) It will send a packet each advertising interval(by defeault 1000 ms with the fix).&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>