<?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>Nordic UART Service Stops Advertising</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/55132/nordic-uart-service-stops-advertising</link><description>Hi. 
 We are using the Nordic UART service. Our project is based on the example project &amp;quot;ble_app_uart&amp;quot; from version 15.2 of the SDK. I&amp;#39;ve found after about 3 minutes it stops advertising (the reason why I am unable to connect to it). What would be the</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Thu, 05 Dec 2019 11:41:14 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/55132/nordic-uart-service-stops-advertising" /><item><title>RE: Nordic UART Service Stops Advertising</title><link>https://devzone.nordicsemi.com/thread/223868?ContentTypeID=1</link><pubDate>Thu, 05 Dec 2019 11:41:14 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:5f282a2b-4116-4df7-9d1d-1d03dc3f9a2c</guid><dc:creator>Joakim Jakobsen</dc:creator><description>&lt;p&gt;Sorry, I forgot to mention that.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;You are correct, thanks for pointing that out!&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Best regards,&amp;nbsp;&lt;br /&gt;Joakim&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Nordic UART Service Stops Advertising</title><link>https://devzone.nordicsemi.com/thread/223752?ContentTypeID=1</link><pubDate>Thu, 05 Dec 2019 04:48:13 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:92e7ad3e-9823-4504-9816-2b8c01594b56</guid><dc:creator>chrismy</dc:creator><description>&lt;p&gt;Hi Joakim,&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;I&amp;#39;ve since found in another post that you also need to also change the value of&amp;nbsp;init.advdata.flags.&lt;/p&gt;
&lt;p&gt;&lt;a href="https://devzone.nordicsemi.com/f/nordic-q-a/46494/define-app_adv_duration-18000-or-0"&gt;https://devzone.nordicsemi.com/f/nordic-q-a/46494/define-app_adv_duration-18000-or-0&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;After making that change it seems to work OK now.&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Thanks,&lt;/p&gt;
&lt;p&gt;Chris.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Nordic UART Service Stops Advertising</title><link>https://devzone.nordicsemi.com/thread/223746?ContentTypeID=1</link><pubDate>Thu, 05 Dec 2019 04:16:50 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:a6e8a4fe-706f-403f-b6ad-129940c6d7d7</guid><dc:creator>chrismy</dc:creator><description>&lt;p&gt;Hi Joakim,&lt;/p&gt;
&lt;p&gt;Setting&amp;nbsp;APP_ADV_DURATION to 0 doesn&amp;#39;t seem to work.&amp;nbsp; The function&amp;nbsp;ble_advertising_init() returns 0 (so I guess it was successful).&amp;nbsp; With&amp;nbsp;&lt;span&gt;APP_ADV_DURATION&amp;nbsp;set to zero it doesn&amp;#39;t seem to advertise at all.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Thanks,&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Chris.&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Nordic UART Service Stops Advertising</title><link>https://devzone.nordicsemi.com/thread/223312?ContentTypeID=1</link><pubDate>Tue, 03 Dec 2019 12:19:38 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:25055691-0736-4bb4-abcf-fd1db731ce52</guid><dc:creator>Joakim Jakobsen</dc:creator><description>&lt;p&gt;Hi.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;If you take a closer look at the source code, you can see that this is the expected behavior of the ble_app_uart example.&lt;/p&gt;
&lt;p&gt;In the example (note that line numbers may differ due to changes you have made);&amp;nbsp;&lt;br /&gt;main.c, line:92&lt;/p&gt;
&lt;p&gt;#define APP_ADV_DURATION 18000&amp;nbsp;/**&amp;lt; The advertising duration (180 seconds) in units of 10 milliseconds. */&lt;/p&gt;
&lt;p&gt;This define is used in the advertising_init() function:&amp;nbsp;&lt;br /&gt;main.c, line:624&lt;/p&gt;
&lt;p&gt;init.config.ble_adv_fast_timeout = APP_ADV_DURATION;&lt;/p&gt;
&lt;p&gt;This define will stop the advertising if no connection has been initiated after 3 minutes (180 seconds), and the device will go to sleep. If you are using the nRF52-DK, you can wake up the device again by pressing one of the buttons. The DK will then wake up and advertise for the defined duration before going back to sleep again.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;You will need to change this in order to advertise for more than 180 seconds.&amp;nbsp;&lt;br /&gt;Changing the APP_ADV_DURATION to 0 will make your device advertise indefinitely.&lt;/p&gt;
&lt;p&gt;Best regards,&amp;nbsp;&lt;br /&gt;Joakim&amp;nbsp;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>