<?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>Zigbee disconnect</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/106090/zigbee-disconnect</link><description>Hi, 
 We have a battery powered device which has both bluetooth and zigbee. 
 When the battery is almost depleted, we want to &amp;quot;disconnect&amp;quot; the zigbee connection in order to save battery power. Is there a way of doing this?</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Wed, 24 Jan 2024 13:55:10 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/106090/zigbee-disconnect" /><item><title>RE: Zigbee disconnect</title><link>https://devzone.nordicsemi.com/thread/465822?ContentTypeID=1</link><pubDate>Wed, 24 Jan 2024 13:55:10 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:1344352c-7b77-43f9-9a25-72d8a8f4de8e</guid><dc:creator>AHaug</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;I have a conclusive update from the Zigbee team and from DSR: Unfortunately it is not possible to disable Zigbee on a device so that it still remembers the nwk data stored on it in our Zigbee stack and there does not exist a general way to do this in any other versions of DSRs Zigbee stacks.&lt;/p&gt;
&lt;p&gt;Kind regards,&lt;br /&gt;Andreas&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Zigbee disconnect</title><link>https://devzone.nordicsemi.com/thread/465583?ContentTypeID=1</link><pubDate>Tue, 23 Jan 2024 13:26:11 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:cf6d58c1-449f-4ab4-b72c-1f768e81cd8a</guid><dc:creator>AHaug</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;Apologies for the week long wait. I&amp;#39;ve been out of office.&lt;/p&gt;
&lt;p&gt;It looks like we&amp;#39;ve misunderstood your original query, which stated &amp;quot;disconnect&amp;quot; and not &amp;quot;disable&amp;quot;. I&amp;#39;ve created a query if it is possible to disable Zigbee so that it still remembers the nwk details, and I&amp;#39;ll get back to you when I hear more from the Zigbee team.&lt;/p&gt;
[quote user="Gaston"]Is the another way of shutting down Zigbee? It&amp;#39;s strange that it&amp;#39;s not possible to easily shut it down, like with bluetooth it&amp;#39;s just a matter of stopping advertising.[/quote]
&lt;p&gt;This seems to be correct, but I will verify when I hear back from the Zigbee teams investigation. One way that we briefly discussed that might be an alternative is to use a combination of determining a long timeout for when a router should delete an end device if it does not receive a keep-alive from the end device through zb_set_ed_timeout() (should be ~256 minutes in nRF5 and ~64 minutes in NCS by default), and&amp;nbsp;&lt;span&gt;&lt;span dir="ltr"&gt;zb_set_keepalive_timeout() that determines how often you send keep alive. This period is 3 seconds by default, but you should be able to get away with just sending 3 keep-alives during the span of the timeout period.&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&lt;span dir="ltr"&gt;This is not a perfect way, but it could be worth investigating while waiting&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&lt;span dir="ltr"&gt;Kind regards,&lt;br /&gt;Andreas&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Zigbee disconnect</title><link>https://devzone.nordicsemi.com/thread/464188?ContentTypeID=1</link><pubDate>Mon, 15 Jan 2024 13:21:08 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:be32b517-1fd2-4e9f-8a61-5238547d9825</guid><dc:creator>Gueston</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;This works, but now it leaves the whole zigbee network and can&amp;#39;t rejoin without deleting the device from the coordinator and rejoin it manually. My purpose is not leaving the zigbee network itself, because it can&amp;#39;t recover automatically from that. My purpose is to &amp;quot;shut down&amp;quot; zigbee when the battery is almost depleted.&lt;/p&gt;
&lt;p&gt;I believe this code is almost the same as&amp;nbsp;&amp;nbsp;&lt;span&gt;zb_bdb_reset_via_local_action&lt;/span&gt;&lt;span&gt;(&lt;/span&gt;&lt;span&gt;0U&lt;/span&gt;&lt;span&gt;); but like I said, that&amp;#39;s not what I want to do.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;In a previous answer you posted this:&lt;/p&gt;
[quote userid="107683" url="~/f/nordic-q-a/106090/zigbee-disconnect/458058"]&lt;strong&gt;For Mgmt_leave_req:&lt;/strong&gt;&lt;br /&gt;You can call&amp;nbsp;&lt;a title="https://infocenter.nordicsemi.com/topic/sdk_tz_v4.2.0/group__zdo__mgmt.html#ga070ef34e8924ae2bb71fe69a1a297c83" href="https://infocenter.nordicsemi.com/topic/sdk_tz_v4.2.0/group__zdo__mgmt.html#ga070ef34e8924ae2bb71fe69a1a297c83" rel="noopener noreferrer" target="_blank"&gt;zdo_mgmt_leave_req()&lt;/a&gt;. If the device sets is adresse as device_adresse then it will send the leave request to itself. Make sure that you also set the rejoin flag to false so it does not try to rejoine until you&amp;#39;ve met the conditions you want it to have before rejoining. To my understanding that would be when the battery levels are sufficient in your case. There are some examplecode in the link.[/quote]
&lt;p&gt;Which is why I set the device address to 0.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Is the another way of shutting down Zigbee? It&amp;#39;s strange that it&amp;#39;s not possible to easily shut it down, like with bluetooth it&amp;#39;s just a matter of stopping advertising.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Zigbee disconnect</title><link>https://devzone.nordicsemi.com/thread/464099?ContentTypeID=1</link><pubDate>Mon, 15 Jan 2024 08:37:27 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:c5751abe-f7a0-4f6c-bf85-977be93436be</guid><dc:creator>AHaug</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;Here&amp;#39;s some feedback from the Zigbee team:&lt;/p&gt;
&lt;p&gt;---&lt;/p&gt;
&lt;p&gt;I tested their code, and this line caused the ZBOSS fatal error:&lt;/p&gt;
&lt;p&gt;&lt;code&gt;ZB_MEMSET(req-&amp;gt;device_address, 0, sizeof(zb_ieee_addr_t));&lt;/code&gt;&lt;/p&gt;
&lt;p&gt;They can just remove it. Setting the long address to 0000000000000000 will make the device send the leave request to itself, but so will omitting this field completely.&lt;/p&gt;
&lt;p&gt;&lt;br /&gt;They were also doing some other questionable things, so I cleaned up their code. I’ll explain what and why, the full code is at the end.&lt;/p&gt;
&lt;p&gt;1. The function zb_buf_get_out_delayed() will allocate an output buffer, and this output buffer will be a parameter of the function called as callback with zb_buf_get_out_delayed(). E.g:&lt;/p&gt;
&lt;div&gt;
&lt;div&gt;
&lt;div&gt;
&lt;div&gt;&lt;span&gt;&lt;span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;div&gt;&lt;span&gt;&lt;span&gt;&lt;pre class="ui-code" data-mode="text"&gt;zb_buf_get_out_delayed(my_function);

