<?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>Distance measurement library questions (Part 2)</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/96108/distance-measurement-library-questions-part-2</link><description>1.The code in dm.c calls a function nrf_config_get() which returns a default configuration defined as NRF_DM_DEFAULT_CONFIG in nrf_dm.h 
 That configuration has the TX power set to NRF_DM_DEFAULT_TX_POWER ( 8 dBM ) 
 Does this mean that during the distance</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Thu, 16 Feb 2023 14:50:54 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/96108/distance-measurement-library-questions-part-2" /><item><title>RE: Distance measurement library questions (Part 2)</title><link>https://devzone.nordicsemi.com/thread/410416?ContentTypeID=1</link><pubDate>Thu, 16 Feb 2023 14:50:54 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:d92bacc8-405d-4290-bdb1-322ec111e687</guid><dc:creator>Amanda Hsieh</dc:creator><description>&lt;p&gt;Happy to help. &lt;span class="emoticon" data-url="https://devzone.nordicsemi.com/cfs-file/__key/system/emoji/1f642.svg" title="Slight smile"&gt;&amp;#x1f642;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;-Amanda H.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Distance measurement library questions (Part 2)</title><link>https://devzone.nordicsemi.com/thread/410409?ContentTypeID=1</link><pubDate>Thu, 16 Feb 2023 14:44:29 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:c129d7f9-dd51-4696-9799-cbc6184cf59b</guid><dc:creator>AndyM</dc:creator><description>&lt;p&gt;Thank you for help&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Distance measurement library questions (Part 2)</title><link>https://devzone.nordicsemi.com/thread/409653?ContentTypeID=1</link><pubDate>Mon, 13 Feb 2023 15:09:20 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:63ea40dd-9913-4f6b-8fcf-4256ded3e519</guid><dc:creator>Amanda Hsieh</dc:creator><description>&lt;p&gt;Hi,&amp;nbsp;&lt;/p&gt;
