<?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>Zephyr: bt_mesh_reset() does not clear bt_mesh_elem::addr</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/100811/zephyr-bt_mesh_reset-does-not-clear-bt_mesh_elem-addr</link><description>Hi guys, 
 I modified the sample nrf/samples/bluetooth/mesh/light to log elements[0].addr (model_handler.c) when I press the Button 1 of the nRF52840-DK. Using the nRF Mesh application I&amp;#39;ve provisioned the board and I&amp;#39;ve reseted it. The logs: *** Booting</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Mon, 14 Aug 2023 15:59:43 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/100811/zephyr-bt_mesh_reset-does-not-clear-bt_mesh_elem-addr" /><item><title>RE: Zephyr: bt_mesh_reset() does not clear bt_mesh_elem::addr</title><link>https://devzone.nordicsemi.com/thread/441225?ContentTypeID=1</link><pubDate>Mon, 14 Aug 2023 15:59:43 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:1255f91f-d22b-4409-98a2-4f761c2bce29</guid><dc:creator>tesc</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;We have a &lt;a href="https://github.com/zephyrproject-rtos/zephyr/pull/61472"&gt;pull request for fixing this in the mesh stack&lt;/a&gt; now, resetting all of the element addresses on the node when the node gets unprovisioned. This means you should get the behavior that you expected in a future release, if the pull request goes through. Until then you must use the workaround of also checking &lt;a href="https://developer.nordicsemi.com/nRF_Connect_SDK/doc/latest/zephyr/connectivity/bluetooth/api/mesh/provisioning.html#c.bt_mesh_is_provisioned"&gt;bt_mesh_is_provisioned()&lt;/a&gt;.&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: Zephyr: bt_mesh_reset() does not clear bt_mesh_elem::addr</title><link>https://devzone.nordicsemi.com/thread/437357?ContentTypeID=1</link><pubDate>Wed, 19 Jul 2023 18:08:09 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:8219d3b5-809e-431f-b41f-0337c46736b6</guid><dc:creator>tesc</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;I have registered this as a feature request in our internal tracker, for the mesh team to look into.&lt;/p&gt;
&lt;p&gt;It has also come to my attention that in addition to bt_mesh_reset() for resetting the device, there is bt_mesh_cdb_clear() for deleting the configuration database. This is in particular needed for provisioners, but I thought it was worth mentioning here as well.&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: Zephyr: bt_mesh_reset() does not clear bt_mesh_elem::addr</title><link>https://devzone.nordicsemi.com/thread/430989?ContentTypeID=1</link><pubDate>Wed, 14 Jun 2023 11:31:51 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:2bb3015c-2949-44dd-8dad-316abbfa2ad1</guid><dc:creator>qgrembert</dc:creator><description>&lt;p&gt;Thank you for your response.&lt;/p&gt;
&lt;p&gt;In our application, we used bt_mesh_is_provisioned() to bypass this problem.&lt;/p&gt;
&lt;p&gt;But we raise this error because we don&amp;#39;t have the problem with others fields of the bt_mesh_model structure (pub or groups&amp;nbsp; for example).&lt;/p&gt;
&lt;p&gt;Quentin&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Zephyr: bt_mesh_reset() does not clear bt_mesh_elem::addr</title><link>https://devzone.nordicsemi.com/thread/430949?ContentTypeID=1</link><pubDate>Wed, 14 Jun 2023 10:09:01 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:d53462dc-a353-44e8-8e7b-0acce0d77fb9</guid><dc:creator>tesc</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;If the device is unprovisioned, which it will be after a node reset, element configurations are no longer valid. New addresses will be assigned during the next provisioning. You can check whether or not the local node is currently provisioned with &lt;a href="https://developer.nordicsemi.com/nRF_Connect_SDK/doc/latest/zephyr/connectivity/bluetooth/api/mesh/provisioning.html#c.bt_mesh_is_provisioned"&gt;bt_mesh_is_provisioned()&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;I can, at least to a certain degree, see that clearing the data structures may be considered a cleaner solution, but with a tradeoff in resource usage (time, energy, code size, flash write/erase cycles.) Do you want me to bring this to our mesh team for consideration, or are you happy with the above explanation?&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></channel></rss>