<?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 and PHY in NCS Example at Runtime</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/77753/changing-tx-power-and-phy-in-ncs-example-at-runtime</link><description>Hello, 
 I am using NCS v1.6.0 with the nRF52833 DK and would like to modify the TX power (e.g. from 0 to +4 dBm) and PHY (e.g. from 1Mbps to Coded PHY) in the peripheral_uart example with runtime function calls (not Kconfig). I am looking for something</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Fri, 23 Jul 2021 09:19:27 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/77753/changing-tx-power-and-phy-in-ncs-example-at-runtime" /><item><title>RE: Changing TX Power and PHY in NCS Example at Runtime</title><link>https://devzone.nordicsemi.com/thread/321520?ContentTypeID=1</link><pubDate>Fri, 23 Jul 2021 09:19:27 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:63d2e6ea-fa49-45c0-8389-818d565a2cb3</guid><dc:creator>Hung Bui</dc:creator><description>&lt;p&gt;Hi Akash,&amp;nbsp;&lt;/p&gt;
&lt;p&gt;I believe it&amp;#39;s the standard HCI interface, so it&amp;#39;s common between the Zephyr Controller and the Softdevice controller.&amp;nbsp;&lt;br /&gt;BT_HCI_OP_VS_WRITE_TX_POWER_LEVEL is not implemented in the throughput example, but I don&amp;#39;t see any reason why it wouldn&amp;#39;t work. Have you tried to test&amp;nbsp; ? Just call the function in a thread after connected.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Changing TX Power and PHY in NCS Example at Runtime</title><link>https://devzone.nordicsemi.com/thread/321419?ContentTypeID=1</link><pubDate>Thu, 22 Jul 2021 16:13:23 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:e145b050-bb9f-4c04-bed0-2754ec1ada19</guid><dc:creator>Akash Patel</dc:creator><description>&lt;p&gt;Hi Hung,&lt;/p&gt;
[quote userid="2121" url="~/f/nordic-q-a/77753/changing-tx-power-and-phy-in-ncs-example-at-runtime/321351#321351"]Have you tried the throughput example in&amp;nbsp;\nrf\samples\bluetooth\throughput ?&amp;nbsp;&lt;br /&gt;In the example you can find the API to request PHY update or data length update.&amp;nbsp;[/quote]
&lt;p&gt;Thanks, looks like the function to focus on is &lt;a href="https://github.com/nrfconnect/sdk-nrf/blob/master/samples/bluetooth/throughput/src/main.c#L454"&gt;bt_conn_le_phy_update&lt;/a&gt;&amp;nbsp;being set by the shell command &lt;a href="https://github.com/nrfconnect/sdk-nrf/blob/master/samples/bluetooth/throughput/src/cmds.c#L133"&gt;here&lt;/a&gt;.&lt;span&gt;&amp;nbsp;&lt;/span&gt;&lt;/p&gt;
[quote userid="2121" url="~/f/nordic-q-a/77753/changing-tx-power-and-phy-in-ncs-example-at-runtime/321351#321351"]&lt;p&gt;For TX Power you can call&amp;nbsp;&lt;br /&gt;bt_hci_cmd_send_sync(BT_HCI_OP_VS_WRITE_TX_POWER_LEVEL, buf, &amp;amp;rsp);&lt;/p&gt;
&lt;p&gt;Please have a look here:&amp;nbsp;&lt;a href="https://github.com/nrfconnect/sdk-zephyr/tree/master/samples/bluetooth/hci_pwr_ctrl"&gt;github.com/.../hci_pwr_ctrl&lt;/a&gt;&lt;/p&gt;[/quote]
&lt;p&gt;I have looked at this example before but from my understanding, this is only relevant if I am using the Zephyr controller. Is that correct? Also how is that API compatible with the Throughput Example? Can you show where and how it would be implemented in that example?&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Please also answer this:&lt;/span&gt;&lt;/p&gt;
[quote userid="74303" url="~/f/nordic-q-a/77753/changing-tx-power-and-phy-in-ncs-example-at-runtime"]Are these function calls different if I use the Zephyr Controller vs. the SoftDevice Controller?[/quote]
&lt;p&gt;Regards,&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&lt;span&gt;Akash&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Changing TX Power and PHY in NCS Example at Runtime</title><link>https://devzone.nordicsemi.com/thread/321351?ContentTypeID=1</link><pubDate>Thu, 22 Jul 2021 12:28:17 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:6196070a-c62f-4c70-8a4e-c43fe967a2d1</guid><dc:creator>Hung Bui</dc:creator><description>&lt;p&gt;Hi Akash,&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Have you tried the throughput example in&amp;nbsp;\nrf\samples\bluetooth\throughput ?&amp;nbsp;&lt;br /&gt;In the example you can find the API to request PHY update or data length update.&amp;nbsp;&lt;br /&gt;For TX Power you can call&amp;nbsp;&lt;br /&gt;bt_hci_cmd_send_sync(BT_HCI_OP_VS_WRITE_TX_POWER_LEVEL, buf, &amp;amp;rsp);&lt;/p&gt;
&lt;p&gt;Please have a look here:&amp;nbsp;&lt;a href="https://github.com/nrfconnect/sdk-zephyr/tree/master/samples/bluetooth/hci_pwr_ctrl"&gt;github.com/.../hci_pwr_ctrl&lt;/a&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>