<?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>Turn ON and OFF BLE</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/19017/turn-on-and-off-ble</link><description>I am using S132v2 on nrf52831. I am using UART BLE application. I want to turn ON BLE meaning advertising and all parameter of BLE whenever i press any switch. Also bluetooth should get turn OFF when i press another switch.
How can i achieve this?What</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Mon, 16 Jan 2017 11:39:00 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/19017/turn-on-and-off-ble" /><item><title>RE: Turn ON and OFF BLE</title><link>https://devzone.nordicsemi.com/thread/73518?ContentTypeID=1</link><pubDate>Mon, 16 Jan 2017 11:39:00 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:d96b6502-51bc-4eee-ba88-60c43315acae</guid><dc:creator>Yogesh</dc:creator><description>&lt;p&gt;BY mistake i wrote 133.I am using S132V2&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Turn ON and OFF BLE</title><link>https://devzone.nordicsemi.com/thread/73519?ContentTypeID=1</link><pubDate>Mon, 16 Jan 2017 11:27:48 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:9435ed01-23da-4ed9-85cb-1f4e09f5ef6b</guid><dc:creator>Wojtek</dc:creator><description>&lt;p&gt;You are using really weird softdevice with quite unusual chip.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Turn ON and OFF BLE</title><link>https://devzone.nordicsemi.com/thread/73520?ContentTypeID=1</link><pubDate>Mon, 16 Jan 2017 11:21:40 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:7a9441a6-8965-45e0-9a45-76ed19e8dea5</guid><dc:creator>Sigurd</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;You can find the relevant SoftDevice API functions &lt;a href="https://infocenter.nordicsemi.com/topic/com.nordic.infocenter.s132.api.v2.0.0/group___b_l_e___g_a_p___f_u_n_c_t_i_o_n_s.html?resultof=%22%73%64%5f%62%6c%65%5f%67%61%70%5f%64%69%73%63%6f%6e%6e%65%63%74%22%20"&gt;here&lt;/a&gt;.
You can start/stop advertising using &lt;code&gt;sd_ble_gap_adv_start()&lt;/code&gt; and &lt;code&gt;sd_ble_gap_adv_stop()&lt;/code&gt;. If you are in a connection you can use &lt;code&gt;sd_ble_gap_disconnect()&lt;/code&gt; to disconnect from the central. In the ble_app_uart example, use the bsp_event_handler() in main.c to implement the functionality you want on different button events.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>