<?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 set TX power in ADV and Scanning mode</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/60647/how-to-set-tx-power-in-adv-and-scanning-mode</link><description>I am using &amp;quot;ble_app_hrs_rscs_relay&amp;quot; example. I am not able to set the TX power of advertising and scanning both. Currently the avg current is too high. 
 I also tried using this function 
 err_code = sd_ble_gap_tx_power_set(BLE_GAP_TX_POWER_ROLE_ADV </description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Wed, 29 Apr 2020 06:10:24 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/60647/how-to-set-tx-power-in-adv-and-scanning-mode" /><item><title>RE: How to set TX power in ADV and Scanning mode</title><link>https://devzone.nordicsemi.com/thread/247201?ContentTypeID=1</link><pubDate>Wed, 29 Apr 2020 06:10:24 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:5fa84950-f7f9-4a1f-a5c6-93dcefb14ec1</guid><dc:creator>Vidar Berg</dc:creator><description>&lt;p&gt;Hi Salman,&lt;/p&gt;
[quote user="salman"]Now I am able to reduce the TX power, now ever I am seeing spikes of current consumption going up to max 14.262 mA. Can you tell what are they? I am suspecting this might be scanning for scan request at this stage.[/quote]
&lt;p&gt;&amp;nbsp;Yes, this is the RADIO in RX mode. It is not affected by the TX power setting.&lt;/p&gt;
[quote user="salman"]but still there is no effect on the current consumption while scanning after using this function[/quote]
&lt;p&gt;&amp;nbsp;The RADIO is in RX when scanning. The -20 dBm will be used when sending out scan requests or initiating new connections.&amp;nbsp;&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><item><title>RE: How to set TX power in ADV and Scanning mode</title><link>https://devzone.nordicsemi.com/thread/247166?ContentTypeID=1</link><pubDate>Tue, 28 Apr 2020 18:23:29 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:6ce23968-e25a-4222-ac00-942eddcd79a7</guid><dc:creator>Salman</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;Now I am able to reduce the TX power, now ever I am seeing spikes of current consumption going up to max 14.262 mA. Can you tell what are they? I am suspecting this might be scanning for scan request at this stage. See the below image.&lt;/p&gt;
&lt;p&gt;&lt;img src="https://devzone.nordicsemi.com/resized-image/__size/320x240/__key/communityserver-discussions-components-files/4/pastedimage1588098062355v2.png" alt=" " /&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Below is the previous reading before reducing TX power:&lt;/p&gt;
&lt;p&gt;&lt;img src="https://devzone.nordicsemi.com/resized-image/__size/320x240/__key/communityserver-discussions-components-files/4/pastedimage1588098130450v3.png" alt=" " /&gt;&lt;/p&gt;
&lt;p&gt;but still there is no effect on the current consumption while scanning after using this function&lt;/p&gt;
&lt;p&gt;err_code = sd_ble_gap_tx_power_set(BLE_GAP_TX_POWER_ROLE_SCAN_INIT, 0, -20);&lt;br /&gt; APP_ERROR_CHECK(err_code);&lt;/p&gt;
&lt;p&gt;Do I have to put this function before starting scanning?&lt;/p&gt;
&lt;p&gt;&lt;img src="https://devzone.nordicsemi.com/resized-image/__size/320x240/__key/communityserver-discussions-components-files/4/pastedimage1588097885832v1.png" alt=" " /&gt;&lt;/p&gt;
&lt;p&gt;Regards,&lt;/p&gt;
&lt;p&gt;Salman&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How to set TX power in ADV and Scanning mode</title><link>https://devzone.nordicsemi.com/thread/246966?ContentTypeID=1</link><pubDate>Tue, 28 Apr 2020 06:36:25 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:e0da5c02-1ef3-4589-aa35-cd2c69771a70</guid><dc:creator>Vidar Berg</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;It doesn&amp;#39;t look like the&amp;nbsp;TX power&amp;nbsp;changed based on the power profiler plot. Current peaks are close to what you can expect with 0 dBm and LDO regulator. You can play around with the Online power profiler here to see what the expected consumption is with different configurations:&amp;nbsp;&lt;a href="https://devzone.nordicsemi.com/nordic/power/"&gt;https://devzone.nordicsemi.com/nordic/power/&lt;/a&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;1. I&amp;#39;m not sure why the power settings are not being applied. Please try to add the code below after advertising init and see if you get the same result.&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="c_cpp"&gt;    err_code = sd_ble_gap_tx_power_set(BLE_GAP_TX_POWER_ROLE_ADV, 0 /* Handle is always 0 with current Softdevices */, -20);
    APP_ERROR_CHECK(err_code);
    err_code = sd_ble_gap_tx_power_set(BLE_GAP_TX_POWER_ROLE_SCAN_INIT, 0, -20);
    APP_ERROR_CHECK(err_code);
&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;2. It&amp;#39;s only measuring the VDD current going into the nRF51. LEDs and other external circuitries are excluded.&lt;/p&gt;
&lt;p&gt;3. See the code snippet&amp;nbsp;in point 1 above.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>