<?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>how to change beacon data when push the button with Sleep mode?</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/28886/how-to-change-beacon-data-when-push-the-button-with-sleep-mode</link><description>[SDK 12.3.0 / nrf52 DK / Keil tool / beacon example code] 
 Hello. i am a novice developer. 
 
 Power On - Beacon data transmit and enter to sleep mode after 10 sec 
 Button_1 Push - Beacon data Change and transmit(after 10 Sec, go to sleep) 
 Button_2</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Wed, 03 Jan 2018 13:47:31 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/28886/how-to-change-beacon-data-when-push-the-button-with-sleep-mode" /><item><title>RE: how to change beacon data when push the button with Sleep mode?</title><link>https://devzone.nordicsemi.com/thread/114333?ContentTypeID=1</link><pubDate>Wed, 03 Jan 2018 13:47:31 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:b5e143b2-ef63-4541-8b97-d25d0078ed30</guid><dc:creator>J&amp;#248;rgen Holmefjord</dc:creator><description>&lt;p&gt;The code you have put in main loop will put the chip in &lt;a href="http://infocenter.nordicsemi.com/topic/com.nordic.infocenter.nrf52832.ps.v1.1/power.html?cp=2_1_0_17_2#unique_1349410009"&gt;system on sleep mode&lt;/a&gt;. In this sleep mode, any event will wake the chip. This will not stop the advertising or turn off any timers. This mode is used while the device is advertising/connected etc. As @endnode mention, you should use the softdevice API when the softdevice is enabled. If you want to go to deep sleep mode, where you will need external trigger like button press to wake the chip, this is called &lt;a href="http://infocenter.nordicsemi.com/topic/com.nordic.infocenter.nrf52832.ps.v1.1/power.html?cp=2_1_0_17_1#unique_1707892264"&gt;system off mode&lt;/a&gt;. If you disable the softdevice, you can enter this mode by setting the register &lt;a href="http://infocenter.nordicsemi.com/topic/com.nordic.infocenter.nrf52832.ps.v1.1/power.html?cp=2_1_0_17_8_4#register.SYSTEMOFF"&gt;&lt;code&gt;NRF_POWER-&amp;gt;SYSTEMOFF = 1;&lt;/code&gt;&lt;/a&gt;, or using the softdevice API &lt;a href="http://infocenter.nordicsemi.com/topic/com.nordic.infocenter.s132.api.v5.0.0/group___n_r_f___s_o_c___f_u_n_c_t_i_o_n_s.html?cp=2_3_1_1_0_2_7_2_25#ga774947ee0e200456ea3aec3fc7f8bd6b"&gt;sd_power_system_off&lt;/a&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: how to change beacon data when push the button with Sleep mode?</title><link>https://devzone.nordicsemi.com/thread/114336?ContentTypeID=1</link><pubDate>Tue, 02 Jan 2018 09:37:15 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:5173e680-aa05-4643-b0e9-11821599ea08</guid><dc:creator>endnode</dc:creator><description>&lt;p&gt;I&amp;#39;m talking about your &lt;code&gt;in_pin_handler&lt;/code&gt; function where you do stop/init/start which isn&amp;#39;t necessary.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: how to change beacon data when push the button with Sleep mode?</title><link>https://devzone.nordicsemi.com/thread/114335?ContentTypeID=1</link><pubDate>Tue, 02 Jan 2018 06:57:08 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:c7975334-45c4-4a11-aabb-30b591f67f5c</guid><dc:creator>Dawaz</dc:creator><description>&lt;p&gt;i using multiple beacon device(maximum 45) inside 10m. i worried about data collision(like a packet drop) from smart phone that is why i try to stop beacon advertising(and little bit save the power). It is not neccesary?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: how to change beacon data when push the button with Sleep mode?</title><link>https://devzone.nordicsemi.com/thread/114334?ContentTypeID=1</link><pubDate>Tue, 02 Jan 2018 06:18:33 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:f9f8cd5e-cbe0-4825-8dec-50892dac4124</guid><dc:creator>endnode</dc:creator><description>&lt;p&gt;Go back to beacon example and don&amp;#39;t change content of main infinite loop (once you use Nordic BLE stack you cannot use things like &lt;code&gt;WFE&lt;/code&gt;, you should call respective Soft Device function to wait for event/interrupt). Secondly you don&amp;#39;t need to stop advertising, you can change data through calling of SD API functions a any time. See example code &lt;a href="https://devzone.nordicsemi.com/question/56603/nrf-master-control-panel-for-android-crashes-when-displaying-details-of-fast-advertising-peripheral/?answer=64925#post-id-64925"&gt;here&lt;/a&gt;.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>