<?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] FOTA mcuboot update</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/101260/zigbee-fota-mcuboot-update</link><description>Setup : nRF Connect SDK 2.3.0 nRF52840 
 Hi all, 
 I would like to add mcuboot update over Zigbee FOTA to my application. I am aware of that the bootloader update over Zigbee is not currently supported by the nRF Connect SDK and it will require multiple</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Sat, 29 Mar 2025 07:33:35 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/101260/zigbee-fota-mcuboot-update" /><item><title>RE: [Zigbee] FOTA mcuboot update</title><link>https://devzone.nordicsemi.com/thread/529632?ContentTypeID=1</link><pubDate>Sat, 29 Mar 2025 07:33:35 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:ba22bcfa-b789-449a-812f-22bf767925a0</guid><dc:creator>Pawel(embeddedsolutions.pl)</dc:creator><description>&lt;p&gt;Hello,&amp;nbsp;&lt;br /&gt;&lt;br /&gt;I was going through my tickets and changing tickets titles to be in compliance with other ones.&amp;nbsp;&lt;br /&gt;Didn&amp;#39;t mean to bother you.&amp;nbsp;&lt;br /&gt;&lt;br /&gt;Anyway, regarding this ticket I think it deserves an update as a lot changed in between v2.3.0 and v2.9.1.&lt;br /&gt;So for anyone interested in that topic, after migration to sysbuild it is still possible to support MCUboot FOTA via Zigbee by modifying the build and having a little bit of logic implemented to handle multiple images types.&lt;br /&gt;&lt;br /&gt;Regards,&amp;nbsp;&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] FOTA mcuboot update</title><link>https://devzone.nordicsemi.com/thread/529305?ContentTypeID=1</link><pubDate>Thu, 27 Mar 2025 13:35:34 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:d2685367-631c-4547-8f2a-38923f959681</guid><dc:creator>Maria Gilje</dc:creator><description>&lt;p&gt;Hello, &lt;/p&gt;
&lt;p&gt;I noticed that this case returned to my work queue today.&lt;/p&gt;
&lt;p&gt;Do you have any current need for support? &lt;/p&gt;
&lt;p&gt;Best regards,&lt;/p&gt;
&lt;p&gt;Maria&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Zigbee FOTA mcuboot update</title><link>https://devzone.nordicsemi.com/thread/460289?ContentTypeID=1</link><pubDate>Thu, 14 Dec 2023 08:16:06 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:cf3eb0f7-a86e-4e49-9507-47978da94796</guid><dc:creator>Pawel(embeddedsolutions.pl)</dc:creator><description>&lt;p&gt;Hello once again,&lt;/p&gt;
&lt;p&gt;I solved that problem.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;As far as I noticed that timers are not the best option here, I have registered the endpoint handler and based on Query Next Image Response I change the&amp;nbsp;ZB_ZCL_ATTR_OTA_UPGRADE_FILE_VERSION_ID and&amp;nbsp;ZB_ZCL_ATTR_OTA_UPGRADE_IMAGE_TYPE_ID.&amp;nbsp;&lt;br /&gt;The rest is to handle properly the sequence restarting depending on different events in the app, but this is totally application depended which is not the goal of this topic&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Zigbee FOTA mcuboot update</title><link>https://devzone.nordicsemi.com/thread/449004?ContentTypeID=1</link><pubDate>Thu, 05 Oct 2023 12:19:58 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:f1b99753-1709-49d6-9b57-1bba9ef566cc</guid><dc:creator>Pawel(embeddedsolutions.pl)</dc:creator><description>&lt;p&gt;Hi,&amp;nbsp;&lt;br /&gt;I will be more than happy to share the source code. &lt;br /&gt;I wrongly thought that it is working correctly.&amp;nbsp;Unfortunately it is not.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;br /&gt;The goal is to change the FileVersion and ImageType attributes in the middle of the query interval then the&amp;nbsp;&lt;span&gt;the updated values for the attributes will be relevant from the next time the client queries the server.&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;I would like also to achieve following sequence:&amp;nbsp;&lt;/p&gt;
&lt;div&gt;
&lt;div&gt;&lt;span&gt;Desired images sequence: Boot -&amp;gt; 1min -&amp;gt; QueryNextImageRequest (s0) -&amp;gt; ~1.5min -&amp;gt; keep s0 image -&amp;gt; ~3min -&amp;gt;&amp;nbsp;&lt;/span&gt;&lt;span&gt;QueryNextImageRequest(s0) -&amp;gt; ~4.5min -&amp;gt; switch to s1 image -&amp;gt; ~6min -&amp;gt; QueryNextImageRequest(s1) -&amp;gt; ~7.5min -&amp;gt; switch to app image -&amp;gt; ~&lt;/span&gt;&lt;span&gt;9min -&amp;gt; QueryNextImageRequest(app) -&amp;gt; ~10.5min -&amp;gt; keep app image data, stop image switcher and set interval to 24h&lt;br /&gt;&lt;br /&gt;This is the code which is trying to do such thing but what I have noticed is that the query interval does not change at all. QueryInterval is something about 1 minute.&lt;br /&gt;&lt;br /&gt;&lt;pre class="ui-code" data-mode="c_cpp"&gt;
/* CONFIG_ZIGBEE_FOTA_IMAGE_QUERY_INTERVAL_MIN set to 3 minutes */



