<?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>Changing ble_gap_adv_params_t properties types on SDK15</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/42386/changing-ble_gap_adv_params_t-properties-types-on-sdk15</link><description>Hi there, 
 I am migrating a project from SDK13 to SDK15.2, where I need to change the advertising data dynamically and change the ble_gap_adv_params_t properties type between BLE_GAP_ADV_TYPE_NONCONNECTABLE_SCANNABLE_UNDIRECTED and BLE_GAP_ADV_TYPE_CONNECTABLE_SCANNABLE_UNDIRECTED</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Wed, 23 Jan 2019 10:25:21 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/42386/changing-ble_gap_adv_params_t-properties-types-on-sdk15" /><item><title>RE: Changing ble_gap_adv_params_t properties types on SDK15</title><link>https://devzone.nordicsemi.com/thread/167326?ContentTypeID=1</link><pubDate>Wed, 23 Jan 2019 10:25:21 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:81c5e5d1-bdf3-4308-9b54-864664bbf2c6</guid><dc:creator>Jared</dc:creator><description>[quote userid="17999" url="~/f/nordic-q-a/42386/changing-ble_gap_adv_params_t-properties-types-on-sdk15/165576"]when I reach the connection limit my device tries to connect again returning&amp;nbsp;&amp;nbsp;&lt;strong&gt;NRF_ERROR_CONN_COUNT.&amp;nbsp;&lt;/strong&gt;[/quote]
