<?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>Factory Reset function and erasing EnOcean switch data</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/44107/factory-reset-function-and-erasing-enocean-switch-data</link><description>I am trying to erase the EnOcean switch data without erasing the board. node_reset() function isn&amp;#39;t erasing the EnOcean switch data after commissioning. 
 I would like to know how to erase the switch data without erasing. 
 Also, is there any function</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Mon, 04 Mar 2019 13:39:00 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/44107/factory-reset-function-and-erasing-enocean-switch-data" /><item><title>RE: Factory Reset function and erasing EnOcean switch data</title><link>https://devzone.nordicsemi.com/thread/174010?ContentTypeID=1</link><pubDate>Mon, 04 Mar 2019 13:39:00 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:542a9c23-cf00-4bdc-bc0b-fbd40aca5082</guid><dc:creator>Aryan</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;That solved the issue. Thanks&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Factory Reset function and erasing EnOcean switch data</title><link>https://devzone.nordicsemi.com/thread/173982?ContentTypeID=1</link><pubDate>Mon, 04 Mar 2019 12:58:45 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:19b5fd36-0fc3-4167-96ce-74b37f9a7783</guid><dc:creator>Simonr</dc:creator><description>&lt;p&gt;Hi&lt;/p&gt;
&lt;p&gt;I presented this issue to my colleagues, and while providing a patch for this, we found a bug that took some time to fix. There are two parts to patch/bug fix so follow these steps:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;&lt;span&gt;In the enocean example&amp;#39;s main.c file, call `app_flash_clear(&amp;amp;m_app_secmat_flash&lt;/span&gt;&lt;span&gt;[0]&lt;/span&gt;&lt;span&gt;, sizeof(m_app_secmat_flash));` while handling the `&lt;/span&gt;&lt;br /&gt;&lt;span&gt;EVT_NODE_RESET`&amp;nbsp;in the config server&amp;#39;s event handler, as shown below:&lt;br /&gt;&amp;nbsp;&lt;pre class="ui-code" data-mode="c_cpp"&gt;--- a/examples/enocean_switch/src/main.c
+++ b/examples/enocean_switch/src/main.c
@@ -338,6 +338,8 @@ static void config_server_evt_cb(const config_server_evt_t * p_evt)
 {
     if (p_evt-&amp;gt;type == CONFIG_SERVER_EVT_NODE_RESET)
     {
+        /* Trigger clearing of application data and schedule node reset. */
+        app_flash_clear(&amp;amp;m_app_secmat_flash[0], sizeof(m_app_secmat_flash));
         node_reset();
     }
 }&lt;/pre&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span&gt;Bug fix in `mesh_stack.c`, which will ensure that the application data is erased correctly.&lt;br /&gt;&lt;pre class="ui-code" data-mode="text"&gt;--- a/mesh/stack/src/mesh_stack.c
+++ b/mesh/stack/src/mesh_stack.c
@@ -203,7 +203,7 @@ bool mesh_stack_is_device_provisioned(void)
 #if PERSISTENT_STORAGE
 static void mesh_evt_handler(const nrf_mesh_evt_t * p_evt)
 {
-    if (p_evt-&amp;gt;type == NRF_MESH_EVT_FLASH_STABLE)
+    if (flash_manager_is_stable() &amp;amp;&amp;amp; p_evt-&amp;gt;type == NRF_MESH_EVT_FLASH_STABLE)
     {
         device_reset();
     }
 }     
