<?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 to set &amp;#39;&amp;#39;Complete Local Name&amp;quot; of ibeacon</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/14011/how-to-set-complete-local-name-of-ibeacon</link><description>When I use master control panel to scan ibeacn, I find &amp;quot;Complete Local Name&amp;quot; in below picture, 
 How to set the &amp;quot;Complete local name&amp;quot; ? 
 I heard someone says set in the scan response struct,but how to set? 
 Thanks!</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Wed, 13 Jun 2018 21:07:26 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/14011/how-to-set-complete-local-name-of-ibeacon" /><item><title>RE: How to set ''Complete Local Name" of ibeacon</title><link>https://devzone.nordicsemi.com/thread/136013?ContentTypeID=1</link><pubDate>Wed, 13 Jun 2018 21:07:26 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:2ecd7bfd-1345-4bd6-9023-ad97ecf79b58</guid><dc:creator>Alaricus</dc:creator><description>&lt;p&gt;For SDK15, I found that they use &lt;em&gt;ble_advdata_encode&lt;/em&gt; rather than &lt;em&gt;ble_advertising_init&lt;/em&gt;&lt;/p&gt;
&lt;p&gt;So I think you have to update each data packet seperately, which should look like:&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;    err_code = ble_advdata_encode(&amp;amp;advdata, 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;srdata, m_adv_data.scan_rsp_data.p_data, &amp;amp;m_adv_data.scan_rsp_data.len);
    APP_ERROR_CHECK(err_code);&lt;/pre&gt;&lt;code&gt;&lt;br /&gt;&lt;/code&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How to set ''Complete Local Name" of ibeacon</title><link>https://devzone.nordicsemi.com/thread/132847?ContentTypeID=1</link><pubDate>Wed, 23 May 2018 01:02:03 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:7e64aa77-6535-401c-a4ae-f85f3347c689</guid><dc:creator>xiaoju</dc:creator><description>&lt;p&gt;I want to&amp;nbsp;set &amp;#39;&amp;#39;Complete Local Name&amp;quot; of ibeacon .in nRF5_SDK_15.0.0_a53641 ,but the api&amp;nbsp;&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;    err_code = ble_advertising_init(&amp;amp;advdata, &amp;amp;srdata, &amp;amp;options, on_adv_evt, NULL);&lt;/code&gt;&lt;br /&gt;is not &lt;em&gt;&lt;span class="skip"&gt;exist.can you tell me new api or other method solvetheproblem&lt;/span&gt;&lt;/em&gt;&lt;/pre&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How to set ''Complete Local Name" of ibeacon</title><link>https://devzone.nordicsemi.com/thread/53499?ContentTypeID=1</link><pubDate>Mon, 23 May 2016 10:33:22 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:e0b4ca98-38ea-4500-8449-966fb035bbc2</guid><dc:creator>Stian R&amp;#248;ed Hafskjold</dc:creator><description>&lt;p&gt;If you want to use a short name in the advertisement data and the full name in the scan response data, you can edit the &lt;code&gt;advertising_init()&lt;/code&gt; function in &lt;strong&gt;main.c&lt;/strong&gt; to something like this:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;static void advertising_init(void)
{
    uint32_t      err_code;
    ble_advdata_t advdata;

    memset(&amp;amp;advdata, 0, sizeof(advdata));

    advdata.name_type               = BLE_ADVDATA_SHORT_NAME;
    advdata.short_name_len          = 6;
    advdata.flags                   = BLE_GAP_ADV_FLAGS_LE_ONLY_GENERAL_DISC_MODE;
    
    /* Create the scan response struct: */
    ble_advdata_t srdata;
    memset(&amp;amp;srdata, 0, sizeof(srdata));
    srdata.name_type               = BLE_ADVDATA_FULL_NAME;
    /**/

    ble_adv_modes_config_t options = {0};
    options.ble_adv_fast_enabled   = BLE_ADV_FAST_ENABLED;
    options.ble_adv_fast_interval  = APP_ADV_INTERVAL;
    options.ble_adv_fast_timeout   = APP_ADV_TIMEOUT_IN_SECONDS;
    
    /* Pass the srdata struct to the init function: */
    err_code = ble_advertising_init(&amp;amp;advdata, &amp;amp;srdata, &amp;amp;options, on_adv_evt, NULL);
    APP_ERROR_CHECK(err_code);
}
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;This will use the short name in &lt;code&gt;advdata&lt;/code&gt; and the full name in &lt;code&gt;srdata&lt;/code&gt;. Then you need to pass both to the &lt;code&gt;ble_advertising_init()&lt;/code&gt; function.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>