/* Application is able to update s0, s1 (bootloader partitions) and app image. ZBOSS sends QueryNextImageRequest
 * each CONFIG_ZIGBEE_FOTA_IMAGE_QUERY_INTERVAL_MIN. In the middle of defined time ZBOSS changes the requested Image
 * Type and Image version */
static void zb_fota_start_image_switcher_timer(void) {
    k_timer_start(&amp;amp;image_type_switcher_timer, K_SECONDS(CONFIG_ZIGBEE_FOTA_IMAGE_QUERY_INTERVAL_MIN * 60 / 2),
                  K_MINUTES(CONFIG_ZIGBEE_FOTA_IMAGE_QUERY_INTERVAL_MIN));
    LOG_DBG(&amp;quot;Image Type switcher timer started&amp;quot;);
}

/* desired images sequence: Boot -&amp;gt; 1min -&amp;gt; QueryNextImageRequest (s0) -&amp;gt; 1.5min -&amp;gt; keep s0 -&amp;gt; 3min -&amp;gt;
 * QueryNextImageRequest(s0) -&amp;gt; 4.5min -&amp;gt; switch to s1 -&amp;gt; 6min QueryNextImageRequest(s1) -&amp;gt; 7.5min -&amp;gt; switch to app -&amp;gt;
 * 9min -&amp;gt; QueryNextImageRequest(app) -&amp;gt; 10.5min -&amp;gt; keep app data, stop image switcher, set interval to 24h */
/* Zigbee STACK sends first QueryNextImageRequest after 1min after boot and it is unchangeable */
static void zb_fota_change_requested_image_type(struct k_timer *switcher_timer) {
    ARG_UNUSED(switcher_timer);
    static zb_uint8_t idx = 0;

    if (restart_image_seq) {
        idx = 0;
        restart_image_seq = false;
    }

    zb_uint16_t image_types_list[] = {CONFIG_ZIGBEE_FOTA_S0_IMAGE_TYPE, CONFIG_ZIGBEE_FOTA_S1_IMAGE_TYPE,
                                      CONFIG_ZIGBEE_FOTA_IMAGE_TYPE};

    if (idx &amp;gt;= ARRAY_SIZE(image_types_list)) {
        /*  ImageType switcher reached 4th transition without detecting FOTA upgrades -&amp;gt; keep application image data and
         * change the interval to 24h */
        LOG_DBG(&amp;quot;Set 24h interval for app image FOTA requests&amp;quot;);
        k_timer_stop(&amp;amp;image_type_switcher_timer);
        zb_zcl_ota_upgrade_set_query_interval(CONFIG_ZB_DEVICE_ENDPOINT,
                                              CONFIG_ZIGBEE_FOTA_APP_IMAGE_QUERY_INTERVAL_TIME);
        return;
    }

    uint32_t img_ver = zb_fota_get_image_ver(image_types_list[idx]);
    ZB_ZCL_SET_ATTRIBUTE(CONFIG_ZIGBEE_FOTA_ENDPOINT, ZB_ZCL_CLUSTER_ID_OTA_UPGRADE, ZB_ZCL_CLUSTER_CLIENT_ROLE,
                         ZB_ZCL_ATTR_OTA_UPGRADE_FILE_VERSION_ID, (zb_uint8_t *)&amp;amp;img_ver, ZB_FALSE);

    ZB_ZCL_SET_ATTRIBUTE(CONFIG_ZIGBEE_FOTA_ENDPOINT, ZB_ZCL_CLUSTER_ID_OTA_UPGRADE, ZB_ZCL_CLUSTER_CLIENT_ROLE,
                         ZB_ZCL_ATTR_OTA_UPGRADE_IMAGE_TYPE_ID, (zb_uint8_t *)&amp;amp;image_types_list[idx], ZB_FALSE);

    LOG_INF(&amp;quot;Image Type changed to=0x%03X&amp;quot;, image_types_list[idx]);
    idx++;
}



