<?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 Switch results in bootloop</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/84122/zigbee-switch-results-in-bootloop</link><description>I am using nrf52840-DK and trying to get the Zigbee Switch working. This is just a plain zigbee switch with no bind to light. However, this set attribute during init results in the bootloop 
 SET_ATTRIBUTE 
 The below code in switch_clusters_attr_init</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Sun, 30 Jan 2022 11:21:36 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/84122/zigbee-switch-results-in-bootloop" /><item><title>RE: Zigbee Switch results in bootloop</title><link>https://devzone.nordicsemi.com/thread/350324?ContentTypeID=1</link><pubDate>Sun, 30 Jan 2022 11:21:36 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:e1c4c3db-f768-40cf-b521-387248a7316b</guid><dc:creator>Manju_rn</dc:creator><description>&lt;p&gt;Found the problem. It does not fix the requirement I was trying to achieve but the bootloop issue is resolved.&lt;/p&gt;
&lt;p&gt;The problem was that I was providing ON_OFF attributes list in the ON_OFF_SWITCH_CLUSTER.&amp;nbsp; The ZB_HA_DECLARE_ON_OFF_SWITCH_CLUSTER_LIST take switch configuration as the input &lt;a class="code" href="https://infocenter.nordicsemi.com/topic/sdk_tz_v4.1.0/group___z_b___z_c_l___o_o_s_c.html#ga005d9f73f4306d2327672c5fa992075b"&gt;&lt;span&gt;ZB_ZCL_DECLARE_&lt;span class="resultofText"&gt;ON_OFF_SWITCH_CONFIG&lt;/span&gt;URATION_ATTRIB_LIST&lt;/span&gt;&lt;/a&gt;(switch_cfg_attr_list, &amp;amp;attr_switch_type, &amp;amp;attr_switch_actions);&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;----Incorrect declatation-----&lt;/p&gt;
&lt;p&gt;/* On/Off cluster attributes additions data */&lt;br /&gt;ZB_ZCL_DECLARE_ON_OFF_ATTRIB_LIST(&lt;br /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;on_off_attr_list,&lt;br /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;amp;dev_ctx.on_off_attr.on_off);&lt;br /&gt;&lt;br /&gt;ZB_HA_DECLARE_ON_OFF_SWITCH_CLUSTER_LIST(&lt;br /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;switch_clusters,&lt;br /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;on_off_attr_list,&lt;br /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;basic_attr_list,&lt;br /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;identify_attr_list&lt;br /&gt;);&lt;/p&gt;
&lt;p&gt;---------------------&lt;/p&gt;
&lt;p&gt;---- Correct declaration-----&lt;/p&gt;
&lt;div class="fragment"&gt;
&lt;div class="line"&gt;&lt;span class="comment"&gt;/******************* Declare attributes ************************/&lt;/span&gt;&lt;/div&gt;
&lt;div class="line"&gt;&lt;/div&gt;
&lt;div class="line"&gt;&lt;span class="comment"&gt;/* Switch config cluster attributes data */&lt;/span&gt;&lt;/div&gt;
&lt;div class="line"&gt;&lt;a class="code" href="https://infocenter.nordicsemi.com/topic/sdk_tz_v4.1.0/group__base__types.html#gaa82a9657ef11a3947586065cf8066256"&gt;zb_uint8_t&lt;/a&gt; attr_switch_type =&lt;/div&gt;
&lt;div class="line"&gt;&lt;a class="code" href="https://infocenter.nordicsemi.com/topic/sdk_tz_v4.1.0/group___z_b___z_c_l___o_o_s_c.html#ggae92bb00709be040ba03a01f754ea1f29aa3e98ff8bc1ba98068e1bd8204038039"&gt;&lt;span&gt;ZB_ZCL_&lt;span class="resultofText"&gt;ON_OFF_SWITCH_CONFIG&lt;/span&gt;URATION_SWITCH_TYPE_TOGGLE&lt;/span&gt;&lt;/a&gt;;&lt;/div&gt;
&lt;div class="line"&gt;&lt;a class="code" href="https://infocenter.nordicsemi.com/topic/sdk_tz_v4.1.0/group__base__types.html#gaa82a9657ef11a3947586065cf8066256"&gt;zb_uint8_t&lt;/a&gt; attr_switch_actions =&lt;/div&gt;
&lt;div class="line"&gt;&lt;a class="code" href="https://infocenter.nordicsemi.com/topic/sdk_tz_v4.1.0/group___z_b___z_c_l___o_o_s_c.html#gaac509b1128c5a2fc9cc107f559466329"&gt;&lt;span&gt;ZB_ZCL_&lt;span class="resultofText"&gt;ON_OFF_SWITCH_CONFIG&lt;/span&gt;URATION_SWITCH_ACTIONS_DEFAULT_VALUE&lt;/span&gt;&lt;/a&gt;;&lt;/div&gt;
&lt;div class="line"&gt;&lt;/div&gt;
&lt;div class="line"&gt;&lt;a class="code" href="https://infocenter.nordicsemi.com/topic/sdk_tz_v4.1.0/group___z_b___z_c_l___o_o_s_c.html#ga005d9f73f4306d2327672c5fa992075b"&gt;&lt;span&gt;ZB_ZCL_DECLARE_&lt;span class="resultofText"&gt;ON_OFF_SWITCH_CONFIG&lt;/span&gt;URATION_ATTRIB_LIST&lt;/span&gt;&lt;/a&gt;(switch_cfg_attr_list, &amp;amp;attr_switch_type, &amp;amp;attr_switch_actions);&lt;/div&gt;
&lt;div class="line"&gt;&lt;/div&gt;
&lt;div class="line"&gt;&lt;span class="comment"&gt;/* Basic cluster attributes data */&lt;/span&gt;&lt;/div&gt;
&lt;div class="line"&gt;&lt;a class="code" href="https://infocenter.nordicsemi.com/topic/sdk_tz_v4.1.0/group__base__types.html#gaa82a9657ef11a3947586065cf8066256"&gt;zb_uint8_t&lt;/a&gt; attr_zcl_version = &lt;a class="code" href="https://infocenter.nordicsemi.com/topic/sdk_tz_v4.1.0/group___z_b___z_c_l___b_a_s_i_c.html#gaa18ac51025ca57aec1d1e0b1681d2436"&gt;ZB_ZCL_BASIC_ZCL_VERSION_DEFAULT_VALUE&lt;/a&gt;;&lt;/div&gt;
&lt;div class="line"&gt;&lt;a class="code" href="https://infocenter.nordicsemi.com/topic/sdk_tz_v4.1.0/group__base__types.html#gaa82a9657ef11a3947586065cf8066256"&gt;zb_uint8_t&lt;/a&gt; attr_power_source = &lt;a class="code" href="https://infocenter.nordicsemi.com/topic/sdk_tz_v4.1.0/group___z_b___z_c_l___b_a_s_i_c.html#ga5fbef278352f7681269cb032b411f297"&gt;ZB_ZCL_BASIC_POWER_SOURCE_DEFAULT_VALUE&lt;/a&gt;;&lt;/div&gt;
&lt;div class="line"&gt;&lt;/div&gt;
&lt;div class="line"&gt;&lt;a class="code" href="https://infocenter.nordicsemi.com/topic/sdk_tz_v4.1.0/group___z_b___z_c_l___b_a_s_i_c.html#ga234177d0215acbfb6ddc48572ffca40d"&gt;ZB_ZCL_DECLARE_BASIC_ATTRIB_LIST&lt;/a&gt;(basic_attr_list, &amp;amp;attr_zcl_version, &amp;amp;attr_power_source);&lt;/div&gt;
&lt;div class="line"&gt;&lt;/div&gt;
&lt;div class="line"&gt;&lt;span class="comment"&gt;/* Identify cluster attributes data */&lt;/span&gt;&lt;/div&gt;
&lt;div class="line"&gt;&lt;a class="code" href="https://infocenter.nordicsemi.com/topic/sdk_tz_v4.1.0/group__base__types.html#ga83793366ad4d54e8b65840d82a751498"&gt;zb_uint16_t&lt;/a&gt; attr_identify_time = 0;&lt;/div&gt;
&lt;div class="line"&gt;&lt;/div&gt;
&lt;div class="line"&gt;ZB_ZCL_DECLARE_IDENTIFY_ATTRIB_LIST(identify_attr_list, &amp;amp;attr_identify_time);&lt;/div&gt;
&lt;div class="line"&gt;&lt;/div&gt;
&lt;div class="line"&gt;&lt;span class="comment"&gt;/********************* Declare device **************************/&lt;/span&gt;&lt;/div&gt;
&lt;div class="line"&gt;&lt;span class="preprocessor"&gt;#define HA_SWITCH_ENDPOINT 10&lt;/span&gt;&lt;/div&gt;
&lt;div class="line"&gt;&lt;/div&gt;
&lt;div class="line"&gt;&lt;a class="code" href="https://infocenter.nordicsemi.com/topic/sdk_tz_v4.1.0/group__ha__on__off__switch.html#ga1108f798477399871d17489cb75e194d"&gt;ZB_HA_DECLARE_ON_OFF_SWITCH_CLUSTER_LIST&lt;/a&gt;(on_off_switch_clusters, switch_cfg_attr_list, basic_attr_list, identify_attr_list);&lt;/div&gt;
&lt;div class="line"&gt;&lt;/div&gt;
&lt;div class="line"&gt;&lt;a class="code" href="https://infocenter.nordicsemi.com/topic/sdk_tz_v4.1.0/group__ha__on__off__switch.html#gaf93d4db889c0d0b511793ecdab615674"&gt;ZB_HA_DECLARE_ON_OFF_SWITCH_EP&lt;/a&gt;(on_off_switch_ep, HA_SWITCH_ENDPOINT, on_off_switch_clusters);&lt;/div&gt;
&lt;div class="line"&gt;&lt;/div&gt;
&lt;div class="line"&gt;&lt;a class="code" href="https://infocenter.nordicsemi.com/topic/sdk_tz_v4.1.0/group__ha__on__off__switch.html#gad71426cd25501787f4ef4b0558a9df65"&gt;ZB_HA_DECLARE_ON_OFF_SWITCH_CTX&lt;/a&gt;(on_off_switch_ctx, on_off_switch_ep);&lt;/div&gt;
&lt;/div&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Zigbee Switch results in bootloop</title><link>https://devzone.nordicsemi.com/thread/350299?ContentTypeID=1</link><pubDate>Sat, 29 Jan 2022 03:09:54 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:dcf06ffd-116d-47ba-80db-390e0a4ad9d5</guid><dc:creator>Manju_rn</dc:creator><description>&lt;p&gt;Well, it is a combination of the both. I didn&amp;#39;t start off with the light switch example because the code is written as a binding to a bulb, so the button click actually sends the command for the light bulb rather than the switch itself &lt;span class="pl-en"&gt;light_switch_send_on_off.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span class="pl-en"&gt;However, if you can take a look at the main.c&amp;nbsp; can tell why this ZB_ZCL_SET_ATTRIBUTE might fail. I believe it is due to this pointer (zb_uint8_t *)&amp;amp;on&amp;nbsp; but during the debug it does have a value and in not null. but somehow the kernel still gets panicked and bootloops&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Zigbee Switch results in bootloop</title><link>https://devzone.nordicsemi.com/thread/350177?ContentTypeID=1</link><pubDate>Fri, 28 Jan 2022 11:16:20 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:1904caf8-3241-4a53-91f7-926b4e30e7e9</guid><dc:creator>J&amp;#248;rgen Holmefjord</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;From your main.c code, it looks like you started out with the light_bulb sample and modified it to work as a light switch. Is there any specific reasons you did not start out with the ready-made &lt;a href="https://github.com/nrfconnect/sdk-nrf/tree/v1.8.0/samples/zigbee/light_switch"&gt;light_switch sample&lt;/a&gt; instead?&lt;/p&gt;
&lt;p&gt;The configuration of the light_bulb sample may not support the light_switch APIs you have added. Did you change any other configs in the sample?&lt;/p&gt;
&lt;p&gt;Best regards,&lt;br /&gt;Jørgen&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Zigbee Switch results in bootloop</title><link>https://devzone.nordicsemi.com/thread/350089?ContentTypeID=1</link><pubDate>Thu, 27 Jan 2022 23:09:15 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:bec9f94e-a60d-4849-bb32-b11218917667</guid><dc:creator>Manju_rn</dc:creator><description>&lt;p&gt;Not sure why you have given the NXP . It doesn;t help. I know the basics of zigbee. I see no generic example of a switch and they have their own macros. &lt;span style="font-family:sans-serif;font-size:15px;left:315.223px;top:877.624px;" dir="ltr"&gt;&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Zigbee Switch results in bootloop</title><link>https://devzone.nordicsemi.com/thread/350021?ContentTypeID=1</link><pubDate>Thu, 27 Jan 2022 15:09:31 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:22c21d63-063f-4420-9bf2-16489ea6a71c</guid><dc:creator>sipan112</dc:creator><description>&lt;p&gt;the manual describes the NXP implementation of the ZigBee Cluster Library (ZCL) for the ZigBee 3.0 standard&amp;nbsp;&lt;br /&gt;you can read it:&amp;nbsp;&lt;a href="https://www.nxp.com/docs/en/user-guide/JN-UG-3115.pdf"&gt;JN-UG-3115.book (nxp.com)&lt;/a&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>