void my_function(zb_bufid_t bufid)
{
  // Here I can use bufid as the output buffer
}&lt;/pre&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;p&gt;So they do not need to create the param variable and can just use this buffer instead.&lt;/p&gt;
&lt;p&gt;2. They should use the correct short addr for the device, not just set it to 1. They have to use the long address to find the short address, but it’s just a few lines of code. So I added code for getting the long address and short address, and changed dst_addr to this short_addr instead of 1.&lt;/p&gt;
&lt;p&gt;3. They should free the output buffer with zb_buf_free(). If the command is not successful they should free it in zb_leave(). If it is successful, they should handle it in the callback by checking if the buffer exists and, if so, freeing it.&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Cleaned up code:&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;void leave_callback(zb_uint8_t param)
{
    // Handle callback here as you want
    if (param) {
        zb_buf_free(param);
    }
}

void leave_zb(zb_bufid_t buf) {
    zb_zdo_mgmt_leave_param_t *req = NULL;
    zb_uint8_t tsn;

    // Getting short address of the device
    zb_uint16_t short_addr;
	zb_ieee_addr_t addr;
    zb_get_long_address(addr);
    short_addr = zb_address_short_by_ieee(addr);
 
    req = ZB_BUF_GET_PARAM(buf, zb_zdo_mgmt_leave_param_t);
    
    req-&amp;gt;remove_children = ZB_FALSE;
    req-&amp;gt;rejoin = ZB_FALSE;
    req-&amp;gt;dst_addr = short_addr;
    tsn = zdo_mgmt_leave_req(buf, leave_callback);

    if (tsn == ZB_ZDO_INVALID_TSN){
        zb_buf_free(buf);
    }
}

...

