<?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 advertise TX power of a peripheral</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/91184/how-to-advertise-tx-power-of-a-peripheral</link><description>Hi, 
 
 I am programming the nRF52833 DK using the nRF Connect SDK (v2.00). I have built and flashed the Bluetooth: Peripheral HT sample from Zephyr to both boards successfully. I use the Android nRF Connect app to connect to the SoC. 
 I would like to</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Thu, 25 Aug 2022 06:13:24 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/91184/how-to-advertise-tx-power-of-a-peripheral" /><item><title>RE: How to advertise TX power of a peripheral</title><link>https://devzone.nordicsemi.com/thread/383165?ContentTypeID=1</link><pubDate>Thu, 25 Aug 2022 06:13:24 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:87168f8c-4855-4b7b-b437-cc5ec3ed5794</guid><dc:creator>adam_atmo</dc:creator><description>&lt;p&gt;That works! Thanks Kenneth.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How to advertise TX power of a peripheral</title><link>https://devzone.nordicsemi.com/thread/382939?ContentTypeID=1</link><pubDate>Tue, 23 Aug 2022 13:26:28 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:450cb2c9-1816-4fd1-8408-73da1244a6cf</guid><dc:creator>Kenneth</dc:creator><description>&lt;p&gt;Try the attachment. Made with NCS v2.&lt;/p&gt;
&lt;p&gt;&lt;a href="https://devzone.nordicsemi.com/cfs-file/__key/communityserver-discussions-components-files/4/peripheral_5F00_ht_5F00_adve_5F00_tx_5F00_power.zip"&gt;devzone.nordicsemi.com/.../peripheral_5F00_ht_5F00_adve_5F00_tx_5F00_power.zip&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;Kenneth&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How to advertise TX power of a peripheral</title><link>https://devzone.nordicsemi.com/thread/382790?ContentTypeID=1</link><pubDate>Tue, 23 Aug 2022 02:34:00 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:1284aaba-60ab-4c80-aa57-592aaaa7d2ed</guid><dc:creator>adam_atmo</dc:creator><description>&lt;p&gt;Thanks Kenneth,&lt;/p&gt;
&lt;p&gt;I have included the relevant files/functions from the fast pair sample into the&lt;span&gt;&amp;nbsp;&lt;/span&gt;&lt;a href="https://docs.zephyrproject.org/2.6.0/samples/bluetooth/peripheral_ht/README.html"&gt;Bluetooth: Peripheral HT&lt;/a&gt;&amp;nbsp;sample; however, the applciation is failing to build. I have attached my main.c and prj.conf file. Please let me know if I am using the functions correctly - I have pointed out clearly the changes I have made to the&amp;nbsp;&lt;a href="https://docs.zephyrproject.org/2.6.0/samples/bluetooth/peripheral_ht/README.html"&gt;Bluetooth: Peripheral HT&lt;/a&gt;&amp;nbsp;sample.&lt;/p&gt;
&lt;p&gt;Adam&lt;/p&gt;
&lt;p&gt;&lt;a href="https://devzone.nordicsemi.com/cfs-file/__key/communityserver-discussions-components-files/4/7345.main.c"&gt;devzone.nordicsemi.com/.../7345.main.c&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;CONFIG_BT=y
CONFIG_BT_DEBUG_LOG=y
CONFIG_BT_SMP=y
CONFIG_BT_PERIPHERAL=y
CONFIG_BT_DIS=y
CONFIG_BT_DIS_PNP=y
CONFIG_BT_BAS=y
CONFIG_BT_DEVICE_NAME=&amp;quot;Zephyr Health Thermometer&amp;quot;
CONFIG_BT_DEVICE_APPEARANCE=768
CONFIG_BT_ATT_ENFORCE_FLOW=n
CONFIG_CBPRINTF_FP_SUPPORT=y

CONFIG_BT_CTLR_TX_PWR_DYNAMIC_CONTROL=y&lt;/pre&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How to advertise TX power of a peripheral</title><link>https://devzone.nordicsemi.com/thread/382654?ContentTypeID=1</link><pubDate>Mon, 22 Aug 2022 11:32:14 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:46b70d78-eaf7-4635-8113-a9b974c3f012</guid><dc:creator>Kenneth</dc:creator><description>&lt;p&gt;Hello,&lt;/p&gt;
&lt;p&gt;I can find there is a&amp;nbsp;bt_tx_power_adv_data_fill() implementation in bt_tx_power_adv.c that you likely you can use here. I can find that the &lt;a href="https://developer.nordicsemi.com/nRF_Connect_SDK/doc/latest/nrf/samples/bluetooth/peripheral_fast_pair/README.html"&gt;peripheral_fast_pair&lt;/a&gt; example seem to call this from&amp;nbsp;bt_adv_helper_tx_power_prepare(). Basically the&amp;nbsp;&lt;span&gt;bt_tx_power_adv_data_fill() will read out the tx power used in the controller and prepare to be used in advertisment.&amp;nbsp;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&lt;pre class="ui-code" data-mode="c_cpp"&gt;static struct bt_data ad[] = {
	BT_DATA_BYTES(BT_DATA_FLAGS, (BT_LE_AD_GENERAL | BT_LE_AD_NO_BREDR)),
	BT_DATA_BYTES(BT_DATA_UUID16_ALL,
		      BT_UUID_16_ENCODE(BT_UUID_HIDS_VAL),
		      BT_UUID_16_ENCODE(BT_UUID_BAS_VAL)),
	/* Empty placeholder for TX power advertising data. */
	{
	},
	/* Empty placeholder for Fast Pair advertising data. */
	{
	},
};&lt;/pre&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Best regards,&lt;br /&gt;Kenneth&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>