&lt;p&gt;The settings of BT and the nrf_dm_config_t should generally not affect each other.&amp;nbsp;If the BT subsys is active, it should set the TX power level to the configured value (in this case, this would be the one that was set at boot).&amp;nbsp;If DM is active, it should use the value configured in nrf_dm_config_t. So when DM is not using the radio, it should be set to the value defined at boot.&lt;/p&gt;
&lt;p&gt;Regards,&lt;br /&gt;Amanda H.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Distance measurement library questions (Part 2)</title><link>https://devzone.nordicsemi.com/thread/409416?ContentTypeID=1</link><pubDate>Fri, 10 Feb 2023 20:01:26 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:8f34c00d-737b-488e-a6c2-c7aa9b3db95e</guid><dc:creator>AndyM</dc:creator><description>[quote userid="77782" url="~/f/nordic-q-a/96108/distance-measurement-library-questions-part-2/407560"]The BT (or any other stack) needs to set the TX power again, otherwise, it will use the radio&amp;#39;s default value.[/quote]
&lt;p&gt;Let me rephrase my question&lt;/p&gt;
&lt;p&gt;My application uses&amp;nbsp;&lt;/p&gt;
&lt;div&gt;
&lt;div&gt;&lt;span&gt;bt_hci_cmd_send_sync&lt;/span&gt;&lt;span&gt;(&lt;/span&gt;&lt;span&gt;BT_HCI_OP_VS_WRITE_TX_POWER_LEVEL,,,,,...) API to set the tx power on boot. Let&amp;#39;s say it is set&amp;nbsp; to 2 dBM&lt;br /&gt;Then it calls the DM library to measure with another node&amp;nbsp;&lt;br /&gt;What will the TX power be after DM result callback fires ?&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span&gt;&lt;br /&gt;Thanks&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span&gt;Andy&lt;/span&gt;&lt;/div&gt;
&lt;/div&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Distance measurement library questions (Part 2)</title><link>https://devzone.nordicsemi.com/thread/407560?ContentTypeID=1</link><pubDate>Wed, 01 Feb 2023 13:46:38 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:70155c1c-fb0b-491d-9474-ad0ca1486c92</guid><dc:creator>Amanda Hsieh</dc:creator><description>&lt;p&gt;Hi,&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Because the &lt;span&gt;RADIO_TXPOWER_TXPOWER_Pos8dBm&amp;nbsp;meets the first if condition.&amp;nbsp;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;The TX power is only valid when the distance measurement is running. Once we power-cycle the radio, the configuration is reset. We turn the radio off after the measurement. The BT (or any other stack) needs to set the TX power again, otherwise, it will use the radio&amp;#39;s default value.&lt;/p&gt;
&lt;p&gt;Generally, the measurements will be better with higher TX power, this will decrease the interference / noise during the measurements. However, it is possible to use too high TX power, which can lead to saturation in the receiving side, which will worsen the quality of the measurements.&lt;/p&gt;
&lt;p&gt;Our distance measurement library will detect saturation and report that the measurement has poor quality.&lt;/p&gt;
&lt;p&gt;Regards,&lt;br /&gt;Amanda H.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Distance measurement library questions (Part 2)</title><link>https://devzone.nordicsemi.com/thread/407427?ContentTypeID=1</link><pubDate>Tue, 31 Jan 2023 19:10:56 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:fa01e659-9e03-4b91-96ed-08bf816b15cf</guid><dc:creator>AndyM</dc:creator><description>&lt;p&gt;About the TX power definition.&lt;/p&gt;
&lt;p&gt;In my case it is defined in&amp;nbsp;modules\hal\nordic\nrfx\mdk\nrf52840_bitfields.h file&lt;/p&gt;
&lt;p&gt;However&amp;nbsp;RADIO_TXPOWER_TXPOWER_Pos4dBm and others are also defined in the same file but VSCode grays out everything except&amp;nbsp; RADIO_TXPOWER_TXPOWER_Pos8dBm in nrf_dm.h&lt;/p&gt;
&lt;p&gt;Why?&lt;/p&gt;
&lt;p&gt;On TX power&lt;/p&gt;
&lt;p&gt;Please clarify what you mean by &amp;quot;it depends on your application to configure the TX power..&amp;quot; The implication is that&amp;nbsp; after the measurement the TX power remains at 8 dBM&amp;nbsp; and it&amp;#39;s my application responsibility to set it back to 0. Can you confirm that ?&lt;/p&gt;
&lt;p&gt;Generally, how does the TX power affect the measurement? Is there a correlation between the accuracy of the measurement and TX power?&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Thanks&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Distance measurement library questions (Part 2)</title><link>https://devzone.nordicsemi.com/thread/407425?ContentTypeID=1</link><pubDate>Tue, 31 Jan 2023 18:56:11 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:08e8d8a0-8b89-4789-a0e7-54c8054aefce</guid><dc:creator>Amanda Hsieh</dc:creator><description>&lt;p&gt;Hi,&amp;nbsp;&lt;/p&gt;
[quote user="AndyM"]mdk is a directory with lots&amp;nbsp; files. How do I tell which one is used by my application?[/quote]
&lt;p&gt;Depends on the build target. The easiest way is to use VS Code to find the definition. After building the app with VSCode, right-click on &amp;quot;&lt;span&gt;RADIO_TXPOWER_TXPOWER_Pos8dBm&lt;/span&gt;&amp;quot; -&amp;gt; go to definition; it will show you where it&amp;#39;s defined.&amp;nbsp;&lt;/p&gt;
&lt;div&gt;[quote user="AndyM"]&lt;span&gt; wh&lt;/span&gt;&lt;span&gt;at happens when the measurement is complete?&amp;nbsp; Is the power reset back to what it was set to before? ( 0 in my case )&lt;/span&gt;[/quote]
&lt;p&gt;It depends on your application whether to configure the &lt;span&gt;TX power again after measurement&lt;/span&gt;.&lt;/p&gt;
&lt;p&gt;In the&amp;nbsp;&lt;a href="https://developer.nordicsemi.com/nRF_Connect_SDK/doc/latest/nrf/samples/bluetooth/nrf_dm/README.html"&gt;Bluetooth: nRF Distance Measurement with Bluetooth LE discovery&lt;/a&gt;, it should be still the same.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;-Amanda H.&lt;/p&gt;
&lt;span&gt;&amp;nbsp;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Distance measurement library questions (Part 2)</title><link>https://devzone.nordicsemi.com/thread/407420?ContentTypeID=1</link><pubDate>Tue, 31 Jan 2023 17:46:32 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:463180b8-055e-4bb0-a8b9-59fc3d35761a</guid><dc:creator>AndyM</dc:creator><description>&lt;p&gt;mdk is a directory with lots&amp;nbsp; files. How do I tell which one is used by my application? When I load my app in VSCode, in the nrf_dm.h file only&amp;nbsp;RADIO_TXPOWER_TXPOWER_Pos8dBm is enabled , all others are grayed out, so I assume my application uses that value. Please confirm that.&lt;/p&gt;
&lt;p&gt;Assuming&amp;nbsp;&lt;span&gt;NRF_DM_DEFAULT_TX_POWER&lt;/span&gt;&lt;span&gt;&amp;nbsp; is&amp;nbsp;&lt;/span&gt;&lt;span&gt;RADIO_TXPOWER_TXPOWER_Pos8dBm and the radio TX power is set to 8 dBM for the distance measurement, wh&lt;/span&gt;&lt;span&gt;at happens when the measurement is complete?&amp;nbsp; Is the power reset back to what it was set to before? ( 0 in my case )&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Thanks&lt;br /&gt;&lt;/span&gt;&lt;/p&gt;
&lt;div&gt;&lt;/div&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Distance measurement library questions (Part 2)</title><link>https://devzone.nordicsemi.com/thread/407182?ContentTypeID=1</link><pubDate>Mon, 30 Jan 2023 19:20:46 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:23920788-9286-4ce4-af9c-6ec4893d5d96</guid><dc:creator>Amanda Hsieh</dc:creator><description>&lt;p&gt;Hi,&amp;nbsp;&lt;/p&gt;
&lt;p&gt;If the application is using the default config &lt;code&gt;&lt;span&gt;NRF_DM_DEFAULT_CONFIG&lt;/span&gt;&lt;/code&gt;&lt;span&gt; when calling &lt;/span&gt;&lt;code&gt;&lt;span&gt;&lt;/span&gt;&lt;span&gt;&lt;/span&gt;&lt;span&gt;&lt;/span&gt;&lt;span&gt;nrf_dm_configure&lt;/span&gt;&lt;/code&gt;&lt;span&gt; it would get &lt;code&gt;NRF_DM_DEFAULT_TX_POWER&lt;/code&gt;. The value of &lt;code&gt;NRF_DM_DEFAULT_TX_POWER&lt;/code&gt; in turn depends on what&amp;nbsp;NCS\modules\hal\nordic\nrfx\mdk is being used by the application. The &lt;a href="https://github.com/nrfconnect/sdk-nrfxlib/blob/7b5f28fe8bac6ec458e7aa77cdc6ae8349e3cbc4/nrf_dm/include/nrf_dm.h#L244"&gt;RADIO_TXPOWER_TXPOWER_Pos8dBm&lt;/a&gt;&lt;/span&gt;&amp;nbsp;is defined in the nrfxxxx_bitfields.h&amp;nbsp; file.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;nrf_dm_configure() is defined in&amp;nbsp;NCS\nrfxlib\nrf_dm\include\nrf_dm.h L.288. See &lt;a href="https://developer.nordicsemi.com/nRF_Connect_SDK/doc/latest/nrfxlib/nrf_dm/doc/api.html#c.nrf_dm_configure"&gt;nrf_dm_configure&lt;/a&gt;() documentation.&amp;nbsp;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Regards,&lt;br /&gt;Amanda H&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>