<?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>Why does fixed group address &amp;quot;all-nodes&amp;quot; not route on BLE Mesh?</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/75942/why-does-fixed-group-address-all-nodes-not-route-on-ble-mesh</link><description>From looking at the code when a message is posted to &amp;quot;all-nodes&amp;quot; fixed group address of 0xFFFF it does not route. I was unable to find this behavior specified anywhere in any BLE Mesh Specs so I would like to understand why it works this way? 
 It seems</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Mon, 07 Jun 2021 13:45:06 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/75942/why-does-fixed-group-address-all-nodes-not-route-on-ble-mesh" /><item><title>RE: Why does fixed group address "all-nodes" not route on BLE Mesh?</title><link>https://devzone.nordicsemi.com/thread/313953?ContentTypeID=1</link><pubDate>Mon, 07 Jun 2021 13:45:06 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:e72a269d-1ca0-42b7-beac-a3abb0af3007</guid><dc:creator>tesc</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;Thank you for the detailed explanation.&lt;/p&gt;
&lt;p&gt;Unfortunately, I do not think that is a bug. That &lt;code&gt;if&lt;/code&gt; statement checks if one of two is true:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;The address is not a unicast address&lt;/li&gt;
&lt;li&gt;The address is neither a local match nor a friend match&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;For the first check, &lt;code&gt;!BT_MESH_ADDR_IS_UNICAST&lt;/code&gt; would be true if &lt;code&gt;address &amp;gt;= 0x8000&lt;/code&gt;, so it should trigger on the fixed group address &lt;code&gt;0xFFFF&lt;/code&gt;. If a node does not relay messages addressed to &lt;code&gt;0xFFFF&lt;/code&gt; then the reason for not relaying would be something else than that code.&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Since it works when using unicast address &lt;code&gt;0x0001&lt;/code&gt;, and address &lt;code&gt;0x0001&lt;/code&gt; is the first valid unicast address, I expect that to be the primary element on the node, and so the node should definitely have reacted to that message. So I agree that something is clearly wrong.&lt;/p&gt;
&lt;p&gt;Do you get reception of the message on any node other than the originating node? I am thinking there might be an issue at the originating node, and not in relay nodes. If the node with the primary element at 0x0001 never receives the message, then maybe the message was never sent over the air. Especially if no other node receive the message either. I would do some more testing, maybe also with sniffer traces, in order to get more clues about the behavior of the nodes.&lt;/p&gt;
&lt;p&gt;Regards,&lt;br /&gt;Terje&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Why does fixed group address "all-nodes" not route on BLE Mesh?</title><link>https://devzone.nordicsemi.com/thread/313753?ContentTypeID=1</link><pubDate>Fri, 04 Jun 2021 19:53:55 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:1a1999ee-2520-48cb-a7a8-d2d319c15865</guid><dc:creator>dstarling</dc:creator><description>&lt;p&gt;Originally I setup publishing to address 0xFFFF, but it was not routing.&amp;nbsp; I have reconfigured to send to unicast 0x0001 which is base node and it routes as expected.&amp;nbsp; So I have verified that it does not route as I would have expected.&lt;/p&gt;
&lt;p&gt;As to the code:&lt;/p&gt;
&lt;p&gt;In net.c:835 is this code:&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;	/* Relay if this was a group/virtual address, or if the destination
	 * was neither a local element nor an LPN we&amp;#39;re Friends for.
	 */
	if (!BT_MESH_ADDR_IS_UNICAST(rx.ctx.recv_dst) ||
	    (!rx.local_match &amp;amp;&amp;amp; !rx.friend_match)) {
		net_buf_simple_restore(&amp;amp;buf, &amp;amp;state);
		bt_mesh_net_relay(&amp;amp;buf, &amp;amp;rx);
	}&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;The issue appears to be on rx.local_match, which is determined at line 807&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;	rx.local_match = (bt_mesh_fixed_group_match(rx.ctx.recv_dst) ||
			  bt_mesh_elem_find(rx.ctx.recv_dst));
&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;So the local match seems correct in that the all-nodes address should be included.&amp;nbsp; However using the local_match in the logic for relay, causes the all-node and any other applicable fixed group address to not route. local_match should be replaced with different logic that takes into account if the fixed group address should continue to route such as &amp;quot;all-node&amp;quot; and &amp;quot;all-routers&amp;quot;, etc.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Why does fixed group address "all-nodes" not route on BLE Mesh?</title><link>https://devzone.nordicsemi.com/thread/313596?ContentTypeID=1</link><pubDate>Fri, 04 Jun 2021 10:05:21 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:fef740c1-1221-41fe-a1a9-d024774d9a75</guid><dc:creator>tesc</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;The all-nodes group address is used to address messages to the primary element of all nodes. The only exceptions regarding when the all-nodes address can be used, has to do with the configuration model. In any case the packets should get relayed just as any other packets using any group address.&lt;/p&gt;
&lt;p&gt;In order for me to investigate further:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Where in the NCS code did you find packets addressed to all-nodes not to be handled correctly?&lt;/li&gt;
&lt;li&gt;Have you reproduced this behavior, to confirm that is what happens, and if so what was your setup?&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Regards,&lt;br /&gt;Terje&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>