<?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>Continue advertising even after getting connected</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/113988/continue-advertising-even-after-getting-connected</link><description>Good day, 
 i would like to know if it is possible to continue broadcasting even if the device is already connected. i am using nrf52832 with SDK17.1</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Wed, 04 Sep 2024 11:52:34 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/113988/continue-advertising-even-after-getting-connected" /><item><title>RE: Continue advertising even after getting connected</title><link>https://devzone.nordicsemi.com/thread/501144?ContentTypeID=1</link><pubDate>Wed, 04 Sep 2024 11:52:34 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:e4ecc082-beaf-4859-b09e-7c52c5391624</guid><dc:creator>Susheel Nuguru</dc:creator><description>&lt;p&gt;I should have mentioned to use the code I provided as reference only and fine tune it for your application and not use it as it is. More info on how to handle your error is given in &lt;a href="https://devzone.nordicsemi.com/f/nordic-q-a/61918/sd_ble_gap_adv_set_configure-error-4-nrf_error_no_mem"&gt;similar thread&lt;/a&gt;.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Continue advertising even after getting connected</title><link>https://devzone.nordicsemi.com/thread/501083?ContentTypeID=1</link><pubDate>Wed, 04 Sep 2024 07:42:16 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:5f3a3b6e-028c-4e66-babf-2937ab124034</guid><dc:creator>xtian</dc:creator><description>&lt;p&gt;i get an error in the&amp;nbsp;sd_ble_gap_adv_set_configure.&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;&amp;lt;error&amp;gt; app: ERROR 4 [NRF_ERROR_NO_MEM] at: 0x0002871F&lt;/pre&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Continue advertising even after getting connected</title><link>https://devzone.nordicsemi.com/thread/500685?ContentTypeID=1</link><pubDate>Mon, 02 Sep 2024 06:23:17 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:403eb5d3-d5ce-42b9-8a66-d1af9a6cc03a</guid><dc:creator>Susheel Nuguru</dc:creator><description>&lt;p&gt;Yes, you can do that. In the connected event you can do below and start the advertiser&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;    static ble_gap_adv_params_t m_adv_params;  

    // Initialize advertising parameters (used when starting advertising).
    memset(&amp;amp;m_adv_params, 0, sizeof(m_adv_params));

    m_adv_params.properties.type = BLE_GAP_ADV_TYPE_NONCONNECTABLE_NONSCANNABLE_UNDIRECTED;
    m_adv_params.p_peer_addr     = NULL;    // Undirected advertisement.
    m_adv_params.filter_policy   = BLE_GAP_ADV_FP_ANY;
    m_adv_params.interval        = NON_CONNECTABLE_ADV_INTERVAL;
    m_adv_params.duration        = 0;       // Never time out.

    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 = sd_ble_gap_adv_set_configure(&amp;amp;m_adv_handle, &amp;amp;m_adv_data, &amp;amp;m_adv_params);
    APP_ERROR_CHECK(err_code);&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;When you disconnect and get the disconnected event, you can stop the non connectable advertising and reconfigure it to be connectable and start the advertiser again as connectable.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Continue advertising even after getting connected</title><link>https://devzone.nordicsemi.com/thread/500676?ContentTypeID=1</link><pubDate>Mon, 02 Sep 2024 02:40:23 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:9ad11380-f60b-45f2-8671-42d6aed7b233</guid><dc:creator>xtian</dc:creator><description>&lt;p&gt;when device gets connected, i want it to advertise as non-connectable. and when it gets disconnected, it should return to connectable advertisement again. is this possible?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Continue advertising even after getting connected</title><link>https://devzone.nordicsemi.com/thread/498540?ContentTypeID=1</link><pubDate>Fri, 16 Aug 2024 06:03:36 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:e41b7c0c-0467-4b7a-8ae2-4b72146b05a3</guid><dc:creator>Susheel Nuguru</dc:creator><description>&lt;p&gt;If you have&amp;nbsp;NRF_SDH_BLE_PERIPHERAL_LINK_COUNT more than 1, then you can just call advertising_start() in the&amp;nbsp;ble_evt_handler-&amp;gt;&amp;nbsp;BLE_GAP_EVT_CONNECTED event. The code for advertising start is shown in many ble_peripheral examples.&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="c_cpp"&gt;/**@brief Function for starting advertising.
 */
static void advertising_start(void)
{
    ret_code_t           err_code;

    err_code = sd_ble_gap_adv_start(m_adv_handle, APP_BLE_CONN_CFG_TAG);
    APP_ERROR_CHECK(err_code);

    bsp_board_led_on(ADVERTISING_LED);
}&lt;/pre&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>