<?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>Customising distance measurement using NDT</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/99676/customising-distance-measurement-using-ndt</link><description>Today I&amp;#39;m working on distance measurement using NDT. I have the example code running (on two Thingy:91s). My next step will be to optimise the code so that rather than running identical code on both devices, I will have one (mobile) device where power</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Fri, 01 Mar 2024 14:40:58 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/99676/customising-distance-measurement-using-ndt" /><item><title>RE: Customising distance measurement using NDT</title><link>https://devzone.nordicsemi.com/thread/471839?ContentTypeID=1</link><pubDate>Fri, 01 Mar 2024 14:40:58 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:dc33b616-84fb-4489-8ca8-192b946dba51</guid><dc:creator>Amanda Hsieh</dc:creator><description>&lt;p&gt;It&amp;#39;s handled by this case&amp;nbsp;&amp;nbsp;&lt;a href="https://devzone.nordicsemi.com/f/nordic-q-a/108629/nrfconnect-sdk-nrf_dm-example-with-dedicated-roles-with-several-reflectors-and-one-initiator-degrades-with-time"&gt;NrfConnect SDK nrf_dm example with dedicated roles with several Reflectors and one Initiator degrades with time&lt;/a&gt;&amp;nbsp;&amp;nbsp;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Customising distance measurement using NDT</title><link>https://devzone.nordicsemi.com/thread/470326?ContentTypeID=1</link><pubDate>Thu, 22 Feb 2024 19:52:16 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:b668661e-2ebf-4562-8fde-08931c71defe</guid><dc:creator>AlexVrubel</dc:creator><description>&lt;p&gt;Hello, I tried your code and this works.&amp;nbsp;&lt;br /&gt;But when I took much more devices (15 ps) in mode WithoutScanning and only one device WithScanning, I get most of ranging with error:&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;Timeslot allocation failed (err -16)&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;Here you can see full log (with some of my custom logs):&lt;/p&gt;
&lt;p&gt;&lt;a href="https://devzone.nordicsemi.com/cfs-file/__key/communityserver-discussions-components-files/4/2543.log.txt"&gt;devzone.nordicsemi.com/.../2543.log.txt&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;I get:&lt;/p&gt;
&lt;p&gt;- 33&amp;nbsp;Measurement result&lt;/p&gt;
&lt;p&gt;- 22&amp;nbsp;Ranging failed (nrf_dm status: 1)&lt;/p&gt;
&lt;p&gt;- 772&amp;nbsp;Timeslot allocation failed (err -16)&lt;/p&gt;
&lt;p&gt;So, I find some configs, by default:&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;CONFIG_DM_INITIATOR_DELAY_US=1000
CONFIG_DM_MIN_TIME_BETWEEN_TIMESLOTS_US=8000
CONFIG_DM_TIMESLOT_QUEUE_LENGTH=40
CONFIG_DM_TIMESLOT_QUEUE_COUNT_SAME_PEER=10
CONFIG_DM_TIMESLOT_RESCHEDULE=n
CONFIG_DM_RANGING_OFFSET_US=1200000&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;My full config file:&lt;/p&gt;
&lt;p&gt;&lt;a href="https://devzone.nordicsemi.com/cfs-file/__key/communityserver-discussions-components-files/4/7360.prj.conf"&gt;devzone.nordicsemi.com/.../7360.prj.conf&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;Add also, that devices works in DM_RANGING_MODE_RTT mode.&lt;/p&gt;
&lt;p&gt;So, the question is what should I change to have better results?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Customising distance measurement using NDT</title><link>https://devzone.nordicsemi.com/thread/426102?ContentTypeID=1</link><pubDate>Wed, 17 May 2023 21:24:20 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:7f3f26f0-4dfb-49b0-86d3-7386ba855b11</guid><dc:creator>Frog</dc:creator><description>&lt;p&gt;Thanks Amanda, that&amp;#39;s much appreciated.&amp;nbsp; I&amp;#39;ve been diverted to another task for a few days but will get back to this in due course.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Customising distance measurement using NDT</title><link>https://devzone.nordicsemi.com/thread/426088?ContentTypeID=1</link><pubDate>Wed, 17 May 2023 16:38:04 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:b9d54d2d-8a07-40dc-8559-014dcec0e33c</guid><dc:creator>Amanda Hsieh</dc:creator><description>&lt;p&gt;Hi,&amp;nbsp;&lt;/p&gt;
&lt;p&gt;When printing the results, the list of supported peers is also checked. To print out the measurement result,&amp;nbsp;you can make the following modification in the peer.c:&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;if (k_msgq_get(&amp;amp;result_msgq, &amp;amp;result, K_FOREVER) == 0) {
            struct peer_entry *peer;
            print_result(&amp;amp;result);
            // peer = peer_find(&amp;amp;result.bt_addr);
            // if (!peer) {
            //  continue;
            // }
            // memcpy(&amp;amp;peer-&amp;gt;result, &amp;amp;result, sizeof(peer-&amp;gt;result));
            // peer-&amp;gt;timeout_ms = PEER_TIMEOUT_INIT_MS;
            // print_result(&amp;amp;peer-&amp;gt;result);
            // closest_peer = mcpd_min_peer_result(closest_peer, peer);
            // led_notification(closest_peer);
            // ble_notification(peer);
        }&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;In the nrf_dm sample (from NCS) the device acts as both scanner and advertiser. A list of supported device is build in the scanner callback function. This list is only used for the purpose of sample. It is not used by the dm submodule or the nrf_dm library.&lt;/p&gt;
