<?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>Transmit large data using Zigbee</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/103545/transmit-large-data-using-zigbee</link><description>Hello, 
 
 What is the recommendation to transmit large data (1-2 kB) from ZED to coordinator using Zigbee/Zboss library ? 
 Are there any tested examples ? (I couldn&amp;#39;t find any in the SDK) 
 
 Thanks, 
 Sebastien</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Fri, 08 Sep 2023 07:45:25 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/103545/transmit-large-data-using-zigbee" /><item><title>RE: Transmit large data using Zigbee</title><link>https://devzone.nordicsemi.com/thread/445072?ContentTypeID=1</link><pubDate>Fri, 08 Sep 2023 07:45:25 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:7c49edc6-d610-40e2-9976-45c9a3bac51f</guid><dc:creator>Marte Myrvold</dc:creator><description>&lt;p&gt;Hi Sebastien,&lt;/p&gt;
&lt;p&gt;My reason for asking was that knowing what you want to achieve might make it easier to figure out the best solution to this.&lt;/p&gt;
&lt;p&gt;If it is arbitrary data that you can split up and send in several packets yourself then you could do this manually without using the Partition cluster. This might be the easiest way to do this since, as you say, the Partition cluster is not implemented in ZBOSS. However, it is also possible to implement the Partition cluster yourself and use that. &lt;br /&gt;I am not aware of anything like this being tested in ZBOSS, but I will verify with the developers.&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: Transmit large data using Zigbee</title><link>https://devzone.nordicsemi.com/thread/444961?ContentTypeID=1</link><pubDate>Thu, 07 Sep 2023 13:45:20 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:3a8b965d-f3fe-4068-983c-4e0e50eb5a81</guid><dc:creator>Cheb</dc:creator><description>&lt;p&gt;Sorry yes 82 bytes.&lt;/p&gt;
&lt;p&gt;No I cannot communicate why we need to transmit such large data but this is what we want to do. Let&amp;#39;s say it&amp;#39;s arbitrary data that we want to read from the controller. The zigbee protocol has a Partition cluster but it doesn&amp;#39;t seem implemented by ZBoss, not sure if there&amp;#39;s something that has been tested / validated by ZBoss for such cases.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Transmit large data using Zigbee</title><link>https://devzone.nordicsemi.com/thread/444959?ContentTypeID=1</link><pubDate>Thu, 07 Sep 2023 13:40:06 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:e699a98d-7dc9-4bd4-9d4b-e011af859282</guid><dc:creator>Marte Myrvold</dc:creator><description>&lt;p&gt;Hi Sebastien,&lt;/p&gt;
&lt;p&gt;I am not sure where you get that the maximum payload size is 52 from when the MAC, APS and NWK headers, security etc. are 45 bytes total, which leaves 82 bytes for the APS payload. The ZCL header only takes up a very small part of that. &lt;/p&gt;
&lt;p&gt;Regardless, you are correct that the maximum number of APS fragments is 8, so fragmentation will not work for sending 1-2 kB of data.&lt;/p&gt;
&lt;p&gt;Can you explain what you are trying to achieve? Why do you want to transmit 1-2 kB of data over Zigbee?&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: Transmit large data using Zigbee</title><link>https://devzone.nordicsemi.com/thread/444931?ContentTypeID=1</link><pubDate>Thu, 07 Sep 2023 12:48:35 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:15b6fb9d-938d-4b09-af57-09e593e4417e</guid><dc:creator>Cheb</dc:creator><description>&lt;p&gt;Hi Marte,&lt;/p&gt;
&lt;p&gt;That would be raw data.&lt;/p&gt;
&lt;p&gt;As far as I can see in SDK 4.2.0 the usable payload for a zigbee frame is 52 bytes&lt;br /&gt;&lt;br /&gt;&lt;/p&gt;
&lt;pre class="c-mrkdwn__pre" data-stringify-type="pre"&gt;&lt;pre class="ui-code" data-mode="c_cpp"&gt;/**
   MAC hdr: 9
   3 (hdr, seq num) + 2 * 3  (short dst and src; dst panid)
   NWK hdr: 8
   4 + 2*2 (dst, src short)
   NWK security:  18
   APS hdr: 8 (max, without ext header and security)
   MAC footer: 2

   Total: 9 + 8 + 18 + 8 + 2 = 45 bytes
   So we can send: 127 - 45 = 82 bytes
*/
#define ZB_APS_GUARANTEED_PAYLOAD_SIZE_WO_SECURITY     \
  ((MAX_PHY_FRM_SIZE)                                  \
   - ((MAX_MAC_OVERHEAD_SHORT_ADDRS)                   \
      + (ZB_NWK_BASE_HDR_SIZE)                         \
      + (ZB_NWK_MAX_SECURITY_HDR_SIZE)                 \
      + (ZB_APS_BASE_HDR_SIZE)))&lt;/pre&gt;&lt;/pre&gt;
&lt;p&gt;And the maximum number of fragments is 8 so not sure it&amp;#39;s ideal.&lt;/p&gt;
&lt;p&gt;Thanks,&lt;/p&gt;
&lt;p&gt;Sebastien&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Transmit large data using Zigbee</title><link>https://devzone.nordicsemi.com/thread/444906?ContentTypeID=1</link><pubDate>Thu, 07 Sep 2023 11:38:33 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:b7e30519-1d4a-4a12-bbc9-53e2a59ac358</guid><dc:creator>Marte Myrvold</dc:creator><description>&lt;p&gt;Hi Sebastien,&lt;/p&gt;
&lt;p&gt;What kind of packets are you going to transmit?&lt;/p&gt;
&lt;p&gt;The maximum total size of a Zigbee packet is 128 bytes, but Zigbee use something called APS fragmentation, which allows you to send larger data units by fragmenting the data into smaller packets which are then sent and reassembled on the receiver side. Fragmentation is handled automatically by the stack when you allocate a buffer using &lt;a href="https://developer.nordicsemi.com/nRF_Connect_SDK/doc/zboss/3.12.1.0/group__buf.html#ga252f09a403d23347b2d4987a4d8d1833"&gt;zb_buf_get()&lt;/a&gt; or &lt;a href="https://developer.nordicsemi.com/nRF_Connect_SDK/doc/zboss/3.12.1.0/group__buf.html#ga3e1aadf51fc1f01efe2663c442bc1a73"&gt;zb_buf_get_out_delayed_ext()&lt;/a&gt; and set max_size to the required payload size.&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></channel></rss>