<?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 Coordinator (Client) - IAS Zone Implementation</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/71253/zigbee-coordinator-client---ias-zone-implementation</link><description>SDK : nRF5_SDK_for_Thread_and_Zigbee_v4.1.0 
 Hardware : 2x nRF52840 (PCA10059) + 1x generic overflow sensor. 
 This is an attempt to gather complete information regarding IAS Zone enrollment process implementation using ZBOSS Stack. 
 
 The primary reference</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Tue, 02 Mar 2021 12:34:41 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/71253/zigbee-coordinator-client---ias-zone-implementation" /><item><title>RE: Zigbee Coordinator (Client) - IAS Zone Implementation</title><link>https://devzone.nordicsemi.com/thread/297169?ContentTypeID=1</link><pubDate>Tue, 02 Mar 2021 12:34:41 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:dfd3d42e-b0f0-4472-8277-4a1bb2d81970</guid><dc:creator>Nik</dc:creator><description>&lt;p&gt;Thank you Marjeris.&lt;/p&gt;
&lt;p&gt;I was hoping to get a little more information regarding the max network size, and expected (recommended) size of the IAS ACE Zone Table, but oh well... I assume that&amp;#39;s all we can get.&lt;/p&gt;
&lt;p&gt;I think we can close this thread now, since primary objective was achieved - I gathered all necessary information and was able to implement IAS Zone Enrollment + reception and processing of async state change reports, and it seems to be stable for now.&lt;/p&gt;
&lt;p&gt;Best reagards,&lt;/p&gt;
&lt;p&gt;Nikita&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Zigbee Coordinator (Client) - IAS Zone Implementation</title><link>https://devzone.nordicsemi.com/thread/296838?ContentTypeID=1</link><pubDate>Mon, 01 Mar 2021 12:44:19 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:b46de927-8482-4275-9572-20af305a7c16</guid><dc:creator>Marjeris Romero</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;When it comes to storing the IAS ACE zone table, the stack doesn&amp;#39;t store it in non-volatile memory - it has to be implemented in the application. This can be either implemented using Flash Data Storage (FDS) an used in the Zigbee Door Lock example or using ZBOSS&amp;#39;s NVRAM and stored as APP_DATA.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Zigbee Coordinator (Client) - IAS Zone Implementation</title><link>https://devzone.nordicsemi.com/thread/296823?ContentTypeID=1</link><pubDate>Mon, 01 Mar 2021 11:42:40 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:079cdd2d-6723-4742-b8bb-5c76732e0a25</guid><dc:creator>Marjeris Romero</dc:creator><description>&lt;div&gt;
&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;I am sorry for the late reply. Answer from one of our Zigbee developers: &lt;br /&gt;&lt;br /&gt;&amp;quot;Yes, the Zone Enroll Request needs to be handled by the application (in the endpoint handler), I don&amp;#39;t see it being handled in the stack. This is also confirmed by DSR.&lt;/p&gt;
&lt;p&gt;Since this is nRF5 SDK, response packets can be scheduled from the callback. To send packet, first obtain the buffer to put packet into and then schedule it to be sent.&lt;br /&gt; Macro ZB_ZCL_IAS_ZONE_SEND_ZONE_ENROLL_RES can be used to send a response.&lt;/p&gt;
&lt;div&gt;
&lt;p&gt;As for the IAS ACE Zone Table, see &lt;b&gt;zb_zcl_ias_ace_zone_table_t&lt;/b&gt; in the &lt;em&gt;zb_zcl_ias_ace.h&lt;/em&gt;.&lt;/p&gt;
&lt;p&gt;Declare array of&amp;nbsp;&lt;b&gt;zb_zcl_ias_ace_zone_table_t&lt;/b&gt; as variable and additional variable (zb_uint16_t) to store the size of the IAS ACE table. When declaring IAS ACE attribute list using &lt;b&gt;ZB_ZCL_DECLARE_IAS_ACE_ATTRIB_LIST&lt;/b&gt; macro, you will pass pointers to both IAS ACE zone table and variable with table size to the macro. When it comes to size of the IAS ACE zone table, maximum size is 255 - each zone has its ID stored in uint8, hence the limit.&lt;/p&gt;
&lt;p&gt;I am not yet sure about storing this table at non-volatile memory. Need to check if the stack stores it or not.&amp;quot;&lt;br /&gt;&lt;br /&gt;BR,&lt;/p&gt;
&lt;p&gt;Marjeris&lt;/p&gt;
&lt;/div&gt;
&lt;/div&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Zigbee Coordinator (Client) - IAS Zone Implementation</title><link>https://devzone.nordicsemi.com/thread/295413?ContentTypeID=1</link><pubDate>Fri, 19 Feb 2021 17:29:02 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:85a2d5c3-7346-455b-b908-62c523944ac9</guid><dc:creator>Nik</dc:creator><description>&lt;p&gt;Hi Marjeris,&lt;/p&gt;
&lt;p&gt;Thank you for clarification.&lt;/p&gt;
[quote userid="73427" url="~/f/nordic-q-a/71253/zigbee-coordinator-client---ias-zone-implementation/295047#295047"]I am not sure if the stack will handle the &amp;#39;Zone Enroll Request&amp;#39; command or not[/quote]
&lt;p&gt;Currently, default response to &amp;#39;Zone Enroll Requests&amp;#39; is &amp;#39;Unsopported Command&amp;#39; (when IAS Zone cluster is declared), so yes, it has to be intercepted and handled by the APP layer and answered with either &amp;#39;Success&amp;#39; + Enrolled ZoneID of &amp;#39;Fail&amp;#39;. Just wanted to clarify that scheduling response packets right from the callback is the right thing and I don&amp;#39;t have to create and manage signals for external thread for that.&lt;/p&gt;
&lt;p&gt;I look forward to hearing from you about possibility of larger Zigbee networks (especially when TC is not on NRF52840) and expected &amp;#39;IAS ACE Zone Table&amp;#39; size. Also, can application layer store information (like that zone table) inside persistent config sector? Or should it allocate another, different sector in flash memory for that?&lt;/p&gt;
&lt;p&gt;Regards,&lt;/p&gt;
&lt;p&gt;Nikita&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Zigbee Coordinator (Client) - IAS Zone Implementation</title><link>https://devzone.nordicsemi.com/thread/295047?ContentTypeID=1</link><pubDate>Thu, 18 Feb 2021 10:27:21 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:2c7a616e-950d-4d9a-a2d6-71ea2fb3a62f</guid><dc:creator>Marjeris Romero</dc:creator><description>&lt;p&gt;Hi, &lt;br /&gt;&lt;br /&gt;Sorry I haven&amp;#39;t come back to you sooner. I don&amp;#39;t know all the answers so I will need to consult with our developers.&lt;/p&gt;
[quote user="hw_dev"]After a ton of experiments I found that if I modify &lt;code&gt;ZB_HA_DECLARE_IAS_CONTROL_INDICATING_EQUIPMENT_CLUSTER_LIST()&lt;/code&gt; macro by moving &lt;code&gt;ZB_ZCL_CLUSTER_DESC()&lt;/code&gt; with &lt;code&gt;ZB_ZCL_CLUSTER_ID_GROUPS&lt;/code&gt; and &lt;code&gt;ZB_ZCL_CLUSTER_ID_SCENES&lt;/code&gt; above &lt;code&gt;IAS_*&lt;/code&gt; related clusters, device starts up successfully and works properly. &lt;em&gt;Don&amp;#39;t ask how...&lt;/em&gt; Long term stability yet unknown[/quote]
&lt;p&gt;I do see that most of our clusters in the example start with identiy, basic, groups and scene before moving to specific clusters, this is interesting, I will make an internal ticket to ask the developers about this, perhaps there is some requirement from the ZCL spec I am not aware of.&lt;/p&gt;
[quote user="hw_dev"]I assume I should handle &amp;#39;Zone Enroll Requests&amp;#39; inside &lt;code&gt;ep_handler&lt;/code&gt;, and also call &lt;code&gt;ZB_ZCL_IAS_ZONE_SEND_ZONE_ENROLL_RES(buffer, addr, dst_addr_mode, dst_ep, ep, prfl_id, def_resp, cb, code, zone_id)&lt;/code&gt; macro, is that correct? And, by the way, can I use callback&amp;#39;s &lt;code&gt;bufid&lt;/code&gt; as buffer, or should I create a new one with &lt;code&gt;zb_buf_get_out()&lt;/code&gt;? And, should I also &lt;code&gt;return ZB_TRUE&lt;/code&gt; from &lt;code&gt;ep_handler&lt;/code&gt; after calling that function macro to prevent default response?[/quote]
&lt;p&gt;I am not sure if the stack will handle the &amp;#39;Zone Enroll Request&amp;#39; command or not. If not, you need to probably use the ZCL packet handler callback to intercept the ZCL command as it&amp;#39;s explain here: &lt;a href="https://infocenter.nordicsemi.com/topic/sdk_tz_v4.1.0/using_zigbee__z_c_l.html?cp=7_3_3_4_1_8_1#process_zcl_cmd_implementin"&gt;https://infocenter.nordicsemi.com/topic/sdk_tz_v4.1.0/using_zigbee__z_c_l.html?cp=7_3_3_4_1_8_1#process_zcl_cmd_implementin&lt;/a&gt;g&lt;/p&gt;
&lt;p&gt;There are multiple examples on how to intercept ZCL commands in many of our examples. After intercepting the &amp;#39;Zone Enroll request&amp;#39; command from the server you should send a Zone enroll response ZB_ZCL_IAS_ZONE_SEND_ZONE_ENROLL_RES from the callback, so in this case I think inside &lt;em&gt;coord_main_ep_handler&lt;/em&gt;().&lt;/p&gt;
&lt;p&gt;See also this link for explanation on why sometimes the stack process the incomming ZCL commands or not: &lt;a href="https://infocenter.nordicsemi.com/index.jsp?topic=%2Fsdk_tz_v4.1.0%2Fusing_zigbee__z_c_l.html&amp;amp;cp=7_3_3_4_1_11&amp;amp;anchor=zcl_cmd_parse"&gt;https://infocenter.nordicsemi.com/index.jsp?topic=%2Fsdk_tz_v4.1.0%2Fusing_zigbee__z_c_l.html&amp;amp;cp=7_3_3_4_1_11&amp;amp;anchor=zcl_cmd_parse&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;/p&gt;
[quote user="hw_dev"]It is also not quite clear how to use &lt;code&gt;ZB_ZCL_DECLARE_IAS_ACE_ATTRIB_LIST()&lt;/code&gt; which requires &amp;#39;pointer to variable to store IAS ACE Zone Table attribute&amp;#39;.[/quote]
&lt;p&gt;&amp;nbsp;Yes, from the documentation I am quite sure you need to allocate this table yourself, and then give a pointer to that in the attribute declaration. They refer to this table:&lt;br /&gt;&lt;br /&gt;&lt;img src="https://devzone.nordicsemi.com/resized-image/__size/640x480/__key/communityserver-discussions-components-files/4/pastedimage1613642632077v1.png" alt=" " /&gt;&lt;br /&gt;Structure representation for the table: &lt;a href="https://infocenter.nordicsemi.com/index.jsp?topic=%2Fsdk_tz_v4.1.0%2Fstructzb__zcl__ias__ace__zone__table__s.html&amp;amp;cp=7_3_5_1_1_4_7_"&gt;https://infocenter.nordicsemi.com/index.jsp?topic=%2Fsdk_tz_v4.1.0%2Fstructzb__zcl__ias__ace__zone__table__s.html&amp;amp;cp=7_3_5_1_1_4_7_&lt;/a&gt;0&lt;br /&gt;&lt;br /&gt;But let me come back to you after I have discussed with the developers is there should be a preffered size or if you can allocate for as much memory as you think you will use. &lt;/p&gt;
[quote user="hw_dev"]So, I would like to know, what is the theoretical limit of the zigbee network if ZC is NRF52840? What if it is only a Router? Is it theoretically possible to connect, say, 2000 devices, or there is simply not enough memory to store routing table on NRF52840?[/quote]
&lt;p&gt;Difficult question that we get asked a lot. There is a theoretical limit in Zigbee but there will probably not be enough memory on the nRF52840 for that. DSR have had long running load tests for several months with up to 24 devices connected, but there is no architectural limitation for a network larger than that. The practical limiting factor is on the Trust Center (typically on coordinator devices) memory as the TC must hold link keys to all connected devices. Current soft limit is set on 200.&lt;br /&gt;&lt;br /&gt;Best regards,&lt;/p&gt;
&lt;p&gt;Marjeris&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Zigbee Coordinator (Client) - IAS Zone Implementation</title><link>https://devzone.nordicsemi.com/thread/294277?ContentTypeID=1</link><pubDate>Sat, 13 Feb 2021 15:34:47 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:c1575eba-80bc-4651-a1d6-5898672c63b7</guid><dc:creator>Nik</dc:creator><description>&lt;p&gt;Hi Marjeris,&lt;/p&gt;
&lt;p&gt;Once again, thank you for your advices.&lt;/p&gt;
&lt;p&gt;Alright, so here are the results:&lt;/p&gt;
&lt;p&gt;First, as you have suggested, I attempted to declare IAS Zone CIE cluster. However, device was failing to start. After a ton of experiments I found that if I modify &lt;code&gt;ZB_HA_DECLARE_IAS_CONTROL_INDICATING_EQUIPMENT_CLUSTER_LIST()&lt;/code&gt; macro by moving &lt;code&gt;ZB_ZCL_CLUSTER_DESC()&lt;/code&gt; with &lt;code&gt;ZB_ZCL_CLUSTER_ID_GROUPS&lt;/code&gt; and &lt;code&gt;ZB_ZCL_CLUSTER_ID_SCENES&lt;/code&gt; above &lt;code&gt;IAS_*&lt;/code&gt; related clusters, device starts up successfully and works properly. &lt;em&gt;Don&amp;#39;t ask how...&lt;/em&gt; Long term stability yet unknown. Please let me know I am doing something wrong, my code is below.&lt;/p&gt;
&lt;p&gt;Another major breakthrough happened when I found &lt;code&gt;zigbee_logger_eprxzcl_ep_handler()&lt;/code&gt; function inside &lt;strong&gt;zigbee_logger_eprxzcl.c&lt;/strong&gt; file, which clearly demonstrated how to work with &lt;code&gt;bufid&lt;/code&gt;.&lt;/p&gt;
&lt;p&gt;I assume I should handle &amp;#39;Zone Enroll Requests&amp;#39; inside &lt;code&gt;ep_handler&lt;/code&gt;, and also call &lt;code&gt;ZB_ZCL_IAS_ZONE_SEND_ZONE_ENROLL_RES(buffer, addr, dst_addr_mode, dst_ep, ep, prfl_id, def_resp, cb, code, zone_id)&lt;/code&gt; macro, is that correct? And, by the way, can I use callback&amp;#39;s &lt;code&gt;bufid&lt;/code&gt; as buffer, or should I create a new one with &lt;code&gt;zb_buf_get_out()&lt;/code&gt;? And, should I also &lt;code&gt;return ZB_TRUE&lt;/code&gt; from &lt;code&gt;ep_handler&lt;/code&gt; after calling that function macro to prevent default response?&lt;/p&gt;
&lt;p&gt;Here is how it looks right now:&lt;/p&gt;
&lt;pre&gt;#define APP_DECLARE_IAS_CONTROL_INDICATING_EQUIPMENT_CLUSTER_LIST(cluster_list_name, basic_attr_list, identify_attr_list, ias_ace_attr_list)&amp;nbsp; \&lt;br /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;zb_zcl_cluster_desc_t cluster_list_name[] = { \&lt;br /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;ZB_ZCL_CLUSTER_DESC(ZB_ZCL_CLUSTER_ID_BASIC,&amp;nbsp;&amp;nbsp;&amp;nbsp; ZB_ZCL_ARRAY_SIZE(basic_attr_list, zb_zcl_attr_t), (basic_attr_list), ZB_ZCL_CLUSTER_SERVER_ROLE, ZB_ZCL_MANUF_CODE_INVALID), \&lt;br /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;ZB_ZCL_CLUSTER_DESC(ZB_ZCL_CLUSTER_ID_IDENTIFY, 0, NULL, ZB_ZCL_CLUSTER_CLIENT_ROLE, ZB_ZCL_MANUF_CODE_INVALID ), \&lt;br /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;ZB_ZCL_CLUSTER_DESC(ZB_ZCL_CLUSTER_ID_IDENTIFY, ZB_ZCL_ARRAY_SIZE(identify_attr_list, zb_zcl_attr_t), (identify_attr_list), ZB_ZCL_CLUSTER_SERVER_ROLE, ZB_ZCL_MANUF_CODE_INVALID), \&lt;br /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;ZB_ZCL_CLUSTER_DESC(ZB_ZCL_CLUSTER_ID_GROUPS,&amp;nbsp;&amp;nbsp; 0, NULL, ZB_ZCL_CLUSTER_CLIENT_ROLE, ZB_ZCL_MANUF_CODE_INVALID ), \&lt;br /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;ZB_ZCL_CLUSTER_DESC(ZB_ZCL_CLUSTER_ID_SCENES,&amp;nbsp;&amp;nbsp; 0, NULL, ZB_ZCL_CLUSTER_CLIENT_ROLE, ZB_ZCL_MANUF_CODE_INVALID ), \&lt;br /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;ZB_ZCL_CLUSTER_DESC(ZB_ZCL_CLUSTER_ID_IAS_ZONE, 0, NULL, ZB_ZCL_CLUSTER_CLIENT_ROLE, ZB_ZCL_MANUF_CODE_INVALID ), \&lt;br /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;ZB_ZCL_CLUSTER_DESC(ZB_ZCL_CLUSTER_ID_IAS_ACE, ZB_ZCL_ARRAY_SIZE(ias_ace_attr_list, zb_zcl_attr_t), (ias_ace_attr_list), ZB_ZCL_CLUSTER_SERVER_ROLE,ZB_ZCL_MANUF_CODE_INVALID), \&lt;br /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;ZB_ZCL_CLUSTER_DESC(ZB_ZCL_CLUSTER_ID_IAS_WD,&amp;nbsp;&amp;nbsp; 0, NULL, ZB_ZCL_CLUSTER_CLIENT_ROLE, ZB_ZCL_MANUF_CODE_INVALID ), \&lt;br /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;}&lt;br /&gt;&lt;br /&gt;typedef struct {&lt;br /&gt;    zb_zcl_basic_attrs_t basic_attr;&lt;br /&gt;    zb_zcl_identify_attrs_t identify_attr;&lt;br /&gt;    struct {&lt;br /&gt;        zb_uint8_t zone_state;&lt;br /&gt;        zb_uint16_t zone_type;&lt;br /&gt;        zb_uint16_t zone_status;&lt;br /&gt;        zb_uint8_t ias_ace_zone_table_len;&lt;br /&gt;        zb_zcl_ias_ace_zone_table_t table[10]; // max is [ZB_ZCL_IAS_ACE_ZONE_TABLE_LENGTH] and sizeof(table) = 3825 (!)&lt;br /&gt;    } ias_zone_attr;&lt;br /&gt;} coord_attrs_t;&lt;br /&gt;&lt;br /&gt;static coord_attrs_t coord;&lt;br /&gt;&lt;br /&gt;ZB_ZCL_DECLARE_BASIC_ATTRIB_LIST(basic_attr_list, &amp;amp;coord.basic_attr.zcl_version, &amp;amp;coord.basic_attr.power_source);&lt;br /&gt;ZB_ZCL_DECLARE_IDENTIFY_ATTRIB_LIST(identify_attr_list, &amp;amp;coord.identify_attr.identify_time);&lt;br /&gt;ZB_ZCL_DECLARE_IAS_ACE_ATTRIB_LIST(ias_ace_attr_list, &amp;amp;coord.ias_zone_attr.ias_ace_zone_table_len, coord.ias_zone_attr.table);&lt;br /&gt;&lt;br /&gt;ZB_HA_DECLARE_CONFIGURATION_TOOL_CLUSTER_LIST(cli_agent_clusters, basic_attr_list, identify_attr_list);&lt;br /&gt;APP_DECLARE_IAS_CONTROL_INDICATING_EQUIPMENT_CLUSTER_LIST(ias_zone_cie_clusters, basic_attr_list, identify_attr_list, ias_ace_attr_list); // NK // rearranged ZB_HA_DECLARE_IAS_CONTROL_INDICATING_EQUIPMENT_CLUSTER_LIST(), otherwise hangs @ startup&lt;br /&gt;&lt;br /&gt;ZB_HA_DECLARE_CONFIGURATION_TOOL_EP(cli_agent_ep, ZIGBEE_CLI_ENDPOINT, cli_agent_clusters);&lt;br /&gt;ZB_HA_DECLARE_IAS_CONTROL_INDICATING_EQUIPMENT_EP(ias_zone_cie_ep, MAIN_ENDPOINT, ias_zone_cie_clusters);&lt;br /&gt;ZBOSS_DECLARE_DEVICE_CTX_2_EP(device_ctx, cli_agent_ep, ias_zone_cie_ep);&lt;br /&gt;&lt;br /&gt;//(...)&lt;br /&gt;&lt;br /&gt;zb_uint8_t coord_main_ep_handler(zb_bufid_t bufid) { &lt;br /&gt;    zigbee_logger_eprxzcl_ep_handler(bufid);&lt;br /&gt;    return ZB_FALSE; // continue packet processing inside default callback handler&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;&amp;nbsp;&lt;br /&gt;int main () {&lt;br /&gt;&lt;br /&gt;//(...)&lt;br /&gt;    ZB_AF_REGISTER_DEVICE_CTX(&amp;amp;device_ctx);&lt;br /&gt;    ZB_AF_SET_ENDPOINT_HANDLER(ZIGBEE_CLI_ENDPOINT, cli_agent_ep_handler);&lt;br /&gt;    ZB_AF_SET_ENDPOINT_HANDLER(MAIN_ENDPOINT, coord_main_ep_handler);&lt;br /&gt;//(...)&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;&lt;/pre&gt;
&lt;p&gt;It is also not quite clear how to use &lt;code&gt;ZB_ZCL_DECLARE_IAS_ACE_ATTRIB_LIST()&lt;/code&gt; which requires &amp;#39;pointer to variable to store IAS ACE Zone Table attribute&amp;#39;. Is ZBOSS core going to allocate memory inside persistent config sector? In RAM? Do I have to allocate manually dynamically / staticaly? Allocate one value or as much as I expect to use, or max possible size?&lt;/p&gt;
&lt;pre&gt;zb_uint8_t ias_ace_zone_table_len;&lt;br /&gt;&lt;br /&gt;// Option1&lt;br /&gt;zb_zcl_ias_ace_zone_table_t *table;&lt;br /&gt;ZB_ZCL_DECLARE_IAS_ACE_ATTRIB_LIST(ias_ace_attr_list, &amp;amp;ias_ace_zone_table_len, &amp;amp;table);&lt;br /&gt;&lt;br /&gt;// Option2&lt;br /&gt;zb_zcl_ias_ace_zone_table_t table;&lt;br /&gt;ZB_ZCL_DECLARE_IAS_ACE_ATTRIB_LIST(ias_ace_attr_list, &amp;amp;ias_ace_zone_table_len, &amp;amp;table);&lt;br /&gt;&lt;br /&gt;// Option3&lt;br /&gt;zb_zcl_ias_ace_zone_table_t table[10];&lt;br /&gt;ZB_ZCL_DECLARE_IAS_ACE_ATTRIB_LIST(ias_ace_attr_list, &amp;amp;ias_ace_zone_table_len, table);&lt;br /&gt;&lt;br /&gt;// Option4&lt;br /&gt;zb_zcl_ias_ace_zone_table_t table[ZB_ZCL_IAS_ACE_ZONE_TABLE_LENGTH]; // LENGTH = 255, size()= almost 4KB&lt;br /&gt;ZB_ZCL_DECLARE_IAS_ACE_ATTRIB_LIST(ias_ace_attr_list, &amp;amp;ias_ace_zone_table_len, table);&lt;/pre&gt;
&lt;p&gt;Please advice, since all options compile and the device starts up successfully, but I cannot test actual functionality at this point.&lt;/p&gt;
&lt;p&gt;I also found this line in the config&lt;/p&gt;
&lt;pre&gt;#define ZB_CONFIG_OVERALL_NETWORK_SIZE&amp;nbsp;&amp;nbsp; 200 // 2 &amp;lt;= x &amp;lt;= 200&lt;/pre&gt;
&lt;p&gt;So, I would like to know, what is the theoretical limit of the zigbee network if ZC is NRF52840? What if it is only a Router? Is it theoretically possible to connect, say, 2000 devices, or there is simply not enough memory to store routing table on NRF52840?&lt;/p&gt;
&lt;p&gt;Regards,&lt;/p&gt;
&lt;p&gt;Nikita&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Zigbee Coordinator (Client) - IAS Zone Implementation</title><link>https://devzone.nordicsemi.com/thread/293899?ContentTypeID=1</link><pubDate>Thu, 11 Feb 2021 08:17:08 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:db7abeba-9cea-468e-8595-2d4061270c52</guid><dc:creator>Marjeris Romero</dc:creator><description>&lt;p&gt;Hi again,&lt;br /&gt;&lt;br /&gt;Regarding zb_zcl_ias_zone_init_client(), this function should not be called by the application. Try instead of getting started with the cluster implementation like in other Zigbee applications. Perhaps it&amp;#39;s easier to start out with the light coordinator cluster, as it is a much strip down example with basic coordinator functionality and then add the IAS zone client cluster to it. &lt;/p&gt;
[quote user="hw_dev"]I think it is still worth posting a link even to heavily obsolete and non-functional example code (with related disclaimer, of course), since reading through it still help restore / understand the logic of declarations and function calls.[/quote]
&lt;p&gt;I am afraid those examples are obsolete, as said there is an internal ticket for reviewing this part of the documentation and I think the references to these examples will ended being removed from the documentation. Also just so you are aware of it it&amp;#39;s not possible for us to disclose ZBOSS source code as our licence with DSR does not allow us too share any source code. &lt;br /&gt;&lt;br /&gt;Regarding you feedback about zboss_main_loop() current comsumption, have you seen our Sleepy End Device samples? &lt;br /&gt;&lt;br /&gt;Did you have any other questions to help you get started with the IAS zone client on coordinator side? &lt;br /&gt;&lt;br /&gt;Best regards,&lt;/p&gt;
&lt;p&gt;Marjeris&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Zigbee Coordinator (Client) - IAS Zone Implementation</title><link>https://devzone.nordicsemi.com/thread/293391?ContentTypeID=1</link><pubDate>Mon, 08 Feb 2021 15:49:34 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:59966fdb-8454-4fa3-a11b-bc649b865003</guid><dc:creator>Nik</dc:creator><description>&lt;p&gt;Hi Marjeris,&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Thank you for detailed explanation. I believe that should help with implementation, I will post my results.&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;div&gt;
&lt;blockquote&gt;The release of the Zigbee stack from DSR to Nordic may have contained a IAS zone server example long time ago, and the comments from the documentation have slipped into our API docs.&lt;/blockquote&gt;
&lt;/div&gt;
&lt;p&gt;Ah, I see. DSR might have not provided the examples in the first place and/or source code of those examples became completely obsolete as SDK evolves and there was not enough resources to keep those up to date, so it was removed to avoid confusion. That&amp;#39;s totally understandable. However, if those example do exist (and if not, how about requesting those from DSR?), and taking into consideration that documentation is not finished and needs quite a bit of work to be done at this point, I think it is still worth posting a link even to heavily obsolete and non-functional example code (with related disclaimer, of course), since reading through it still help restore / understand the logic of declarations and function calls.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;For example&lt;/strong&gt;, it is sill not clear where+when to call &lt;code&gt;zb_zcl_ias_zone_init_client()&lt;/code&gt; and if it is necessary to call it at all, I just found it accidentally, while reading the header file. Is it enough to call it once in the main() function? Does it has to be called before or after &lt;code&gt;zboss_start&lt;/code&gt;() or &lt;code&gt;zboss_start_no_autostart&lt;/code&gt;&lt;code&gt;()&lt;/code&gt; or any other function, or it doesn&amp;#39;t matter, or, maybe, it should be called inside &lt;code&gt;zboss_signal_handler()&lt;/code&gt;, similar to &lt;code&gt;bdb_start_top_level_commissioning&lt;/code&gt;&lt;code&gt;()&lt;/code&gt;, and if so, at which signal, at which status of that signal? These are the essential answers that developer needs to know for each function in order to use it properly. And it gets much, much worse when a function has arguments.So far, my absolute favorites are &lt;code&gt;zboss_signal_handler(zb_bufid_t bufid)&lt;/code&gt; and &lt;code&gt;zcl_device_cb(zb_bufid_t bufid)&lt;/code&gt;, where &lt;code&gt;bufid&lt;/code&gt; just gets re-casted to multiple different structure types through &lt;code&gt;zb_buf_get_tail_func()&lt;/code&gt;, but there is almost no error detection/handling implemented explicitly, while pointer cast is one of the most dangerous operations in C/C++.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Another example&lt;/strong&gt; is &lt;code&gt;zboss_start()&lt;/code&gt;. I actually do like how it is documented, brief exaplanation has everything necessary to work with this function: it states what it does, what are the prerequsites and consiquences of calling that function and even briefly mentioned the next step (i.e. calling &lt;code&gt;zboss_main_loop()&lt;/code&gt;). Unfortunately, documentation makes impression that there is no alternative except polling &lt;code&gt;zboss_main_loop()&lt;/code&gt;at max speed, draining the power source, even if nothig is happening, but that is a minor issue.&lt;/p&gt;
&lt;p&gt;Fortunately, most of the time examples do allow us to extract all the necessary answers, but when there is no example, no details in documentation and no source code of the function, this is just impossible, so I hope you understand my frustration. And I hope my feedback will help Nordic Developers improve SDK documentation and examples in the future.&lt;br /&gt;&lt;br /&gt;&lt;/p&gt;
&lt;p&gt;Best regards,&lt;/p&gt;
&lt;p&gt;Nikita&lt;/p&gt;
&lt;div&gt;&lt;/div&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Zigbee Coordinator (Client) - IAS Zone Implementation</title><link>https://devzone.nordicsemi.com/thread/293304?ContentTypeID=1</link><pubDate>Mon, 08 Feb 2021 11:09:47 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:5f2fced7-01f8-4a62-9825-e06d35458e70</guid><dc:creator>Marjeris Romero</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;To start with the first problem, if you see the Wireshark messages you are receiving after writing to the IAS_CIE_address attribute of the IAS zone server:&lt;/p&gt;
[quote user=""]&lt;div style="padding-left:60px;"&gt;&lt;div&gt;&lt;code&gt;0xf230 &amp;gt; 0x0000 | ZCL IAS Zone: Zone Status Change Notification, Seq: 81, Cmd: Zone Status Change Notification (0x00), Extended Status: 0x00&lt;br /&gt;&lt;/code&gt;&lt;/div&gt;
&lt;code&gt;&lt;code&gt;&lt;/code&gt;&lt;/code&gt;
&lt;div&gt;&lt;code&gt;0x0000 &amp;gt; 0xf230 | ZCL: Default Response, Seq: 81, Cmd: Default Response (0x0b), Status: Unsupported Cluster (0xc3)&lt;br /&gt;&lt;/code&gt;&lt;/div&gt;
&lt;code&gt;&lt;code&gt;&lt;/code&gt;&lt;/code&gt;
&lt;div&gt;&lt;code&gt;&lt;/code&gt;&lt;/div&gt;
&lt;div&gt;&lt;code&gt;...&lt;/code&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;div style="padding-left:60px;"&gt;&lt;code&gt;0xf230 &amp;gt; 0x0000 | ZCL IAS Zone: Zone Enroll Request, Seq: 82, Cmd: Zone Enroll Request (0x01), ZoneType: Water sensor (0x002a)&lt;br /&gt;&lt;/code&gt;&lt;/div&gt;
&lt;div style="padding-left:60px;"&gt;&lt;code&gt;0x0000 &amp;gt; 0xf230 | ZCL: Default Response, Seq: 82, Cmd: Default Response (0x0b), Status: Unsupported Cluster (0xc3)&lt;/code&gt;&lt;/div&gt;[/quote]
&lt;p&gt;You see the coordinator (CLI example) responds with &amp;#39;Unsupported Cluster&amp;#39; to the IAS zone server commands &amp;#39;Zone Status Change Notification&amp;#39; and &amp;#39;Zone Enroll Request&amp;#39;. I think as for all other ZCL clusters the first think you need to do is to declared the IAS zone client cluster on the coordinator side as an output cluster (see figure 8-1 in the ZCL specification &amp;#39;Typical Use of the IAS clusters&amp;#39;, server IAS zone needs to be paired with a client IAS zone, as normal cluster behaviour in Zigbee, for example light switch - light bulb example shows an example of server-client interaction). If you send a match desc request to the CLI coordinator example you will see that the only output clusters declared on endpoint 64 are 0x0000 (basic), 0x0003(identify) and 0x0004(groups), so IAS zone client need to be added here.&lt;/p&gt;
[quote user=""] And the second problem is that system does receive &amp;#39;Zone Status Change&amp;#39; reports, but never reflects that in log or CLI[/quote]
&lt;p&gt;Just so you are aware of it, the CLI example doesn&amp;#39;t magically print logs from attribute reporting either. If you see in the Multisensor example you need to enable displaying the reports in CLI, using the command &amp;#39;log enable info zigbee.report&amp;#39; to print the reports. You can see how printing of attribute logs on CLI example is handled in nrf_log_frontend.c and zigbee_cli_cmd_attr_report.c. &lt;br /&gt;&lt;br /&gt;But back to your question, the &amp;#39;Zone Status Change Notification&amp;#39; is actually a ZCL command generated by the IAS zone server, so it&amp;#39;s not the same as configuring attribute reports either. I think you should treat these notifications like a normal ZCL command, for example see how the ON/OFF command is handled by the light bulb example, which intercept the command in the ZCL device callback function to power the LED light ON or OFF, see the light_bulb example zcl_device_cb() callback function. But before intercepting the command on the code it&amp;#39;s better to be sure that the coordinator is acknowledging these commands sucessfully (since right now the coordinator is just responding with &amp;#39;Unsupported Cluster&amp;#39;) using Wireshark. &lt;/p&gt;
[quote user=""]I find references to non-existent files/foldes with essential information, like &amp;quot;&lt;em&gt;The complete set of IAS Zone samples can be found in /application/ias_zone_sensor&lt;/em&gt;&amp;quot; in the &amp;quot;documentation&amp;quot; at infocenter.nordicsemi.com and in source files/header and wonder why is it removed/hidden?[/quote]
&lt;p&gt;This is sadly a known and reported bug in the documentation. The release of the Zigbee stack from DSR to Nordic may have contained a IAS zone server example long time ago, and the comments from the documentation have slipped into our API docs. There is an internal ticket to see if this line in the documentation should be remove or modified. There is currently no IAS zone sensor example available on our nRF5 SDK for Zigbee &amp;amp; Thread.&lt;/p&gt;
[quote user=""]Finally, the general question is: how do you (Nordic Developers) expect us (users / 3d party developers) to figure out the sequence of variable decalarations, function calls and callbacks registrations without detaild documentation and examples? Trial-Error? I&amp;#39;m afraid reading headers with minimal comments like &amp;quot;This functions is for that.&amp;quot; does not really help, since we still don&amp;#39;t undestand what are the prerequisites for that function, what are the inputs/outputs, limitations, etc.[/quote]
&lt;p&gt;I will forward this feedback to our developers. For declaring attributes, clusters, cluster list and endpoints I think the more detailed documentation we have at the moment is this section from our Zigbee API stack overview at the infocenter: &amp;#39;&lt;a href="https://infocenter.nordicsemi.com/index.jsp?topic=%2Fsdk_tz_v4.1.0%2Fusing_zigbee__z_c_l.html&amp;amp;cp=7_3_3_4_1&amp;amp;anchor=zigbee_device_imp"&gt;Implementing a Zigbee end product with ZCL&lt;/a&gt;&amp;#39;. This section of the documentation have been getting bigger and better for each release but we may have parts that should be better covered/explained. Reading the ZCL specification is also obligatory for implementing other Zigbee clusters than the ones available in our examples. &lt;br /&gt;&lt;br /&gt;Best regards,&lt;/p&gt;
&lt;p&gt;Marjeris&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>