<?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>The Block Request Delay and Maximum Data Size attributes for the Zigbee OTA upgrade</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/53383/the-block-request-delay-and-maximum-data-size-attributes-for-the-zigbee-ota-upgrade</link><description>While using the Zigbee OTA examples (nRF Thread and ZigBee SDK v3.1.0), I have noticed by the sniffer, that the attribute “Block Request Delay” is presented in the OTA Upgrade Image Block Request from the client, and it’s equal to 0x00b8 milliseconds</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Thu, 24 Oct 2019 07:09:43 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/53383/the-block-request-delay-and-maximum-data-size-attributes-for-the-zigbee-ota-upgrade" /><item><title>RE: The Block Request Delay and Maximum Data Size attributes for the Zigbee OTA upgrade</title><link>https://devzone.nordicsemi.com/thread/216500?ContentTypeID=1</link><pubDate>Thu, 24 Oct 2019 07:09:43 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:48ced798-4114-434f-99fe-7122859a5895</guid><dc:creator>AndreasF</dc:creator><description>&lt;p&gt;Hi.&lt;/p&gt;
&lt;p&gt;I understand your concern.&lt;/p&gt;
&lt;p&gt;The reason I said that configuring the blocks will not really make any difference is because I think that the maximum block size according to the Zigbee specification is 68 bytes if i rememeber correctly. That&amp;#39;s because you have all these layers (PHY, MAC, NWK, APS, ZCL).&lt;/p&gt;
&lt;p&gt;So yes, you might be able to have it working with a 68 byte block size, but I think that the only thing that will make it noticeable faster is to not have a long delay.&lt;/p&gt;
&lt;p&gt;And yes, I understand you want this delay to decrease the Zigbee traffic.&lt;/p&gt;
&lt;p&gt;But you could perhaps send out the new firmware slower and update at a later point in time?&lt;/p&gt;
&lt;p&gt;Best regards,&lt;/p&gt;
&lt;p&gt;Andreas&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: The Block Request Delay and Maximum Data Size attributes for the Zigbee OTA upgrade</title><link>https://devzone.nordicsemi.com/thread/216243?ContentTypeID=1</link><pubDate>Tue, 22 Oct 2019 20:57:18 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:f95feb8c-6ed5-4353-8904-61fc84088323</guid><dc:creator>AnnaR</dc:creator><description>&lt;p&gt;Hi again,&lt;/p&gt;
&lt;p&gt;Let explain further with example estimations.&lt;/p&gt;
&lt;p&gt;Let suppose that the firmware size is 400kB. Taking into account the Zigbee data rate and neglecting the overhead traffic for simplicity, the non-stop firmware submission would require about 13 seconds.&lt;/p&gt;
&lt;p&gt;Then, let suppose that the &amp;ldquo;Block Request Delay&amp;rdquo; is set to 5 seconds in order to decrease the load on the Zigbee network in the meantime. The 128-bytes block size gives us the 3200 blocks, that will require approximately 3200 * 5s (delays) + 13 s (pure firmware), so more than 4 hours.&lt;/p&gt;
&lt;p&gt;But increasing the block size to 2048 bytes gives the 200 blocks, that will require approximately 200 * 5s (delays) + 13 s (pure firmware), so about the 17 minutes.&lt;/p&gt;
&lt;p&gt;Sincerely,&lt;/p&gt;
&lt;p&gt;Anna&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: The Block Request Delay and Maximum Data Size attributes for the Zigbee OTA upgrade</title><link>https://devzone.nordicsemi.com/thread/216072?ContentTypeID=1</link><pubDate>Tue, 22 Oct 2019 07:58:13 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:ebb231fe-63a3-493c-b3c1-c749f4af2ac3</guid><dc:creator>AnnaR</dc:creator><description>&lt;p&gt;Hi Andreas,&lt;/p&gt;
&lt;p&gt;Exactly, I want to increase the &amp;ldquo;Block Request Delay&amp;rdquo; in order to decrease the Zigbee traffic with my device in time slots between the OTA block sending. As a consequence, indeed, it requires more time for DFU. So, in order to keep the same overall time, I want to increase the block size.&lt;/p&gt;
&lt;p&gt;In other words, I just need to &amp;ldquo;reshape&amp;rdquo; OTA DFU traffic for fewer requests with bigger packets&amp;rsquo; size.&lt;/p&gt;
&lt;p&gt;Sincerely,&lt;/p&gt;
&lt;p&gt;Anna&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: The Block Request Delay and Maximum Data Size attributes for the Zigbee OTA upgrade</title><link>https://devzone.nordicsemi.com/thread/216064?ContentTypeID=1</link><pubDate>Tue, 22 Oct 2019 07:33:05 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:a172490a-09c8-4e8a-87ca-271df4529468</guid><dc:creator>AndreasF</dc:creator><description>&lt;p&gt;Hi again Anna.&lt;/p&gt;
[quote user="AnnaR"]Anyway, either 128 or 255, these are quite small blocks to transfer in case of the OTA blocks should be submitted with the 5 seconds interval, for example. So, the 400kB firmware image would be updated as long as more than four hours. Is there some solution, how to overcome this issue?[/quote]
&lt;p&gt;&amp;nbsp;Could I just ask you to clarify this? :-) &lt;/p&gt;
&lt;p&gt;You wanted to increase the “Block Request Delay”, which increases the time used for DFU.&lt;/p&gt;
&lt;p&gt;And then you want to configure &lt;strong&gt;BACKGROUND_DFU_DEFAULT_BLOCK_SIZE&lt;/strong&gt; and &lt;strong&gt;BACKGROUND_DFU_BLOCKS_PER_BUFFER&lt;/strong&gt; to try to reduce the time used for DFU?&lt;/p&gt;
&lt;p&gt;It should be noted that Zigbee uses a background DFU process, so you have all the functionality on your device while doing the DFU. If you compare DFU in Zigbee and BLE you can see that the reason it takes so long to do DFU in Zigbee is because the throughput is lower and the image is quite large (it&amp;#39;s not image, not split images like in BLE).&lt;/p&gt;
&lt;p&gt;I don&amp;#39;t really think that configuring blocks will make any significant change in time spent on DFU to be honest.&lt;/p&gt;
&lt;p&gt;Best regards,&lt;/p&gt;
&lt;p&gt;Andreas&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: The Block Request Delay and Maximum Data Size attributes for the Zigbee OTA upgrade</title><link>https://devzone.nordicsemi.com/thread/215958?ContentTypeID=1</link><pubDate>Mon, 21 Oct 2019 13:47:41 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:425a2df1-e1eb-4b33-a7f2-961a3bf9bea0</guid><dc:creator>AndreasF</dc:creator><description>&lt;p&gt;Hi Anna.&lt;/p&gt;
&lt;p&gt;I&amp;#39;m doing some testing and I will get back to you tomorrow if that is ok.&lt;/p&gt;
&lt;p&gt;Best regards,&lt;/p&gt;
&lt;p&gt;Andreas&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: The Block Request Delay and Maximum Data Size attributes for the Zigbee OTA upgrade</title><link>https://devzone.nordicsemi.com/thread/215809?ContentTypeID=1</link><pubDate>Sun, 20 Oct 2019 23:34:32 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:c5e83d3c-5ea2-4341-843d-7dd6195d83d0</guid><dc:creator>AnnaR</dc:creator><description>&lt;p&gt;Hi Andreas,&lt;/p&gt;
&lt;p&gt;Thank you for your reply. I should have known better about the &lt;strong&gt;min_block_reque&lt;/strong&gt; field (which name, however, is a bit misleading), I just didn&amp;rsquo;t guess to look at the corresponding attribute ID [0x0009].&lt;/p&gt;
&lt;p&gt;About the block size, what is the maximum value that can be set with 3.1.0 SDK, and would the 3.2.0 SDK give the block size increasing? As I understood, in order to have the 4096-size blocks kept in RAM during DFU (for further&amp;nbsp;convenient flashing?), I need to select &lt;strong&gt;BACKGROUND_DFU_DEFAULT_BLOCK_SIZE&lt;/strong&gt; and &lt;strong&gt;BACKGROUND_DFU_BLOCKS_PER_BUFFER&lt;/strong&gt; in such a way that their multiplication will give 4096? The default values of example are both 64, so 64 * 64 gives 4096-bytes block. Then, If I need to increase the &lt;strong&gt;BACKGROUND_DFU_DEFAULT_BLOCK_SIZE&lt;/strong&gt;, I can use the only 128, in order to achieve the 4096-bytes resulting block in RAM. The max uint8&amp;nbsp;255 is not the multiple of 4096, so as I guess, it is not a good idea.&lt;/p&gt;
&lt;p&gt;Anyway, either 128 or 255, these are quite small blocks to transfer in case of the OTA blocks should be submitted with the 5 seconds interval, for example. So, the 400kB firmware image would be updated as long as more than four hours. Is there some solution, how to overcome this issue?&lt;/p&gt;
&lt;p&gt;Sincerely,&lt;/p&gt;
&lt;p&gt;Anna&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: The Block Request Delay and Maximum Data Size attributes for the Zigbee OTA upgrade</title><link>https://devzone.nordicsemi.com/thread/215733?ContentTypeID=1</link><pubDate>Fri, 18 Oct 2019 13:47:57 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:663a8e61-458b-4eae-8d1f-d7135806c968</guid><dc:creator>Bartosz Gentkowski</dc:creator><description>&lt;p&gt;Hi, the infocenter link to the PICS document is now fixed. Thanks for letting us know!&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: The Block Request Delay and Maximum Data Size attributes for the Zigbee OTA upgrade</title><link>https://devzone.nordicsemi.com/thread/215727?ContentTypeID=1</link><pubDate>Fri, 18 Oct 2019 13:21:13 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:85b28c3c-f81f-4bb5-ac68-2f8876f44f44</guid><dc:creator>AndreasF</dc:creator><description>&lt;p&gt;Hi.&lt;/p&gt;
&lt;p&gt;For &amp;quot;Block Request Delay&amp;quot;, you can change the value of this attribute in for example ota_client_attr_init() in the client example:&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;static void ota_client_attr_init(void)
{
    /* Basic cluster attributes data */
    m_dev_ctx.basic_attr.zcl_version  = ZB_ZCL_VERSION;
    m_dev_ctx.basic_attr.power_source = ZB_ZCL_BASIC_POWER_SOURCE_UNKNOWN;

    /* OTA cluster attributes data */
    zb_ieee_addr_t addr = ZB_ZCL_OTA_UPGRADE_SERVER_DEF_VALUE;
    ZB_MEMCPY(m_dev_ctx.ota_attr.upgrade_server, addr, sizeof(zb_ieee_addr_t));
    m_dev_ctx.ota_attr.file_offset = ZB_ZCL_OTA_UPGRADE_FILE_OFFSET_DEF_VALUE;
    m_dev_ctx.ota_attr.file_version = OTA_UPGRADE_TEST_FILE_VERSION;
    m_dev_ctx.ota_attr.stack_version = ZB_ZCL_OTA_UPGRADE_FILE_HEADER_STACK_PRO;
    m_dev_ctx.ota_attr.downloaded_file_ver  = ZB_ZCL_OTA_UPGRADE_DOWNLOADED_FILE_VERSION_DEF_VALUE;
    m_dev_ctx.ota_attr.downloaded_stack_ver = ZB_ZCL_OTA_UPGRADE_DOWNLOADED_STACK_DEF_VALUE;
    m_dev_ctx.ota_attr.image_status = ZB_ZCL_OTA_UPGRADE_IMAGE_STATUS_DEF_VALUE;
    m_dev_ctx.ota_attr.manufacturer = OTA_UPGRADE_TEST_MANUFACTURER;
    m_dev_ctx.ota_attr.image_type = OTA_UPGRADE_TEST_IMAGE_TYPE;
    m_dev_ctx.ota_attr.min_block_reque = 0xF88;
    m_dev_ctx.ota_attr.image_stamp = ZB_ZCL_OTA_UPGRADE_IMAGE_STAMP_MIN_VALUE;
}&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;Simply change the attribute m_dev_ctx.ota_attr.min_block_reque.&lt;/p&gt;
&lt;p&gt;The second question:&lt;/p&gt;
&lt;p&gt;&amp;nbsp;The 3.1.0 SDK does not support APS fragmentation, thus you cannot use 4096 block sizes.&lt;/p&gt;
&lt;p&gt;Have a nice weekend.&lt;/p&gt;
&lt;p&gt;Best regards,&lt;/p&gt;
&lt;p&gt;Andreas&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>