/*
 Overwrite default Zigbee FOTA subsys attributes to send QueryNextImageRequest with s0 bootloader related
 attributes values rather than application image data */
static void zb_fota_overwrite_default_attr(void) {
    uint32_t img_ver = zb_fota_get_image_ver(CONFIG_ZIGBEE_FOTA_S0_IMAGE_TYPE);
    ZB_ZCL_SET_ATTRIBUTE(CONFIG_ZIGBEE_FOTA_ENDPOINT, ZB_ZCL_CLUSTER_ID_OTA_UPGRADE, ZB_ZCL_CLUSTER_CLIENT_ROLE,
                         ZB_ZCL_ATTR_OTA_UPGRADE_FILE_VERSION_ID, (zb_uint8_t *)&amp;amp;img_ver, ZB_FALSE);

    zb_uint16_t img_type = CONFIG_ZIGBEE_FOTA_S0_IMAGE_TYPE;
    ZB_ZCL_SET_ATTRIBUTE(CONFIG_ZIGBEE_FOTA_ENDPOINT, ZB_ZCL_CLUSTER_ID_OTA_UPGRADE, ZB_ZCL_CLUSTER_CLIENT_ROLE,
                         ZB_ZCL_ATTR_OTA_UPGRADE_IMAGE_TYPE_ID, (zb_uint8_t *)&amp;amp;img_type, ZB_FALSE);
}


