<?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>Remove/disable endpoint at runtime</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/84768/remove-disable-endpoint-at-runtime</link><description>Hi, 
 I have a doubt regarding the possibility of removing or disabling an endpoint at runtime. 
 Assuming that we have a device with multiple endpoints, is there a mechanism to disable temporarely or definetely an endpoint from the device itself? Va</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Fri, 18 Mar 2022 13:57:47 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/84768/remove-disable-endpoint-at-runtime" /><item><title>RE: Remove/disable endpoint at runtime</title><link>https://devzone.nordicsemi.com/thread/358892?ContentTypeID=1</link><pubDate>Fri, 18 Mar 2022 13:57:47 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:42cc9a3a-8328-4c06-808f-f90ceaacc8b1</guid><dc:creator>Simonr</dc:creator><description>&lt;p&gt;Update from one of our in-house Zigbee-experts on this use case:&lt;/p&gt;
&lt;div&gt;
&lt;div&gt;Most of the ecosystems are going to discover the device right after it has joined the network and store this data inside the database. If the device will remove one of the endpoints afterwards, they will not rediscover the list of endpoints, but will simply try to communicate with it over and over again.&lt;/div&gt;
&lt;div&gt;As a result, to make this happen in a sorta-safer way, the device shall:&lt;/div&gt;
&lt;div&gt;-&amp;gt; Leave the network&lt;/div&gt;
&lt;div&gt;-&amp;gt; Reconfigure endpoints&lt;/div&gt;
&lt;div&gt;-&amp;gt; (at best) use different EUI64 address&lt;/div&gt;
&lt;div&gt;-&amp;gt; Join the network as a new, different device&lt;/div&gt;
&lt;div&gt;&lt;/div&gt;
&lt;div&gt;Are you aware of the consequences of doing this?&lt;/div&gt;
&lt;div&gt;&lt;/div&gt;
&lt;div&gt;This should be doable, and a good example of the set of actions that must be performed is the implementation of the NCS_HL_AF_DEL_SIMPLE_DESC command in the &lt;a href="https://developer.nordicsemi.com/nRF_Connect_SDK/doc/latest/nrf/samples/zigbee/ncp/README.html?highlight=ncp_hl"&gt;NCP application&lt;/a&gt;&amp;nbsp;in the nRF Connect SDK.&lt;/div&gt;
&lt;div&gt;&lt;/div&gt;
&lt;div&gt;Best regards,&lt;/div&gt;
&lt;div&gt;Simon&lt;/div&gt;
&lt;/div&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Remove/disable endpoint at runtime</title><link>https://devzone.nordicsemi.com/thread/358858?ContentTypeID=1</link><pubDate>Fri, 18 Mar 2022 12:46:36 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:9f8c8b57-8b6f-4a9d-a925-af00ca702b1f</guid><dc:creator>Simonr</dc:creator><description>&lt;p&gt;Hi again&lt;/p&gt;
&lt;p&gt;Endpoints are added by using the zb_af_register_device_ctx(), which registers a context containing the endpoint. However, there is no &amp;quot;unregister&amp;quot; or &amp;quot;remove&amp;quot; equivalent. So it&amp;#39;s not supported to specifically remove them it seems. Removing it from all groups will be the closest you get I guess, as that at least will have it removed.&lt;/p&gt;
&lt;p&gt;I would go for this over suggestion B at least, as that is more of a &amp;quot;brute force&amp;quot; way of doing it, when you knowingly prevent the callback. Option C would be valid though I think, if you find it useful to update the endpoint device like this.&lt;/p&gt;
&lt;p&gt;I&amp;#39;ll have to ask internally for more information on how the&amp;nbsp;&lt;span&gt;&lt;strong&gt;zb_apsme_remove_all_groups_req_s&lt;/strong&gt; is forwarded to the stack, as I&amp;#39;m not getting much out of the documentation either.&lt;/span&gt;&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: Remove/disable endpoint at runtime</title><link>https://devzone.nordicsemi.com/thread/358597?ContentTypeID=1</link><pubDate>Thu, 17 Mar 2022 10:25:47 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:cbb23b19-e101-4d2e-b5d6-8588a6ac9ec5</guid><dc:creator>Valerio.Colombo</dc:creator><description>&lt;p&gt;Hi Simonr, sorry for my late reply.&lt;/p&gt;
[quote userid="75734" url="~/f/nordic-q-a/84768/remove-disable-endpoint-at-runtime/353292#353292"]It also depends on what you mean by &amp;quot;disabling&amp;quot;, as it would be disabled if it is turned off I guess.[/quote]
&lt;p&gt;To clarify what I meant:&lt;/p&gt;
&lt;p&gt;1)&amp;nbsp;we have a device running multiple endpoints&lt;/p&gt;
&lt;p&gt;2)&amp;nbsp;we would like to &amp;quot;switch off&amp;quot; Zigbee communication just for a single endpoint. We don&amp;#39;t want to switch off the device entirely.&lt;/p&gt;
&lt;p&gt;We can summarize the steps that we do to use the stack as:&lt;br /&gt;1) we allocate and initialize the data used for multiple Zboss Zigbee endpoints&lt;br /&gt;2) we register the proper callbacks and initialize what is needed (we call ZB_ZCL_REGISTER_DEVICE_CB(), ZB_AF_REGISTER_DEVICE_CTX(), ...)&lt;br /&gt;3) we call ZB_AF_SET_ENDPOINT_HANDLER(endpoint_id, callback)&lt;br /&gt;4) from the controller, we see the endpoints, and we add them&lt;br /&gt;5) we can communicate as desired&lt;br /&gt;6) we want to switch off just one endpoint (we want to do that form from the device itself) so that the Zboss stack does not handle its communication anymore.&lt;/p&gt;
&lt;p&gt;&lt;br /&gt;To achieve step 6, we suppose that:&lt;br /&gt;A) we could remove the endpoint from all groups as you suggested&lt;br /&gt;B) we could call ZB_AF_SET_ENDPOINT_HANDLER(endpoint_id, NULL) to prevent the callback to be called&lt;br /&gt;C) possibly we could update the device context variable of type zb_af_device_ctx_t (registered using ZB_AF_REGISTER_DEVICE_CTX()).&lt;br /&gt;Note that as update we mean the change of zb_af_device_ctx_t::ep_count and/or zb_af_device_ctx_t::ep_desc_list.&lt;br /&gt;Do you have any suggestions about points B and C?&lt;/p&gt;
&lt;p&gt;&lt;br /&gt;Moreover, could you please add some details about how we could use zb_apsme_remove_all_groups_req_s? How do we forward this command to the stack?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Remove/disable endpoint at runtime</title><link>https://devzone.nordicsemi.com/thread/353292?ContentTypeID=1</link><pubDate>Wed, 16 Feb 2022 09:20:22 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:dea4e7b6-6893-4d80-abfd-294f98d37114</guid><dc:creator>Simonr</dc:creator><description>&lt;p&gt;Hi&lt;/p&gt;
&lt;p&gt;I don&amp;#39;t see a way to remove and delete an endpoint entirely, but you can remove an endpoint from all groups/subscribers if that&amp;#39;s sufficient, using the &lt;a href="https://infocenter.nordicsemi.com/topic/sdk_tz_v4.1.0/structzb__apsme__remove__all__groups__req__s.html"&gt;&lt;span&gt;zb_apsme_remove_all_groups&lt;/span&gt;&lt;span&gt;_req_s&amp;nbsp;&lt;/span&gt;&lt;/a&gt;&lt;span&gt;and&amp;nbsp;&lt;/span&gt;&lt;span&gt;&lt;a href="https://infocenter.nordicsemi.com/topic/sdk_tz_v4.1.0/structzb__apsme__remove__all__groups__conf__s.html"&gt;zb_apsme_remove_all_groups_conf_s&lt;/a&gt;. It doesn&amp;#39;t seem like a normal use case to disable endpoints at runtime. It also depends on what you mean by &amp;quot;disabling&amp;quot;, as it would be disabled if it is turned off I guess.&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: Remove/disable endpoint at runtime</title><link>https://devzone.nordicsemi.com/thread/353162?ContentTypeID=1</link><pubDate>Tue, 15 Feb 2022 16:07:25 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:81da6657-8be8-4c8c-ac83-11944fd79b4e</guid><dc:creator>Valerio.Colombo</dc:creator><description>&lt;p&gt;Sorry for the missing information.&lt;br /&gt;The SDK I&amp;#39;m using is &amp;quot;nRF5 SDK for Thread and Zigbee v4.1.0&amp;quot; and the protocol is Zigbee&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Remove/disable endpoint at runtime</title><link>https://devzone.nordicsemi.com/thread/353146?ContentTypeID=1</link><pubDate>Tue, 15 Feb 2022 14:36:31 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:4fa410cc-815c-4b2e-a534-77e88d73e91a</guid><dc:creator>Simonr</dc:creator><description>&lt;p&gt;Hi Valerio&lt;/p&gt;
&lt;p&gt;Can you please provide some more information here. Are you using Bluetooth Mesh, Zigbee, Open Thread, or some proprietary protocol using end points here? Please also let me know what SDK (nRF5 SDK or nRFConnect SDK) and version you&amp;#39;re using.&amp;nbsp;&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>