zb_buf_get_out_delayed(leave_zb);&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;---&lt;/p&gt;
&lt;p&gt;Let me know if this resolves the issue&lt;/p&gt;
&lt;p&gt;Kind regards,&lt;br /&gt;Andreas&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Zigbee disconnect</title><link>https://devzone.nordicsemi.com/thread/463563?ContentTypeID=1</link><pubDate>Wed, 10 Jan 2024 13:33:57 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:39e72875-3a95-424b-9619-d31301e9c26a</guid><dc:creator>Gueston</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;I indeed called leave_zb directly, I didn&amp;#39;t know I had to call it via the scheduler.&lt;/p&gt;
&lt;p&gt;However, this didn&amp;#39;t solve the issue. I still get this error log&lt;pre class="ui-code" data-mode="text"&gt;00&amp;gt; &amp;lt;info&amp;gt; app: Joined network successfully on reboot signal (Extended PAN ID: 9820273807686906, PAN ID: 0x4EBC)
00&amp;gt; &amp;lt;error&amp;gt; app: ZBOSS assertion in file: 24, line: 1024
00&amp;gt; &amp;lt;error&amp;gt; app: ZBOSS assertion occurred&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;I indeed also think that it crashed before the leave request, hence the assert. Which file is File 24?&lt;/p&gt;
&lt;p&gt;The leave request call is:&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="c_cpp"&gt;void leave_callback(zb_uint8_t param)
{
 //zb_zdo_mgmt_leave_res_t *resp = (zb_zdo_mgmt_leave_res_t *)zb_buf_begin(param);
 //TRACE_MSG(TRACE_ERROR, &amp;quot;LEAVE CALLBACK status %hd&amp;quot;, (FMT__H, resp-&amp;gt;status));
}

