<?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 shuts off and/or the device stops advertising</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/37784/ble-shuts-off-and-or-the-device-stops-advertising</link><description>After searching around a little bit I found this post, but sadly an answer did never come up apparently. I&amp;#39;m using the nrf52 DK, using the 132 Softdevice. 
 I&amp;#39;m kind of at a loss here and I know it&amp;#39;s hard to answer to something like this. I&amp;#39;m programming</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Mon, 05 Nov 2018 09:08:27 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/37784/ble-shuts-off-and-or-the-device-stops-advertising" /><item><title>RE: BLE shuts off and/or the device stops advertising</title><link>https://devzone.nordicsemi.com/thread/155887?ContentTypeID=1</link><pubDate>Mon, 05 Nov 2018 09:08:27 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:0d284fa0-2a03-4dc2-9cbc-d907b92c52a6</guid><dc:creator>MartinBL</dc:creator><description>&lt;p&gt;That is good news! Thank you for the update.&amp;nbsp;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: BLE shuts off and/or the device stops advertising</title><link>https://devzone.nordicsemi.com/thread/155883?ContentTypeID=1</link><pubDate>Mon, 05 Nov 2018 08:57:48 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:f83222e0-5fe7-4991-8c88-30f8f2899c7d</guid><dc:creator>AlexanderGrath</dc:creator><description>&lt;p&gt;I figured it out and solved the problem. So for anybody who finds this in the hopes to find an answer:&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;The problem was caused by many little things. First one, like MartinBL&amp;nbsp;suggested some of the functions produced error codes that did not get checked, doublecheck your code. Especially if you used some BLE examples&amp;nbsp;to create&amp;nbsp;your code, they usually do not check for anything. It depends on how you test but under the &amp;quot;right&amp;quot; conditions almost every part of the BLE connection can fail, you definitely&amp;nbsp;want to handle every single exception.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Second thing: The official Bluetooth&amp;nbsp;connection app and our own app that we used for testing allowed faulty or &amp;quot;dead&amp;quot; BLE connections when rapidly connecting/disconnecting. Without apps running, a BLE connection could be kept active (happened only on Android devices). So it seemed the MCU stopped working but it was actually still connected.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Third issue: Something very specific to my case, long story short: a sensor on the MCU completely freaked out when it was exposed to the vibration of a car engine (when taking the thing with me, to the office, home etc).&amp;nbsp;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: BLE shuts off and/or the device stops advertising</title><link>https://devzone.nordicsemi.com/thread/145697?ContentTypeID=1</link><pubDate>Fri, 24 Aug 2018 13:26:14 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:3b0482a4-6a45-4442-a7a3-86e5738027aa</guid><dc:creator>MartinBL</dc:creator><description>&lt;p&gt;Happy to help.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Since your application seems to just carry on as normal, but without BLE, I suspect that there are some&amp;nbsp;Softdevice API calls (prefixed sd_... ) without error checking.&amp;nbsp;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: BLE shuts off and/or the device stops advertising</title><link>https://devzone.nordicsemi.com/thread/145695?ContentTypeID=1</link><pubDate>Fri, 24 Aug 2018 13:18:15 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:f9f44b04-5348-44f1-b450-39c8c252bc57</guid><dc:creator>AlexanderGrath</dc:creator><description>&lt;p&gt;Thanks for the fast response, I&amp;#39;ll try all those things out.&lt;/p&gt;
&lt;p&gt;As of right now, I don&amp;#39;t have sniffer traces, so far I used the nRF&amp;nbsp;Connect app do debug the connection (as of now there were no issues, so the app was enough to test things out).&lt;br /&gt;&lt;br /&gt;I&amp;#39;ll check the code again and add some error handling where it is missing, thanks for that.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;The logger module seems nice, especially as it can store crash information to the flash.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: BLE shuts off and/or the device stops advertising</title><link>https://devzone.nordicsemi.com/thread/145684?ContentTypeID=1</link><pubDate>Fri, 24 Aug 2018 12:56:52 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:dc4758cb-7125-4800-8524-406c72ee4355</guid><dc:creator>MartinBL</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;Do you use the &lt;a title="Logger module" href="http://infocenter.nordicsemi.com/topic/com.nordic.infocenter.sdk5.v15.1.0/lib_nrf_log.html?cp=4_0_0_3_26"&gt;Logger module&lt;/a&gt;&amp;nbsp;to print debug info to a terminal? If so what do you see? If not I advise you to implement it.&lt;/p&gt;
&lt;p&gt;Do you check the return codes of&amp;nbsp;&lt;em&gt;&lt;strong&gt;all&lt;/strong&gt;&amp;nbsp;&lt;/em&gt;your&amp;nbsp;function calls? If not, the typical way of doing it is e.g.:&lt;/p&gt;
&lt;p&gt;&lt;code&gt;uint32_t err_code = ble_advertising_start(&amp;amp;m_advertising, BLE_ADV_MODE_FAST);&lt;/code&gt;&lt;br /&gt;&lt;code&gt; APP_ERROR_CHECK(err_code);&lt;/code&gt;&lt;/p&gt;
&lt;p&gt;Can you provide sniffer traces? If you have an extra Nordic dev kit to spare you can use our &lt;a title="nRF Tools" href="http://infocenter.nordicsemi.com/topic/com.nordic.infocenter.tools/dita/tools/sniffer/sniffer_intro.html?resultof=%22%73%6e%69%66%66%65%72%22%20"&gt;nRF Bluetooth Sniffer&lt;/a&gt;.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>