<?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>nRF NCS - Set radio TX Power</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/73161/nrf-ncs---set-radio-tx-power</link><description>Hi Nordic Team, 
 I am using a simple GPIO (tx/rx controlled via GPIO) FEM (PA/LNA) with connected to nRF52840. 
 I know I am allowed to crank up the TX power of nRF to +2dBm as per certification of the module. I am using MPSL in nRF NCS to work with</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Thu, 25 Mar 2021 08:59:47 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/73161/nrf-ncs---set-radio-tx-power" /><item><title>RE: nRF NCS - Set radio TX Power</title><link>https://devzone.nordicsemi.com/thread/301823?ContentTypeID=1</link><pubDate>Thu, 25 Mar 2021 08:59:47 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:cb843745-39db-44f2-ac4e-1ce73abd7bf0</guid><dc:creator>Einar Thorsrud</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;The&amp;nbsp;mpsl_tx_power_channel_map_set() function just sets a maximum. You should use the APIs from the respective stacs to set Tx power. It seems to work on my end, by testing with NCS 1.5.0 and just slightly modifying the hci_pwr_ctrl sample like this (here I am including 2 dB and removing some power levels that are invalid for the nRF52840):&lt;/p&gt;
&lt;p&gt;&lt;a href="https://devzone.nordicsemi.com/cfs-file/__key/communityserver-discussions-components-files/4/hci_5F00_pwr_5F00_ctrl.diff"&gt;devzone.nordicsemi.com/.../hci_5F00_pwr_5F00_ctrl.diff&lt;/a&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nRF NCS - Set radio TX Power</title><link>https://devzone.nordicsemi.com/thread/301785?ContentTypeID=1</link><pubDate>Wed, 24 Mar 2021 23:59:23 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:66218a1a-bef5-4c47-9a86-154d8cba80a0</guid><dc:creator>Farhang</dc:creator><description>&lt;p&gt;@eith Thanks for the response, the sample&amp;nbsp;helped a bit.&lt;/p&gt;
&lt;p&gt;However, due to my project requirements, I need to use MPSL as explained in&amp;nbsp;&lt;a href="https://devzone.nordicsemi.com/f/nordic-q-a/72893/mpsl-and-fem-support-ncs-1-5-0"&gt;this post&lt;/a&gt;&amp;nbsp;and&amp;nbsp;@joh2 responded in &lt;a href="https://devzone.nordicsemi.com/f/nordic-q-a/72904/add-mpsl-and-fem-func-in-ncs-1-5-0-example"&gt;this post&lt;/a&gt;&amp;nbsp;that this will be available in v1.5.1 of NCS. I went ahead and updated my nrfxlib to that commit (&lt;a href="https://github.com/nrfconnect/sdk-nrfxlib/commit/ef9e33ee5c1d5d951d0415f0944fc52a15a55a95"&gt;ef9e33&lt;/a&gt;)&lt;/p&gt;
&lt;p&gt;I then used the same helper functions in the sample to set BLE power in my project, with the.conf params below.&lt;/p&gt;
&lt;p&gt;CONFIG_BT_CTLR_ADVANCED_FEATURES=y&lt;br /&gt;CONFIG_BT_CTLR_CONN_RSSI=y&lt;br /&gt;CONFIG_BT_CTLR_TX_PWR_DYNAMIC_CONTROL=y&lt;/p&gt;
&lt;p&gt;The&amp;nbsp;BT_HCI_OP_VS_WRITE_TX_POWER_LEVEL command passes but when read via&amp;nbsp;BT_HCI_OP_VS_READ_TX_POWER_LEVEL it doesn&amp;#39;t match! The read tx power remains at 0.&lt;/p&gt;
&lt;p&gt;Also&amp;nbsp;BT_HCI_OP_READ_RSSI command returns -5 which I believe hints that is not supported.&lt;/p&gt;
&lt;p&gt;Should I be using the MPSL API (e.g. mpsl_tx_power.h is available in the nrfxlib commit above) since I have CONFIG_MPSL=y?&lt;/p&gt;
&lt;p&gt;Looks like i can set via&amp;nbsp;mpsl_tx_power_channel_map_set() but can&amp;#39;t read the tx power?&lt;/p&gt;
&lt;p&gt;Or is the issue that softdevice BLE stack isn&amp;#39;t supporting these command yet with MPSL?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nRF NCS - Set radio TX Power</title><link>https://devzone.nordicsemi.com/thread/301671?ContentTypeID=1</link><pubDate>Wed, 24 Mar 2021 12:43:29 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:0f5a87f9-9d3e-402d-9166-0b34df4044d1</guid><dc:creator>Einar Thorsrud</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
[quote user=""]Should I directly set the&amp;nbsp;TXPOWER register? Or is there a suitable sd_ call for this?&amp;nbsp;[/quote]
&lt;p&gt;The stacks have different API for setting Tx power. For BLE you use&amp;nbsp;BT_HCI_OP_VS_WRITE_TX_POWER_LEVEL (see &lt;a href="https://github.com/nrfconnect/sdk-zephyr/blob/master/samples/bluetooth/hci_pwr_ctrl/src/main.c"&gt;this sample&lt;/a&gt;). For Thread you use&amp;nbsp;otPlatRadioSetTransmitPower().&lt;/p&gt;
[quote user=""]2nd question: What are the max allowed tx power for Thread/BLE? I believe BLE is +20dbm but not sure about Thread.[/quote]
&lt;p&gt;The maximum Tx power for BLE is +20 dBm but in much of the world (including Europe) the limit is 10 dBm, so in most cases that is what you need to relate to unless you make different devices for different regions.&lt;/p&gt;
[quote user=""]3rd question: Is there a reason why sd_ interface allows setting BLE gain per role? in other words, are there difference limitations in TX power for each BLE role?[/quote]
&lt;p&gt;I assume you are referring to full SoftDevice BLE stacks here and not just the SoftDevice controller? That is not relevant in NCS context. But you are right, recent SoftDevice versions support that feature. In most case it is not useful, but you could think of situations where you would for instance want to have a different range for connections than for advertisements etc or that you are willing to spend more power to maintain a specific connection or simmilar.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>