<?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 log message relay path in Bluetooth Mesh Chat sample (nRF52840DK, NCS v3.0.2)</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/124977/how-to-log-message-relay-path-in-bluetooth-mesh-chat-sample-nrf52840dk-ncs-v3-0-2</link><description>Hi, I’m working on an nRF52840DK-based Bluetooth Mesh project derived from the Chat sample on nRF connect SDK extension for VS Code. 
 The setup involves three types of nodes: 
 
 
 Setup Overview: 
 
 
 
 Client – Scans BLE devices using scan_cb(), computes</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Mon, 20 Oct 2025 13:06:54 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/124977/how-to-log-message-relay-path-in-bluetooth-mesh-chat-sample-nrf52840dk-ncs-v3-0-2" /><item><title>RE: How to log message relay path in Bluetooth Mesh Chat sample (nRF52840DK, NCS v3.0.2)</title><link>https://devzone.nordicsemi.com/thread/551946?ContentTypeID=1</link><pubDate>Mon, 20 Oct 2025 13:06:54 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:3f2a33a1-7487-4a8c-b8dd-ea53d612f4ff</guid><dc:creator>Edvin</dc:creator><description>&lt;p&gt;I understand.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Well, as mentioned, the packet doesn&amp;#39;t contain any information of the devices that has relayed it when it arrives. It is only the radio of the receiver that can see the address of the originator, and the last relay node. So if you want to see whether R3 was the one who relayed the packet to GW1, you need to look at the address of the packet. But I guess this was a simplified model. I guess you also want to check something like this:&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;CN1 -&amp;gt; R1 -&amp;gt; R2 -&amp;gt; R3 -&amp;gt; GW1 = OK Path&lt;/p&gt;
&lt;p&gt;CN1 -&amp;gt; R1 -&amp;gt; R3 -&amp;gt; GW1 = NOT OK Path. R1 is within range of R3, and you don&amp;#39;t want that.&lt;/p&gt;
&lt;p&gt;In that case, the GW1 received the packet from R3 in both cases, and it is not able to see directly whether R2 was involved or not. But that is not possible from GW1. The added challenge is that R2 will probably also get the packet and relay it, but R3 was just able to pick up the packet directly from R1 in one of the cases. So you would need to monitor logs on R3 to see what nodes it can pick up packets from, or you need to monitor the TTL on GW1 to see how many hops the packet has done.&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Best regards,&lt;/p&gt;
&lt;p&gt;Edvin&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How to log message relay path in Bluetooth Mesh Chat sample (nRF52840DK, NCS v3.0.2)</title><link>https://devzone.nordicsemi.com/thread/551651?ContentTypeID=1</link><pubDate>Thu, 16 Oct 2025 05:32:47 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:2706c1d4-2637-4bce-b661-b05de0265933</guid><dc:creator>tanmayi</dc:creator><description>&lt;p&gt;Thanks Edvin for your reply. TTL seems to be a good idea.&lt;br /&gt;To explain further on what I would like to achieve...&lt;br /&gt;I am preparing for a dense network, where Relay will be scattered. I would like to ensure that the message from Client Node follow specific Relay route. If I notice, that my messages are following non-desired path, I would like to move Relay away from those nodes or reduce the transmission power of the Client. For that to happen, I would like to know what is the MAC/Mesh address of earlier Relay that forwarded the message. e.g.&lt;/p&gt;
&lt;p&gt;CN1 -&amp;gt; R1 -&amp;gt; R2 -&amp;gt; GW1 = OK Path&lt;/p&gt;
&lt;p&gt;CN1 -&amp;gt; R1 -&amp;gt; R3 -&amp;gt; GW1 = NOT OK Path. In that case, I would move R3 away from R1.&lt;/p&gt;
&lt;p&gt;CN1 - Client Node&lt;br /&gt;R1/R2 - Relay&lt;br /&gt;GW1 - Gateway&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How to log message relay path in Bluetooth Mesh Chat sample (nRF52840DK, NCS v3.0.2)</title><link>https://devzone.nordicsemi.com/thread/551605?ContentTypeID=1</link><pubDate>Wed, 15 Oct 2025 14:02:44 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:a8b7b54b-ebcf-4b20-866d-b1b99a93d96a</guid><dc:creator>Edvin</dc:creator><description>&lt;p&gt;Hello,&lt;/p&gt;
&lt;p&gt;There is no information regarding the path of the packet in a Bluetooth Mesh packet.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Since Bluetooth Mesh is a flooding mesh, and not a routed Mesh, so packets don&amp;#39;t have a planned route when traversing the network.&lt;/p&gt;
&lt;p&gt;In addition, for this to work, the packet would need to include the address of the nodes that are relaying the message. This mean they would have to open the packet and modify it&amp;#39;s content before relaying it. But since this is no longer following the mesh specification, then you will end up debugging your own network implementation, rather than the actual Mesh network you are trying to debug.&lt;/p&gt;
&lt;p&gt;I ran this by our Bluetooth Mesh team, and they had some ideas on how to approach this. Perhaps the simplest way is to use a fixed TTL for your messages, and when you receive a message, you can look at the TTL (time to live), which will tell you how many relays the packet has traversed. Mapping this against the source of the packets gives some idea of what nodes that are within reach, or how many hops there typically is between two nodes. Note that this may vary from message to message.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;But this data needs to be gathered periodically e.g. by the gateway, for you to be able to represent it visually, e.g. every minute or so.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Alternatively, you can turn on logging on the network layer, to print the SRC (source address) and SEQ (sequence number), and print this information from each&amp;nbsp; node over UART. This then needs to be collected, and perhaps parsed using some python script to represent the statistics of your network.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;May I ask what exactly you were hoping to find using this debugging? Did you encounter some issues while developing a certain feature?&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Best regards,&lt;/p&gt;
&lt;p&gt;Edvin&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>