<?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 correctly enable/disable the Bluetooth radio on the nRF Distance Measurement with BLE Discovery?&amp;quot;</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/104021/how-to-correctly-enable-disable-the-bluetooth-radio-on-the-nrf-distance-measurement-with-ble-discovery</link><description>Hey, 
 
 I took the code example for nRF Distance Measurement with Bluetooth LE discovery , and updated the application to start or stop the radio based on a specific condition. I have a button for this and I am using callback. I found that disabling</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Tue, 31 Oct 2023 10:46:42 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/104021/how-to-correctly-enable-disable-the-bluetooth-radio-on-the-nrf-distance-measurement-with-ble-discovery" /><item><title>RE: How to correctly enable/disable the Bluetooth radio on the nRF Distance Measurement with BLE Discovery?"</title><link>https://devzone.nordicsemi.com/thread/453224?ContentTypeID=1</link><pubDate>Tue, 31 Oct 2023 10:46:42 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:ccca640c-6e56-401a-a57d-6f4dd38650a5</guid><dc:creator>J0sh1101</dc:creator><description>&lt;p&gt;Hello,&amp;nbsp;&lt;/p&gt;
&lt;p&gt;I&amp;#39;ll check and then let you knowif this solved the issue.&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Thanks&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How to correctly enable/disable the Bluetooth radio on the nRF Distance Measurement with BLE Discovery?"</title><link>https://devzone.nordicsemi.com/thread/449719?ContentTypeID=1</link><pubDate>Wed, 11 Oct 2023 08:02:59 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:2066f119-51df-4f78-9235-21febc1f8b4e</guid><dc:creator>Simonr</dc:creator><description>&lt;p&gt;Hi&lt;/p&gt;
&lt;p&gt;Sorry for the late reply, but we&amp;#39;re falling behind with handling some cases, so I&amp;#39;m taking over this case now. As my colleague Einar explains in the link you shared on &amp;quot;disabling Bluetooth&amp;quot; he states that you should terminate active connections and stop scanning/advertising on both ends. From what I can see in your initial ticket, it only seems like you stop scanning/advertising, but don&amp;#39;t terminate the connections. I haven&amp;#39;t had time to look at your full project yet, but please make sure you terminate connections on both ends properly and disable scanning/advertising. Then I think you should reinit the Bluetooth stack to avoid any of the error messages you&amp;#39;re seeing.&lt;/p&gt;
&lt;p&gt;Best regards,&lt;/p&gt;
&lt;p&gt;Simon&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How to correctly enable/disable the Bluetooth radio on the nRF Distance Measurement with BLE Discovery?"</title><link>https://devzone.nordicsemi.com/thread/449062?ContentTypeID=1</link><pubDate>Thu, 05 Oct 2023 14:27:46 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:8b6a5c20-8194-4b4a-a702-8a1841541011</guid><dc:creator>J0sh1101</dc:creator><description>&lt;p&gt;Hi,&lt;br /&gt;&lt;br /&gt;Thanks for coming back to me.&lt;/p&gt;
&lt;p&gt;I am using the latest NCS, the SDK v2.4.2:&lt;/p&gt;
&lt;p&gt;&lt;img style="max-height:240px;max-width:320px;" alt=" " src="https://devzone.nordicsemi.com/resized-image/__size/640x480/__key/communityserver-discussions-components-files/4/pastedimage1696516002835v1.png" /&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How to correctly enable/disable the Bluetooth radio on the nRF Distance Measurement with BLE Discovery?"</title><link>https://devzone.nordicsemi.com/thread/449049?ContentTypeID=1</link><pubDate>Thu, 05 Oct 2023 13:55:53 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:ec239b5d-2a9c-4a66-af62-2ffec2508e0c</guid><dc:creator>JONATHAN LL</dc:creator><description>&lt;p&gt;What NCS version are you using?&lt;br /&gt;&lt;br /&gt;Regards,&lt;br /&gt;Jonathan&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How to correctly enable/disable the Bluetooth radio on the nRF Distance Measurement with BLE Discovery?"</title><link>https://devzone.nordicsemi.com/thread/447689?ContentTypeID=1</link><pubDate>Tue, 26 Sep 2023 11:20:32 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:ffdb6743-7365-418b-9e9f-a6841a0a9f46</guid><dc:creator>J0sh1101</dc:creator><description>[quote userid="91187" url="~/f/nordic-q-a/104021/how-to-correctly-enable-disable-the-bluetooth-radio-on-the-nrf-distance-measurement-with-ble-discovery/447407"]Could you try to run in Debug mode and set some brake points, then go through the scenario where you think the device is crashing[/quote]
&lt;p&gt;I tried it and no exception is thrown. When you call stop_ble_system() and start_ble_system(), you would think that the application is running normally. At second glance, you notice that LED4 is no longer blinking (The main is toggling the LED at 1Hz). Also the DM request and DM ranging pins (0.28, 0.29) do not toggle. When I press pause to see where the application is, I am usually in the scanning process:&lt;/p&gt;
&lt;p&gt;&lt;img style="max-height:240px;max-width:320px;" alt=" " src="https://devzone.nordicsemi.com/resized-image/__size/640x480/__key/communityserver-discussions-components-files/4/pastedimage1695718661005v1.png" /&gt;&lt;/p&gt;
&lt;p&gt;When I try to continue to execute the program, the Error Fault Handler is called because the BLE constraints are violated.&lt;/p&gt;
[quote userid="91187" url="~/f/nordic-q-a/104021/how-to-correctly-enable-disable-the-bluetooth-radio-on-the-nrf-distance-measurement-with-ble-discovery/447407"]Does not seem like the output indicates a crash. Does the console output just stop ?&amp;nbsp;[/quote]
&lt;p&gt;Yes, my output freezes like that:&lt;/p&gt;
&lt;p&gt;&lt;img style="max-height:240px;max-width:320px;" alt=" " src="https://devzone.nordicsemi.com/resized-image/__size/640x480/__key/communityserver-discussions-components-files/4/pastedimage1695718786452v2.png" /&gt;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;I have attached a project of my application. Maybe it will be faster this way. Below is the minimal version of the project:&lt;/p&gt;
&lt;p&gt;&lt;a href="https://devzone.nordicsemi.com/cfs-file/__key/communityserver-discussions-components-files/4/dm_5F00_minimal.zip"&gt;devzone.nordicsemi.com/.../dm_5F00_minimal.zip&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;/p&gt;
&lt;p&gt;If you press key 1, the measurement will be stopped, and if you press key 2, the measurement will be started again.&lt;/p&gt;
&lt;p&gt;I hope this helps a bit.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How to correctly enable/disable the Bluetooth radio on the nRF Distance Measurement with BLE Discovery?"</title><link>https://devzone.nordicsemi.com/thread/447407?ContentTypeID=1</link><pubDate>Mon, 25 Sep 2023 09:22:46 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:789832b5-5390-4b2d-840a-f93a363f1064</guid><dc:creator>JONATHAN LL</dc:creator><description>[quote user=""]However, the application crashes when I attempt to restart it. I noticed this because the LED is not blinking (I have set it to blink at 1 Hz). [/quote]
&lt;p&gt;Could you try to run in Debug mode and set some brake points, then go through the scenario where you think the device is crashing.&amp;nbsp;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;/p&gt;
[quote user=""]Here is the console output:&amp;nbsp;[/quote]
&lt;p&gt;Does not seem like the output indicates a crash. Does the console output just stop ?&amp;nbsp;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Running in debug mode should give you some insight on what is happening and will show where in the application it gets stuck.&amp;nbsp;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Regards,&lt;br /&gt;Jonathan&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>