void leave_zb() {
    uint8_t param = 0;
    zb_bufid_t buf = param;
    zb_zdo_mgmt_leave_param_t *req = NULL;
    zb_ret_t ret = RET_OK;
    zb_uint8_t tsn;

    //TRACE_MSG(TRACE_ERROR, &amp;quot;zb_leave_req&amp;quot;, (FMT__0));

    req = ZB_BUF_GET_PARAM(buf, zb_zdo_mgmt_leave_param_t);

    ZB_MEMSET(req-&amp;gt;device_address, 0, sizeof(zb_ieee_addr_t));
    req-&amp;gt;remove_children = ZB_FALSE;
    req-&amp;gt;rejoin = ZB_FALSE;
    req-&amp;gt;dst_addr = 1;
    tsn = zdo_mgmt_leave_req(param, leave_callback);
}&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;And leave_zb is called with:&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="c_cpp"&gt;zb_buf_get_out_delayed(leave_zb);&lt;/pre&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Zigbee disconnect</title><link>https://devzone.nordicsemi.com/thread/463557?ContentTypeID=1</link><pubDate>Wed, 10 Jan 2024 13:16:45 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:a3573994-7a1c-4266-b7b7-c6943f12f825</guid><dc:creator>AHaug</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;After inspecting the pcap we believe that your device is not sending the leave request before crashing. Could you post the complete leave request call with parameters that you used in this trace?&lt;/p&gt;
&lt;p&gt;&lt;span&gt;The Zigbee teams suspicion is that you are calling leave_zb() incorrectly and outside of the ZBOSS scheduler. Could you try calling it using zb_buf_get_out_delayed()?&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&lt;pre class="ui-code" data-mode="text"&gt;zb_buf_get_out_delayed(leave_zb);&lt;/pre&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Kind regards,&lt;br /&gt;Andreas&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Zigbee disconnect</title><link>https://devzone.nordicsemi.com/thread/463381?ContentTypeID=1</link><pubDate>Tue, 09 Jan 2024 14:32:06 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:f8a9231c-3769-42cd-afd5-d716f6687273</guid><dc:creator>Gueston</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;The zigbee assert log I get is:&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;00&amp;gt; &amp;lt;error&amp;gt; app: ZBOSS assertion in file: 24, line: 1024
00&amp;gt; &amp;lt;error&amp;gt; app: ZBOSS assertion occurred&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;I&amp;#39;m not so sure if the wireshark sniff log is so usefull, as I can&amp;#39;t see anything happening there (probably because it asserts before doing anything).&lt;/p&gt;
&lt;p&gt;Anyway, I attached it. The network key is 83:26:c3:f1:02:82:6b:d1:13:fa:db:a7:47:36:db:dd&lt;a href="https://devzone.nordicsemi.com/cfs-file/__key/communityserver-discussions-components-files/4/Zigbee_5F00_assert2.pcapng"&gt;devzone.nordicsemi.com/.../Zigbee_5F00_assert2.pcapng&lt;/a&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Zigbee disconnect</title><link>https://devzone.nordicsemi.com/thread/463275?ContentTypeID=1</link><pubDate>Tue, 09 Jan 2024 07:46:28 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:f3b21c18-4152-4e45-9887-1fcf94bfb04b</guid><dc:creator>AHaug</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;Could you provide us with a device log (without trace such as the one you have provided) and a separate wireshark sniff (.pcap)? See&amp;nbsp;&lt;a href="https://infocenter.nordicsemi.com/index.jsp?topic=%2Fug_sniffer_802154%2FUG%2Fsniffer_802154%2Fintro_802154.html"&gt;https://infocenter.nordicsemi.com/index.jsp?topic=%2Fug_sniffer_802154%2FUG%2Fsniffer_802154%2Fintro_802154.html&lt;/a&gt;&amp;nbsp;for how to set up wireshark for sniffing Zigbee&lt;/p&gt;
&lt;p&gt;Kind regards,&lt;br /&gt;Andreas&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Zigbee disconnect</title><link>https://devzone.nordicsemi.com/thread/463080?ContentTypeID=1</link><pubDate>Mon, 08 Jan 2024 09:34:10 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:51dc3b25-0bf4-42d3-9677-56c9559228f2</guid><dc:creator>AHaug</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;I&amp;#39;ve queried the team once more. December has been busy and there has been some organizational changes in the Zigbee team&lt;/p&gt;
&lt;p&gt;Hopefully this will pick up speed, but unfortunately there will be some more wait.&lt;/p&gt;
&lt;p&gt;Apologies for the inconvenience&lt;/p&gt;
&lt;p&gt;Kind regards,&lt;br /&gt;Andreas&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Zigbee disconnect</title><link>https://devzone.nordicsemi.com/thread/463060?ContentTypeID=1</link><pubDate>Mon, 08 Jan 2024 08:11:44 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:34850809-0322-4bc2-8119-ca898da05c0b</guid><dc:creator>Gueston</dc:creator><description>&lt;p&gt;Hi, any updates on this? It&amp;#39;s been more then a month ago.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Zigbee disconnect</title><link>https://devzone.nordicsemi.com/thread/459407?ContentTypeID=1</link><pubDate>Thu, 07 Dec 2023 15:20:49 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:b9a7793b-5043-4243-a21b-ff4bb6bc04ca</guid><dc:creator>AHaug</dc:creator><description>&lt;p&gt;Hi,&amp;nbsp;&lt;/p&gt;
&lt;p&gt;This is just an update that I will relay this to the Zigbee team for some input and I&amp;#39;ll get back to you when I know some more or if they have any questions to you.&lt;/p&gt;
&lt;p&gt;Hopefully that won&amp;#39;t take to long, and I&amp;#39;ll check back in with you next week regarding the status&lt;/p&gt;
&lt;p&gt;Kind regards,&lt;br /&gt;Andreas&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Zigbee disconnect</title><link>https://devzone.nordicsemi.com/thread/458967?ContentTypeID=1</link><pubDate>Tue, 05 Dec 2023 13:03:50 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:184b3b79-38c3-401e-a02e-160fc2ce4b8f</guid><dc:creator>Gueston</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;See the zigbee trace (including traffic) attached.&lt;/p&gt;
&lt;p&gt;When I call zdo_mgmt_leave_req with param 0, then I get a softreset. When I call it with 1, then it won&amp;#39;t reset, but it won&amp;#39;t leave the network. The attached trace file is with param 1.&lt;/p&gt;
&lt;p&gt;&lt;a href="https://devzone.nordicsemi.com/cfs-file/__key/communityserver-discussions-components-files/4/zigbee_5F00_trace.txt"&gt;devzone.nordicsemi.com/.../zigbee_5F00_trace.txt&lt;/a&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Zigbee disconnect</title><link>https://devzone.nordicsemi.com/thread/458920?ContentTypeID=1</link><pubDate>Tue, 05 Dec 2023 09:41:09 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:8acf6625-aed3-4f63-b251-7db0e63036c2</guid><dc:creator>AHaug</dc:creator><description>&lt;p&gt;You&amp;#39;re right, my bad.&lt;/p&gt;
&lt;p&gt;Could you provide me with a application log and sniffer trace?&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Kind regards,&lt;br /&gt;Andreas&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Zigbee disconnect</title><link>https://devzone.nordicsemi.com/thread/458711?ContentTypeID=1</link><pubDate>Mon, 04 Dec 2023 11:18:40 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:1df2f4ad-ac82-4196-a5a6-870b98166da1</guid><dc:creator>Gueston</dc:creator><description>&lt;p&gt;Yes it does. On line number 1 till 5 of the code that I posted you can see that callback.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Zigbee disconnect</title><link>https://devzone.nordicsemi.com/thread/458680?ContentTypeID=1</link><pubDate>Mon, 04 Dec 2023 09:13:09 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:a04a078a-2e6d-471d-ac4a-3355f41f3eb0</guid><dc:creator>AHaug</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;The example code also contains this callback&lt;/p&gt;
&lt;p&gt;&lt;img style="max-height:240px;max-width:320px;" src="https://devzone.nordicsemi.com/resized-image/__size/640x480/__key/communityserver-discussions-components-files/4/pastedimage1701681170193v1.png" alt=" " /&gt;&lt;/p&gt;
&lt;p&gt;While the sample code you posted does not.&lt;/p&gt;
&lt;p&gt;Kind regards,&lt;br /&gt;Andreas&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Zigbee disconnect</title><link>https://devzone.nordicsemi.com/thread/458556?ContentTypeID=1</link><pubDate>Fri, 01 Dec 2023 14:37:04 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:bc28934f-5e1e-4fec-9673-9f18e6883015</guid><dc:creator>Gueston</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;I&amp;#39;m not sure what you mean with include leave_callback? This callback is called via the&amp;nbsp;zdo_mgmt_leave_req function, where should I include it?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Zigbee disconnect</title><link>https://devzone.nordicsemi.com/thread/458536?ContentTypeID=1</link><pubDate>Fri, 01 Dec 2023 13:42:37 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:3d153d74-acbf-412d-9ac7-82505dea3c98</guid><dc:creator>AHaug</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;Do you also include the leave_callback? I assume you do, but just to be safe&lt;/p&gt;
&lt;p&gt;Kind regards,&lt;br /&gt;Andreas&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Zigbee disconnect</title><link>https://devzone.nordicsemi.com/thread/458140?ContentTypeID=1</link><pubDate>Wed, 29 Nov 2023 14:36:25 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:93bb66d0-ad13-4d24-9c06-24665cc5a50e</guid><dc:creator>Gueston</dc:creator><description>&lt;p&gt;Hi,&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Thanks.for the reply.&amp;nbsp;So I should leave the network, that makes sense.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;However, I can&amp;#39;t get&amp;nbsp;&lt;a title="https://infocenter.nordicsemi.com/topic/sdk_tz_v4.2.0/group__zdo__mgmt.html#ga070ef34e8924ae2bb71fe69a1a297c83" href="https://infocenter.nordicsemi.com/topic/sdk_tz_v4.2.0/group__zdo__mgmt.html#ga070ef34e8924ae2bb71fe69a1a297c83" rel="noopener noreferrer" target="_blank"&gt;zdo_mgmt_leave_req()&lt;/a&gt;&amp;nbsp;to leave the network.&lt;/p&gt;
&lt;p&gt;I use the following code from the sample:&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="c_cpp"&gt;void leave_callback(zb_uint8_t param)
{
 zb_zdo_mgmt_leave_res_t *resp = (zb_zdo_mgmt_leave_res_t *)zb_buf_begin(param);
 TRACE_MSG(TRACE_ERROR, &amp;quot;LEAVE CALLBACK status %hd&amp;quot;, (FMT__H, resp-&amp;gt;status));
}

