<?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>Directional Ranging Setup with Anchor and Tags using nrf_dm with nRF5340.</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/123168/directional-ranging-setup-with-anchor-and-tags-using-nrf_dm-with-nrf5340</link><description>Hello, I’m working with the Distance Measurement (nrf_dm) module and aiming to implement a centralized topology using Anchor and Tag roles. 
 The intended behavior is: 
 
 
 One device acts as an Anchor and performs ranging with any available device in</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Mon, 11 Aug 2025 08:22:45 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/123168/directional-ranging-setup-with-anchor-and-tags-using-nrf_dm-with-nrf5340" /><item><title>RE: Directional Ranging Setup with Anchor and Tags using nrf_dm with nRF5340.</title><link>https://devzone.nordicsemi.com/thread/545155?ContentTypeID=1</link><pubDate>Mon, 11 Aug 2025 08:22:45 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:178a25eb-b33e-4958-b4e1-9d7ddc007bd1</guid><dc:creator>PaKa</dc:creator><description>&lt;p&gt;The latter aproach works but there are some often overseen items that need to be handled. There are multiple threads in the forum on how to do this and make it work. Believe Amanda posted as good recipe.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Directional Ranging Setup with Anchor and Tags using nrf_dm with nRF5340.</title><link>https://devzone.nordicsemi.com/thread/545082?ContentTypeID=1</link><pubDate>Fri, 08 Aug 2025 16:53:20 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:b3d64664-ec3c-47cc-bf6a-d4a7edd6ab33</guid><dc:creator>Luis Santos</dc:creator><description>&lt;p&gt;Thanks for your previous response, and sorry for the late reply.&lt;br /&gt;&lt;br /&gt;While analyzing the dm_sample code, I noticed that it relies on both advertising and scanning to perform distance measurements. I tried modifying the example to run only advertising on one device and only scanning on the other (by commenting out either adv_start() or scan_start()), but in this configuration, no ranging occurs.&lt;/p&gt;
&lt;p&gt;For example, in the bt_sync_init() function, it&amp;#39;s mentioned:&lt;/p&gt;
&lt;p&gt;&lt;br /&gt;&lt;pre class="ui-code" data-mode="text"&gt;static int bt_sync_init(void)
{
	/* Synchronisation is based on advertising and scanning modes.
	 * It occurs when SCAN_REQ and SCAN_RESP packets are exchanged.
	 */

	int err;

	LOG_INF(&amp;quot;DM Bluetooth LE Synchronization initialization\n&amp;quot;);

	mfg_data.company_code = sys_cpu_to_le16(CONFIG_BT_COMPANY_ID_NORDIC);
	mfg_data.support_dm_code = sys_cpu_to_le32(DM_SRV_SUPPORT_DM_CODE);
	mfg_data.rng_seed = sys_cpu_to_le32(peer_rng_seed_prepare());

	err = adv_start();
	if (err)
	{
		LOG_ERR(&amp;quot;Failed to start advertising (err %d)\n&amp;quot;, err);
		return err;
	}

	err = scan_start();
	if (err)
	{
		LOG_ERR(&amp;quot;Failed to start scanning (err %d)\n&amp;quot;, err);
	}

	return err;
}&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;if I comment the adv_start() or scan_start() functions, ranging just stop to happen.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Directional Ranging Setup with Anchor and Tags using nrf_dm with nRF5340.</title><link>https://devzone.nordicsemi.com/thread/543356?ContentTypeID=1</link><pubDate>Wed, 23 Jul 2025 12:49:38 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:6385f5ff-42f3-440f-a307-e04ba61903dd</guid><dc:creator>Simonr</dc:creator><description>&lt;p&gt;Hi&lt;/p&gt;
&lt;p&gt;Since the nrf_dm sample project and thus likely your devices as well use Bluetooth LE connections as the backbone to connect before doing ranging, I think the easiest way to do this would be to make the anchor act as a Bluetooth LE central device, that can scan and connect to advertising devices, while the tags would be peripheral devices, that advertise, and accepts conections from specific central devices (the anchor). That way, the tags won&amp;#39;t try to connect to one another, and the distance measurement will take place once a tag is connected to an anchor.&lt;/p&gt;
&lt;p&gt;This is just explaining in rough terms the Bluetooth LE roles, so if you need more information on Bluetooth LE, I&amp;#39;d recommend you start with the &lt;a href="https://academy.nordicsemi.com/courses/bluetooth-low-energy-fundamentals/"&gt;DevAcademy course on Bluetooth fundamentals available here.&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;Best regards,&lt;/p&gt;
&lt;p&gt;Simon&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>