void zb_fota_init(void) {
    zigbee_fota_abort();
    zb_fota_nsib_abort();
    int err = zigbee_fota_init(zb_fota_evt_handler);
    if (err) {
        LOG_ERR(&amp;quot;err=%d zboss fota init&amp;quot;, err);
        return;
    }

    /* Overwrite default OTA Upgrade ImageType, FileVersion attributes */
    zb_fota_overwrite_default_attr();

    err = zb_fota_nsib_register_cb(zb_fota_evt_handler);
    if (err) {
        LOG_ERR(&amp;quot;err=%d zigbee nsib callback register&amp;quot;, err);
        return;
    }

    err = zb_fota_confirm_image();
    if (err) {
        LOG_ERR(&amp;quot;err=%d img confirm&amp;quot;, err);
    }

    k_timer_init(&amp;amp;image_type_switcher_timer, zb_fota_change_requested_image_type, NULL);
    zb_fota_start_image_switcher_timer();
}&lt;/pre&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;p&gt;There is of course another part of the code responsible for restarting the sequence/stopping the timer based on various events detected in the&amp;nbsp;zigbee_fota_zcl_cb but I do no think it is important in that case.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Zigbee FOTA mcuboot update</title><link>https://devzone.nordicsemi.com/thread/448520?ContentTypeID=1</link><pubDate>Mon, 02 Oct 2023 13:03:20 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:a23cda23-2ae7-42c3-a157-8d2578323810</guid><dc:creator>Maria Gilje</dc:creator><description>&lt;p&gt;Hello,&lt;/p&gt;
&lt;p&gt;Thank you for the update.&lt;/p&gt;
&lt;p&gt;From what I can see your implementation looks good.&lt;/p&gt;
&lt;p&gt;I have one minor concern regarding &lt;strong&gt;4.&lt;/strong&gt;:&lt;/p&gt;
[quote user="pwpot"]I just have a timer which in the middle of&amp;nbsp;CONFIG_ZIGBEE_FOTA_IMAGE_QUERY_INTERVAL_MIN changes two attributes in OTA Upgrade Cluster, which is ImageType and FileVersion.[/quote]
&lt;p&gt;Can you please share how this is implemented? Or if you don&amp;#39;t want to share more of your code, please describe more of the intended functionality. &lt;br /&gt;Do I understand correctly that the updated values for the attributes will be relevant from the next time the client queries the server?&lt;/p&gt;
&lt;p&gt;BR,&lt;/p&gt;
&lt;p&gt;Maria&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Zigbee FOTA mcuboot update</title><link>https://devzone.nordicsemi.com/thread/447206?ContentTypeID=1</link><pubDate>Fri, 22 Sep 2023 08:52:15 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:5f301f1a-de6b-40f5-b5b7-8c207d3b7646</guid><dc:creator>Pawel(embeddedsolutions.pl)</dc:creator><description>&lt;p&gt;Hi, I came back here just to share with you how I implemented the Zigbee FOTA bootloader update:&amp;nbsp;&lt;br /&gt;1. Create module for dfu update based on dfu_target_stream API. (init, target_done, offset_get, write, get_bootloader_versions) -&amp;gt; As a reference I took dfu_target_mcuboot module.&lt;br /&gt;2. Basically copy the implementation of Zigbee FOTA subsys for app image and adapt it to created earlier&amp;nbsp; dfu module.&lt;br /&gt;3. Create Kconfigs for bootloader image types like:&amp;nbsp;&amp;nbsp;CONFIG_ZIGBEE_FOTA_S1_IMAGE,_TYPE&amp;nbsp;CONFIG_ZIGBEE_FOTA_S0_IMAGE_TYPE&lt;br /&gt;3. To generate fota images from the bootloaders .bin files, I added following code in the CMakeLists.txt&lt;br /&gt;&lt;br /&gt;&lt;pre class="ui-code" data-mode="c_cpp"&gt;if (CONFIG_ZIGBEE_FOTA_GENERATE_LEGACY_IMAGE_TYPE)
		set(legacy_cmd &amp;quot;--legacy&amp;quot;)
	elseif(CONFIG_DFU_MULTI_IMAGE_PACKAGE_BUILD)
		set(legacy_cmd )
	endif()

	set(add_zigbee_header_cmd
		${PYTHON_EXECUTABLE}
		${NRF_DIR}/scripts/bootloader/zb_add_ota_header.py
		#								Provide acceptable format x.y.z
		--application-version-string 	&amp;quot;0.0.${mcuboot_CONFIG_FW_INFO_FIRMWARE_VERSION}&amp;quot;
		--zigbee-manufacturer-id 		${CONFIG_ZIGBEE_FOTA_MANUFACTURER_ID}
		--zigbee-ota-min-hw-version 	${CONFIG_ZIGBEE_FOTA_MIN_HW_VERSION}
		--zigbee-ota-max-hw-version 	${CONFIG_ZIGBEE_FOTA_MAX_HW_VERSION}
		--out-directory 				${PROJECT_BINARY_DIR}/zephyr
		${legacy_cmd}
	)

	set(FOTA_HEADER_STEP_S0 &amp;quot;dummy_s0&amp;quot;)
	add_custom_command(
		COMMAND ${add_zigbee_header_cmd} --application ${PROJECT_BINARY_DIR}/zephyr/signed_by_mcuboot_and_b0_s0_image_update.bin
		--zigbee-image-type ${CONFIG_ZIGBEE_FOTA_S0_IMAGE_TYPE}
		--zigbee-comment &amp;quot;${CONFIG_ZIGBEE_FOTA_BOOTLOADER_COMMENT}_s0&amp;quot;
		OUTPUT ${FOTA_HEADER_STEP_S0}
		DEPENDS zigbee_ota_image
		COMMENT &amp;quot;Add Zigbee FOTA header to s0 bootloader image...&amp;quot;
	)

	set(FOTA_HEADER_STEP_S1 &amp;quot;dummy_s1&amp;quot;)
	add_custom_command(
		COMMAND ${add_zigbee_header_cmd} --application ${PROJECT_BINARY_DIR}/zephyr/signed_by_mcuboot_and_b0_s1_image_update.bin
		--zigbee-image-type ${CONFIG_ZIGBEE_FOTA_S1_IMAGE_TYPE}
		--zigbee-comment &amp;quot;${CONFIG_ZIGBEE_FOTA_BOOTLOADER_COMMENT}_s1&amp;quot;
		OUTPUT ${FOTA_HEADER_STEP_S1}
		DEPENDS ${FOTA_HEADER_STEP_S0}
		COMMENT &amp;quot;Add Zigbee FOTA header to s1 bootloader image...&amp;quot;
	)

	add_custom_target(
		post_bin ALL
		DEPENDS
		${FOTA_HEADER_STEP_S1}
	)&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;4. Multiple FOTA images handling on the Zigbee End device.&lt;br /&gt;I just have a timer which in the middle of&amp;nbsp;CONFIG_ZIGBEE_FOTA_IMAGE_QUERY_INTERVAL_MIN changes two attributes in OTA Upgrade Cluster, which is ImageType and FileVersion.&lt;br /&gt;Handling of these images is really application depended. I did in such way but You can change the requested image type (QueryNextImageRequest) on specific events.&lt;br /&gt;&lt;br /&gt;I would like to get your thoughts about that implementation and I will be very grateful if let me know if You notice&amp;nbsp;any problems in provided solution.&amp;nbsp;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Zigbee FOTA mcuboot update</title><link>https://devzone.nordicsemi.com/thread/435501?ContentTypeID=1</link><pubDate>Mon, 10 Jul 2023 12:42:54 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:869b7fb9-3e53-46e5-aeaa-7ea9cc31c2af</guid><dc:creator>Maria Gilje</dc:creator><description>&lt;p&gt;&lt;em&gt;Due to the summer holiday period in Norway we currently have low staffing on DevZone. We apologize for possible delays caused by this and thank you for your patience.&lt;/em&gt;&lt;/p&gt;