void leave_zb(uint8_t param) {
    zb_bufid_t buf = param;
    zb_zdo_mgmt_leave_param_t *req = NULL;
    zb_ret_t ret = RET_OK;
    zb_uint8_t tsn;

    TRACE_MSG(TRACE_ERROR, &amp;quot;zb_leave_req&amp;quot;, (FMT__0));

    req = ZB_BUF_GET_PARAM(buf, zb_zdo_mgmt_leave_param_t);

    ZB_MEMSET(req-&amp;gt;device_address, 0, sizeof(zb_ieee_addr_t));
    req-&amp;gt;remove_children = ZB_FALSE;
    req-&amp;gt;rejoin = ZB_FALSE;
    req-&amp;gt;dst_addr = 1;
    tsn = zdo_mgmt_leave_req(param, leave_callback);
}&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;I call leave_zb with parameter 0.&lt;/p&gt;
&lt;p&gt;When I call it, I get a device reset because the zigbee stack crashed.&lt;/p&gt;
&lt;p&gt;What should I change in the code?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Zigbee disconnect</title><link>https://devzone.nordicsemi.com/thread/458058?ContentTypeID=1</link><pubDate>Wed, 29 Nov 2023 11:34:01 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:f9dc665f-4cdc-450e-aa82-457eb90a8eed</guid><dc:creator>AHaug</dc:creator><description>&lt;p&gt;Hi,&amp;nbsp;&lt;/p&gt;
&lt;p&gt;I&amp;#39;ve asked around some and here&amp;#39;s an alternative to what you can do:&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;For Mgmt_leave_req:&lt;/strong&gt;&lt;br /&gt;You can call&amp;nbsp;&lt;a title="https://infocenter.nordicsemi.com/topic/sdk_tz_v4.2.0/group__zdo__mgmt.html#ga070ef34e8924ae2bb71fe69a1a297c83" href="https://infocenter.nordicsemi.com/topic/sdk_tz_v4.2.0/group__zdo__mgmt.html#ga070ef34e8924ae2bb71fe69a1a297c83" rel="noopener noreferrer" target="_blank"&gt;zdo_mgmt_leave_req()&lt;/a&gt;. If the device sets is adresse as device_adresse then it will send the leave request to itself. Make sure that you also set the rejoin flag to false so it does not try to rejoine until you&amp;#39;ve met the conditions you want it to have before rejoining. To my understanding that would be when the battery levels are sufficient in your case. There are some examplecode in the link.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Factory reset&lt;br /&gt;&lt;br /&gt;&lt;/strong&gt;For factory reset you can call&amp;nbsp;&lt;a title="https://infocenter.nordicsemi.com/topic/sdk_tz_v4.2.0/group__af__management__service.html#ga7c7c6a7b96b210641a8d9632e27ff4c8" href="https://infocenter.nordicsemi.com/topic/sdk_tz_v4.2.0/group__af__management__service.html#ga7c7c6a7b96b210641a8d9632e27ff4c8" rel="noopener noreferrer" target="_blank"&gt;zb_bdb_reset_via_local_action()&lt;/a&gt;. This will make the device run a NLME leave and remove all Zigbee persistent data except the outgoing NWK frame counter and the aplication dataset (if there are any present)&lt;/p&gt;
&lt;p&gt;Let me know if this answers your question!&lt;/p&gt;
&lt;p&gt;Kind regards,&lt;br /&gt;Andreas&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Zigbee disconnect</title><link>https://devzone.nordicsemi.com/thread/457912?ContentTypeID=1</link><pubDate>Tue, 28 Nov 2023 14:53:10 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:3b4ba7ef-8c14-4963-8330-936729d4386e</guid><dc:creator>AHaug</dc:creator><description>&lt;p&gt;Allright, thank you for verifying&lt;/p&gt;
&lt;p&gt;I would say that this should be possible to do as long as you handle the reconnection procedure correct&lt;/p&gt;
&lt;p&gt;I will have ask around a bit if someone knows if there are an existing API, but in the meanwhile you can have a look in the API reference for Zigbee in&amp;nbsp;&lt;a href="https://infocenter.nordicsemi.com/topic/sdk_tz_v4.2.0/modules.html"&gt;https://infocenter.nordicsemi.com/topic/sdk_tz_v4.2.0/modules.html&lt;/a&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Kind regards,&lt;br /&gt;Andreas&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Zigbee disconnect</title><link>https://devzone.nordicsemi.com/thread/457887?ContentTypeID=1</link><pubDate>Tue, 28 Nov 2023 14:06:03 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:4c1b8586-ab1f-48ab-82e5-cb5e6e7b4a09</guid><dc:creator>Gueston</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;nRF5 SDK for Thread and Zigbee v4.2.0&lt;/p&gt;
&lt;p&gt;Yes I still want to use other features of the device, so I don&amp;#39;t want a powerdown. With bluetooth I simply stop the advertising with low battery, so I&amp;#39;m looking like a similar feature to &amp;#39;disconnect&amp;#39; from the zigbee router.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Zigbee disconnect</title><link>https://devzone.nordicsemi.com/thread/457882?ContentTypeID=1</link><pubDate>Tue, 28 Nov 2023 13:53:59 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:63a9f172-0b2b-45e7-beaf-f939c8415f5d</guid><dc:creator>AHaug</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;I see that you&amp;#39;ve listed the nRF52833. Could you also state which SDK and version of said SDK you&amp;#39;re using?&lt;/p&gt;
&lt;p&gt;Could you verify if you still want to use other features of the device, such as the BLE features and/or other items, or do you simply want to power down the device and let it sleep as long as possible?&lt;/p&gt;
&lt;p&gt;Kind regards,&lt;br /&gt;Andreas&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>