&lt;p&gt;&lt;span&gt;Exactly which function is it that returns&amp;nbsp;&lt;/span&gt;&lt;strong&gt;NRF_ERROR_CONN_COUNT.&lt;/strong&gt;&lt;span&gt;&amp;nbsp;Is it returned when you receive a connection request from a central, or does it return when you try to advertise and the max link count is already reached.&amp;nbsp;&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Changing ble_gap_adv_params_t properties types on SDK15</title><link>https://devzone.nordicsemi.com/thread/166976?ContentTypeID=1</link><pubDate>Mon, 21 Jan 2019 21:52:45 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:0f98cbe7-40c6-425a-9e89-74084daee5f6</guid><dc:creator>Arepa</dc:creator><description>&lt;p&gt;Hi Jared, thanks for the reply, but I am still facing the same issue after added m_advertising.initialized = true. After my device reached the max link count it is still connecting to central nodes returning&amp;nbsp;NRF_ERROR_CONN_COUNT, I want to keep my device advertising, but in non-connectable way being unable to do it in the latest SDK version&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Changing ble_gap_adv_params_t properties types on SDK15</title><link>https://devzone.nordicsemi.com/thread/166799?ContentTypeID=1</link><pubDate>Mon, 21 Jan 2019 11:23:48 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:5f08528e-678e-4bdb-b8d2-c9c8f2a006f4</guid><dc:creator>Jared</dc:creator><description>&lt;p&gt;Sorry for the late response.&lt;/p&gt;
&lt;p&gt;Could you try setting initialized = true before you call the ble_advertising_init()?:&lt;/p&gt;
&lt;p&gt;m_advertising.intialized = true;&lt;/p&gt;
&lt;p&gt;err_code = ble_advertising_init(&amp;amp;m_advertising, &amp;amp;init);&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Changing ble_gap_adv_params_t properties types on SDK15</title><link>https://devzone.nordicsemi.com/thread/165593?ContentTypeID=1</link><pubDate>Mon, 14 Jan 2019 19:19:33 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:626cd874-fe92-41cd-a6c7-bc815ba47529</guid><dc:creator>Arepa</dc:creator><description>&lt;p&gt;I tried using the following and it is updating my advertising data, but I am still unable to set the peripheral scannable non-connectable&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="c_cpp"&gt;		BLE_ADVERTISING_DEF(m_advertising); /**&amp;lt; Advertising module instance. */
		...
		
		uint8_t update_advertising_data()
		{
			uint32_t err_code = NRF_SUCCESS;
			ble_advertising_init_t 		init;
			ble_advdata_t				advert; 
			ble_advdata_t				scanrsp;
		
			memset(&amp;amp;advert, 0, sizeof(advert));
			advert.flags						= BLE_GAP_ADV_FLAGS_LE_ONLY_GENERAL_DISC_MODE;
			advert.p_tx_power_level				= &amp;amp;txpower;
			
			memset(&amp;amp;scanrsp, 0, sizeof(scanrsp));
			scanrsp.name_type				    = BLE_ADVDATA_FULL_NAME;
			
			memset(&amp;amp;init, 0, sizeof(init));
			init.advdata						= advert;
			init.srdata							= scanrsp;
			init.config.ble_adv_fast_enabled	= true;
			init.config.ble_adv_fast_interval	= MSEC_TO_UNITS(advertisinginterval, UNIT_0_625_MS); 
					
			if (NRF_SDH_BLE_PERIPHERAL_LINK_COUNT)	
				m_advertising.adv_params.properties.type = BLE_GAP_ADV_TYPE_NONCONNECTABLE_SCANNABLE_UNDIRECTED; 
			else
				m_advertising.adv_params.properties.type = BLE_GAP_ADV_TYPE_CONNECTABLE_SCANNABLE_UNDIRECTED; 
			
			err_code = ble_advertising_init(&amp;amp;m_advertising, &amp;amp;init);
			APP_ERROR_CHECK(err_code);
			ble_advertising_conn_cfg_tag_set(&amp;amp;m_advertising, APP_BLE_CONN_CFG_TAG);	
			
			err_code = ble_advdata_encode(advert, m_advertising.enc_advdata, &amp;amp;m_advertising.adv_data.adv_data.len);
			APP_ERROR_CHECK(err_code);

			err_code = ble_advdata_encode(scanrsp, m_advertising.enc_scan_rsp_data, &amp;amp;m_advertising.adv_data.scan_rsp_data.len);
			APP_ERROR_CHECK(err_code);
			
			
			return ble_advertising_start(&amp;amp;m_advertising, BLE_ADV_MODE_FAST);
		}&lt;/pre&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Changing ble_gap_adv_params_t properties types on SDK15</title><link>https://devzone.nordicsemi.com/thread/165576?ContentTypeID=1</link><pubDate>Mon, 14 Jan 2019 16:50:58 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:31543f70-f783-437d-91da-055ce709a633</guid><dc:creator>Arepa</dc:creator><description>&lt;p&gt;actually, I don&amp;#39;t&amp;nbsp;have issues updating the advertising data or handle, my problem is I am unable to change the&amp;nbsp;adv_params.properties.type to change my device between &lt;strong&gt;scannable connectable&lt;/strong&gt; and &lt;strong&gt;scannable non-connectable&lt;/strong&gt;,&amp;nbsp;&lt;strong&gt;&lt;/strong&gt;when I add it to &lt;strong&gt;sd_ble_gap_adv_set_configure&lt;/strong&gt; I got the error above, and when it is not added when I reach the connection limit my device tries to connect again returning&amp;nbsp;&amp;nbsp;&lt;strong&gt;NRF_ERROR_CONN_COUNT.&amp;nbsp;&lt;/strong&gt;After the link count is reached I want my device keep&amp;nbsp;advertising scannable non&amp;nbsp;connectable, when I have link&amp;nbsp;counts available advertisie&amp;nbsp;the device it is scannable connectable&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;How can I set&amp;nbsp;&lt;strong&gt;ble_gap_adv_params_t&amp;nbsp;properties.type&lt;/strong&gt; when using the SDK15?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Changing ble_gap_adv_params_t properties types on SDK15</title><link>https://devzone.nordicsemi.com/thread/165352?ContentTypeID=1</link><pubDate>Mon, 14 Jan 2019 08:03:53 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:8b338a26-eb0d-4750-b4df-a349ed6cba34</guid><dc:creator>Jared</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;The NRF_ERROR_NO_MEM is returned when there is not enough memory to configure a new handle. You should update the existing advertising handle instead.&lt;/p&gt;
&lt;p&gt;Jared&amp;nbsp;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>