&lt;hr /&gt;
&lt;p&gt;Hello,&lt;/p&gt;
[quote user="pwpot"]I assume that if I will choose the DFU lib I will have to write the code which will be similar to dfu_target_mcuboot.c&amp;nbsp;&lt;br /&gt;is that right ?&amp;nbsp;[/quote]
&lt;p&gt;Yes, your DFU target is MCUboot, so the functions to use are in that file as well as in &lt;a href="https://github.com/nrfconnect/sdk-nrf/blob/main/subsys/dfu/dfu_target/src/dfu_target.c"&gt;dfu_target.c&lt;/a&gt;. Please see the &lt;a href="https://developer.nordicsemi.com/nRF_Connect_SDK/doc/latest/nrf/libraries/dfu/dfu_target.html#mcuboot-style-upgrades"&gt;MCUBoot-style upgrades&lt;/a&gt; part of the DFU target library documentation for information on how to use the API functions.&lt;/p&gt;
[quote user="pwpot"]I compared both binaries and they have got a lot of differences. I noticed that every bin file contains the firmware info which also contains the start address of image, so when the &lt;strong&gt;&lt;em&gt;signed_by_mcuboot_and_b0_s1_image_update.bin&amp;nbsp;&lt;/em&gt;&lt;/strong&gt;&lt;em&gt;&lt;/em&gt;is used for updating the s0 partition, b0 (NSIB) tries to boot the s0 from&amp;nbsp;&amp;nbsp;&lt;em&gt;&lt;strong&gt;PM_S1_ADDRESS&amp;nbsp;&lt;/strong&gt;&lt;/em&gt;which ends with error:&amp;nbsp;&lt;br /&gt;&amp;quot;Firmware info doesn&amp;#39;t point to itself&amp;quot;.[/quote][quote user="pwpot"]What I am trying to achieve is to have only one binary file which will be suitable for both partitions. Is it even possible ? If not, why ?[/quote]
&lt;p&gt;From &lt;a href="https://developer.nordicsemi.com/nRF_Connect_SDK/doc/latest/nrf/config_and_build/bootloaders_and_dfu/bootloader.html#pre-signed-variants"&gt;Pre-signed variants&lt;/a&gt; in the &lt;a href="https://developer.nordicsemi.com/nRF_Connect_SDK/doc/latest/nrf/config_and_build/bootloaders_and_dfu/bootloader.html"&gt;Secure bootloader chain&lt;/a&gt; documentation:&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;You must build with pre-signed variants when building upgrade images for the image that follows the nRF Secure Immutable Bootloader in the boot chain, such as the upgradable bootloader or the application.&lt;strong&gt; Firmware update packages of the upgradable bootloader must contain images for both slots, since it may not be known which slot is in use by its current version while deployed in the field.&lt;/strong&gt;&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;From the documentation excerpt above it looks like it will not be possible to have one binary to fit both slots.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Edit: &lt;/strong&gt;I want to add that the reason for the different images is that the code is memory-dependent. The difference in images is necessary for the firmware to run properly.&lt;/p&gt;
&lt;p&gt;Best regards,&lt;/p&gt;
&lt;p&gt;Maria&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Zigbee FOTA mcuboot update</title><link>https://devzone.nordicsemi.com/thread/434440?ContentTypeID=1</link><pubDate>Tue, 04 Jul 2023 11:17:46 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:06d7ee73-ce55-4c48-beb7-6338b805f9fc</guid><dc:creator>Pawel(embeddedsolutions.pl)</dc:creator><description>&lt;p&gt;Hi, in the past few days, I have implemented the source code for handling the mcuboot image update over Zigbee.&amp;nbsp;&lt;br /&gt;Since today&amp;nbsp;I am able to send the image through Zigbee FOTA server, parse the image on the client side, save it to flash and correctly boot with the new version.&amp;nbsp;&lt;br /&gt;Implementation has got some limitations which I am going to overcome in the next steps.&amp;nbsp;&lt;br /&gt;I am using&amp;nbsp;&lt;strong&gt;&lt;em&gt;CONFIG_FW_INFO&amp;nbsp; (fw_info_find)&amp;nbsp;&lt;/em&gt;&lt;/strong&gt;&lt;em&gt;&lt;/em&gt;to read the content of both s0,s1 partitions metadata like firmware version. On the application side when the Zigbee Image Response arrives I check the greatest firmware version stored in any of the partitions to avoid downgrading.&lt;br /&gt;If that requirement is met I decide which partition should be updated. In other words I look for slot which has got the lowest firmware version.&lt;br /&gt;Then the update starts and data is being saved to flash starting from&amp;nbsp;&amp;nbsp;&lt;em&gt;&lt;strong&gt;PM_S0_ADDRESS &lt;/strong&gt;&lt;/em&gt;or&lt;strong&gt;&lt;/strong&gt;&lt;em&gt;&lt;strong&gt;&amp;nbsp;PM_S1_ADDRESS.&amp;nbsp;&lt;br /&gt;&lt;br /&gt;&lt;/strong&gt;&lt;/em&gt;Everything works well if&amp;nbsp;&lt;span&gt;&amp;nbsp;&lt;/span&gt;&lt;strong&gt;&lt;em&gt;signed_by_mcuboot_and_b0_s0_image_update.bin&amp;nbsp;&lt;/em&gt;&lt;/strong&gt;&lt;strong&gt;&lt;em&gt;&lt;/em&gt;&lt;/strong&gt;&lt;em&gt;&lt;/em&gt;is used for updating s0 partition, and&amp;nbsp;&lt;strong&gt;&lt;em&gt;signed_by_mcuboot_and_b0_s1_image_update.bin&amp;nbsp;&lt;/em&gt;&lt;/strong&gt;&lt;em&gt;&lt;/em&gt;for s1 partition.&amp;nbsp;&lt;br /&gt;&lt;br /&gt;I compared both binaries and they have got a lot of differences. I noticed that every bin file contains the firmware info which also contains the start address of image, so when the &lt;strong&gt;&lt;em&gt;signed_by_mcuboot_and_b0_s1_image_update.bin&amp;nbsp;&lt;/em&gt;&lt;/strong&gt;&lt;em&gt;&lt;/em&gt;is used for updating the s0 partition, b0 (NSIB) tries to boot the s0 from&amp;nbsp;&amp;nbsp;&lt;em&gt;&lt;strong&gt;PM_S1_ADDRESS&amp;nbsp;&lt;/strong&gt;&lt;/em&gt;which ends with error:&amp;nbsp;&lt;br /&gt;&amp;quot;Firmware info doesn&amp;#39;t point to itself&amp;quot;.&lt;br /&gt;&lt;br /&gt;That problem might be resolved by giving the s1 and s0 updatable images their own Zigbee image types. The FOTA client will periodically send the request for image type 0xXXX which will inform FOTA server to send the bootloader update image for s0. For s1 the client will send request for image type 0xYYYY.&amp;nbsp;&lt;br /&gt;It should work as intended but it seems like a waste of memory on the FOTA server side because it will need to have enough space for containing s0, s1 and app images.&amp;nbsp;&lt;br /&gt;&lt;br /&gt;The other option is to use s0 as a main bootloader (well-tested, lifeguard) and update only bootloader in s1 partition.&amp;nbsp;&lt;br /&gt;&lt;br /&gt;What I am trying to achieve is to have only one binary file which will be suitable for both partitions. Is it even possible ? If not, why ?&lt;br /&gt;&lt;br /&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Zigbee FOTA mcuboot update</title><link>https://devzone.nordicsemi.com/thread/434074?ContentTypeID=1</link><pubDate>Sun, 02 Jul 2023 19:33:06 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:b3a86b09-38d8-4bc6-b0cd-10f363bb181c</guid><dc:creator>Pawel(embeddedsolutions.pl)</dc:creator><description>&lt;p&gt;Hi Maria,&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Thank you so much for taking a look on that topic.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;I did some further research regarding choosing option A or B, but I have not decided yet. From my understanding option A&lt;br /&gt;will require using Flash API, which seems like code duplication knowing that dfu target(stream) is already using that.&lt;br /&gt;At this moment I tend to use the dfu library.&amp;nbsp;&lt;br /&gt;I assume that if I will choose the DFU lib I will have to write the code which will be similar to dfu_target_mcuboot.c&amp;nbsp;&lt;br /&gt;is that right ?&amp;nbsp;&lt;br /&gt;&lt;br /&gt;I am looking forward to hearing from you.&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Zigbee FOTA mcuboot update</title><link>https://devzone.nordicsemi.com/thread/433935?ContentTypeID=1</link><pubDate>Fri, 30 Jun 2023 12:14:12 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:2d7d193a-8eb9-4e82-97f9-a0344e03d4e9</guid><dc:creator>Maria Gilje</dc:creator><description>&lt;p&gt;Hello again,&lt;/p&gt;
&lt;p&gt;Thanks again for your patience.&lt;/p&gt;
&lt;p&gt;You seem to have covered the steps needed to &lt;a href="https://developer.nordicsemi.com/nRF_Connect_SDK/doc/latest/nrf/config_and_build/bootloaders_and_dfu/bootloader_adding.html#adding-an-upgradable-bootloader"&gt;adding an upgradable bootloader&lt;/a&gt; to your Zigbee application. &lt;/p&gt;
&lt;p&gt;I have a few comments on step 4: &lt;/p&gt;
&lt;p style="padding-left:30px;"&gt;You can choose the option which suits you best (A or B).&lt;/p&gt;
&lt;p style="padding-left:30px;"&gt;Choosing option A will give you the most control over what is happening and more of the development is on you. The generated pm_config.h defines the start addresses for the different sections of flash and the header file can be included in your project. From your build folder it can be found in zephyr/include/generated.&lt;/p&gt;
&lt;p style="padding-left:30px;"&gt;If you opt for option B and choose the &lt;a href="https://developer.nordicsemi.com/nRF_Connect_SDK/doc/latest/nrf/libraries/dfu/dfu_target.html"&gt;DFU target library&lt;/a&gt;, the functionality for firmware upgrade is already implemented. This option will include that you get familiar with the library and its complexity.&lt;/p&gt;
&lt;p&gt;Other than the above, I recommend that you take the instructions and documentation for Zigbee FOTA into account: &lt;br /&gt;&lt;a href="https://developer.nordicsemi.com/nRF_Connect_SDK/doc/latest/nrf/protocols/zigbee/configuring_libraries.html#enabling-zigbee-fota-in-an-application"&gt;Enabling Zigbee FOTA in an application&lt;br /&gt;&lt;/a&gt;&lt;a href="https://developer.nordicsemi.com/nRF_Connect_SDK/doc/latest/nrf/libraries/zigbee/zigbee_fota.html"&gt;Zigbee FOTA library&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;Best regards,&lt;/p&gt;
&lt;p&gt;Maria&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Zigbee FOTA mcuboot update</title><link>https://devzone.nordicsemi.com/thread/433748?ContentTypeID=1</link><pubDate>Thu, 29 Jun 2023 15:14:13 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:91dc475a-4941-4b6f-b48a-b805d9e1a6f6</guid><dc:creator>Maria Gilje</dc:creator><description>&lt;p&gt;Hello,&lt;/p&gt;
&lt;p&gt;I will look into this. Thank you for your patience.&lt;/p&gt;
&lt;p&gt;Best regards,&lt;/p&gt;
&lt;p&gt;Maria&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>