&lt;p&gt;Here is my&amp;nbsp;test project&amp;nbsp;&lt;a href="https://devzone.nordicsemi.com/cfs-file/__key/communityserver-discussions-components-files/4/nrf_5F00_dm_5F00_withoutScanning.7z"&gt;devzone.nordicsemi.com/.../nrf_5F00_dm_5F00_withoutScanning.7z&lt;/a&gt; for NCS v2.3.0.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;em&gt;Beware that this code/configuration is not fully tested or qualified and should be considered provided “as-is”. Please test it with your application and let me know if you find any issues.&lt;/em&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: Customising distance measurement using NDT</title><link>https://devzone.nordicsemi.com/thread/425741?ContentTypeID=1</link><pubDate>Tue, 16 May 2023 03:31:30 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:c61e915b-94de-4f69-b05b-d1c3e0a158ac</guid><dc:creator>Frog</dc:creator><description>&lt;p&gt;Thanks Amanda,&lt;br /&gt;&amp;nbsp; I&amp;#39;ve done as you advised and it&amp;#39;s working for me.&lt;br /&gt;What I&amp;#39;m trying to achieve next is to make the &amp;#39;mobile&amp;#39; device advertise but not scan.&amp;nbsp; However, in the &amp;#39;mobile&amp;#39; firmware, if I comment out bt_scan_start() or change from active to passive scanning mode then I don&amp;#39;t see any distance measurements.&amp;nbsp; But from what you say I would expect the &amp;#39;fixed&amp;#39; device still to see the advertisements from the &amp;#39;mobile&amp;#39; device, and connect to perform measurements.&amp;nbsp; So it seems there&amp;#39;s more I need to understand.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Customising distance measurement using NDT</title><link>https://devzone.nordicsemi.com/thread/425716?ContentTypeID=1</link><pubDate>Mon, 15 May 2023 19:05:18 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:18bf2fdc-b41f-4f59-bd9d-fbedcedbccb0</guid><dc:creator>Amanda Hsieh</dc:creator><description>&lt;p&gt;Hi,&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Sorry for the misunderstanding.&amp;nbsp;&lt;/p&gt;
[quote user=""]Can you please confirm whether distance measurement is possible with only one device scanning[/quote]
&lt;p&gt;Yes, when you disable scanning, you&amp;nbsp;should also comment out the&lt;span&gt;&amp;nbsp;&lt;/span&gt;&lt;code&gt;if (peer_supported_test(info-&amp;gt;addr))&lt;/code&gt;&amp;nbsp;line inside&lt;span&gt;&amp;nbsp;&lt;/span&gt;&lt;code&gt;adv_scanned_cb&lt;/code&gt;callback function.&lt;/p&gt;
&lt;p&gt;If the device does not act as a scanner it does not build the list of supported peers.&lt;/p&gt;
&lt;p&gt;In the DM sample (from NCS) the device acts as both scanner and advertiser. A list of supported device is build in the scanner callback function. This list is only used for the purpose of&lt;span&gt;&amp;nbsp;&lt;/span&gt;&lt;em&gt;sample&lt;/em&gt;. It is not used by the&lt;span&gt;&amp;nbsp;&lt;/span&gt;&lt;em&gt;dm submodule&lt;/em&gt;&lt;span&gt;&amp;nbsp;&lt;/span&gt;or the&lt;span&gt;&amp;nbsp;&lt;/span&gt;&lt;em&gt;nrf_dm library.&lt;/em&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: Customising distance measurement using NDT</title><link>https://devzone.nordicsemi.com/thread/425461?ContentTypeID=1</link><pubDate>Sun, 14 May 2023 21:30:27 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:976b34a0-5f47-4fd6-95a7-74331bed353d</guid><dc:creator>Frog</dc:creator><description>&lt;p&gt;Hi Amanda,&lt;/p&gt;
&lt;p&gt;&amp;nbsp; When I say &amp;#39;mobile&amp;#39; and &amp;#39;fixed&amp;#39; I&amp;#39;m referring to the devices being physically portable or not.&amp;nbsp; Both devices will use Nordic microcontrollers.&lt;/p&gt;
&lt;p&gt;Cheers,&lt;/p&gt;
&lt;p&gt;&amp;nbsp; Frog&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Customising distance measurement using NDT</title><link>https://devzone.nordicsemi.com/thread/425419?ContentTypeID=1</link><pubDate>Fri, 12 May 2023 19:01:39 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:eabae6e9-e08f-4d39-a8c3-f776de95dbc6</guid><dc:creator>Amanda Hsieh</dc:creator><description>&lt;p&gt;Hi,&amp;nbsp;&lt;/p&gt;
&lt;p&gt;I am afraid the&amp;nbsp;&lt;a href="https://developer.nordicsemi.com/nRF_Connect_SDK/doc/2.3.0/nrf/samples/bluetooth/nrf_dm/README.html"&gt;nRF Distance Measurement with Bluetooth LE discovery&lt;/a&gt;&amp;nbsp;cannot support mobile phones. The sample requires two nRF devices, one works as the reflector and another as the initiator to measure the distance.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Regards,&lt;br /&gt;Amanda&amp;nbsp;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>