<?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>Mesh: clearing configuration data does not work</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/76265/mesh-clearing-configuration-data-does-not-work</link><description>I need to make a reset of mesh device with clearing its configuration. 
 For this I tried to use model_config_file_clear() or mesh_stack_config_clear() functions. 
 However I get an assert error by calling any of these functions. Please see screenshots</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Tue, 27 Jul 2021 09:29:35 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/76265/mesh-clearing-configuration-data-does-not-work" /><item><title>RE: Mesh: clearing configuration data does not work</title><link>https://devzone.nordicsemi.com/thread/321996?ContentTypeID=1</link><pubDate>Tue, 27 Jul 2021 09:29:35 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:ca2649e3-5ccb-45a2-8662-f87d4126a3a2</guid><dc:creator>tesc</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;Did you find a solution?&lt;/p&gt;
&lt;p&gt;For what it&amp;#39;s worth, the SDK examples typically solves this the following way:&lt;/p&gt;
&lt;p&gt;Triggering a reset, e.g. through button press, it runs the following:&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="c_cpp"&gt;/* Clear all the states to reset the node. */
if (mesh_stack_is_device_provisioned())
{
#if MESH_FEATURE_GATT_PROXY_ENABLED
    (void) proxy_stop();
#endif
    mesh_stack_config_clear();
    node_reset();
}
else
{
    __LOG(LOG_SRC_APP, LOG_LEVEL_INFO, &amp;quot;The device is unprovisioned. Resetting has no effect.\n&amp;quot;);
}&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;In the above, node_reset() is implemented as:&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="c_cpp"&gt;static void node_reset(void)
{
    __LOG(LOG_SRC_APP, LOG_LEVEL_INFO, &amp;quot;----- Node reset  -----\n&amp;quot;);
    /* This function may return if there are ongoing flash operations. */
    model_config_file_clear();
    mesh_stack_device_reset();
}&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;Note that the order of operations, as well as flash activity and priority levels, might affect these operations.&lt;/p&gt;
&lt;p&gt;Let me know if you are still seeing issues, and that approach does not work for your application. The particular code was taken from the Light CTL Server of nRF5 SDK for Mesh v5.0.0.&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>