<?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>Decommissioning the EnOcean switch</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/104669/decommissioning-the-enocean-switch</link><description>Hello, I&amp;#39;m an engineer living in Japan. 
 【Development environment】 &amp;quot;SDK:nRF Connect SDK v2.4.2&amp;quot; &amp;quot;IDE:VSCode 1.83.1&amp;quot; &amp;quot;PCA10040(nRF52832)&amp;quot; x 1 (central) &amp;quot;PTM215B&amp;quot; EnOcean &amp;#215; 1 (peripheral) &amp;quot;PTM535BZ&amp;quot; + &amp;quot;ECO260&amp;quot; &amp;#215; 1 (peripheral) 
 This is a question about</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Thu, 09 Nov 2023 07:32:21 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/104669/decommissioning-the-enocean-switch" /><item><title>RE: Decommissioning the EnOcean switch</title><link>https://devzone.nordicsemi.com/thread/454833?ContentTypeID=1</link><pubDate>Thu, 09 Nov 2023 07:32:21 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:cccbb18a-14f3-481a-ae3d-53759f6a27cc</guid><dc:creator>Terutaka Takeuji</dc:creator><description>&lt;p&gt;I mistakenly continued on with another ticket, so I will only write the conclusion in this ticket.&lt;/p&gt;
&lt;p&gt;First of all, the &amp;quot;bt_enocean_foreach()&amp;quot; function is not a function for removing a commissioned EnOcean switch.&lt;br /&gt;This function executes the callback function associated with &amp;quot;bt_enocean_foreach()&amp;quot; for the number of commissioned devices (valid devices only).&lt;/p&gt;
&lt;p&gt;Therefore, the function that removes the EnOcean switch is the &amp;quot;bt_enocean_decommission()&amp;quot; function.&lt;/p&gt;
&lt;p&gt;I built it based on the &amp;quot;EnOcean&amp;quot; sample, and was able to decommission all commissioned EnOcean switches simply by editing &amp;quot;main.c&amp;quot;.&lt;/p&gt;
&lt;p&gt;■Delete all EnOcean switches (described in main.c)&lt;br /&gt;static void find_and_decommission(struct bt_enocean_device *dev, void *user_data)&lt;br /&gt;{&lt;br /&gt;　　bt_enocean_decommission(dev);&lt;br /&gt;}&lt;br /&gt;bt_enocean_foreach(find_and_decommission, NULL);&lt;/p&gt;
&lt;p&gt;You can remove all EnOcean switches with the above code.&lt;br /&gt;&amp;quot;bt_enocean_foreach()&amp;quot; can be called anywhere in main.c where you want to perform processing.&lt;/p&gt;
&lt;p&gt;I had a problem with the button interrupt processing description and was repeatedly failing, but the problem was resolved by writing the button interrupt processing as below.&lt;/p&gt;
&lt;p&gt;■Button interrupt processing code&lt;br /&gt;static void button_changed(uint32_t button_state, uint32_t has_changed)&lt;br /&gt;{&lt;br /&gt;　　Processing content&amp;hellip;&lt;br /&gt;}&lt;br /&gt;err = dk_buttons_init(button_changed);&lt;/p&gt;
&lt;p&gt;For more details, please check the following questions in Case ID: 317215.&lt;/p&gt;
&lt;p&gt;thank you very much.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Decommissioning the EnOcean switch</title><link>https://devzone.nordicsemi.com/thread/453427?ContentTypeID=1</link><pubDate>Wed, 01 Nov 2023 08:03:04 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:159cd219-245c-4523-b49e-2668fbdf5918</guid><dc:creator>Terutaka Takeuji</dc:creator><description>&lt;p&gt;Sorry for the late reply.&lt;br /&gt;I have an additional question for Mr. Taesuk.&lt;/p&gt;
&lt;p&gt;I would like to use the bt_enocean_foreach function to erase everything, but I don&amp;#39;t know what to specify as an argument.&lt;/p&gt;
&lt;p&gt;&amp;quot;bt_enocean_foreach syntax&amp;quot;&lt;br /&gt;bt_enocean_foreach(bt_enocean_foreach_cb_t cb, void *user_data)&lt;/p&gt;
&lt;p&gt;question)&lt;br /&gt;bt_enocean_foreach has two arguments, but what should I specify for each?&lt;br /&gt;Please tell me the program code in detail.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Decommissioning the EnOcean switch</title><link>https://devzone.nordicsemi.com/thread/450857?ContentTypeID=1</link><pubDate>Tue, 17 Oct 2023 13:09:42 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:6351e55d-54f6-4f93-aabb-0927c3f72001</guid><dc:creator>tesc</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
[quote user="Terutaka Takeuji"]While checking the answers, I understood that there is no way to decommission EnOcean switches individually, but is my understanding correct?[/quote]
&lt;p&gt;It is possible to decommission EnOcean switches individually through the use of &lt;a href="https://developer.nordicsemi.com/nRF_Connect_SDK/doc/latest/nrf/libraries/bluetooth_services/enocean.html#c.bt_enocean_decommission"&gt;bt_enocean_decommission()&lt;/a&gt; if you have the bt_enocean_device structure for the EnOcean switch.&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: Decommissioning the EnOcean switch</title><link>https://devzone.nordicsemi.com/thread/450394?ContentTypeID=1</link><pubDate>Fri, 13 Oct 2023 23:33:59 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:018619b0-19e4-4318-a10a-50ed426d73c0</guid><dc:creator>Terutaka Takeuji</dc:creator><description>&lt;p&gt;Thank you for your reply tesc.&lt;/p&gt;
&lt;p&gt;The answer was to use &amp;quot;bt_enocean_foreach()&amp;quot; if you want to decommission all EnOcean switches, so I&amp;#39;ll try that.&lt;/p&gt;
&lt;p&gt;While checking the answers, I understood that there is no way to decommission EnOcean switches individually, but is my understanding correct?&lt;/p&gt;
&lt;p&gt;Also, am I correct in understanding that there is no way to send a decommission signal from the EnOcean switch?&lt;/p&gt;
&lt;p&gt;Please give me an answer.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Decommissioning the EnOcean switch</title><link>https://devzone.nordicsemi.com/thread/450319?ContentTypeID=1</link><pubDate>Fri, 13 Oct 2023 13:21:16 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:9f3df0c8-802c-4f38-b1d5-658052f1997d</guid><dc:creator>tesc</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;The &lt;a href="https://developer.nordicsemi.com/nRF_Connect_SDK/doc/latest/nrf/libraries/bluetooth_services/enocean.html"&gt;Bluetooth EnOcean library&lt;/a&gt; is only capable of observing the output of the EnOcean devices, and does not send anything back. The &lt;a href="https://developer.nordicsemi.com/nRF_Connect_SDK/doc/latest/nrf/libraries/bluetooth_services/enocean.html#c.bt_enocean_decommission"&gt;decommissioning&lt;/a&gt; is only for a device to remove the details of a (separate) switch. For instance, if you have a &lt;a href="https://developer.nordicsemi.com/nRF_Connect_SDK/doc/latest/nrf/samples/bluetooth/mesh/silvair_enocean/README.html"&gt;Bluetooth mesh bridge for bridging EnOcean switch messages into a Bluetooth mesh network&lt;/a&gt;, decommissioning can be used to make that bridge not bridging messages from that EnOcean switch into the mesh network anymore.&lt;/p&gt;
&lt;p&gt;If you want to decommission all switches, you can use &lt;a href="https://developer.nordicsemi.com/nRF_Connect_SDK/doc/latest/nrf/libraries/bluetooth_services/enocean.html#c.bt_enocean_foreach"&gt;bt_enocean_foreach()&lt;/a&gt;, which calls a callback for all commissioned EnOcean devices. Decommission the device in the callback, and decommissioning will be done for all commissioned devices.&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>