<?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>ble_app_uart peripheral example, SDK12.3, 51822, turning advertising on/off</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/58450/ble_app_uart-peripheral-example-sdk12-3-51822-turning-advertising-on-off</link><description>Hello again Nordic Pro&amp;#39;s, 
 As you probably all know by now, our product app is based on the subject example code, SDK and device. We need to programmatically disconnect from a central, turn advertising off and then later, turn advertising back on for</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Mon, 02 Mar 2020 14:51:02 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/58450/ble_app_uart-peripheral-example-sdk12-3-51822-turning-advertising-on-off" /><item><title>RE: ble_app_uart peripheral example, SDK12.3, 51822, turning advertising on/off</title><link>https://devzone.nordicsemi.com/thread/237500?ContentTypeID=1</link><pubDate>Mon, 02 Mar 2020 14:51:02 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:e2a767e4-5407-4f67-9f28-dfb78c4268a5</guid><dc:creator>Robin</dc:creator><description>&lt;p&gt;Hello Hung Bui,&lt;/p&gt;
&lt;p&gt;Thank you very much.&amp;nbsp; This info should help simplify my efforts.&amp;nbsp; Your expert advice is greatly appreciated.&lt;/p&gt;
&lt;p&gt;I will post my final code and results when I get back to resolving this issue&lt;/p&gt;
&lt;p&gt;Robin @ TL&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: ble_app_uart peripheral example, SDK12.3, 51822, turning advertising on/off</title><link>https://devzone.nordicsemi.com/thread/237398?ContentTypeID=1</link><pubDate>Mon, 02 Mar 2020 11:21:11 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:cad5b465-cbd3-4a45-852a-a0bdbeb4526e</guid><dc:creator>Hung Bui</dc:creator><description>&lt;p&gt;Hi Robin,&amp;nbsp;&lt;/p&gt;
&lt;p&gt;The question is to check&amp;nbsp;if you use the ble_advertising module to&amp;nbsp;do your initial advertising. If the module is being used, the advertising will restart automatically after disconnected.&amp;nbsp;&lt;br /&gt;So what you need to do is to remove the call&amp;nbsp;on_disconnected() inside&amp;nbsp;ble_advertising_on_ble_evt() in ble_advertising.c&lt;/p&gt;
&lt;p&gt;And then in your own code you can start advertising again by calling&amp;nbsp;ble_advertising_start() with the mode you want.&amp;nbsp;&lt;br /&gt;&lt;br /&gt;To disconnect you can call&amp;nbsp;sd_ble_gap_disconnect() to request the connection to be terminated. There will be&amp;nbsp;&amp;nbsp;BLE_GAP_EVT_DISCONNECTED event after the connection is disconnected.&amp;nbsp;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: ble_app_uart peripheral example, SDK12.3, 51822, turning advertising on/off</title><link>https://devzone.nordicsemi.com/thread/237195?ContentTypeID=1</link><pubDate>Fri, 28 Feb 2020 15:04:05 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:731af310-955b-4f8f-94a3-3b736cee0ba1</guid><dc:creator>Robin</dc:creator><description>&lt;p&gt;Hello Hung Bui,&lt;/p&gt;
&lt;p&gt;Thank you for the prompt reply. So, I am not totally sure if the ble_advertising code is being used, but the c file with that name is within the project, and that file is the is the only place, other that a header that creates macros with them, that I can find calls to the ... start and ...stop functions.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;What is the point of your question.&amp;nbsp; How would the disconnect/stop_adv/restart_adv process change if it is being used?&lt;/p&gt;
&lt;p&gt;Thank you again,&lt;/p&gt;
&lt;p&gt;Robin @ TL&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: ble_app_uart peripheral example, SDK12.3, 51822, turning advertising on/off</title><link>https://devzone.nordicsemi.com/thread/237162?ContentTypeID=1</link><pubDate>Fri, 28 Feb 2020 14:08:50 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:ed0403f2-19cc-49e7-a024-103e63e83ad2</guid><dc:creator>Hung Bui</dc:creator><description>&lt;p&gt;Hi Robin,&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Do you use the ble_advertising in your firmware ?&lt;/p&gt;
&lt;p&gt;If you don&amp;#39;t use the ble_advertising but rather use the softdevice API to initialize and start advertising, you can follow this message sequence chart:&amp;nbsp;&lt;a href="https://infocenter.nordicsemi.com/topic/com.nordic.infocenter.s130.api.v2.0.1/group___b_l_e___g_a_p___a_d_v___m_s_c.html?cp=5_7_2_2_2_1_3_0"&gt;https://infocenter.nordicsemi.com/topic/com.nordic.infocenter.s130.api.v2.0.1/group___b_l_e___g_a_p___a_d_v___m_s_c.html?cp=5_7_2_2_2_1_3_0&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;You are free to use this function, but you need to follow the requirement of the priority context that there has to be called from application low priority or in main() context.&amp;nbsp;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>