<?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>Configuring TX power level on the central device - nrf52840 / VS code / nrf connect / zephyr</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/119047/configuring-tx-power-level-on-the-central-device---nrf52840-vs-code-nrf-connect-zephyr</link><description>Hi, 
 I am trying to set the Tx power level on the central device, I have followed the nordic example samples/bluetooth/hci_pwr_ctrl in the Zephyr tree. But it only sets for the peripheral device and it works fine. 
 I tried following the same steps to</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Wed, 14 May 2025 05:29:11 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/119047/configuring-tx-power-level-on-the-central-device---nrf52840-vs-code-nrf-connect-zephyr" /><item><title>RE: Configuring TX power level on the central device - nrf52840 / VS code / nrf connect / zephyr</title><link>https://devzone.nordicsemi.com/thread/535240?ContentTypeID=1</link><pubDate>Wed, 14 May 2025 05:29:11 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:aa2be617-f0cd-484f-a7ba-c8ae21b03bf5</guid><dc:creator>MMH</dc:creator><description>&lt;p&gt;Hi Kazi, Thank you for your reply! I will try this out. Appreciate you.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Cheers, Mujeefha&amp;nbsp;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Configuring TX power level on the central device - nrf52840 / VS code / nrf connect / zephyr</title><link>https://devzone.nordicsemi.com/thread/528001?ContentTypeID=1</link><pubDate>Wed, 19 Mar 2025 12:02:35 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:0b51cb2f-78d7-44dd-8fdc-1a99f27afe9f</guid><dc:creator>Kazi Afroza Sultana</dc:creator><description>&lt;p&gt;Hello Mujeefa,&lt;/p&gt;
&lt;p&gt;You can read the register value of TXPOWER by the following command&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;nrfjprog --memrd 0x4000150C&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;The deafult value is 0dbM (&lt;a href="https://docs.nordicsemi.com/bundle/ps_nrf52840/page/radio.html#ariaid-title70"&gt;https://docs.nordicsemi.com/bundle/ps_nrf52840/page/radio.html#ariaid-title70&lt;/a&gt;).&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;&lt;img style="max-height:240px;max-width:320px;" src="https://devzone.nordicsemi.com/resized-image/__size/640x480/__key/communityserver-discussions-components-files/4/pastedimage1742385700826v1.png" alt=" " /&gt;&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;If you set TX power 8dbM it will look like this&lt;/p&gt;
&lt;p&gt;&lt;img style="max-height:240px;max-width:320px;" src="https://devzone.nordicsemi.com/resized-image/__size/640x480/__key/communityserver-discussions-components-files/4/pastedimage1742385739002v2.png" alt=" " /&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Configuring TX power level on the central device - nrf52840 / VS code / nrf connect / zephyr</title><link>https://devzone.nordicsemi.com/thread/527486?ContentTypeID=1</link><pubDate>Sun, 16 Mar 2025 23:17:08 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:2b8d34ac-4cb8-45ec-9c08-bc341f9d147a</guid><dc:creator>MMH</dc:creator><description>&lt;p&gt;Hi Kazi,&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Thank you so much for your reply. Appreciate your help. I will try this out and will keep you posted. Wondering if you could suggest me ways, I could verify that the BLE is running at 8dBM? From the software as well as practically?&lt;/p&gt;
&lt;p&gt;Thanks,&lt;/p&gt;
&lt;p&gt;Mujeefa&amp;nbsp;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Configuring TX power level on the central device - nrf52840 / VS code / nrf connect / zephyr</title><link>https://devzone.nordicsemi.com/thread/523520?ContentTypeID=1</link><pubDate>Tue, 18 Feb 2025 13:49:36 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:3a1475c0-b7af-4eca-83f6-3e9b27b317a7</guid><dc:creator>Kazi Afroza Sultana</dc:creator><description>&lt;p&gt;Hello Mujeefa,&lt;/p&gt;
&lt;p&gt;1. &amp;#39;&amp;#39;Can&lt;span&gt;&amp;nbsp;we set the&amp;nbsp;TX power level on the central device (I am using nrf52840) using zephyr? I am using the&amp;nbsp;Central uart code.&amp;#39;&amp;#39;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;3. &amp;#39;&amp;#39;Is there any example codes I can refer to that sets the TX power on the central device?&amp;#39;&amp;#39;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Yes, you can set it&amp;nbsp;the&amp;nbsp;TX power level on the central device. This can be done by both from configuration and runtime. If you want to change it statically then you need to add&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;CONFIG_BT_CTLR_TX_PWR_* (you can change power upto 8 dbM) in thprj.config file (&lt;a href="https://docs.nordicsemi.com/bundle/ncs-latest/page/nrf/protocols/matter/getting_started/transmission_power.html#changing_tx_power_for_bluetooth_le"&gt;Configuring transmission power&lt;/a&gt;).&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;For runtime, you can add this&amp;nbsp;&lt;/span&gt;&lt;/p&gt;
&lt;div&gt;
&lt;div&gt;&lt;span&gt;CONFIG_BT_CTLR_TX_PWR_DYNAMIC_CONTROL&lt;/span&gt;&lt;span&gt;=y (same as hci_pwr_control sample) in config file and after this, in your code, you can use the HCI command to set the TX power (to set the TX power dynamically).&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span&gt;&lt;pre class="ui-code" data-mode="text"&gt;static void set_tx_power(uint8_t handle_type, uint16_t handle, int8_t tx_pwr_lvl)
{
	struct bt_hci_cp_vs_write_tx_power_level *cp;
	struct bt_hci_rp_vs_write_tx_power_level *rp;
	struct net_buf *buf, *rsp = NULL;
	int err;

	buf = bt_hci_cmd_create(BT_HCI_OP_VS_WRITE_TX_POWER_LEVEL,
				sizeof(*cp));
	if (!buf) {
		printk(&amp;quot;Unable to allocate command buffer\n&amp;quot;);
		return;
	}

	cp = net_buf_add(buf, sizeof(*cp));
	cp-&amp;gt;handle = sys_cpu_to_le16(handle);
	cp-&amp;gt;handle_type = handle_type;
	cp-&amp;gt;tx_power_level = tx_pwr_lvl;

	err = bt_hci_cmd_send_sync(BT_HCI_OP_VS_WRITE_TX_POWER_LEVEL,
				   buf, &amp;amp;rsp);
	if (err) {
		printk(&amp;quot;Set Tx power err: %d\n&amp;quot;, err);
		return;
	}

	rp = (void *)rsp-&amp;gt;data;
	printk(&amp;quot;Actual Tx Power: %d\n&amp;quot;, rp-&amp;gt;selected_tx_power);

	net_buf_unref(rsp);
}&lt;/pre&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span&gt;&amp;nbsp;2. What is the TX power level set on the Central device by default?&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span&gt;0dbM&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;/div&gt;
&lt;div&gt;&lt;span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;/div&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>