<?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] ZCL Tunneling cluster / APS Fragmentation</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/106858/zigbee-zcl-tunneling-cluster-aps-fragmentation</link><description>Setup: 
 nrf52840DK (Zigbee Cordinator based on Zigbee Coordinator sample) 
 nrf52840DK (ZED) 
 NCS v2.4.1 
 
 Hi, 
 I am working on Tunneling cluster handling as that one is not implemented in the SDK. 
 I have encountered weird problem with adding data</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Tue, 21 May 2024 08:30:40 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/106858/zigbee-zcl-tunneling-cluster-aps-fragmentation" /><item><title>RE: Zigbee: ZCL Tunneling cluster / APS Fragmentation</title><link>https://devzone.nordicsemi.com/thread/485001?ContentTypeID=1</link><pubDate>Tue, 21 May 2024 08:30:40 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:1e310210-70a5-4bec-9293-9b865db2ec28</guid><dc:creator>Marte Myrvold</dc:creator><description>&lt;p&gt;Hi Pawel,&lt;/p&gt;
&lt;p&gt;I have taken over this ticket and started looking into it.&lt;/p&gt;
[quote user="pwpot"]When MaxIncomingPacketSize is limited to 52bytes everything works very well [/quote]
&lt;p&gt;Can you share where MaxIncomingPacketSize is defined and used?&lt;/p&gt;
&lt;p&gt;Do you have a sniffer log that shows the packet being sent?&lt;/p&gt;
&lt;p&gt;Best regards,&lt;br /&gt;Marte&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Zigbee: ZCL Tunneling cluster / APS Fragmentation</title><link>https://devzone.nordicsemi.com/thread/482418?ContentTypeID=1</link><pubDate>Wed, 08 May 2024 06:45:54 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:1372323f-d423-4d20-a66f-17450ee0c3da</guid><dc:creator>Pawel(embeddedsolutions.pl)</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;I implemented the tunnelling cluster on my own. I wanted to use the APS fragmentation feature implemented in the stack and from my understanding, lower layers will handle it if needed.&lt;/p&gt;
&lt;p&gt;Do you mean that APS is broken and requires bug fixing?&amp;nbsp;&lt;/p&gt;
&lt;p&gt;What do you mean by&amp;nbsp;&lt;/p&gt;
[quote userid="108933" url="~/f/nordic-q-a/106858/zigbee-zcl-tunneling-cluster-aps-fragmentation/482414"]APS fragmentation won&amp;#39;t work. [/quote]
&lt;p&gt;Could you elaborate more?&lt;/p&gt;
&lt;p&gt;Thanks in advance,&lt;/p&gt;
&lt;p&gt;Pawel&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Zigbee: ZCL Tunneling cluster / APS Fragmentation</title><link>https://devzone.nordicsemi.com/thread/482414?ContentTypeID=1</link><pubDate>Wed, 08 May 2024 06:25:44 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:edc94b43-7541-4e31-8f25-b424c772b47f</guid><dc:creator>Kazi Afroza Sultana</dc:creator><description>&lt;p&gt;Hello Pawel,&lt;/p&gt;
&lt;p&gt;Sorry for the late reply.&lt;/p&gt;
&lt;p&gt;APS fragmentation won&amp;#39;t work. We do not have any support for the tunneling cluster, so, you have to implement it yourself.&lt;/p&gt;
&lt;p&gt;Thanks.&lt;/p&gt;
&lt;p&gt;BR&lt;br /&gt;Kazi&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Zigbee: ZCL Tunneling cluster / APS Fragmentation</title><link>https://devzone.nordicsemi.com/thread/478442?ContentTypeID=1</link><pubDate>Fri, 12 Apr 2024 06:48:46 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:c487ecd2-d98b-4dcc-ac0e-61d27d8c224a</guid><dc:creator>Pawel(embeddedsolutions.pl)</dc:creator><description>&lt;p&gt;Hi,&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Do you have any updates on that matter?&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Regards,&lt;/p&gt;
&lt;p&gt;Pawel&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Zigbee: ZCL Tunneling cluster / APS Fragmentation</title><link>https://devzone.nordicsemi.com/thread/467361?ContentTypeID=1</link><pubDate>Fri, 02 Feb 2024 12:31:03 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:fd2c9ab6-3fa0-43d0-ad01-fc98d67b5987</guid><dc:creator>Kazi Afroza Sultana</dc:creator><description>&lt;p&gt;Hello,&lt;/p&gt;
&lt;p&gt;I have asked the respective team. I will let you know soon.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Zigbee: ZCL Tunneling cluster / APS Fragmentation</title><link>https://devzone.nordicsemi.com/thread/465194?ContentTypeID=1</link><pubDate>Sun, 21 Jan 2024 12:43:03 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:363bd9bf-d110-4731-b285-c79528f7e953</guid><dc:creator>Pawel(embeddedsolutions.pl)</dc:creator><description>&lt;p&gt;Hi,&amp;nbsp;&lt;br /&gt;I would like to share my newest findings.&amp;nbsp;&lt;br /&gt;It seems that APS fragmentation does not work properly -&amp;gt; more than 58bytes.&amp;nbsp;&lt;br /&gt;I was thinking that it works well, but after more long term tests it seems to be different.&amp;nbsp;&lt;br /&gt;&lt;br /&gt;Even if sending the ZCL Command returns RET_OK, the APS callback returns RET_NO_MEMORY and command is not being sent at all (I verify it under Wireshark).&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;pre class="ui-code" data-mode="c_cpp"&gt;zb_ret_t zb_zcl_tunneling_server_send_transfer_data(zb_uint8_t param, zb_uint8_t ep, zb_uint16_t prfl_id,
                                                    zb_uint8_t def_resp, zb_callback_t cb, zb_uint16_t tunnel_id,
                                                    zb_uint16_t data_size, zb_uint8_t *image_data) {
    ARG_UNUSED(def_resp);
    ARG_UNUSED(ep);
    ARG_UNUSED(prfl_id);

    if (!data_size || !image_data) {
        zb_buf_free(param);
        return RET_EMPTY;
    }

    tunnel_session_t *tunnel = find_session_by_tunnel_id(tunnel_id);
    if (!tunnel) {
        zb_buf_free(param);
        return RET_EMPTY;
    }

    zb_addr_u addr = {.addr_short = tunnel-&amp;gt;session_data.dst.short_addr};
    uint8_t *ptr = ZB_ZCL_START_PACKET(param);
    ZB_ZCL_CONSTRUCT_SPECIFIC_COMMAND_RES_FRAME_CONTROL(ptr);
    ZB_ZCL_CONSTRUCT_COMMAND_HEADER(ptr, ZB_ZCL_GET_SEQ_NUM(), ZB_ZCL_TUNNELING_SRV_CMD_TRANSFER_DATA);
    ZB_ZCL_PACKET_PUT_DATA16(ptr, &amp;amp;tunnel_id);
    ZB_ZCL_PACKET_PUT_DATA_N(ptr, image_data, data_size);
    return zb_zcl_finish_and_send_packet_new(
        param, ptr, &amp;amp;addr, ZB_APS_ADDR_MODE_16_ENDP_PRESENT, tunnel-&amp;gt;session_data.dst.ep, CONFIG_ZB_DEVICE_ENDPOINT,
        CONFIG_ZB_DEVICE_PROFILE_ID, ZB_ZCL_CLUSTER_ID_TUNNELING, cb, false, false, 0);
}&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="c_cpp"&gt;static void transfer_ams_data_aps_ack_cb(zb_bufid_t bufid) {
    zb_zcl_command_send_status_t *cmd_send_status = ZB_BUF_GET_PARAM(bufid, zb_zcl_command_send_status_t);
    if (cmd_send_status) {
        if (cmd_send_status-&amp;gt;status != RET_OK) {
            LOG_ERR(&amp;quot;APS CB stat: %d&amp;quot;, cmd_send_status-&amp;gt;status);
        }
    }

    k_mutex_lock(&amp;amp;tunnel_ctx_mtx, K_FOREVER);
    tunnel_session_t *tunnel = &amp;amp;tunnel_sessions[AMS_IDX];
    /* Stop the timer if started by UART RX thread as we are going to call send_tunnel_data from here */
    k_timer_stop(&amp;amp;tunnel-&amp;gt;timer);
    zb_buf_free(bufid);
    zigbee_get_out_buf_delayed_ext(send_tunnel_data, tunnel-&amp;gt;tunnel_id, MIN_REQUIRED_BUFFER_SIZE);
    k_mutex_unlock(&amp;amp;tunnel_ctx_mtx);
}
&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;When MaxIncomingPacketSize is limited to 52bytes everything works very well :) but I would like to have slightly better throughput&amp;nbsp;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Zigbee: ZCL Tunneling cluster / APS Fragmentation</title><link>https://devzone.nordicsemi.com/thread/462957?ContentTypeID=1</link><pubDate>Fri, 05 Jan 2024 15:45:45 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:40b799ba-add7-4497-96de-a1a709065dde</guid><dc:creator>Kazi Afroza Sultana</dc:creator><description>&lt;p&gt;Hello,&lt;/p&gt;
&lt;p&gt;It seems like&amp;nbsp;&lt;span&gt;&lt;span dir="ltr"&gt;something wrong in the ZBOSS stack. I have asked our team. I will let you know soon.&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Zigbee: ZCL Tunneling cluster / APS Fragmentation</title><link>https://devzone.nordicsemi.com/thread/461719?ContentTypeID=1</link><pubDate>Wed, 27 Dec 2023 08:45:22 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:1c69ef07-c5a0-422e-93e5-b5cb1eef8e4a</guid><dc:creator>Kazi Afroza Sultana</dc:creator><description>&lt;p&gt;Hello,&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&lt;span dir="ltr"&gt;We are severely understaffed this week because of the Christmas holidays, and I will have to get back to you on this next week. Sorry for the inconvenience.&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Zigbee: ZCL Tunneling cluster / APS Fragmentation</title><link>https://devzone.nordicsemi.com/thread/461634?ContentTypeID=1</link><pubDate>Sat, 23 Dec 2023 01:00:35 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:d95c5afc-fcfc-4a4e-93d9-0beacd832620</guid><dc:creator>Pawel(embeddedsolutions.pl)</dc:creator><description>&lt;p&gt;Hi,&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Thanks for fast reply,&lt;/p&gt;
&lt;p&gt;Understood, so knowing that maximum number of APS fragments is limited to 8 and the available payload is something about 82bytes - ZCL Header it means that the maximum amount of data supported should be more than 600 bytes.&lt;/p&gt;
&lt;p&gt;As I mentioned at the beginning, there is unknown for me limitation which forces me to send maximally 255bytes.&lt;/p&gt;
&lt;p&gt;Why is that ?&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Best regards,&lt;/p&gt;
&lt;p&gt;Pawel&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Zigbee: ZCL Tunneling cluster / APS Fragmentation</title><link>https://devzone.nordicsemi.com/thread/461605?ContentTypeID=1</link><pubDate>Fri, 22 Dec 2023 14:55:17 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:c6fb5266-23fb-4b5e-a1b4-cff716e7060f</guid><dc:creator>Kazi Afroza Sultana</dc:creator><description>&lt;p&gt;Hello,&lt;/p&gt;
&lt;p&gt;You will not be able to send 1kB with APS fragmentation. You can look at the explanation here in this&amp;nbsp;&lt;a href="https://devzone.nordicsemi.com/support-private/support/314225"&gt;(+) Nordic DevZone (nordicsemi.com)&lt;/a&gt;&amp;nbsp;similar case.&lt;/p&gt;
&lt;p&gt;Thanks.&lt;/p&gt;
&lt;p&gt;BR&lt;/p&gt;
&lt;p&gt;Kazi&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>