<?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>NrfConnect SDK nrf_dm example with dedicated roles with several Reflectors and one Initiator degrades with time</title><link>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</link><description>Hello, I work with nrf_dm example. 
 I found this thread and fixed roles for devices as shows in this thread (also add question to that thread). Then I take 1 device with Scanner enable and 15 devices with Scanner disable options. Also I modify some logs</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Tue, 02 Apr 2024 14:44:13 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" 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" /><item><title>RE: NrfConnect SDK nrf_dm example with dedicated roles with several Reflectors and one Initiator degrades with time</title><link>https://devzone.nordicsemi.com/thread/476653?ContentTypeID=1</link><pubDate>Tue, 02 Apr 2024 14:44:13 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:485b99e0-0ba2-4500-8a07-9e51b0dca78d</guid><dc:creator>Amanda Hsieh</dc:creator><description>&lt;p&gt;Hi,&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&lt;span dir="ltr"&gt;Did you enable logging of error return values?&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;Could you&amp;nbsp;check if the devices try to range?&lt;/p&gt;
&lt;p&gt;You can check the value returned here:&lt;span&gt;&amp;nbsp;&lt;/span&gt;&lt;a title="https://github.com/nrfconnect/sdk-nrf/blob/main/subsys/dm/dm.c#l184" href="https://github.com/nrfconnect/sdk-nrf/blob/main/subsys/dm/dm.c#L184" rel="noopener noreferrer" target="_blank"&gt;https://github.com/nrfconnect/sdk-nrf/blob/main/subsys/dm/dm.c#L184&lt;br /&gt;&lt;/a&gt;( I think it is logged here:&lt;span&gt;&amp;nbsp;&lt;/span&gt;&lt;a title="https://github.com/nrfconnect/sdk-nrf/blob/main/subsys/dm/dm.c#l440" href="https://github.com/nrfconnect/sdk-nrf/blob/main/subsys/dm/dm.c#L440" rel="noopener noreferrer" target="_blank"&gt;https://github.com/nrfconnect/sdk-nrf/blob/main/subsys/dm/dm.c#L440&lt;/a&gt;&lt;span&gt;&amp;nbsp;&lt;/span&gt;) &lt;br /&gt;also, the quality of the report could be interesting, if the ranging does not result in an error.&lt;/p&gt;
&lt;/blockquote&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: NrfConnect SDK nrf_dm example with dedicated roles with several Reflectors and one Initiator degrades with time</title><link>https://devzone.nordicsemi.com/thread/476015?ContentTypeID=1</link><pubDate>Tue, 26 Mar 2024 19:08:17 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:194d5c5e-0f91-4a18-b3bd-7ab0dc0ab422</guid><dc:creator>AlexVrubel</dc:creator><description>&lt;p&gt;No, I don&amp;#39;t. Can you prove, that it works with 10+ devices in role without scanning? For example if I use PCA10040 boards and your implementation from the box? Did you tested it in that way?&lt;/p&gt;
&lt;p&gt;Thanks&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: NrfConnect SDK nrf_dm example with dedicated roles with several Reflectors and one Initiator degrades with time</title><link>https://devzone.nordicsemi.com/thread/476011?ContentTypeID=1</link><pubDate>Tue, 26 Mar 2024 18:17:22 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:503ad235-2dbc-4bdb-9c9c-9a015d8aad38</guid><dc:creator>AlexVrubel</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;First of all thanks for reply.&lt;/p&gt;
&lt;p&gt;1. I use NCS version 2.5.0, with some modifications with logs&lt;/p&gt;
&lt;p&gt;&lt;img style="max-height:240px;max-width:320px;" src="https://devzone.nordicsemi.com/resized-image/__size/640x480/__key/communityserver-discussions-components-files/4/_21043D0438043C043E043A04_-_4D043A04400430043D043004_-2024_2D00_03_2D00_21-_3204_-21.51.31.png" alt=" " /&gt;&lt;/p&gt;
&lt;p&gt;2. Devices try to range and it ends with error - I even comment this debug message because it spams a lot&lt;/p&gt;
&lt;p&gt;&lt;img style="max-height:240px;max-width:320px;" src="https://devzone.nordicsemi.com/resized-image/__size/640x480/__key/communityserver-discussions-components-files/4/_21043D0438043C043E043A04_-_4D043A04400430043D043004_-2024_2D00_03_2D00_21-_3204_-21.55.30.png" alt=" " /&gt;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;So, I took an original project nrf_dm_WithoutScanning from &lt;a href="https://devzone.nordicsemi.com/f/nordic-q-a/99676/customising-distance-measurement-using-ndt/426102?focus=true#permalink=858951*/"&gt;this&lt;/a&gt; thread and revert my changes with logs in SDK, but save my prj.conf file to work with custom board. Full diff of config files:&lt;/p&gt;
&lt;p&gt;&lt;img style="max-height:240px;max-width:320px;" src="https://devzone.nordicsemi.com/resized-image/__size/640x480/__key/communityserver-discussions-components-files/4/_21043D0438043C043E043A04_-_4D043A04400430043D043004_-2024_2D00_03_2D00_21-_3204_-22.16.06.png" alt=" " /&gt;&lt;/p&gt;
&lt;p&gt;And also change mode from MCPD to RTT:&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;#define DEFAULT_RANGING_MODE    DM_RANGING_MODE_RTT /* DM_RANGING_MODE_MCPD */&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;Then I build and flash one device with&amp;nbsp;SCAN_ENABLE option and 15 without. And get only errors&lt;/p&gt;
&lt;p&gt;&lt;img style="max-height:240px;max-width:320px;" src="https://devzone.nordicsemi.com/resized-image/__size/640x480/__key/communityserver-discussions-components-files/4/_21043D0438043C043E043A04_-_4D043A04400430043D043004_-2024_2D00_03_2D00_26-_3204_-20.09.57.png" alt=" " /&gt;&lt;/p&gt;
&lt;p&gt;Full logs:&lt;/p&gt;
&lt;p&gt;&lt;a href="https://devzone.nordicsemi.com/cfs-file/__key/communityserver-discussions-components-files/4/3247.txt"&gt;devzone.nordicsemi.com/.../3247.txt&lt;/a&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: NrfConnect SDK nrf_dm example with dedicated roles with several Reflectors and one Initiator degrades with time</title><link>https://devzone.nordicsemi.com/thread/475416?ContentTypeID=1</link><pubDate>Fri, 22 Mar 2024 14:06:54 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:5c1ce0ef-ecff-40c8-b1c8-86c24e3fa46a</guid><dc:creator>Amanda Hsieh</dc:creator><description>&lt;p&gt;Hi,&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&lt;span dir="ltr"&gt;Were you able to resolve this issue?&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: NrfConnect SDK nrf_dm example with dedicated roles with several Reflectors and one Initiator degrades with time</title><link>https://devzone.nordicsemi.com/thread/474450?ContentTypeID=1</link><pubDate>Mon, 18 Mar 2024 21:11:09 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:c730bb76-8e03-4fe9-aece-a06025be07e6</guid><dc:creator>Amanda Hsieh</dc:creator><description>&lt;p&gt;Hi,&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Sorry for the delay. I was out of the office.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;From the logs, it looks like the timeslot allocation works now.&lt;/p&gt;
&lt;p&gt;What NCS version are you using?&lt;/p&gt;
&lt;p&gt;Could you&amp;nbsp;check if the devices try to range?&lt;/p&gt;
&lt;p&gt;You can check the value returned here: &lt;a title="https://github.com/nrfconnect/sdk-nrf/blob/main/subsys/dm/dm.c#l184" href="https://github.com/nrfconnect/sdk-nrf/blob/main/subsys/dm/dm.c#L184" rel="noopener noreferrer" target="_blank"&gt;https://github.com/nrfconnect/sdk-nrf/blob/main/subsys/dm/dm.c#L184&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;( I think it is logged here: &lt;a title="https://github.com/nrfconnect/sdk-nrf/blob/main/subsys/dm/dm.c#l440" href="https://github.com/nrfconnect/sdk-nrf/blob/main/subsys/dm/dm.c#L440" rel="noopener noreferrer" target="_blank"&gt;https://github.com/nrfconnect/sdk-nrf/blob/main/subsys/dm/dm.c#L440&lt;/a&gt; )&lt;/p&gt;
&lt;p&gt;also, the quality of the report could be interesting, if the ranging does not result in an error.&lt;/p&gt;
&lt;p&gt;Do you have any modifications to the sample? Could you share the project?&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: NrfConnect SDK nrf_dm example with dedicated roles with several Reflectors and one Initiator degrades with time</title><link>https://devzone.nordicsemi.com/thread/473023?ContentTypeID=1</link><pubDate>Fri, 08 Mar 2024 17:51:13 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:90945135-1aa9-488c-a08f-d94574b699b7</guid><dc:creator>AlexVrubel</dc:creator><description>&lt;p&gt;Hello, so for I tried:&lt;/p&gt;
&lt;p&gt;- Increase advertise interval from&amp;nbsp;BT_GAP_ADV_FAST_INT_MIN_2 to&amp;nbsp;BT_GAP_ADV_SLOW_INT_MIN and&amp;nbsp;BT_GAP_ADV_FAST_INT_MAX_2 to&amp;nbsp;BT_GAP_ADV_SLOW_INT_MAX&lt;/p&gt;
&lt;p&gt;&lt;span&gt;- CONFIG_DM_TIMESLOT_QUEUE_COUNT_SAME_PEER: 1 (10 by default)&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;- CONFIG_DM_RANGING_OFFSET_US reduce to 120000 (120 ms, was 1.2s)&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;- CONFIG_DM_TIMESLOT_RESCHEDULE tried y and n&lt;/span&gt;&lt;/p&gt;
&lt;div&gt;
&lt;div&gt;&lt;span&gt;- CONFIG_DM_TIMESLOT_QUEUE_LENGTH tried 1, 3, 5, 8, 40 (by default), 100&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span&gt;- Tried decrease&amp;nbsp;CONFIG_BT_BACKGROUND_SCAN_WINDOW from 1024 up to 4&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span&gt;Nothing helps, and get only worse. Instead of 5-8 rangings from the start, I get only 1-2-3 at the beginning and only 1&amp;nbsp;every 2-3 seconds after ~5 minutes.&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span&gt;I use 1 devise with&amp;nbsp;SCAN_ENABLE and 14 without scanning&lt;/span&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;p&gt;&lt;span&gt;&lt;/span&gt;Also I added logs to&amp;nbsp;data_cb function in main.c:&lt;/p&gt;
&lt;p&gt;&lt;img style="max-height:240px;max-width:320px;" alt=" " src="https://devzone.nordicsemi.com/resized-image/__size/640x480/__key/communityserver-discussions-components-files/4/_21043D0438043C043E043A04_-_4D043A04400430043D043004_-2024_2D00_03_2D00_08-_3204_-20.14.19.png" /&gt;&lt;/p&gt;
&lt;p&gt;And in logs I can see up to 8 packets per second:&lt;/p&gt;
&lt;p&gt;&lt;a href="https://devzone.nordicsemi.com/cfs-file/__key/communityserver-discussions-components-files/4/1643.log.txt"&gt;devzone.nordicsemi.com/.../1643.log.txt&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;My config file:&lt;/p&gt;
&lt;p&gt;&lt;a href="https://devzone.nordicsemi.com/cfs-file/__key/communityserver-discussions-components-files/4/1732.prj.conf"&gt;devzone.nordicsemi.com/.../1732.prj.conf&lt;/a&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: NrfConnect SDK nrf_dm example with dedicated roles with several Reflectors and one Initiator degrades with time</title><link>https://devzone.nordicsemi.com/thread/471838?ContentTypeID=1</link><pubDate>Fri, 01 Mar 2024 14:40:00 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:a8ff6e41-362c-482c-abe7-6e8dea57ba3f</guid><dc:creator>Amanda Hsieh</dc:creator><description>&lt;p&gt;Hi,&amp;nbsp;&lt;/p&gt;
&lt;p&gt;The issue is probably that you try to schedule a lot more rangings than what you have air-time for.&lt;/p&gt;
&lt;p&gt;You could try to reduce the number of CONFIG_DM_TIMESLOT_QUEUE_COUNT_SAME_PEER. And if you do that, you can probably reduce CONFIG_DM_RANGING_OFFSET_US to get some latency improvement.&lt;/p&gt;
&lt;p&gt;Reducing the advertising/scan interval should also help avoid having that many requests in the queue.&lt;/p&gt;
&lt;p&gt;Is there a reason you use CONFIG_DM_TIMESLOT_RESCHEDULE=n?&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: NrfConnect SDK nrf_dm example with dedicated roles with several Reflectors and one Initiator degrades with time</title><link>https://devzone.nordicsemi.com/thread/471136?ContentTypeID=1</link><pubDate>Tue, 27 Feb 2024 20:55:59 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:db4d2e5c-9ca1-4323-ac4f-77fb0fef1287</guid><dc:creator>Michal</dc:creator><description>&lt;p&gt;Hello,&lt;/p&gt;
&lt;p&gt;I will look into it.&lt;/p&gt;
&lt;p&gt;Best regards,&lt;/p&gt;
&lt;p&gt;Michal&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>