<?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>Queries regarding Advertisement module initialization</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/60310/queries-regarding-advertisement-module-initialization</link><description>Hi, 
 I am using the following tools and resources, 
 1. Segger embedded studio 
 2. SDK 16. 
 3. SD version 7. 
 4. nrf52 Development kit PC410040. 
 5. nrf Connect app in iPhone 
 I am trying to develop a simple non connectable simple advertisement</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Tue, 21 Apr 2020 05:52:41 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/60310/queries-regarding-advertisement-module-initialization" /><item><title>RE: Queries regarding Advertisement module initialization</title><link>https://devzone.nordicsemi.com/thread/245690?ContentTypeID=1</link><pubDate>Tue, 21 Apr 2020 05:52:41 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:9b1795af-4c58-436a-a862-b8159bccd92a</guid><dc:creator>Niranjan Pandian</dc:creator><description>&lt;p&gt;Thank you Amanda for your reply.&amp;nbsp;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Queries regarding Advertisement module initialization</title><link>https://devzone.nordicsemi.com/thread/245535?ContentTypeID=1</link><pubDate>Mon, 20 Apr 2020 12:44:22 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:5f4709cf-75c2-4c29-a01d-19debcb89f84</guid><dc:creator>Amanda Hsieh</dc:creator><description>&lt;p&gt;Hi,&amp;nbsp;&lt;/p&gt;
[quote user=""]1. my understanding of this function &amp;quot;ble_advertising_conn_cfg_tag_set(&amp;amp;m_advertising, APP_BLE_CONN_CFG_TAG);&amp;quot; is just a tag created for a particular advertisement configuration, and unique tag ID can be created for multiple configuration. The problem is, if i dont use this function, my app runs into some kind of run time error, which i can see it in RTT viewer, please find the below screenshot from the RTT viewer. But ideally even without the function the program should work fine, shouldnt it?[/quote]
&lt;p&gt;Ans.&amp;nbsp;&lt;a title="ble_advertising_conn_cfg_tag_set" href="https://infocenter.nordicsemi.com/topic/sdk_nrf5_v16.0.0/group__ble__advertising.html?cp=7_1_6_2_0_11#ga3117ef69ce4d31b09be0bb1421e54150"&gt;ble_advertising_conn_cfg_tag_set&lt;/a&gt;() is the f&lt;span&gt;unction for changing the connection settings tag that will be used for upcoming connections.&amp;nbsp;&lt;/span&gt;Please see the note in the&amp;nbsp;&lt;a title="Software Development Kit" href="https://infocenter.nordicsemi.com/topic/sdk_nrf5_v16.0.0/examples_ble.html?resultof=%22%62%6c%65%5f%61%64%76%65%72%74%69%73%69%6e%67%5f%63%6f%6e%6e%5f%63%66%67%5f%74%61%67%5f%73%65%74%22%20"&gt;Bluetooth low energy examples&lt;/a&gt;:&lt;br /&gt;&lt;em&gt;When setting connection-specific configurations using&amp;nbsp;&lt;a href="https://infocenter.nordicsemi.com/topic/com.nordic.infocenter.s140.api.v7.0.1/group___b_l_e___c_o_m_m_o_n___f_u_n_c_t_i_o_n_s.html#ga4edae2bac8c68b672c0fa101ed2c687f"&gt;sd_ble_cfg_set&lt;/a&gt;, you must create a tag for each configuration. This tag must be supplied when calling&amp;nbsp;&lt;a href="https://infocenter.nordicsemi.com/topic/com.nordic.infocenter.s140.api.v7.0.1/group___b_l_e___g_a_p___f_u_n_c_t_i_o_n_s.html#ga74c21287bd6cbcd5822bc73792f678d8"&gt;sd_ble_gap_adv_start()&lt;/a&gt;&amp;nbsp;and&amp;nbsp;&lt;a href="https://infocenter.nordicsemi.com/topic/com.nordic.infocenter.s140.api.v7.0.1/group___b_l_e___g_a_p___f_u_n_c_t_i_o_n_s.html#gacca0e56084c7b3ed832b1bfa3911b7fe"&gt;sd_ble_gap_connect()&lt;/a&gt;. If your application uses the&amp;nbsp;&lt;a href="https://infocenter.nordicsemi.com/topic/sdk_nrf5_v16.0.0/lib_ble_advertising.html"&gt;Advertising Module&lt;/a&gt;, you must call&amp;nbsp;&lt;a href="https://infocenter.nordicsemi.com/topic/sdk_nrf5_v16.0.0/group__ble__advertising.html#ga3117ef69ce4d31b09be0bb1421e54150"&gt;ble_advertising_conn_cfg_tag_set&lt;/a&gt;&amp;nbsp;before starting advertising.&lt;/em&gt;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
[quote user=""]2. when I use configuration tag function, the&amp;nbsp;app is working fine, I am able to see the device listed on nrf connect app, but RTT viewer is just blank, I am not able to see any NRF_LOG / APP_ERROR outputs, is that supposed to happen?[/quote]
&lt;p&gt;&amp;nbsp;Ans. Please enable&amp;nbsp;NRF_LOG_BACKEND_RTT_ENABLED and&amp;nbsp;NRF_LOG_ENABLED in the sdk_config.h&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;//==========================================================
// &amp;lt;e&amp;gt; NRF_LOG_BACKEND_RTT_ENABLED - nrf_log_backend_rtt - Log RTT backend
//==========================================================
#ifndef NRF_LOG_BACKEND_RTT_ENABLED
#define NRF_LOG_BACKEND_RTT_ENABLED 1
#endif

// &amp;lt;e&amp;gt; NRF_LOG_ENABLED - nrf_log - Logger
//==========================================================
#ifndef NRF_LOG_ENABLED
#define NRF_LOG_ENABLED 1
#endif

&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/p&gt;
[quote user=""]3. In the examples I have there is a function to initialize GAP parameters directly using the SD API instead of SDK APIs. And certain parameters such as structures like device name couldnt be found in the SDK data structures, so is it correct that we have use to SD API to set some critical parameters such as device name? or Have I missed something?[/quote]
&lt;p&gt;&amp;nbsp;For device_name, you should use&amp;nbsp;&lt;a title="sd_ble_gap_device_name_set" href="https://infocenter.nordicsemi.com/topic/com.nordic.infocenter.s140.api.v7.0.1/group___b_l_e___g_a_p___f_u_n_c_t_i_o_n_s.html?cp=4_6_3_1_2_1_3_19#gae779f7eed346027dc4cbaf438352e5db"&gt;sd_ble_gap_device_name_set&lt;/a&gt;&amp;nbsp;to s&lt;span&gt;et GAP device name. Could you elaborate the critical parameters more than the device name?&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
[quote user=""]4. &amp;quot;init.evt_handler&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;= adv_event;&amp;quot; if i try to assign a event handler for advertisement module, i am getting a linker error, I am not sure whats the problem. Please find the error statement below.&amp;nbsp;[/quote]
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;As the error indicates, do you declare the function adv_event? You should declare the function before it is used.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;-Amanda H.&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>