<?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 prevent nRF52832 device to enter sleep mode?</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/90736/how-to-prevent-nrf52832-device-to-enter-sleep-mode</link><description>I found after a while I can&amp;#39;t scan BLE device &amp;quot;ANCS2&amp;quot;. Since I don&amp;#39;t implement wake up mechanism, how to prevent nRF52832 device to enter sleep mode?</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Tue, 09 Aug 2022 09:17:19 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/90736/how-to-prevent-nrf52832-device-to-enter-sleep-mode" /><item><title>RE: How to prevent nRF52832 device to enter sleep mode?</title><link>https://devzone.nordicsemi.com/thread/380777?ContentTypeID=1</link><pubDate>Tue, 09 Aug 2022 09:17:19 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:e30b7dea-76d6-4e12-af23-dad571ac5d83</guid><dc:creator>snowuyl</dc:creator><description>&lt;p&gt;Thanks for your reply!&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How to prevent nRF52832 device to enter sleep mode?</title><link>https://devzone.nordicsemi.com/thread/380775?ContentTypeID=1</link><pubDate>Tue, 09 Aug 2022 09:15:10 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:036d029d-af1a-4e48-ad55-abd2d2a820eb</guid><dc:creator>Jared</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;Are you able to find the device advertising if you remove the filter?&lt;/p&gt;
[quote user="snowuyl"]I have removed calling &amp;nbsp;_sleepModeEnter() and calling advertisingStart() when _advertisingEvtHandler() handles BLE_ADV_EVT_IDLE event. Do you think it is good idea?[/quote]
&lt;p&gt;Yes, this is fine. The advertising module will go to IDLE state after it has iterated through all the enabled advertising states and no connection requests has been received. Restarting advertising when it has reached the IDLE state is ok.&lt;/p&gt;
&lt;p&gt;Are you using a custom board or the development kit?&lt;/p&gt;
&lt;p&gt;regards&lt;/p&gt;
&lt;p&gt;Jared&amp;nbsp;&amp;nbsp;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How to prevent nRF52832 device to enter sleep mode?</title><link>https://devzone.nordicsemi.com/thread/380731?ContentTypeID=1</link><pubDate>Tue, 09 Aug 2022 06:48:43 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:b3d7d47e-4ddb-4171-8da7-2426652341e3</guid><dc:creator>snowuyl</dc:creator><description>&lt;p&gt;&lt;img style="max-height:240px;max-width:320px;" src="https://devzone.nordicsemi.com/resized-image/__size/640x480/__key/communityserver-discussions-components-files/4/3731.ANCS2.png" alt=" " /&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How to prevent nRF52832 device to enter sleep mode?</title><link>https://devzone.nordicsemi.com/thread/380730?ContentTypeID=1</link><pubDate>Tue, 09 Aug 2022 06:48:06 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:4ae17d84-96a6-4f11-b493-65840bfed7d1</guid><dc:creator>snowuyl</dc:creator><description>&lt;p&gt;I have removed calling &amp;nbsp;_sleepModeEnter() and calling advertisingStart() when _advertisingEvtHandler() handles BLE_ADV_EVT_IDLE event. Do you think it is good idea?&lt;/p&gt;
&lt;p&gt;00&amp;gt; &amp;lt;info&amp;gt; app: POWER_ON.&lt;br /&gt;00&amp;gt; &lt;br /&gt;00&amp;gt; &amp;lt;info&amp;gt; app: External devices initializing start&lt;br /&gt;00&amp;gt; &lt;br /&gt;00&amp;gt; &amp;lt;info&amp;gt; app: BLE_ADV_EVT_FAST&lt;br /&gt;00&amp;gt; &lt;br /&gt;00&amp;gt; &amp;lt;info&amp;gt; app: External devices initializing finish&lt;br /&gt;00&amp;gt; &lt;br /&gt;00&amp;gt; &amp;lt;info&amp;gt; app: bsp_button_longkey_handler 1.&lt;br /&gt;00&amp;gt; &lt;br /&gt;00&amp;gt; &amp;lt;info&amp;gt; app: BLE_ADV_EVT_IDLE&lt;br /&gt;00&amp;gt; &lt;br /&gt;00&amp;gt; &amp;lt;info&amp;gt; app: BLE_ADV_EVT_FAST&lt;br /&gt;00&amp;gt; &lt;br /&gt;00&amp;gt; &amp;lt;info&amp;gt; app: BLE_ADV_EVT_IDLE&lt;br /&gt;00&amp;gt; &lt;br /&gt;00&amp;gt; &amp;lt;info&amp;gt; app: BLE_ADV_EVT_FAST&lt;br /&gt;00&amp;gt; &lt;br /&gt;00&amp;gt; &amp;lt;info&amp;gt; app: BLE_ADV_EVT_IDLE&lt;br /&gt;00&amp;gt; &lt;br /&gt;00&amp;gt; &amp;lt;info&amp;gt; app: BLE_ADV_EVT_FAST&lt;br /&gt;00&amp;gt; &lt;br /&gt;00&amp;gt; &amp;lt;info&amp;gt; app: BLE_ADV_EVT_IDLE&lt;br /&gt;00&amp;gt; &lt;br /&gt;00&amp;gt; &amp;lt;info&amp;gt; app: BLE_ADV_EVT_FAST&lt;br /&gt;00&amp;gt; &lt;br /&gt;00&amp;gt; &amp;lt;info&amp;gt; app: BLE_ADV_EVT_IDLE&lt;br /&gt;00&amp;gt; &lt;br /&gt;00&amp;gt; &amp;lt;info&amp;gt; app: BLE_ADV_EVT_FAST&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How to prevent nRF52832 device to enter sleep mode?</title><link>https://devzone.nordicsemi.com/thread/380696?ContentTypeID=1</link><pubDate>Tue, 09 Aug 2022 01:46:07 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:bf58f72e-b20a-47f9-92f7-9a58d9dc3b7e</guid><dc:creator>snowuyl</dc:creator><description>&lt;p&gt;&lt;a href="https://devzone.nordicsemi.com/cfs-file/__key/communityserver-discussions-components-files/4/5381.advertising.c"&gt;devzone.nordicsemi.com/.../5381.advertising.c&lt;/a&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How to prevent nRF52832 device to enter sleep mode?</title><link>https://devzone.nordicsemi.com/thread/380695?ContentTypeID=1</link><pubDate>Tue, 09 Aug 2022 01:40:42 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:77e18a73-25c4-4d31-ad85-108a9e19a5c4</guid><dc:creator>snowuyl</dc:creator><description>&lt;p&gt;&lt;img style="max-height:240px;max-width:320px;" src="https://devzone.nordicsemi.com/resized-image/__size/640x480/__key/communityserver-discussions-components-files/4/no_5F00_ANCS2.png" alt=" " /&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How to prevent nRF52832 device to enter sleep mode?</title><link>https://devzone.nordicsemi.com/thread/380694?ContentTypeID=1</link><pubDate>Tue, 09 Aug 2022 01:39:57 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:50b3e699-e28b-4628-b772-21020bac2358</guid><dc:creator>snowuyl</dc:creator><description>&lt;p&gt;Thanks for your suggestion! I have removed calling &amp;nbsp;_sleepModeEnter(). But nRF Connect still can&amp;#39;t scan BLE device &amp;quot;ANCS2&amp;quot; after &amp;nbsp;_advertisingEvtHandler() handles BLE_ADV_EVT_IDLE event.&lt;/p&gt;
&lt;p&gt;The following is log messages of nRF52832 device:&lt;br /&gt;00&amp;gt; &amp;lt;info&amp;gt; app: POWER_ON.&lt;br /&gt;00&amp;gt; &amp;lt;info&amp;gt; app: BLE_ADV_EVT_FAST&lt;br /&gt;00&amp;gt; &amp;lt;info&amp;gt; app: BLE_ADV_EVT_IDLE&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How to prevent nRF52832 device to enter sleep mode?</title><link>https://devzone.nordicsemi.com/thread/380599?ContentTypeID=1</link><pubDate>Mon, 08 Aug 2022 12:04:38 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:18ce044d-f0e5-4c33-aef2-c66abd53d158</guid><dc:creator>Jared</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;In&amp;nbsp;BLE_ADV_EVT_IDLE you call sd_system_off()&amp;nbsp;by&amp;nbsp;_sleepModeEnter(). The program will enter&amp;nbsp;BLE_ADV_EVT_IDLE&amp;nbsp;after advertising has ended. If you want to avoid the program going to system off sleep then remove the function call from the&amp;nbsp;BLE_ADV_EVT_IDLE&amp;nbsp;event.&lt;/p&gt;
&lt;div&gt;
&lt;div&gt;&lt;span&gt;&amp;nbsp;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span&gt;regards&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span&gt;Jared&amp;nbsp;&lt;/span&gt;&lt;/div&gt;
&lt;/div&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How to prevent nRF52832 device to enter sleep mode?</title><link>https://devzone.nordicsemi.com/thread/380553?ContentTypeID=1</link><pubDate>Mon, 08 Aug 2022 09:31:17 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:a2be8766-d3b2-41e3-a187-166ff484df8b</guid><dc:creator>snowuyl</dc:creator><description>&lt;p&gt;&lt;a href="https://devzone.nordicsemi.com/cfs-file/__key/communityserver-discussions-components-files/4/8371.advertising.c"&gt;devzone.nordicsemi.com/.../8371.advertising.c&lt;/a&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How to prevent nRF52832 device to enter sleep mode?</title><link>https://devzone.nordicsemi.com/thread/380552?ContentTypeID=1</link><pubDate>Mon, 08 Aug 2022 09:30:52 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:9931ddc1-4f3d-4546-9e66-f1321859f90b</guid><dc:creator>snowuyl</dc:creator><description>&lt;p&gt;I am using nRF5 SDK v16.0.0.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How to prevent nRF52832 device to enter sleep mode?</title><link>https://devzone.nordicsemi.com/thread/380543?ContentTypeID=1</link><pubDate>Mon, 08 Aug 2022 09:06:57 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:e8805190-0d76-4c0d-9cf7-12e983530456</guid><dc:creator>Jared</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;Are you using nRF Connect SDK or nRF5SDK?&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Can you share your code?&lt;/p&gt;
&lt;p&gt;regards&lt;/p&gt;
&lt;p&gt;Jared&amp;nbsp;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>