<?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 ble timeout problem</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/26497/ble_app_uart-ble-timeout-problem</link><description>Hi, all!
Sorry, I&amp;#39;m not good at English myself. 
 My device is nrf52832.
Example code is ble_app_uart (pca10040, s132), I did not modify the code. 
 My problem. 
 Ble will sleep when Not connet for few time. (APP_ADV_TIMEOUT_IN_SECONDS is 180) </description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Fri, 03 Nov 2017 09:43:15 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/26497/ble_app_uart-ble-timeout-problem" /><item><title>RE: ble_app_uart ble timeout problem</title><link>https://devzone.nordicsemi.com/thread/104262?ContentTypeID=1</link><pubDate>Fri, 03 Nov 2017 09:43:15 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:8be56236-12c7-4d9c-aef4-960e3e65bc07</guid><dc:creator>Joakim Jakobsen</dc:creator><description>&lt;p&gt;It won&amp;#39;t make your board consume any more power when advertising. But it will of course drain more power over time, as the board never stops advertising.&lt;br /&gt;
You can try to reduce the power consumption by changing the advertisement interval etc.&lt;br /&gt;
Best regards.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: ble_app_uart ble timeout problem</title><link>https://devzone.nordicsemi.com/thread/104260?ContentTypeID=1</link><pubDate>Thu, 02 Nov 2017 07:18:13 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:1b07f80d-adfb-4b03-8728-f0467c0bedfb</guid><dc:creator>JaeHo</dc:creator><description>&lt;p&gt;Thank you for teaching me the solution.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: ble_app_uart ble timeout problem</title><link>https://devzone.nordicsemi.com/thread/104263?ContentTypeID=1</link><pubDate>Thu, 02 Nov 2017 07:15:26 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:c4732f7e-7b2e-47a6-a664-d7f646edfadb</guid><dc:creator>JaeHo</dc:creator><description>&lt;p&gt;Thanks to you, I&amp;#39;ve solved it.
I heartily thank you.&lt;/p&gt;
&lt;p&gt;ADD. Advertise forever
Does this function consume a lot of battery? Is there a way to reduce battery consumption using this function?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: ble_app_uart ble timeout problem</title><link>https://devzone.nordicsemi.com/thread/104261?ContentTypeID=1</link><pubDate>Wed, 01 Nov 2017 09:41:29 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:362c29e3-3e34-4e94-8b13-ad53cf36e728</guid><dc:creator>Joakim Jakobsen</dc:creator><description>&lt;p&gt;Hi JaeHo!&lt;/p&gt;
&lt;p&gt;As max said in his answer, you should set the advertisement timeout to zero:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;#define APP_ADV_TIMEOUT_IN_SECONDS     0
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;However, if you want to advertise forever you need to set the LE General Discoverable Mode flag, not the LE Limited Discoverable Mode flag.&lt;/p&gt;
&lt;p&gt;So in advertising_init(), change the:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;advdata.flags = BLE_GAP_ADV_FLAGS_LE_ONLY_LIMITED_DISC_MODE;
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;to&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;advdata.flags = BLE_GAP_ADV_FLAGS_LE_ONLY_GENERAL_DISC_MODE;
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;and your device should advertise forever.&lt;/p&gt;
&lt;p&gt;Hope that works.&lt;br /&gt;
Best regards,&lt;br /&gt;
Joakim.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: ble_app_uart ble timeout problem</title><link>https://devzone.nordicsemi.com/thread/104259?ContentTypeID=1</link><pubDate>Wed, 01 Nov 2017 09:13:57 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:16bc5cf3-5f65-4169-96c9-4754f2a13509</guid><dc:creator>max</dc:creator><description>&lt;p&gt;Try to set advertisment timeout to zero&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;#define APP_ADV_TIMEOUT_IN_SECONDS     0
&lt;/code&gt;&lt;/pre&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>