This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

How to enable Minimum Block Request ?

Hi,

To support the large and dense networks we are building, I need my network coordinator to be able to throttle OTA packets to not completely overtake the network’s bandwidth and cause dropped data packets.To achieve this, I use the Minimum Block Request and Dynamic Block Request option for Zigbee OTA. For the end device to support this feature, I need the Minimum Block Request Period attribute enabled.But I don't know how to operate it? I haven't found any relevant examples.

Parents Reply
  • Hello,

    Sorry for the late reply.

    If you look at the ZB_ZCL_DECLARE_OTA_UPGRADE_ATTRIB_LIST declaration, you can see that it actually contains the min_block_reque parameters, which is the minimum block request attribute.

    In ota_client_attr_init() it sets this parameter to 0,but you can change it during initialization by modifying this, or later during runtime. 

    The DFU client that we use in our tests, based on nrfutil should respect this parameter, so it should be fairly easy to experiment with this.

    Check out the SDK\examples\zigbee\ota example, with the test description in the link above, and play around with the min_block_reque parameter.

    Best regards,

    Edvin

Children
  • Thank you for your patient reply. I see this parameter, which is usually set to 0. But when I want to set it to other parameters, I can't find the detailed description of this parameter. Do you know the detailed description of this parameter?

  • According to the specification, the MinimumBlockPeriod is an uint16_t, ranging from 0x0000 - 0xfffe, and is a value given in milliseconds. I have not tested this myself, but I imagine it is the minimum time between each transfer block. 0 basically means disabled.

    Our team also mentioned that "the value of this attribute is limited by the ability of the OTA client to check for APS duplicates. In order to get the faster transmission, we have increased the APS duplicate table size using the dynamic memory configuration feature:

    https://github.com/nrfconnect/sdk-nrf/blob/da055eb52272c04e5f702806cc6f9cddaef9b1de/samples/zigbee/light_switch/include/zb_mem_config_custom.h#L44

    "

    Which is set in zb_mem_config_med.h, depending on which of the definitions that are defined:

    ZB_CONFIG_APPLICATION_COMPLEX --> #define ZB_CONFIG_APS_DUPS_TABLE_SIZE 32

    ZB_CONFIG_APPLICATION_MODERATE --> #define ZB_CONFIG_APS_DUPS_TABLE_SIZE 16

    ZB_CONFIG_APPLICATION_SIMPLE --> #define ZB_CONFIG_APS_DUPS_TABLE_SIZE 8

    I am not sure exactly how these relate, but it looks like if you want a faster transfer (lower minimumBlockPeriod), you need to increase this value. Probably because it needs to keep more packets in the memory that it needs to check whether or not is a duplicate. 

    So try treating this as a millisecond variable, and see how it is affecting the nrfutil DFU server that is used in the test description from the link in my previous reply.

    Best regards,

    Edvin

Related