<?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>Put the BLE block in sleep to reduce consumption in a nRF52832 using Softdevice</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/116675/put-the-ble-block-in-sleep-to-reduce-consumption-in-a-nrf52832-using-softdevice</link><description>Hello, 
 In a project using the NRF52832. Softdevice SDK 19.1.0 and Segger IDE, I inizialize the BLE for having NUS and DFU services actives. I try to reproduce the code here. 
 
 Using this code I can see the device advertised in the nRFConnect application</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Mon, 25 Nov 2024 13:42:35 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/116675/put-the-ble-block-in-sleep-to-reduce-consumption-in-a-nrf52832-using-softdevice" /><item><title>RE: Put the BLE block in sleep to reduce consumption in a nRF52832 using Softdevice</title><link>https://devzone.nordicsemi.com/thread/511913?ContentTypeID=1</link><pubDate>Mon, 25 Nov 2024 13:42:35 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:6390dfdd-55db-40f8-a152-6cfb2a99e05b</guid><dc:creator>jinvers</dc:creator><description>&lt;p&gt;Thank you.&lt;/p&gt;
&lt;p&gt;Regards,&lt;/p&gt;
&lt;p&gt;Joel&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Put the BLE block in sleep to reduce consumption in a nRF52832 using Softdevice</title><link>https://devzone.nordicsemi.com/thread/511912?ContentTypeID=1</link><pubDate>Mon, 25 Nov 2024 13:41:00 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:1117674e-ea4a-448e-8429-740b912f2af1</guid><dc:creator>Vidar Berg</dc:creator><description>&lt;p&gt;Hi Joel,&lt;/p&gt;
[quote userid="111626" url="~/f/nordic-q-a/116675/put-the-ble-block-in-sleep-to-reduce-consumption-in-a-nrf52832-using-softdevice/511911"]&lt;p&gt;I have modified the code using&lt;/p&gt;
&lt;p&gt;err_code = sd_ble_gap_adv_stop(m_advertising.adv_handle);&lt;/p&gt;
&lt;p&gt;and it looked as if this has worked well.&lt;/p&gt;[/quote]
&lt;p&gt;Note that the function will return &amp;#39;invalid state&amp;#39;&amp;nbsp;if the stack is not advertising at that point. You may want to ignore that error.&lt;/p&gt;
[quote userid="111626" url="~/f/nordic-q-a/116675/put-the-ble-block-in-sleep-to-reduce-consumption-in-a-nrf52832-using-softdevice/511911"]Anyway, is the process mentioned the right one to disable BLE and let the Softdevice to reduce the consumption of the nRF52832?[/quote]
&lt;p&gt;Yes, you the stack will not draw any additional current if you stop any ongoing BLE activities such as active connections, advertising, or scanning.&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Put the BLE block in sleep to reduce consumption in a nRF52832 using Softdevice</title><link>https://devzone.nordicsemi.com/thread/511911?ContentTypeID=1</link><pubDate>Mon, 25 Nov 2024 13:38:39 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:13d4d979-f960-4564-950d-8e52eb6c17a2</guid><dc:creator>jinvers</dc:creator><description>&lt;p&gt;Hi VIdar,&lt;/p&gt;
&lt;p&gt;I have modified the code using&lt;/p&gt;
&lt;p&gt;err_code = sd_ble_gap_adv_stop(m_advertising.adv_handle);&lt;/p&gt;
&lt;p&gt;and it looked as if this has worked well.&lt;/p&gt;
&lt;p&gt;Anyway, is the process mentioned the right one to disable BLE and let the Softdevice to reduce the consumption of the nRF52832?&lt;/p&gt;
&lt;p&gt;Regards,&lt;/p&gt;
&lt;p&gt;Joel&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Put the BLE block in sleep to reduce consumption in a nRF52832 using Softdevice</title><link>https://devzone.nordicsemi.com/thread/511907?ContentTypeID=1</link><pubDate>Mon, 25 Nov 2024 13:33:04 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:99773a37-7048-4b9f-9a7d-15d09efcda5f</guid><dc:creator>Vidar Berg</dc:creator><description>&lt;p&gt;Hi Joel,&lt;/p&gt;
&lt;p&gt;sd_ble_gap_adv_stop() expects the advertisment handle (uint8_t) as input, not the advertisment struct you are passing to the function. Since the Softdevice only supports one advertisment handle, you can hardcode it to &amp;#39;0&amp;#39;.&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="c_cpp"&gt;(void) sd_ble_gap_adv_stop(0);&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;Regards,&lt;/p&gt;
&lt;p&gt;Vidar&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>