-- 
2.17.1.windows.2 &lt;/pre&gt;&lt;br /&gt;&lt;/span&gt;&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;&lt;span&gt;Editing these two files accordingly should make the EnOcean switch node reset work properly.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Best regards,&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Simon&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Factory Reset function and erasing EnOcean switch data</title><link>https://devzone.nordicsemi.com/thread/173554?ContentTypeID=1</link><pubDate>Thu, 28 Feb 2019 17:09:54 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:bfb7f1fc-2a7b-4729-ad01-5db998f5b910</guid><dc:creator>Aryan</dc:creator><description>[quote userid="75734" url="~/f/nordic-q-a/44107/factory-reset-function-and-erasing-enocean-switch-data/173399"]By commisioning data do you mean the provisioning data?[/quote]
&lt;p&gt;By commissioning data, I mean the data of the EnOcean switch which is restored even after resetting the node using the Button 4 on the board or resetting through the nRF Mesh app.&lt;/p&gt;
&lt;p&gt;My end goal would be to have a node free from provisioning data and EnOcean switch security materials when i do a node reset.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Factory Reset function and erasing EnOcean switch data</title><link>https://devzone.nordicsemi.com/thread/173399?ContentTypeID=1</link><pubDate>Thu, 28 Feb 2019 08:51:49 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:9842954d-e5d1-493c-9045-17e3b7f47b92</guid><dc:creator>Simonr</dc:creator><description>&lt;p&gt;Hi&lt;/p&gt;
&lt;p&gt;Is your end goal to remove the node from the mesh network without erasing the bonding information? Please correct me if I am wrong. I am just trying to understand what your application is supposed to do.&lt;/p&gt;
&lt;p&gt;By commisioning data do you mean the provisioning data?&lt;br /&gt;The provisioning data is stored on the provisioner, you can see the mesh_stack_provisioning_data_store function in our provisioner example for more information. So if you are using I.E. the nRF Mesh app the data will be stored in your mobile device running the app, and if you are using the interactive PyACI the data is stored on your computer.&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><item><title>RE: Factory Reset function and erasing EnOcean switch data</title><link>https://devzone.nordicsemi.com/thread/173315?ContentTypeID=1</link><pubDate>Wed, 27 Feb 2019 18:56:20 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:96df07ac-c2c5-4dfb-bdc6-3b4afaca54f0</guid><dc:creator>Aryan</dc:creator><description>[quote userid="75734" url="~/f/nordic-q-a/44107/factory-reset-function-and-erasing-enocean-switch-data/173077"]Could the nrf_flash_erase function be what you are looking for?[/quote]
&lt;p&gt;Okay, I will try that but that function does take the address of data as an input. Can I know where the EnOcean commissioning data is stored?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Factory Reset function and erasing EnOcean switch data</title><link>https://devzone.nordicsemi.com/thread/173077?ContentTypeID=1</link><pubDate>Tue, 26 Feb 2019 14:57:23 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:c3f06582-1b52-41be-94c9-64242f3692d7</guid><dc:creator>Simonr</dc:creator><description>&lt;p&gt;Hi&lt;/p&gt;
&lt;p&gt;By switch data, do you mean the switch status and optional data stored in the DK servers? It seems a little unclear.&lt;/p&gt;
&lt;p&gt;Could the nrf_flash_erase function be what you are looking for?&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><item><title>RE: Factory Reset function and erasing EnOcean switch data</title><link>https://devzone.nordicsemi.com/thread/173039?ContentTypeID=1</link><pubDate>Tue, 26 Feb 2019 13:13:47 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:e8210a26-981f-4aa5-8a7e-ef8ed8d4a17b</guid><dc:creator>Aryan</dc:creator><description>[quote userid="75734" url="~/f/nordic-q-a/44107/factory-reset-function-and-erasing-enocean-switch-data/173034"]What do you mean by erasing switch data without erasing?[/quote]
&lt;p&gt;I would like to erase the switch&amp;nbsp;information when a node_reset() is being executed. Right now, after provisioning the node and resetting the node using the app, it just erases the publishing/subscribing information but not the Enocean switch data. Similar operation with the button 4.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Without a factory reset, I am looking to erase the switch information.&lt;/p&gt;
[quote userid="75734" url="~/f/nordic-q-a/44107/factory-reset-function-and-erasing-enocean-switch-data/173034"]you will have to modify our example in that case.[/quote]
&lt;p&gt;Okay.&amp;nbsp;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Factory Reset function and erasing EnOcean switch data</title><link>https://devzone.nordicsemi.com/thread/173034?ContentTypeID=1</link><pubDate>Tue, 26 Feb 2019 13:01:36 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:91005ec0-0655-4102-ba8d-e55ab434f287</guid><dc:creator>Simonr</dc:creator><description>&lt;p&gt;Hi&lt;/p&gt;
&lt;p&gt;I assume you are using our EnOcean example with compatible EnOcean switches. What do you mean by erasing switch data without erasing? I am sorry but there is no function that does a factory reset without a board erase, as a factory reset includes a board erase.&lt;/p&gt;
&lt;p&gt;It should probably be possible to set a button to perform factory resets, but we do not have an example for just that, so you will have to modify our example in that case.&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>