<?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>Changing tx power has no effect under Zephyr</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/92622/changing-tx-power-has-no-effect-under-zephyr</link><description>Hello I don&amp;#39;t see any change in RSSI with different TX power values under Zephyr. 1.9.1 
 It used to work with Nordic SDK 3.2.0 (see table below) The HCI API in Zephyr that is used to set TX power does not return any errors and query reports the saved</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Wed, 12 Oct 2022 16:05:20 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/92622/changing-tx-power-has-no-effect-under-zephyr" /><item><title>RE: Changing tx power has no effect under Zephyr</title><link>https://devzone.nordicsemi.com/thread/390508?ContentTypeID=1</link><pubDate>Wed, 12 Oct 2022 16:05:20 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:a688b581-c6f7-4659-bea0-2b353c192317</guid><dc:creator>tesc</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;I am happy to see you solved the main issue, through addressing both advertising sets.&lt;/p&gt;
&lt;p&gt;When it comes to Bluetooth Controller, the SoftDevice Controller (SDC) is our proprietary BLE controller based on the link layer of our SoftDevice BLE stack. The SoftDevice Controller is the preferred controller to use with nRF Connect SDK. It is specially tailored for nRF SoCs, and this is also the controller we qualify with the Bluetooth SIG for use with our SDK, resulting in a &lt;a href="https://infocenter.nordicsemi.com/index.jsp?topic=%2Fcomp_matrix_nrf52840%2FCOMP%2Fnrf52840%2Fnrf52840_ble_qdid_qual_matrix.html"&gt;QDID you can use for the qualification of your product&lt;/a&gt;. If using the Zephyr Controller then you must do the corresponding qualification yourself or rely on a third party having already done so. Regardless of which controller you use, the host layer will be the Zephyr BLE host which we also qualify for nRF Connect SDK releases.&lt;/p&gt;
&lt;p&gt;Regards,&lt;br /&gt;Terje&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Changing tx power has no effect under Zephyr</title><link>https://devzone.nordicsemi.com/thread/390324?ContentTypeID=1</link><pubDate>Tue, 11 Oct 2022 18:27:26 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:06dc64e9-d778-4ab5-ac44-dcab2a4c3163</guid><dc:creator>AndyM</dc:creator><description>&lt;p&gt;UPDATE&lt;br /&gt;The issue was due to the fact that my application has&lt;/p&gt;
&lt;div&gt;
&lt;div&gt;&lt;span&gt;CONFIG_BT_EXT_ADV_MAX_ADV_SET&lt;/span&gt;&lt;span&gt;=2 as it needs 2 adv sets - one for mesh and one for beacon advertising&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span&gt;&lt;span&gt;However the code that set the tx power only updated tx power&amp;nbsp;in the first adv set&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;
&lt;div&gt;
&lt;div&gt;&lt;span&gt;struct&lt;/span&gt;&lt;span&gt; &lt;/span&gt;&lt;span&gt;bt_hci_cp_vs_write_tx_power_level&lt;/span&gt;&lt;span&gt; *&lt;/span&gt;&lt;span&gt;cp&lt;/span&gt;&lt;span&gt;;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;div&gt;
&lt;div&gt;&lt;span&gt;cp&lt;/span&gt;&lt;span&gt;-&amp;gt;&lt;/span&gt;&lt;span&gt;handle&lt;/span&gt;&lt;span&gt; = &lt;/span&gt;&lt;span&gt;sys_cpu_to_le16&lt;/span&gt;&lt;span&gt;(&lt;/span&gt;&lt;span&gt;0&lt;/span&gt;&lt;span&gt;);&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span&gt;So the second adv set ( which is used for beacon advertising ) was never updated.&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span&gt;cp-&amp;gt;handle&amp;nbsp;=&amp;nbsp;sys_cpu_to_le16(1); does the trick&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span&gt;&amp;nbsp;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span&gt;Thanks for help!&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;/span&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Changing tx power has no effect under Zephyr</title><link>https://devzone.nordicsemi.com/thread/390310?ContentTypeID=1</link><pubDate>Tue, 11 Oct 2022 15:14:02 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:69bec46b-446e-494d-a021-c5b2fa3314b5</guid><dc:creator>AndyM</dc:creator><description>&lt;p&gt;The sample does&amp;nbsp;work.&lt;/p&gt;
&lt;p&gt;NOTE&amp;nbsp;&lt;/p&gt;
&lt;p&gt;The sample proj.conf has&amp;nbsp;&lt;/p&gt;
&lt;div&gt;&lt;span&gt;&lt;span&gt;CONFIG_BT_CTLR_ADVANCED_FEATURES enabled. That gives a warning that a&amp;nbsp;&lt;/span&gt;&lt;/span&gt;
&lt;div&gt;
&lt;div&gt;&lt;span&gt;CONFIG_BT_LL_SW_SPLIT&amp;nbsp;&lt;/span&gt;dependency is missing&lt;/div&gt;
&lt;div&gt;But it builds and works with and without&amp;nbsp;&amp;nbsp;&lt;span&gt;CONFIG_BT_LL_SW_SPLIT&amp;nbsp;&lt;/span&gt;&lt;br /&gt;The problem is somewhere else. Our program uses mesh. I&amp;#39;ll investigate and update.&lt;/div&gt;
&lt;div&gt;If you have any pointers that would be appreciated.&lt;/div&gt;
&lt;div&gt;Question&lt;/div&gt;
&lt;div&gt;What&amp;#39;s the advantage of using ( or not using ) SoftDevice Controller vs Zephyr BT stack (&amp;nbsp;&lt;span&gt;CONFIG_BT_LL_SW_SPLIT&amp;nbsp; =y)?&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span&gt;Thanks&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Changing tx power has no effect under Zephyr</title><link>https://devzone.nordicsemi.com/thread/390250?ContentTypeID=1</link><pubDate>Tue, 11 Oct 2022 11:50:39 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:86e63737-0a99-4d02-92f9-2a95dd181346</guid><dc:creator>tesc</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;The HCI Power Control example already uses the SoftDevice Controller. Does the unchanged example as delivered through nRF Connect SDK also not work?&lt;/p&gt;
&lt;p&gt;Testing the example here, on an nRF52 DK, I confirm both through power measurement (Power Profiler Kit II) and thorugh nRF Connect on Android, that TX power decreases step-wise (5 seconds on each step) then repeating that pattern indefinitely.&lt;/p&gt;
&lt;p&gt;Regards,&lt;br /&gt;Terje&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Changing tx power has no effect under Zephyr</title><link>https://devzone.nordicsemi.com/thread/390066?ContentTypeID=1</link><pubDate>Mon, 10 Oct 2022 14:23:18 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:4415f104-2b58-497d-aa72-702a53a42349</guid><dc:creator>AndyM</dc:creator><description>&lt;p&gt;Our code is based on that sample. No errors are returned but the RSSI levels do not change. Verified that in the nRF connect mobile app on Android&lt;/p&gt;
&lt;p&gt;What are the alternatives?&lt;/p&gt;
&lt;p&gt;I could disable Zephyr BT stack&amp;nbsp; and use the SDK SoftDevice controller -if I&amp;#39;m not mistaken,&amp;nbsp;&lt;span&gt;CONFIG_BT_LL_SW_SPLIT controls that&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Is this a possibility? If so - could you point me to the API to set TX power using SoftDevice controller?&lt;/span&gt;&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: Changing tx power has no effect under Zephyr</title><link>https://devzone.nordicsemi.com/thread/390008?ContentTypeID=1</link><pubDate>Mon, 10 Oct 2022 12:01:40 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:10afa95e-1274-471f-854e-4e0c8cb046d9</guid><dc:creator>tesc</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;TX power can be set dynamically using the HCI, yes.&lt;/p&gt;
&lt;p&gt;Setting it dynamically is also the workaround prior to nRF Connect SDK 2.1.0, if you want a fixed TX power setting other than the default, since fixed TX power setting does not work for the SoftDevice Controller prior to SDK 2.1.0. Hence the note.&lt;/p&gt;
&lt;p&gt;I recommend having a look at the &lt;a href="https://developer.nordicsemi.com/nRF_Connect_SDK/doc/latest/zephyr/samples/bluetooth/hci_pwr_ctrl/README.html#bluetooth-hci-power-control"&gt;Bluetooth: HCI Power Control example&lt;/a&gt;, as it does exactly what you want; it changes TX power dynamically. In main.c you will find set_tx_power() and get_tx_power() functions, that are called from other functions inside main.c. I see that in that example, the CONFIG_BT_CTLR_ADVANCED_FEATURES is also enabled, although I am not sure which exact features used depend on this setting.&lt;/p&gt;
&lt;p&gt;Regards,&lt;br /&gt;Terje&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Changing tx power has no effect under Zephyr</title><link>https://devzone.nordicsemi.com/thread/389662?ContentTypeID=1</link><pubDate>Thu, 06 Oct 2022 14:28:04 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:9f9f14f8-b665-4d09-870f-bb81cd862676</guid><dc:creator>AndyM</dc:creator><description>&lt;p&gt;&lt;a href="https://developer.nordicsemi.com/nRF_Connect_SDK/doc/latest/kconfig/index.html#CONFIG_BT_CTLR_TX_PWR_DYNAMIC_CONTROL"&gt;CONFIG_BT_CTLR_TX_PWR_DYNAMIC_CONTROL&lt;/a&gt;&amp;nbsp;is enabled&lt;/p&gt;
&lt;p&gt;Please clarify your last statement about nRF&amp;nbsp; Connect SDK and a&amp;nbsp;&lt;a href="https://developer.nordicsemi.com/nRF_Connect_SDK/doc/latest/kconfig/index.html#CONFIG_BT_CTLR_TX_PWR_PLUS_8"&gt;CONFIG_BT_CTLR_TX_PWR_PLUS_8&lt;/a&gt;&amp;nbsp;setting&lt;br /&gt;Does this mean that the TX power cannot be set dynamically?&amp;nbsp;&lt;/p&gt;
&lt;p&gt;I found a function&lt;br /&gt;radio_tx_power_set() in&amp;nbsp;subsys\bluetooth\controller\ll_sw\nordic\hal\nrf5\radio\radio.c&lt;/p&gt;
&lt;div&gt;
&lt;div&gt;&lt;span&gt;It sets the TX power register directly&lt;br /&gt;Can I use that instead of the HAL API ? Or is this a private function?&lt;/span&gt;&lt;/div&gt;
&lt;/div&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Changing tx power has no effect under Zephyr</title><link>https://devzone.nordicsemi.com/thread/389633?ContentTypeID=1</link><pubDate>Thu, 06 Oct 2022 13:02:13 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:43eb0a1f-46ba-4ccc-b97a-820d74327ec3</guid><dc:creator>tesc</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;In order for the HCI commands to control the TX power, you also need to set the config:&lt;/p&gt;
&lt;p&gt;&lt;a href="https://developer.nordicsemi.com/nRF_Connect_SDK/doc/latest/kconfig/index.html#CONFIG_BT_CTLR_TX_PWR_DYNAMIC_CONTROL"&gt;CONFIG_BT_CTLR_TX_PWR_DYNAMIC_CONTROL&lt;/a&gt;=y&lt;/p&gt;
&lt;p&gt;Please note that from nRF Connect SDK v2.1.0, the SoftDevice Controller will use the CONFIG_BT_CTLR_TX_PWR_* settings, e.g. &lt;a href="https://developer.nordicsemi.com/nRF_Connect_SDK/doc/latest/kconfig/index.html#CONFIG_BT_CTLR_TX_PWR_PLUS_8"&gt;CONFIG_BT_CTLR_TX_PWR_PLUS_8&lt;/a&gt; for +8 dBm.&lt;/p&gt;
&lt;p&gt;Regards,&lt;br /&gt;Terje&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>