<?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 Radio Activation/De-Activation</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/32769/ble-radio-activation-de-activation</link><description>I am trying to create a state machine that will be able to turn the Bluetooth radio on/off and possibly change the mode of the BLE service for power testing. I hope to run a continuous test over the course of 15 days and monitor the power consumption</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Tue, 29 May 2018 21:48:08 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/32769/ble-radio-activation-de-activation" /><item><title>RE: BLE Radio Activation/De-Activation</title><link>https://devzone.nordicsemi.com/thread/133899?ContentTypeID=1</link><pubDate>Tue, 29 May 2018 21:48:08 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:373c3f56-ff9b-4078-af4f-8a9c4f19e2df</guid><dc:creator>Matthew Johnson</dc:creator><description>&lt;p&gt;Thank you very much Stian! I wound up using cell phone with the nRF Connect app and running CTS.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: BLE Radio Activation/De-Activation</title><link>https://devzone.nordicsemi.com/thread/131925?ContentTypeID=1</link><pubDate>Mon, 14 May 2018 15:31:34 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:8e46be54-2af0-4802-a690-e8bd66e823ed</guid><dc:creator>Stian R&amp;#248;ed Hafskjold</dc:creator><description>&lt;p&gt;You can start and stop advertising using the SD API documented here: &lt;a href="http://infocenter.nordicsemi.com/topic/com.nordic.infocenter.s132.api.v6.0.0/group___b_l_e___g_a_p___f_u_n_c_t_i_o_n_s.html?cp=2_3_1_1_0_2_1_2_3#ga74c21287bd6cbcd5822bc73792f678d8"&gt;http://infocenter.nordicsemi.com/topic/com.nordic.infocenter.s132.api.v6.0.0/group___b_l_e___g_a_p___f_u_n_c_t_i_o_n_s.html?cp=2_3_1_1_0_2_1_2_3#ga74c21287bd6cbcd5822bc73792f678d8&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;For connection you need a central to initiate the connection, so you can&amp;#39;t just connect using some code in the timer callback. You need a central device as well. You can use the &lt;a href="https://github.com/NordicSemiconductor/pc-ble-driver"&gt;pc-ble-driver&lt;/a&gt; along with an nRF5 DK as a central on your computer. The pc-ble-driver comes with a python wrapper, so you can easily script something that will connect to the peripheral device at specific intervals.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: BLE Radio Activation/De-Activation</title><link>https://devzone.nordicsemi.com/thread/131418?ContentTypeID=1</link><pubDate>Tue, 08 May 2018 21:45:41 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:31f26134-99f0-4887-b157-946777c8a3d4</guid><dc:creator>Matthew Johnson</dc:creator><description>&lt;p&gt;Hi Stian. By &amp;quot;mode of the BLE service&amp;quot; I mean whether it&amp;#39;s in advertising mode or connected to a device. I hope to run a sustained test for two weeks and cycle between these modes for portions of the test. I have been able to generate state changes based on a timer created from the timer library. Is there sample code for entering the advertising and connected modes using the program?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: BLE Radio Activation/De-Activation</title><link>https://devzone.nordicsemi.com/thread/126101?ContentTypeID=1</link><pubDate>Tue, 27 Mar 2018 11:55:08 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:567e298c-724c-4787-99fc-c23d4b5271f0</guid><dc:creator>Stian R&amp;#248;ed Hafskjold</dc:creator><description>&lt;p&gt;Hi, not sure what you mean with &amp;quot;mode of the BLE service&amp;quot; and &amp;quot;control the Bluetooth state&amp;quot;. What kind of states/modes are you talking about?&lt;/p&gt;
&lt;p&gt;In general, you can use the &lt;a href="http://infocenter.nordicsemi.com/topic/com.nordic.infocenter.nrf52832.ps.v1.1/rtc.html?cp=2_1_0_24#concept_rvn_vkj_sr"&gt;RTC &lt;/a&gt;to give you interrupts in specific time intervals. The easiest way to implement this is probably through the&lt;a href="http://infocenter.nordicsemi.com/topic/com.nordic.infocenter.sdk5.v15.0.0/lib_timer.html?cp=4_0_0_3_47"&gt; timer library &lt;/a&gt;in the SDK. Then you can change the mode/state in the callback function for the RTC timer.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>