<?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 do migration of advertising init in 14.2 sdk to sdk 15.3</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/55634/how-to-do-migration-of-advertising-init-in-14-2-sdk-to-sdk-15-3</link><description>Hello All, 
 
 I have developed advertising init in 14.2 sdk (in segger ide). 
 (working on nrf52810 board) 
 I wanted to migrate same functionality to 15.3 sdk so how i can do it. 
 What is the modification is required in 15.3 SDK? 
 How to pass parameters</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Tue, 17 Dec 2019 13:03:03 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/55634/how-to-do-migration-of-advertising-init-in-14-2-sdk-to-sdk-15-3" /><item><title>RE: how to do migration of advertising init in 14.2 sdk to sdk 15.3</title><link>https://devzone.nordicsemi.com/thread/225884?ContentTypeID=1</link><pubDate>Tue, 17 Dec 2019 13:03:03 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:c0b2c898-ce04-48d3-948b-b344ede054ef</guid><dc:creator>Rohit</dc:creator><description>&lt;p&gt;Hi Simon,&lt;/p&gt;
&lt;p&gt;Thanks for your valuable response.&lt;/p&gt;
&lt;p&gt;I have implemented as per your suggestion , now it is working.&lt;/p&gt;
&lt;p&gt;And addition to this i have followed below link also to implement advt init&lt;/p&gt;
&lt;p&gt;&lt;a href="https://devzone.nordicsemi.com/f/nordic-q-a/44513/changing-device-name-dynamically"&gt;https://devzone.nordicsemi.com/f/nordic-q-a/44513/changing-device-name-dynamically&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Thanks And Regards,&lt;/p&gt;
&lt;p&gt;Rohit&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: how to do migration of advertising init in 14.2 sdk to sdk 15.3</title><link>https://devzone.nordicsemi.com/thread/225765?ContentTypeID=1</link><pubDate>Mon, 16 Dec 2019 22:25:27 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:c99572de-5a4b-495e-93e3-93e95c8d9235</guid><dc:creator>Simon</dc:creator><description>&lt;p&gt;Take a look at the main.c file of the &lt;em&gt;examples/ble_peripheral/ble_app_blinky&lt;/em&gt; example, which shows how to set the complete device name (BLE_ADVDATA_FULL_NAME):&lt;/p&gt;
&lt;div&gt;
&lt;div&gt;&lt;span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;pre class="ui-code" data-mode="c_cpp"&gt;static void advertising_init(void)
{
    ret_code_t    err_code;
    ble_advdata_t advdata;
    .
    .
    // Build and set advertising data.
    memset(&amp;amp;advdata, 0, sizeof(advdata));

    advdata.name_type          = BLE_ADVDATA_FULL_NAME;
    .
    .
    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);
    .
    .
    ble_gap_adv_params_t adv_params;

    // Set advertising parameters.
    memset(&amp;amp;adv_params, 0, sizeof(adv_params));
    .
    .
    err_code = sd_ble_gap_adv_set_configure(&amp;amp;m_adv_handle, &amp;amp;m_adv_data, &amp;amp;adv_params);
    APP_ERROR_CHECK(err_code);
}&lt;/pre&gt;&lt;/div&gt;
&lt;div&gt;&lt;/div&gt;
&lt;div&gt;This will gett the device name through&amp;nbsp;&lt;em&gt;ble_advdata_encode()→name_encode()→sd_ble_gap_device_name_get()&lt;/em&gt;, and then set it.&lt;/div&gt;
&lt;div&gt;&lt;/div&gt;
&lt;div&gt;As mentioned by&amp;nbsp;&lt;a href="https://devzone.nordicsemi.com/members/mttrinh"&gt;Mttrinh&lt;/a&gt;&amp;nbsp;in &lt;a href="https://devzone.nordicsemi.com/f/nordic-q-a/33792/nrf52-change-device-name"&gt;this ticket&lt;/a&gt;, you can change the device name through the SVCALL&amp;nbsp;&lt;em&gt;sd_ble_gap_device_name_set(). &lt;/em&gt;Do it before calling&amp;nbsp;&lt;em&gt;ble_advdata_encode().&lt;/em&gt;&lt;/div&gt;
&lt;div&gt;&lt;em&gt;&lt;/em&gt;&lt;/div&gt;
&lt;div&gt;Best regards,&lt;/div&gt;
&lt;div&gt;Simon&lt;/div&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>