<?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>nrf52840 S140 Central DFU  Bluetooth Zephyr 2.0.0 nrf52840 peripheral</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/89921/nrf52840-s140-central-dfu-bluetooth-zephyr-2-0-0-nrf52840-peripheral</link><description>We have nrf52840 S140 BLE Central device that currently connects to TI based sensors. I have implemented code that can upgrade those TI sensors&amp;#39; firmware using the TI BLE protocol. 
 Now we are developing our own BLE peripheral sensors also based on the</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Mon, 05 Aug 2024 14:06:08 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/89921/nrf52840-s140-central-dfu-bluetooth-zephyr-2-0-0-nrf52840-peripheral" /><item><title>RE: nrf52840 S140 Central DFU  Bluetooth Zephyr 2.0.0 nrf52840 peripheral</title><link>https://devzone.nordicsemi.com/thread/496999?ContentTypeID=1</link><pubDate>Mon, 05 Aug 2024 14:06:08 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:727ddf84-8f6e-4561-8c22-ff195d043d3b</guid><dc:creator>OmarN</dc:creator><description>&lt;p&gt;Hello everyone,&lt;br /&gt;&lt;br /&gt;I am trying to get the smp_client_ble sample to work, provided in:&amp;nbsp;&lt;a id="" href="https://github.com/hellesvik-nordic/samples_for_nrf_connect_sdk/tree/main/bootloader_samples/client_smp/smp_client_ble"&gt;https://github.com/hellesvik-nordic/samples_for_nrf_connect_sdk/tree/main/bootloader_samples/client_smp/smp_client_ble&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;However it seems that the ZCBOR library has been updated and the included patch does not work anymore. I tried following this ticket and doing some changes, for example increasing the size of the array version_key and changing functions like zcbor_new_decode_state() to match the lastest ZCBOR update,&amp;nbsp;however the&amp;nbsp;image list, upload, and confirm are not working at all.&lt;/p&gt;
&lt;p&gt;I am getting the following errors:&lt;/p&gt;
&lt;p&gt;1) image list:&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;f3--- 8 messages dropped ---
bed5ea8b2112f4cc6a153cdc7f2fc11c2c485a221d317bf5135
      bootable: true
Decoding error, pending value (err: 11)&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;2) upload&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt; --- 11 messages dropped ---
                                       | (0/483328 bytes)Error in image upload response: 1&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;3) test&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;Decoding error, start_decode images-&amp;gt;list  (err: 10)&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Here are the errors with CONFIG_ZCBOR_VERBOSE enabled:&lt;/p&gt;
&lt;p&gt;1) image list:&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;zcbor_map_start_decode New backup (level 0)
zcbor_tstr_decode rem: 133, cur: 0x66, ec: 0xfffffff0, err: 0, value_extract
zcbor_list_start_decode New backup (level 1)
zcbor_map_start_decode New backup (level 2)
zcbor_tstr_decode rem: 124, cur: 0x64, ec: 0xfffffff0, err: 0, value_extract
zcbor_int32_decode zcbor_int_decode rem: 119, cur: 0x0, ec: 0xffffffef, err: 0, value_extract
zcbor_tstr_decode rem: 118, cur: 0x67, ec: 0xffffffee, err: 0, value_extract
zcbor_tstr_decode rem: 110, cur: 0x65, ec: 0xffffffed, err: 0, value_extract
zcbor_tstr_decode rem: 104, cur: 0x64, ec: 0xffffffec, err: 0, value_extract
zcbor_bstr_decode rem: 99, cur: 0x58, ec: 0xffffffeb, err: 0, value_extract
zcbor_tstr_decode rem: 65, cur: 0x68, ec: 0xffffffea, err: 0, value_extract
zcbor_bool_expect zcbor_simple_expect zcbor_simple_decode zcbor_simple_decode rem: 56, cur: 0xf5, ec: 0xffffffe9, err: 0, value_extract
zcbor_tstr_decode rem: 55, cur: 0x67, ec: 0xffffffe8, err: 0, value_extract
zcbor_bool_expect zcbor_simple_expect zcbor_simple_decode zcbor_simple_decode rem: 47, cur: 0xf4, ec: 0xffffffe7, err: 0, value_extract
simple value 20 != 21
ZCBOR_FAIL rem: 47, cur: 0xf4, ec: 0xffffffe7, err: 11, WEST_TOPDIR/modules/lib/zcbor/src/zcbor_decode.c:1081
f3--- 8 messages dropped ---
bed5ea8b2112f4cc6a153cdc7f2fc11c2c485a221d317bf5135
      bootable: true
Decoding error, pending value (err: 11)&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;2) upload:&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;rem: 299, cur: 0x65, ec: 0x0, err: 0, value_encode_len
rem: 293, cur: 0x0, ec: 0x1, err: 0, value_encode_len
rem: 292, cur: 0x64, ec: 0x2, err: 0, value_encode_len
rem: 287, cur: 0x58, ec: 0x3, err: 0, value_encode_len
rem: 135, cur: 0x63, ec: 0x4, err: 0, value_encode_len
rem: 131, cur: 0x1a, ec: 0x5, err: 0, value_encode_len
rem: 126, cur: 0x63, ec: 0x6, err: 0, value_encode_len
rem: 122, cur: 0x0, ec: 0x7, err: 0, value_encode_len
rem: 121, cur: 0x63, ec: 0x8, err: 0, value_encode_len
rem: 117, cur: 0x45, ec: 0x9, err: 0, value_encode_len
rem: 111, cur: 0x67, ec: 0xa, err: 0, value_encode_len
rem: 103, cur: 0xf4, ec: 0xb, err: 0, value_encode_len
 --- 10 messages dropped ---
                                        | (0/483328 bytes)zcbor_map_start_decode New backup (level 0)
zcbor_tstr_decode rem: 5, cur: 0x62, ec: 0xfffffff0, err: 0, value_extract
zcbor_int32_decode zcbor_int_decode rem: 2, cur: 0x1, ec: 0xffffffef, err: 0, value_extract
Error in image upload response: 1&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;3) test:&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;rem: 299, cur: 0x64, ec: 0x0, err: 0, value_encode_len
rem: 294, cur: 0x58, ec: 0x1, err: 0, value_encode_len
rem: 260, cur: 0x67, ec: 0x2, err: 0, value_encode_len
rem: 252, cur: 0xf4, ec: 0x3, err: 0, value_encode_len
zcbor_map_start_decode New backup (level 0)
zcbor_tstr_decode rem: 5, cur: 0x62, ec: 0xfffffff0, err: 0, value_extract
zcbor_list_start_decode ZCBOR_ERR(10) ZCBOR_FAIL rem: 2, cur: 0x1, ec: 0xffffffef, err: 10, WEST_TOPDIR/modules/lib/zcbor/src/zcbor_decode.c:51
ZCBOR_FAIL rem: 2, cur: 0x1, ec: 0xffffffef, err: 10, WEST_TOPDIR/modules/lib/zcbor/src/zcbor_decode.c:648
Decoding error, start_decode images-&amp;gt;list  (err: 10)&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;any help on this would be greatly appreciated&lt;/p&gt;
&lt;p&gt;regards,&lt;/p&gt;
&lt;p&gt;Omar&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nrf52840 S140 Central DFU  Bluetooth Zephyr 2.0.0 nrf52840 peripheral</title><link>https://devzone.nordicsemi.com/thread/412676?ContentTypeID=1</link><pubDate>Wed, 01 Mar 2023 09:25:44 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:1178818d-386a-48a5-808d-f844d35d3c1a</guid><dc:creator>Sigurd Hellesvik</dc:creator><description>[quote user="DavidKaplan"]Finally![/quote]
&lt;p&gt;Hurray!&lt;/p&gt;
&lt;p&gt;I still remember you asking if it is possible to stream the data directly instead of storing it in the flash of the SMP Central.&lt;br /&gt;We do not have a solution for that, so you will have to make it yourself if you need it.&lt;br /&gt;But now that you can perform an update from the SMP Client with flash storage, it is a good starting point!&lt;/p&gt;
[quote user="DavidKaplan"]Could you point me to a current thread about adding back the key to the bootloader in Zephyr v2.2.0 ?[/quote]
&lt;p&gt;Official documentation can be found at &lt;a href="https://developer.nordicsemi.com/nRF_Connect_SDK/doc/latest/nrf/app_dev/bootloaders_and_dfu/bootloader_adding.html#adding-mcuboot-as-an-immutable-bootloader"&gt;Adding MCUboot as an immutable bootloader&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;I have an unofficial sample of adding this using CMake for relative paths at &lt;a href="https://github.com/hellesvik-nordic/samples_for_nrf_connect_sdk/tree/main/bootloader_samples/keys_and_signatures/mcuboot_smp_custom_key"&gt;MCUboot Custom Key with SMP Server&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;Regards,&lt;br /&gt;Sigurd Hellesvik&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nrf52840 S140 Central DFU  Bluetooth Zephyr 2.0.0 nrf52840 peripheral</title><link>https://devzone.nordicsemi.com/thread/412668?ContentTypeID=1</link><pubDate>Wed, 01 Mar 2023 09:17:11 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:bc6a2666-d0d2-4827-8208-13997bff0c29</guid><dc:creator>DavidKaplan</dc:creator><description>&lt;p&gt;Finally!&lt;/p&gt;
&lt;p&gt;&amp;nbsp;I watched your video (a big effort on your part, thank you) and tried the following that solved all of my SMP DFU problems.&lt;/p&gt;
&lt;p&gt;It works in my custom central board with the image being streamed from a host.&lt;/p&gt;
&lt;p&gt;1) Upload whole sensor slot size (not central slot size) or until I get an error#1 in smp_upload_rsp_proc()&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&amp;quot;Error in image upload response:1&amp;quot; after actual image was already transferred.&lt;/p&gt;
&lt;p&gt;The data I upload in the slot after the actual image I just set to 0xFF. I don&amp;#39;t think that this really matters.&lt;/p&gt;
&lt;p&gt;&lt;br /&gt;2) Increased smp_buffer payload to handle larger chunks. My MTU is 498 I think. I can use a chuck size of 428.&lt;/p&gt;
&lt;p&gt;I just increased its size to 512 to be safe. When 300 is used you sure don&amp;#39;t need 512 if you are short on ram.&lt;/p&gt;
&lt;p&gt;/* Buffer for response */&lt;br /&gt;struct smp_buffer {&lt;br /&gt; struct bt_dfu_smp_header header;&lt;br /&gt; uint8_t payload[512]; // was 300&lt;br /&gt;};&lt;br /&gt;#define UPLOAD_CHUNK 424 // (50 worked) This has to be at least 32 bytes, since first it has to send the whole header (which is 32 bytes)&lt;/p&gt;
&lt;p&gt;This has been a long ride and I really appreciate your help.&lt;/p&gt;
&lt;p&gt;One last thing.&lt;/p&gt;
&lt;p&gt;Could you point me to a current thread about adding back the key to the bootloader in Zephyr v2.2.0 ?&lt;/p&gt;
&lt;p&gt;Thank you!&lt;/p&gt;
&lt;p&gt;David&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nrf52840 S140 Central DFU  Bluetooth Zephyr 2.0.0 nrf52840 peripheral</title><link>https://devzone.nordicsemi.com/thread/412541?ContentTypeID=1</link><pubDate>Tue, 28 Feb 2023 14:00:01 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:319e6753-a4cb-4db3-b011-294df07020fe</guid><dc:creator>Sigurd Hellesvik</dc:creator><description>[quote user="DavidKaplan"]&lt;p&gt;&lt;span&gt;When&amp;nbsp;pressed button#2 and saw that the central tries to upload all of second slot and not just the image size. &lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Is this what you saw too?&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Maybe I should upload with my code the entire slot instead of just the app_update.bin file size?&lt;/span&gt;&lt;/p&gt;[/quote]
&lt;p&gt;Yes. I think it is a good idea to start by uploading the entire slot.&lt;br /&gt;Then if that works, we can try to upload less data after.&lt;/p&gt;
[quote user="DavidKaplan"]&lt;span&gt;Should the padded data be zero or 0xFF?&lt;/span&gt;[/quote]
&lt;p&gt;Are you generating the file manually?&lt;/p&gt;
&lt;p&gt;I recommend that you first try to use build/zephyr/app_update.bin without any changes.&lt;/p&gt;
[quote user="DavidKaplan"]So, I can&amp;#39;t reproduce a DFU successfully like you, so it is evident that I am doing more than one thing wrong.[/quote]
&lt;p&gt;I will upload a video to the private case of how I do this so you can look at all my steps in detail.&lt;br /&gt;I hope that can be helpful.&lt;/p&gt;
&lt;p&gt;Regards,&lt;br /&gt;Sigurd Hellesvik&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nrf52840 S140 Central DFU  Bluetooth Zephyr 2.0.0 nrf52840 peripheral</title><link>https://devzone.nordicsemi.com/thread/412525?ContentTypeID=1</link><pubDate>Tue, 28 Feb 2023 13:35:46 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:9c623e6a-8731-4d04-974b-c27f4ae65332</guid><dc:creator>DavidKaplan</dc:creator><description>&lt;p&gt;OK I see that the secondary image size on my Central nRF52840 build and my nRF9160 &amp;amp; custom sensors are different sizes.&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;1) nRF52840 central
#define PM_MCUBOOT_SECONDARY_OFFSET 0x86000
#define PM_MCUBOOT_SECONDARY_ADDRESS 0x86000
#define PM_MCUBOOT_SECONDARY_END_ADDRESS 0x100000
#define PM_MCUBOOT_SECONDARY_SIZE 0x7a000
#define PM_MCUBOOT_SECONDARY_NAME mcuboot_secondary
#define PM_MCUBOOT_SECONDARY_ID 5
#define PM_mcuboot_secondary_ID PM_MCUBOOT_SECONDARY_ID
#define PM_mcuboot_secondary_IS_ENABLED 1

send_upload2()
	int last_addr = (PM_MCUBOOT_SECONDARY_END_ADDRESS-0x6000);  // ?!?
===================================================
2) nRF9160 sensor
#define PM_MCUBOOT_SECONDARY_OFFSET 0x80000
#define PM_MCUBOOT_SECONDARY_ADDRESS 0x80000
#define PM_MCUBOOT_SECONDARY_END_ADDRESS 0xf4000
#define PM_MCUBOOT_SECONDARY_SIZE 0x74000
#define PM_MCUBOOT_SECONDARY_NAME mcuboot_secondary
#define PM_MCUBOOT_SECONDARY_ID 5
#define PM_mcuboot_secondary_ID PM_MCUBOOT_SECONDARY_ID
#define PM_mcuboot_secondary_IS_ENABLED 1
#define PM_5_LABEL MCUBOOT_SECONDARY

======================================================
3) Custom sensor
#define PM_MCUBOOT_SECONDARY_OFFSET 0x80000
#define PM_MCUBOOT_SECONDARY_ADDRESS 0x80000
#define PM_MCUBOOT_SECONDARY_END_ADDRESS 0xf4000
#define PM_MCUBOOT_SECONDARY_SIZE 0x74000
#define PM_MCUBOOT_SECONDARY_NAME mcuboot_secondary
#define PM_MCUBOOT_SECONDARY_ID 5
#define PM_mcuboot_secondary_ID PM_MCUBOOT_SECONDARY_ID
#define PM_mcuboot_secondary_IS_ENABLED 1
#define PM_5_LABEL MCUBOOT_SECONDARY
&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;I just adjusted the central code so it would only send&amp;nbsp;0x74000 bytes instead of&amp;nbsp;0x7a000,&lt;/p&gt;
&lt;p&gt;but that did not help either. (&lt;em&gt;475136&lt;span&gt;&amp;nbsp;= 0x74000)&lt;/span&gt;&lt;/em&gt;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;&lt;em&gt;send_upload2()&lt;/em&gt;&lt;br /&gt;&lt;em&gt; int last_addr = (PM_MCUBOOT_SECONDARY_END_ADDRESS-0x6000); // ?!?&lt;/em&gt;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;I got when uploading:&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;&lt;em&gt;[&amp;nbsp; 99% ] |================================================= | (474900/475136 bytes)Error in image upload response: 1&lt;/em&gt;&lt;/p&gt;
&lt;p&gt;Still the questions in the previous post are open.&lt;/p&gt;
&lt;p&gt;Thanks David&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nrf52840 S140 Central DFU  Bluetooth Zephyr 2.0.0 nrf52840 peripheral</title><link>https://devzone.nordicsemi.com/thread/412473?ContentTypeID=1</link><pubDate>Tue, 28 Feb 2023 11:36:43 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:70dddaca-4547-4b61-a3f2-6572402460df</guid><dc:creator>DavidKaplan</dc:creator><description>&lt;p&gt;OK, I flashed my sensor code using the&amp;nbsp;&lt;span&gt;&amp;quot;nrf9160dk_nrf52840&amp;quot; build and then tried to DFU from my Central with the image streamed and the Central got OK from the nRF9160 dk sensor as I received before.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Central log:&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&lt;pre class="ui-code" data-mode="text"&gt;02-28 11:23 28/02/2023 09:23:36 |  27/02/2023 23:23:14[.ami_vibe.c:1941] ...[ami_smp.c: 675] DFU:317200/319026 400
02-28 11:23 28/02/2023 09:23:36 |  27/02/2023 23:23:14[.ami_vibe.c:1941] ...[ami_smp.c: 675] DFU:317600/319026 400
02-28 11:23 28/02/2023 09:23:36 |  27/02/2023 23:23:14[.ami_vibe.c:1941] ...[ami_smp.c: 675] DFU:318000/319026 400
02-28 11:23 28/02/2023 09:23:36 |  27/02/2023 23:23:14[.ami_vibe.c:1941] ...[ami_smp.c: 675] DFU:318400/319026 400
02-28 11:23 28/02/2023 09:23:36 |  27/02/2023 23:23:14[.ami_vibe.c:1941] ...[ami_smp.c: 675] DFU:318800/319026 226
02-28 11:23 28/02/2023 09:23:37 |  27/02/2023 23:23:14[.ami_vibe.c:1941] ...[ami_smp.c: 789] ImageChecksum AF3A0C7A
02-28 11:23 28/02/2023 09:23:37 |  27/02/2023 23:23:14[.ami_vibe.c:1941] ...[ami_smp.c: 927] SMP UploadOK
02-28 11:23 28/02/2023 09:23:37 |  27/02/2023 23:23:14[.ami_vibe.c:1941] ...[ami_smp.c:1208] ImageList
02-28 11:23 28/02/2023 09:23:37 |  27/02/2023 23:23:14[.ami_vibe.c:1941] ...[ami_smp.c:1211] ImageTest
02-28 11:23 28/02/2023 09:23:38 |  27/02/2023 23:23:15[.ami_vibe.c:1941] ...[ami_smp.c:1214] ImageReset
02-28 11:23 28/02/2023 09:23:38 |  27/02/2023 23:23:16[.ami_vibe.c:1941] ...[ami_ble.c:2639] DFUConnectFinishedErr:0
&lt;/pre&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;nRF9160-DK log where I used the programmer at the start to perform a reset.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&lt;pre class="ui-code" data-mode="text"&gt;[00:01:38.147,705] &amp;lt;ESC&amp;gt;&#x1B;[1;31m&amp;lt;err&amp;gt; mpsl_init: m_assert_handler: MPSL ASSERT: 112, 2195&amp;lt;ESC&amp;gt;&#x1B;[0m&amp;lt;CR&amp;gt;&amp;lt;LF&amp;gt;
[00:01:38.155,456] &amp;lt;ESC&amp;gt;&#x1B;[1;31m&amp;lt;err&amp;gt; os: hard_fault: ***** HARD FAULT *****&amp;lt;ESC&amp;gt;&#x1B;[0m&amp;lt;CR&amp;gt;&amp;lt;LF&amp;gt;
[00:01:38.162,109] &amp;lt;ESC&amp;gt;&#x1B;[1;31m&amp;lt;err&amp;gt; os: hard_fault:   Fault escalation (see below)&amp;lt;ESC&amp;gt;&#x1B;[0m&amp;lt;CR&amp;gt;&amp;lt;LF&amp;gt;
[00:01:38.169,433] &amp;lt;ESC&amp;gt;&#x1B;[1;31m&amp;lt;err&amp;gt; os: hard_fault: ARCH_EXCEPT with reason 3&amp;lt;LF&amp;gt;
&amp;lt;ESC&amp;gt;&#x1B;[0m&amp;lt;CR&amp;gt;&amp;lt;LF&amp;gt;
[00:01:38.176,452] &amp;lt;ESC&amp;gt;&#x1B;[1;31m&amp;lt;err&amp;gt; os: esf_dump: r0/a1:  0x00000003  r1/a2:  0x00000000  r2/a3:  0x00000000&amp;lt;ESC&amp;gt;&#x1B;[0m&amp;lt;CR&amp;gt;&amp;lt;LF&amp;gt;
[00:01:38.186,065] &amp;lt;ESC&amp;gt;&#x1B;[1;31m&amp;lt;err&amp;gt; os: esf_dump: r3/a4:  0x20003f54 r12/ip:  0x00000000 r14/lr:  0x0003a413&amp;lt;ESC&amp;gt;&#x1B;[0m&amp;lt;CR&amp;gt;&amp;lt;LF&amp;gt;
[00:01:38.195,678] &amp;lt;ESC&amp;gt;&#x1B;[1;31m&amp;lt;err&amp;gt; os: esf_dump:  xpsr:  0x41000018&amp;lt;ESC&amp;gt;&#x1B;[0m&amp;lt;CR&amp;gt;&amp;lt;LF&amp;gt;
[00:01:38.201,843] &amp;lt;ESC&amp;gt;&#x1B;[1;31m&amp;lt;err&amp;gt; os: esf_dump: s[ 0]:  0x00000000  s[ 1]:  0x00000000  s[ 2]:  0x00000000  s[ 3]:  0x00000000&amp;lt;ESC&amp;gt;&#x1B;[0m&amp;lt;CR&amp;gt;&amp;lt;LF&amp;gt;
[00:01:38.213,226] &amp;lt;ESC&amp;gt;&#x1B;[1;31m&amp;lt;err&amp;gt; os: esf_dump: s[ 4]:  0x00000000  s[ 5]:  0x00000000  s[ 6]:  0x00000000  s[ 7]:  0x00000000&amp;lt;ESC&amp;gt;&#x1B;[0m&amp;lt;CR&amp;gt;&amp;lt;LF&amp;gt;
[00:01:38.224,609] &amp;lt;ESC&amp;gt;&#x1B;[1;31m&amp;lt;err&amp;gt; os: esf_dump: s[ 8]:  0x00000000  s[ 9]:  0x00000000  s[10]:  0x00000000  s[11]:  0x00000000&amp;lt;ESC&amp;gt;&#x1B;[0m&amp;lt;CR&amp;gt;&amp;lt;LF&amp;gt;
[00:01:38.235,992] &amp;lt;ESC&amp;gt;&#x1B;[1;31m&amp;lt;err&amp;gt; os: esf_dump: s[12]:  0x00000000  s[13]:  0x00000002  s[14]:  0x00000000  s[15]:  0x00000000&amp;lt;ESC&amp;gt;&#x1B;[0m&amp;lt;CR&amp;gt;&amp;lt;LF&amp;gt;
[00:01:38.247,344] &amp;lt;ESC&amp;gt;&#x1B;[1;31m&amp;lt;err&amp;gt; os: esf_dump: fpscr:  0x00000100&amp;lt;ESC&amp;gt;&#x1B;[0m&amp;lt;CR&amp;gt;&amp;lt;LF&amp;gt;
[00:01:38.253,479] &amp;lt;ESC&amp;gt;&#x1B;[1;31m&amp;lt;err&amp;gt; os: esf_dump: Faulting instruction address (r15/pc): 0x0002f618&amp;lt;ESC&amp;gt;&#x1B;[0m&amp;lt;CR&amp;gt;&amp;lt;LF&amp;gt;
[00:01:38.262,298] &amp;lt;ESC&amp;gt;&#x1B;[1;31m&amp;lt;err&amp;gt; os: z_fatal_error: &amp;gt;&amp;gt;&amp;gt; ZEPHYR FATAL ERROR 3: Kernel oops on CPU 0&amp;lt;ESC&amp;gt;&#x1B;[0m&amp;lt;CR&amp;gt;&amp;lt;LF&amp;gt;
[00:01:38.271,331] &amp;lt;ESC&amp;gt;&#x1B;[1;31m&amp;lt;err&amp;gt; os: z_fatal_error: Fault during interrupt handling&amp;lt;LF&amp;gt;
&amp;lt;ESC&amp;gt;&#x1B;[0m&amp;lt;CR&amp;gt;&amp;lt;LF&amp;gt;
[00:01:38.279,113] &amp;lt;ESC&amp;gt;&#x1B;[1;31m&amp;lt;err&amp;gt; os: z_fatal_error: Current thread: 0x20002ca8 (unknown)&amp;lt;ESC&amp;gt;&#x1B;[0m&amp;lt;CR&amp;gt;&amp;lt;LF&amp;gt;
[00:01:38.287,261] &amp;lt;ESC&amp;gt;&#x1B;[1;31m&amp;lt;err&amp;gt; fatal_error: k_sys_fatal_error_handler: Resetting system&amp;lt;ESC&amp;gt;&#x1B;[0m&amp;lt;CR&amp;gt;
[00:00:00.252,288] &amp;lt;ESC&amp;gt;&#x1B;[0m&amp;lt;inf&amp;gt; board_control: vcom0_pins_routing is ENABLED&amp;lt;ESC&amp;gt;&#x1B;[0m&amp;lt;CR&amp;gt;&amp;lt;LF&amp;gt;
[00:00:00.259,155] &amp;lt;ESC&amp;gt;&#x1B;[0m&amp;lt;inf&amp;gt; board_control: vcom2_pins_routing is ENABLED&amp;lt;ESC&amp;gt;&#x1B;[0m&amp;lt;CR&amp;gt;&amp;lt;LF&amp;gt;
[00:00:00.266,052] &amp;lt;ESC&amp;gt;&#x1B;[0m&amp;lt;inf&amp;gt; board_control: led1_pin_routing is ENABLED&amp;lt;ESC&amp;gt;&#x1B;[0m&amp;lt;CR&amp;gt;&amp;lt;LF&amp;gt;
[00:00:00.272,796] &amp;lt;ESC&amp;gt;&#x1B;[0m&amp;lt;inf&amp;gt; board_control: led2_pin_routing is ENABLED&amp;lt;ESC&amp;gt;&#x1B;[0m&amp;lt;CR&amp;gt;&amp;lt;LF&amp;gt;
[00:00:00.279,541] &amp;lt;ESC&amp;gt;&#x1B;[0m&amp;lt;inf&amp;gt; board_control: led3_pin_routing is ENABLED&amp;lt;ESC&amp;gt;&#x1B;[0m&amp;lt;CR&amp;gt;&amp;lt;LF&amp;gt;
[00:00:00.286,254] &amp;lt;ESC&amp;gt;&#x1B;[0m&amp;lt;inf&amp;gt; board_control: led4_pin_routing is ENABLED&amp;lt;ESC&amp;gt;&#x1B;[0m&amp;lt;CR&amp;gt;&amp;lt;LF&amp;gt;
[00:00:00.292,999] &amp;lt;ESC&amp;gt;&#x1B;[0m&amp;lt;inf&amp;gt; board_control: switch1_pin_routing is ENABLED&amp;lt;ESC&amp;gt;&#x1B;[0m&amp;lt;CR&amp;gt;&amp;lt;LF&amp;gt;
[00:00:00.299,987] &amp;lt;ESC&amp;gt;&#x1B;[0m&amp;lt;inf&amp;gt; board_control: switch2_pin_routing is ENABLED&amp;lt;ESC&amp;gt;&#x1B;[0m&amp;lt;CR&amp;gt;&amp;lt;LF&amp;gt;
[00:00:00.306,976] &amp;lt;ESC&amp;gt;&#x1B;[0m&amp;lt;inf&amp;gt; board_control: button1_pin_routing is ENABLED&amp;lt;ESC&amp;gt;&#x1B;[0m&amp;lt;CR&amp;gt;&amp;lt;LF&amp;gt;
[00:00:00.313,995] &amp;lt;ESC&amp;gt;&#x1B;[0m&amp;lt;inf&amp;gt; board_control: button2_pin_routing is ENABLED&amp;lt;ESC&amp;gt;&#x1B;[0m&amp;lt;CR&amp;gt;&amp;lt;LF&amp;gt;
[00:00:00.320,983] &amp;lt;ESC&amp;gt;&#x1B;[0m&amp;lt;inf&amp;gt; board_control: nrf_interface_pins_0_2_routing is disabled&amp;lt;ESC&amp;gt;&#x1B;[0m&amp;lt;CR&amp;gt;&amp;lt;LF&amp;gt;
[00:00:00.329,040] &amp;lt;ESC&amp;gt;&#x1B;[0m&amp;lt;inf&amp;gt; board_control: nrf_interface_pins_3_5_routing is disabled&amp;lt;ESC&amp;gt;&#x1B;[0m&amp;lt;CR&amp;gt;&amp;lt;LF&amp;gt;
[00:00:00.337,097] &amp;lt;ESC&amp;gt;&#x1B;[0m&amp;lt;inf&amp;gt; board_control: nrf_interface_pins_6_8_routing is disabled&amp;lt;ESC&amp;gt;&#x1B;[0m&amp;lt;CR&amp;gt;&amp;lt;LF&amp;gt;
[00:00:00.345,123] &amp;lt;ESC&amp;gt;&#x1B;[0m&amp;lt;inf&amp;gt; board_control: Board configured.&amp;lt;ESC&amp;gt;&#x1B;[0m&amp;lt;CR&amp;gt;&amp;lt;LF&amp;gt;
*** Booting Zephyr OS build v3.2.99-ncs1 ***&amp;lt;CR&amp;gt;&amp;lt;LF&amp;gt;
[00:00:00.355,041] &amp;lt;ESC&amp;gt;&#x1B;[0m&amp;lt;inf&amp;gt; mcuboot: Starting bootloader&amp;lt;ESC&amp;gt;&#x1B;[0m&amp;lt;CR&amp;gt;&amp;lt;LF&amp;gt;
[00:00:00.360,992] &amp;lt;ESC&amp;gt;&#x1B;[0m&amp;lt;inf&amp;gt; mcuboot: Primary image: magic=unset, swap_type=0x1, copy_done=0x3, image_ok=0x3&amp;lt;ESC&amp;gt;&#x1B;[0m&amp;lt;CR&amp;gt;&amp;lt;LF&amp;gt;
[00:00:00.370,971] &amp;lt;ESC&amp;gt;&#x1B;[0m&amp;lt;inf&amp;gt; mcuboot: Secondary image: magic=unset, swap_type=0x1, copy_done=0x3, image_ok=0x3&amp;lt;ESC&amp;gt;&#x1B;[0m&amp;lt;CR&amp;gt;&amp;lt;LF&amp;gt;
[00:00:00.381,072] &amp;lt;ESC&amp;gt;&#x1B;[0m&amp;lt;inf&amp;gt; mcuboot: Boot source: none&amp;lt;ESC&amp;gt;&#x1B;[0m&amp;lt;CR&amp;gt;&amp;lt;LF&amp;gt;
[00:00:00.386,474] &amp;lt;ESC&amp;gt;&#x1B;[0m&amp;lt;inf&amp;gt; mcuboot: Swap type: none&amp;lt;ESC&amp;gt;&#x1B;[0m&amp;lt;CR&amp;gt;&amp;lt;LF&amp;gt;
[00:00:00.460,571] &amp;lt;ESC&amp;gt;&#x1B;[0m&amp;lt;inf&amp;gt; mcuboot: Bootloader chainload address offset: 0xc000&amp;lt;ESC&amp;gt;&#x1B;[0m&amp;lt;CR&amp;gt;&amp;lt;LF&amp;gt;
[00:00:00.468,139] &amp;lt;ESC&amp;gt;&#x1B;[0m&amp;lt;inf&amp;gt; mcuboot: Jumping to the first image slot&amp;lt;ESC&amp;gt;&#x1B;[0m&amp;lt;CR&amp;gt;
&amp;#255;[00:00:00.000,152] &amp;lt;ESC&amp;gt;&#x1B;[0m&amp;lt;inf&amp;gt; board_control: init: vcom0_pins_routing is ENABLED&amp;lt;ESC&amp;gt;&#x1B;[0m&amp;lt;CR&amp;gt;&amp;lt;LF&amp;gt;
[00:00:00.007,568] &amp;lt;ESC&amp;gt;&#x1B;[0m&amp;lt;inf&amp;gt; board_control: init: vcom2_pins_routing is ENABLED&amp;lt;ESC&amp;gt;&#x1B;[0m&amp;lt;CR&amp;gt;&amp;lt;LF&amp;gt;
[00:00:00.015,014] &amp;lt;ESC&amp;gt;&#x1B;[0m&amp;lt;inf&amp;gt; board_control: init: led1_pin_routing is ENABLED&amp;lt;ESC&amp;gt;&#x1B;[0m&amp;lt;CR&amp;gt;&amp;lt;LF&amp;gt;
[00:00:00.022,277] &amp;lt;ESC&amp;gt;&#x1B;[0m&amp;lt;inf&amp;gt; board_control: init: led2_pin_routing is ENABLED&amp;lt;ESC&amp;gt;&#x1B;[0m&amp;lt;CR&amp;gt;&amp;lt;LF&amp;gt;
[00:00:00.029,541] &amp;lt;ESC&amp;gt;&#x1B;[0m&amp;lt;inf&amp;gt; board_control: init: led3_pin_routing is ENABLED&amp;lt;ESC&amp;gt;&#x1B;[0m&amp;lt;CR&amp;gt;&amp;lt;LF&amp;gt;
[00:00:00.036,804] &amp;lt;ESC&amp;gt;&#x1B;[0m&amp;lt;inf&amp;gt; board_control: init: led4_pin_routing is ENABLED&amp;lt;ESC&amp;gt;&#x1B;[0m&amp;lt;CR&amp;gt;&amp;lt;LF&amp;gt;
[00:00:00.044,067] &amp;lt;ESC&amp;gt;&#x1B;[0m&amp;lt;inf&amp;gt; board_control: init: switch1_pin_routing is ENABLED&amp;lt;ESC&amp;gt;&#x1B;[0m&amp;lt;CR&amp;gt;&amp;lt;LF&amp;gt;
[00:00:00.051,605] &amp;lt;ESC&amp;gt;&#x1B;[0m&amp;lt;inf&amp;gt; board_control: init: switch2_pin_routing is ENABLED&amp;lt;ESC&amp;gt;&#x1B;[0m&amp;lt;CR&amp;gt;&amp;lt;LF&amp;gt;
[00:00:00.059,143] &amp;lt;ESC&amp;gt;&#x1B;[0m&amp;lt;inf&amp;gt; board_control: init: button1_pin_routing is ENABLED&amp;lt;ESC&amp;gt;&#x1B;[0m&amp;lt;CR&amp;gt;&amp;lt;LF&amp;gt;
[00:00:00.066,650] &amp;lt;ESC&amp;gt;&#x1B;[0m&amp;lt;inf&amp;gt; board_control: init: button2_pin_routing is ENABLED&amp;lt;ESC&amp;gt;&#x1B;[0m&amp;lt;CR&amp;gt;&amp;lt;LF&amp;gt;
[00:00:00.074,188] &amp;lt;ESC&amp;gt;&#x1B;[0m&amp;lt;inf&amp;gt; board_control: init: nrf_interface_pins_0_2_routing is disabled&amp;lt;ESC&amp;gt;&#x1B;[0m&amp;lt;CR&amp;gt;&amp;lt;LF&amp;gt;
[00:00:00.082,763] &amp;lt;ESC&amp;gt;&#x1B;[0m&amp;lt;inf&amp;gt; board_control: init: nrf_interface_pins_3_5_routing is disabled&amp;lt;ESC&amp;gt;&#x1B;[0m&amp;lt;CR&amp;gt;&amp;lt;LF&amp;gt;
[00:00:00.091,339] &amp;lt;ESC&amp;gt;&#x1B;[0m&amp;lt;inf&amp;gt; board_control: init: nrf_interface_pins_6_8_routing is disabled&amp;lt;ESC&amp;gt;&#x1B;[0m&amp;lt;CR&amp;gt;&amp;lt;LF&amp;gt;
[00:00:00.099,914] &amp;lt;ESC&amp;gt;&#x1B;[0m&amp;lt;inf&amp;gt; board_control: init: Board configured.&amp;lt;ESC&amp;gt;&#x1B;[0m&amp;lt;CR&amp;gt;&amp;lt;LF&amp;gt;
*** Booting Zephyr OS build v3.2.99-ncs1 ***&amp;lt;CR&amp;gt;&amp;lt;LF&amp;gt;
[00:00:00.110,412] &amp;lt;ESC&amp;gt;&#x1B;[0m&amp;lt;inf&amp;gt; mcumgr_zephyr_grp: zephyr_basic_mgmt_init: Registering Zephyr basic mgmt group&amp;lt;ESC&amp;gt;&#x1B;[0m&amp;lt;CR&amp;gt;&amp;lt;LF&amp;gt;
00/00/0000 00:00:00[ami_main.c: 631] Startup&amp;lt;CR&amp;gt;&amp;lt;LF&amp;gt;
00/00/0000 00:00:00[ami_cfg.c: 256] DeviceID:0&amp;lt;CR&amp;gt;&amp;lt;LF&amp;gt;
00/00/0000 00:00:00[ami_main.c: 448] MainInitErr:4096&amp;lt;CR&amp;gt;&amp;lt;LF&amp;gt;
00/00/0000 00:00:00[ami_main.c: 657] VaporBLE#0 26-Feb-2023 v1.0.0 1.0 2.26&amp;lt;CR&amp;gt;&amp;lt;LF&amp;gt;
build time: Feb 28 2023 11:08:57&amp;lt;CR&amp;gt;&amp;lt;LF&amp;gt;
[00:00:00.245,910] &amp;lt;ESC&amp;gt;&#x1B;[0m&amp;lt;inf&amp;gt; sdc_hci_driver: hci_driver_open: SoftDevice Controller build revision: &amp;lt;CR&amp;gt;&amp;lt;LF&amp;gt;
                                         6d 90 41 2a 38 e8 ad 17  29 a5 03 38 39 27 d7 85 |m.A*8... )..89&amp;#39;..&amp;lt;CR&amp;gt;&amp;lt;LF&amp;gt;
                                         1f 85 d8 e1                                      |....             &amp;lt;ESC&amp;gt;&#x1B;[0m&amp;lt;CR&amp;gt;&amp;lt;LF&amp;gt;
[00:00:00.276,824] &amp;lt;ESC&amp;gt;&#x1B;[0m&amp;lt;inf&amp;gt; bt_hci_core: hci_vs_init: HW Platform: Nordic Semiconductor (0x0002)&amp;lt;ESC&amp;gt;&#x1B;[0m&amp;lt;CR&amp;gt;&amp;lt;LF&amp;gt;
[00:00:00.285,797] &amp;lt;ESC&amp;gt;&#x1B;[0m&amp;lt;inf&amp;gt; bt_hci_core: hci_vs_init: HW Variant: nRF52x (0x0002)&amp;lt;ESC&amp;gt;&#x1B;[0m&amp;lt;CR&amp;gt;&amp;lt;LF&amp;gt;
[00:00:00.293,518] &amp;lt;ESC&amp;gt;&#x1B;[0m&amp;lt;inf&amp;gt; bt_hci_core: hci_vs_init: Firmware: Standard Bluetooth controller (0x00) Version 109.16784 Build 2917677098&amp;lt;ESC&amp;gt;&#x1B;[0m&amp;lt;CR&amp;gt;&amp;lt;LF&amp;gt;
[00:00:00.306,365] &amp;lt;ESC&amp;gt;&#x1B;[0m&amp;lt;inf&amp;gt; bt_hci_core: bt_init: No ID address. App must call settings_load()&amp;lt;ESC&amp;gt;&#x1B;[0m&amp;lt;CR&amp;gt;&amp;lt;LF&amp;gt;
00/00/0000 00:00:00[ami_ble.c: 506] ActualTxPwr:8&amp;lt;CR&amp;gt;&amp;lt;LF&amp;gt;
00/00/0000 00:00:00[ami_ble.c: 788] Bluetooth initialized&amp;lt;CR&amp;gt;&amp;lt;LF&amp;gt;
[00:00:00.325,286] &amp;lt;ESC&amp;gt;&#x1B;[1;33m&amp;lt;wrn&amp;gt; bt_hci_core: bt_set_name: Unable to store name&amp;lt;ESC&amp;gt;&#x1B;[0m&amp;lt;CR&amp;gt;&amp;lt;LF&amp;gt;
[00:00:00.333,099] &amp;lt;ESC&amp;gt;&#x1B;[0m&amp;lt;inf&amp;gt; bt_hci_core: bt_dev_show_info: Identity: C0:F1:EE:C6:31:44 (random)&amp;lt;ESC&amp;gt;&#x1B;[0m&amp;lt;CR&amp;gt;&amp;lt;LF&amp;gt;
[00:00:00.342,010] &amp;lt;ESC&amp;gt;&#x1B;[0m&amp;lt;inf&amp;gt; bt_hci_core: bt_dev_show_info: HCI: version 5.3 (0x0c) revision 0x11fa, manufacturer 0x0059&amp;lt;ESC&amp;gt;&#x1B;[0m&amp;lt;CR&amp;gt;&amp;lt;LF&amp;gt;
[00:00:00.353,057] &amp;lt;ESC&amp;gt;&#x1B;[0m&amp;lt;inf&amp;gt; bt_hci_core: bt_dev_show_info: LMP: version 5.3 (0x0c) subver 0x11fa&amp;lt;ESC&amp;gt;&#x1B;[0m&amp;lt;CR&amp;gt;&amp;lt;LF&amp;gt;
[00:00:00.362,243] &amp;lt;ESC&amp;gt;&#x1B;[1;33m&amp;lt;wrn&amp;gt; bt_hci_core: bt_set_name: Unable to store name&amp;lt;ESC&amp;gt;&#x1B;[0m&amp;lt;CR&amp;gt;&amp;lt;LF&amp;gt;
00/00/0000 00:00:00[ami_ble.c: 555] UpdateAdv x:0 y:0 z:0 Tmp:0 F:0x20&amp;lt;CR&amp;gt;&amp;lt;LF&amp;gt;
00/00/0000 00:00:00[ami_ble.c: 593] AdvertisingStarted&amp;lt;CR&amp;gt;&amp;lt;LF&amp;gt;
00/00/0000 00:00:00[ami_main.c: 676] BootConfirmed&amp;lt;CR&amp;gt;&amp;lt;LF&amp;gt;
00/00/0000 00:00:00[ami_main.c: 683] ResetCause:1&amp;lt;CR&amp;gt;&amp;lt;LF&amp;gt;
[00:00:00.404,693] &amp;lt;ESC&amp;gt;&#x1B;[1;31m&amp;lt;err&amp;gt; bt_gatt: db_hash_store: Failed to save Database Hash (err -2)&amp;lt;ESC&amp;gt;&#x1B;[0m&amp;lt;CR&amp;gt;&amp;lt;LF&amp;gt;
[00:00:00.252,288] &amp;lt;ESC&amp;gt;&#x1B;[0m&amp;lt;inf&amp;gt; board_control: vcom0_pins_routing is ENABLED&amp;lt;ESC&amp;gt;&#x1B;[0m&amp;lt;CR&amp;gt;&amp;lt;LF&amp;gt;
[00:00:00.259,155] &amp;lt;ESC&amp;gt;&#x1B;[0m&amp;lt;inf&amp;gt; board_control: vcom2_pins_routing is ENABLED&amp;lt;ESC&amp;gt;&#x1B;[0m&amp;lt;CR&amp;gt;&amp;lt;LF&amp;gt;
[00:00:00.266,082] &amp;lt;ESC&amp;gt;&#x1B;[0m&amp;lt;inf&amp;gt; board_control: led1_pin_routing is ENABLED&amp;lt;ESC&amp;gt;&#x1B;[0m&amp;lt;CR&amp;gt;&amp;lt;LF&amp;gt;
[00:00:00.272,796] &amp;lt;ESC&amp;gt;&#x1B;[0m&amp;lt;inf&amp;gt; board_control: led2_pin_routing is ENABLED&amp;lt;ESC&amp;gt;&#x1B;[0m&amp;lt;CR&amp;gt;&amp;lt;LF&amp;gt;
[00:00:00.279,541] &amp;lt;ESC&amp;gt;&#x1B;[0m&amp;lt;inf&amp;gt; board_control: led3_pin_routing is ENABLED&amp;lt;ESC&amp;gt;&#x1B;[0m&amp;lt;CR&amp;gt;&amp;lt;LF&amp;gt;
[00:00:00.286,285] &amp;lt;ESC&amp;gt;&#x1B;[0m&amp;lt;inf&amp;gt; board_control: led4_pin_routing is ENABLED&amp;lt;ESC&amp;gt;&#x1B;[0m&amp;lt;CR&amp;gt;&amp;lt;LF&amp;gt;
[00:00:00.293,029] &amp;lt;ESC&amp;gt;&#x1B;[0m&amp;lt;inf&amp;gt; board_control: switch1_pin_routing is ENABLED&amp;lt;ESC&amp;gt;&#x1B;[0m&amp;lt;CR&amp;gt;&amp;lt;LF&amp;gt;
[00:00:00.300,048] &amp;lt;ESC&amp;gt;&#x1B;[0m&amp;lt;inf&amp;gt; board_control: switch2_pin_routing is ENABLED&amp;lt;ESC&amp;gt;&#x1B;[0m&amp;lt;CR&amp;gt;&amp;lt;LF&amp;gt;
[00:00:00.307,037] &amp;lt;ESC&amp;gt;&#x1B;[0m&amp;lt;inf&amp;gt; board_control: button1_pin_routing is ENABLED&amp;lt;ESC&amp;gt;&#x1B;[0m&amp;lt;CR&amp;gt;&amp;lt;LF&amp;gt;
[00:00:00.314,025] &amp;lt;ESC&amp;gt;&#x1B;[0m&amp;lt;inf&amp;gt; board_control: button2_pin_routing is ENABLED&amp;lt;ESC&amp;gt;&#x1B;[0m&amp;lt;CR&amp;gt;&amp;lt;LF&amp;gt;
[00:00:00.321,044] &amp;lt;ESC&amp;gt;&#x1B;[0m&amp;lt;inf&amp;gt; board_control: nrf_interface_pins_0_2_routing is disabled&amp;lt;ESC&amp;gt;&#x1B;[0m&amp;lt;CR&amp;gt;&amp;lt;LF&amp;gt;
[00:00:00.329,101] &amp;lt;ESC&amp;gt;&#x1B;[0m&amp;lt;inf&amp;gt; board_control: nrf_interface_pins_3_5_routing is disabled&amp;lt;ESC&amp;gt;&#x1B;[0m&amp;lt;CR&amp;gt;&amp;lt;LF&amp;gt;
[00:00:00.337,158] &amp;lt;ESC&amp;gt;&#x1B;[0m&amp;lt;inf&amp;gt; board_control: nrf_interface_pins_6_8_routing is disabled&amp;lt;ESC&amp;gt;&#x1B;[0m&amp;lt;CR&amp;gt;&amp;lt;LF&amp;gt;
[00:00:00.345,214] &amp;lt;ESC&amp;gt;&#x1B;[0m&amp;lt;inf&amp;gt; board_control: Board configured.&amp;lt;ESC&amp;gt;&#x1B;[0m&amp;lt;CR&amp;gt;&amp;lt;LF&amp;gt;
*** Booting Zephyr OS build v3.2.99-ncs1 ***&amp;lt;CR&amp;gt;&amp;lt;LF&amp;gt;
[00:00:00.355,102] &amp;lt;ESC&amp;gt;&#x1B;[0m&amp;lt;inf&amp;gt; mcuboot: Starting bootloader&amp;lt;ESC&amp;gt;&#x1B;[0m&amp;lt;CR&amp;gt;&amp;lt;LF&amp;gt;
[00:00:00.361,083] &amp;lt;ESC&amp;gt;&#x1B;[0m&amp;lt;inf&amp;gt; mcuboot: Primary image: magic=unset, swap_type=0x1, copy_done=0x3, image_ok=0x3&amp;lt;ESC&amp;gt;&#x1B;[0m&amp;lt;CR&amp;gt;&amp;lt;LF&amp;gt;
[00:00:00.371,063] &amp;lt;ESC&amp;gt;&#x1B;[0m&amp;lt;inf&amp;gt; mcuboot: Secondary image: magic=unset, swap_type=0x1, copy_done=0x3, image_ok=0x3&amp;lt;ESC&amp;gt;&#x1B;[0m&amp;lt;CR&amp;gt;&amp;lt;LF&amp;gt;
[00:00:00.381,164] &amp;lt;ESC&amp;gt;&#x1B;[0m&amp;lt;inf&amp;gt; mcuboot: Boot source: none&amp;lt;ESC&amp;gt;&#x1B;[0m&amp;lt;CR&amp;gt;&amp;lt;LF&amp;gt;
[00:00:00.386,566] &amp;lt;ESC&amp;gt;&#x1B;[0m&amp;lt;inf&amp;gt; mcuboot: Swap type: none&amp;lt;ESC&amp;gt;&#x1B;[0m&amp;lt;CR&amp;gt;&amp;lt;LF&amp;gt;
[00:00:00.460,662] &amp;lt;ESC&amp;gt;&#x1B;[0m&amp;lt;inf&amp;gt; mcuboot: Bootloader chainload address offset: 0xc000&amp;lt;ESC&amp;gt;&#x1B;[0m&amp;lt;CR&amp;gt;&amp;lt;LF&amp;gt;
[00:00:00.468,231] &amp;lt;ESC&amp;gt;&#x1B;[0m&amp;lt;inf&amp;gt; mcuboot: Jumping to the first image slot&amp;lt;ESC&amp;gt;&#x1B;[0m&amp;lt;CR&amp;gt;
&amp;#255;[00:00:00.000,152] &amp;lt;ESC&amp;gt;&#x1B;[0m&amp;lt;inf&amp;gt; board_control: init: vcom0_pins_routing is ENABLED&amp;lt;ESC&amp;gt;&#x1B;[0m&amp;lt;CR&amp;gt;&amp;lt;LF&amp;gt;
[00:00:00.007,568] &amp;lt;ESC&amp;gt;&#x1B;[0m&amp;lt;inf&amp;gt; board_control: init: vcom2_pins_routing is ENABLED&amp;lt;ESC&amp;gt;&#x1B;[0m&amp;lt;CR&amp;gt;&amp;lt;LF&amp;gt;
[00:00:00.014,984] &amp;lt;ESC&amp;gt;&#x1B;[0m&amp;lt;inf&amp;gt; board_control: init: led1_pin_routing is ENABLED&amp;lt;ESC&amp;gt;&#x1B;[0m&amp;lt;CR&amp;gt;&amp;lt;LF&amp;gt;
[00:00:00.022,247] &amp;lt;ESC&amp;gt;&#x1B;[0m&amp;lt;inf&amp;gt; board_control: init: led2_pin_routing is ENABLED&amp;lt;ESC&amp;gt;&#x1B;[0m&amp;lt;CR&amp;gt;&amp;lt;LF&amp;gt;
[00:00:00.029,510] &amp;lt;ESC&amp;gt;&#x1B;[0m&amp;lt;inf&amp;gt; board_control: init: led3_pin_routing is ENABLED&amp;lt;ESC&amp;gt;&#x1B;[0m&amp;lt;CR&amp;gt;&amp;lt;LF&amp;gt;
[00:00:00.036,773] &amp;lt;ESC&amp;gt;&#x1B;[0m&amp;lt;inf&amp;gt; board_control: init: led4_pin_routing is ENABLED&amp;lt;ESC&amp;gt;&#x1B;[0m&amp;lt;CR&amp;gt;&amp;lt;LF&amp;gt;
[00:00:00.044,067] &amp;lt;ESC&amp;gt;&#x1B;[0m&amp;lt;inf&amp;gt; board_control: init: switch1_pin_routing is ENABLED&amp;lt;ESC&amp;gt;&#x1B;[0m&amp;lt;CR&amp;gt;&amp;lt;LF&amp;gt;
[00:00:00.051,574] &amp;lt;ESC&amp;gt;&#x1B;[0m&amp;lt;inf&amp;gt; board_control: init: switch2_pin_routing is ENABLED&amp;lt;ESC&amp;gt;&#x1B;[0m&amp;lt;CR&amp;gt;&amp;lt;LF&amp;gt;
[00:00:00.059,112] &amp;lt;ESC&amp;gt;&#x1B;[0m&amp;lt;inf&amp;gt; board_control: init: button1_pin_routing is ENABLED&amp;lt;ESC&amp;gt;&#x1B;[0m&amp;lt;CR&amp;gt;&amp;lt;LF&amp;gt;
[00:00:00.066,650] &amp;lt;ESC&amp;gt;&#x1B;[0m&amp;lt;inf&amp;gt; board_control: init: button2_pin_routing is ENABLED&amp;lt;ESC&amp;gt;&#x1B;[0m&amp;lt;CR&amp;gt;&amp;lt;LF&amp;gt;
[00:00:00.074,188] &amp;lt;ESC&amp;gt;&#x1B;[0m&amp;lt;inf&amp;gt; board_control: init: nrf_interface_pins_0_2_routing is disabled&amp;lt;ESC&amp;gt;&#x1B;[0m&amp;lt;CR&amp;gt;&amp;lt;LF&amp;gt;
[00:00:00.082,763] &amp;lt;ESC&amp;gt;&#x1B;[0m&amp;lt;inf&amp;gt; board_control: init: nrf_interface_pins_3_5_routing is disabled&amp;lt;ESC&amp;gt;&#x1B;[0m&amp;lt;CR&amp;gt;&amp;lt;LF&amp;gt;
[00:00:00.091,339] &amp;lt;ESC&amp;gt;&#x1B;[0m&amp;lt;inf&amp;gt; board_control: init: nrf_interface_pins_6_8_routing is disabled&amp;lt;ESC&amp;gt;&#x1B;[0m&amp;lt;CR&amp;gt;&amp;lt;LF&amp;gt;
[00:00:00.099,914] &amp;lt;ESC&amp;gt;&#x1B;[0m&amp;lt;inf&amp;gt; board_control: init: Board configured.&amp;lt;ESC&amp;gt;&#x1B;[0m&amp;lt;CR&amp;gt;&amp;lt;LF&amp;gt;
*** Booting Zephyr OS build v3.2.99-ncs1 ***&amp;lt;CR&amp;gt;&amp;lt;LF&amp;gt;
[00:00:00.110,412] &amp;lt;ESC&amp;gt;&#x1B;[0m&amp;lt;inf&amp;gt; mcumgr_zephyr_grp: zephyr_basic_mgmt_init: Registering Zephyr basic mgmt group&amp;lt;ESC&amp;gt;&#x1B;[0m&amp;lt;CR&amp;gt;&amp;lt;LF&amp;gt;
00/00/0000 00:00:00[ami_main.c: 631] Startup&amp;lt;CR&amp;gt;&amp;lt;LF&amp;gt;
00/00/0000 00:00:00[ami_cfg.c: 256] DeviceID:0&amp;lt;CR&amp;gt;&amp;lt;LF&amp;gt;
00/00/0000 00:00:00[ami_main.c: 448] MainInitErr:4096&amp;lt;CR&amp;gt;&amp;lt;LF&amp;gt;
00/00/0000 00:00:00[ami_main.c: 657] VaporBLE#0 26-Feb-2023 v1.0.0 1.0 2.26&amp;lt;CR&amp;gt;&amp;lt;LF&amp;gt;
build time: Feb 28 2023 11:08:57&amp;lt;CR&amp;gt;&amp;lt;LF&amp;gt;
[00:00:00.245,971] &amp;lt;ESC&amp;gt;&#x1B;[0m&amp;lt;inf&amp;gt; sdc_hci_driver: hci_driver_open: SoftDevice Controller build revision: &amp;lt;CR&amp;gt;&amp;lt;LF&amp;gt;
                                         6d 90 41 2a 38 e8 ad 17  29 a5 03 38 39 27 d7 85 |m.A*8... )..89&amp;#39;..&amp;lt;CR&amp;gt;&amp;lt;LF&amp;gt;
                                         1f 85 d8 e1                                      |....             &amp;lt;ESC&amp;gt;&#x1B;[0m&amp;lt;CR&amp;gt;&amp;lt;LF&amp;gt;
[00:00:00.276,916] &amp;lt;ESC&amp;gt;&#x1B;[0m&amp;lt;inf&amp;gt; bt_hci_core: hci_vs_init: HW Platform: Nordic Semiconductor (0x0002)&amp;lt;ESC&amp;gt;&#x1B;[0m&amp;lt;CR&amp;gt;&amp;lt;LF&amp;gt;
[00:00:00.285,888] &amp;lt;ESC&amp;gt;&#x1B;[0m&amp;lt;inf&amp;gt; bt_hci_core: hci_vs_init: HW Variant: nRF52x (0x0002)&amp;lt;ESC&amp;gt;&#x1B;[0m&amp;lt;CR&amp;gt;&amp;lt;LF&amp;gt;
[00:00:00.293,640] &amp;lt;ESC&amp;gt;&#x1B;[0m&amp;lt;inf&amp;gt; bt_hci_core: hci_vs_init: Firmware: Standard Bluetooth controller (0x00) Version 109.16784 Build 2917677098&amp;lt;ESC&amp;gt;&#x1B;[0m&amp;lt;CR&amp;gt;&amp;lt;LF&amp;gt;
[00:00:00.306,488] &amp;lt;ESC&amp;gt;&#x1B;[0m&amp;lt;inf&amp;gt; bt_hci_core: bt_init: No ID address. App must call settings_load()&amp;lt;ESC&amp;gt;&#x1B;[0m&amp;lt;CR&amp;gt;&amp;lt;LF&amp;gt;
00/00/0000 00:00:00[ami_ble.c: 506] ActualTxPwr:8&amp;lt;CR&amp;gt;&amp;lt;LF&amp;gt;
00/00/0000 00:00:00[ami_ble.c: 788] Bluetooth initialized&amp;lt;CR&amp;gt;&amp;lt;LF&amp;gt;
[00:00:00.325,408] &amp;lt;ESC&amp;gt;&#x1B;[1;33m&amp;lt;wrn&amp;gt; bt_hci_core: bt_set_name: Unable to store name&amp;lt;ESC&amp;gt;&#x1B;[0m&amp;lt;CR&amp;gt;&amp;lt;LF&amp;gt;
[00:00:00.333,251] &amp;lt;ESC&amp;gt;&#x1B;[0m&amp;lt;inf&amp;gt; bt_hci_core: bt_dev_show_info: Identity: C0:F1:EE:C6:31:44 (random)&amp;lt;ESC&amp;gt;&#x1B;[0m&amp;lt;CR&amp;gt;&amp;lt;LF&amp;gt;
[00:00:00.342,132] &amp;lt;ESC&amp;gt;&#x1B;[0m&amp;lt;inf&amp;gt; bt_hci_core: bt_dev_show_info: HCI: version 5.3 (0x0c) revision 0x11fa, manufacturer 0x0059&amp;lt;ESC&amp;gt;&#x1B;[0m&amp;lt;CR&amp;gt;&amp;lt;LF&amp;gt;
[00:00:00.353,179] &amp;lt;ESC&amp;gt;&#x1B;[0m&amp;lt;inf&amp;gt; bt_hci_core: bt_dev_show_info: LMP: version 5.3 (0x0c) subver 0x11fa&amp;lt;ESC&amp;gt;&#x1B;[0m&amp;lt;CR&amp;gt;&amp;lt;LF&amp;gt;
[00:00:00.362,365] &amp;lt;ESC&amp;gt;&#x1B;[1;33m&amp;lt;wrn&amp;gt; bt_hci_core: bt_set_name: Unable to store name&amp;lt;ESC&amp;gt;&#x1B;[0m&amp;lt;CR&amp;gt;&amp;lt;LF&amp;gt;
00/00/0000 00:00:00[ami_ble.c: 555] UpdateAdv x:0 y:0 z:0 Tmp:0 F:0x20&amp;lt;CR&amp;gt;&amp;lt;LF&amp;gt;
00/00/0000 00:00:00[ami_ble.c: 593] AdvertisingStarted&amp;lt;CR&amp;gt;&amp;lt;LF&amp;gt;
00/00/0000 00:00:00[ami_main.c: 676] BootConfirmed&amp;lt;CR&amp;gt;&amp;lt;LF&amp;gt;
00/00/0000 00:00:00[ami_main.c: 683] ResetCause:1&amp;lt;CR&amp;gt;&amp;lt;LF&amp;gt;
[00:00:00.404,815] &amp;lt;ESC&amp;gt;&#x1B;[1;31m&amp;lt;err&amp;gt; bt_gatt: db_hash_store: Failed to save Database Hash (err -2)&amp;lt;ESC&amp;gt;&#x1B;[0m&amp;lt;CR&amp;gt;&amp;lt;LF&amp;gt;
01/01/2004 00:01:00[ami_main.c: 601] NewMin&amp;lt;CR&amp;gt;&amp;lt;LF&amp;gt;
01/01/2004 00:02:00[ami_main.c: 601] NewMin&amp;lt;CR&amp;gt;&amp;lt;LF&amp;gt;
01/01/2004 00:03:00[ami_main.c: 601] NewMin&amp;lt;CR&amp;gt;&amp;lt;LF&amp;gt;
01/01/2004 00:04:00[ami_main.c: 601] NewMin&amp;lt;CR&amp;gt;&amp;lt;LF&amp;gt;
&lt;/pre&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;It does not look that the bootloader showed anything different between the programmer reset and the SMP reset.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&lt;pre class="ui-code" data-mode="text"&gt;*** Booting Zephyr OS build v3.2.99-ncs1 ***&amp;lt;CR&amp;gt;&amp;lt;LF&amp;gt;
[00:00:00.355,041] &amp;lt;ESC&amp;gt;&#x1B;[0m&amp;lt;inf&amp;gt; mcuboot: Starting bootloader&amp;lt;ESC&amp;gt;&#x1B;[0m&amp;lt;CR&amp;gt;&amp;lt;LF&amp;gt;
[00:00:00.360,992] &amp;lt;ESC&amp;gt;&#x1B;[0m&amp;lt;inf&amp;gt; mcuboot: Primary image: magic=unset, swap_type=0x1, copy_done=0x3, image_ok=0x3&amp;lt;ESC&amp;gt;&#x1B;[0m&amp;lt;CR&amp;gt;&amp;lt;LF&amp;gt;
[00:00:00.370,971] &amp;lt;ESC&amp;gt;&#x1B;[0m&amp;lt;inf&amp;gt; mcuboot: Secondary image: magic=unset, swap_type=0x1, copy_done=0x3, image_ok=0x3&amp;lt;ESC&amp;gt;&#x1B;[0m&amp;lt;CR&amp;gt;&amp;lt;LF&amp;gt;
[00:00:00.381,072] &amp;lt;ESC&amp;gt;&#x1B;[0m&amp;lt;inf&amp;gt; mcuboot: Boot source: none&amp;lt;ESC&amp;gt;&#x1B;[0m&amp;lt;CR&amp;gt;&amp;lt;LF&amp;gt;
[00:00:00.386,474] &amp;lt;ESC&amp;gt;&#x1B;[0m&amp;lt;inf&amp;gt; mcuboot: Swap type: none&amp;lt;ESC&amp;gt;&#x1B;[0m&amp;lt;CR&amp;gt;&amp;lt;LF&amp;gt;
[00:00:00.460,571] &amp;lt;ESC&amp;gt;&#x1B;[0m&amp;lt;inf&amp;gt; mcuboot: Bootloader chainload address offset: 0xc000&amp;lt;ESC&amp;gt;&#x1B;[0m&amp;lt;CR&amp;gt;&amp;lt;LF&amp;gt;
[00:00:00.468,139] &amp;lt;ESC&amp;gt;&#x1B;[0m&amp;lt;inf&amp;gt; mcuboot: Jumping to the first image slot&amp;lt;ESC&amp;gt;&#x1B;[0m&amp;lt;CR&amp;gt;
======================================================================
*** Booting Zephyr OS build v3.2.99-ncs1 ***&amp;lt;CR&amp;gt;&amp;lt;LF&amp;gt;
[00:00:00.355,102] &amp;lt;ESC&amp;gt;&#x1B;[0m&amp;lt;inf&amp;gt; mcuboot: Starting bootloader&amp;lt;ESC&amp;gt;&#x1B;[0m&amp;lt;CR&amp;gt;&amp;lt;LF&amp;gt;
[00:00:00.361,083] &amp;lt;ESC&amp;gt;&#x1B;[0m&amp;lt;inf&amp;gt; mcuboot: Primary image: magic=unset, swap_type=0x1, copy_done=0x3, image_ok=0x3&amp;lt;ESC&amp;gt;&#x1B;[0m&amp;lt;CR&amp;gt;&amp;lt;LF&amp;gt;
[00:00:00.371,063] &amp;lt;ESC&amp;gt;&#x1B;[0m&amp;lt;inf&amp;gt; mcuboot: Secondary image: magic=unset, swap_type=0x1, copy_done=0x3, image_ok=0x3&amp;lt;ESC&amp;gt;&#x1B;[0m&amp;lt;CR&amp;gt;&amp;lt;LF&amp;gt;
[00:00:00.381,164] &amp;lt;ESC&amp;gt;&#x1B;[0m&amp;lt;inf&amp;gt; mcuboot: Boot source: none&amp;lt;ESC&amp;gt;&#x1B;[0m&amp;lt;CR&amp;gt;&amp;lt;LF&amp;gt;
[00:00:00.386,566] &amp;lt;ESC&amp;gt;&#x1B;[0m&amp;lt;inf&amp;gt; mcuboot: Swap type: none&amp;lt;ESC&amp;gt;&#x1B;[0m&amp;lt;CR&amp;gt;&amp;lt;LF&amp;gt;
[00:00:00.460,662] &amp;lt;ESC&amp;gt;&#x1B;[0m&amp;lt;inf&amp;gt; mcuboot: Bootloader chainload address offset: 0xc000&amp;lt;ESC&amp;gt;&#x1B;[0m&amp;lt;CR&amp;gt;&amp;lt;LF&amp;gt;
[00:00:00.468,231] &amp;lt;ESC&amp;gt;&#x1B;[0m&amp;lt;inf&amp;gt; mcuboot: Jumping to the first image slot&amp;lt;ESC&amp;gt;&#x1B;[0m&amp;lt;CR&amp;gt;
&lt;/pre&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Next, I tried to use my nRF52840-DK as the Central with your code and my&amp;nbsp;nRF9160-DK as the sensor.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;After using the&amp;nbsp;JFlash.ex flash program to upload the app_update.bin file to&amp;nbsp;0x86000 not 0x50000 and&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;changing the connection UUID to the one I use, the Central connected.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;I pressed button#1 and got a list with only one slot the first time and the second time two slots.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;(Both times the upload failed).&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;When&amp;nbsp;pressed button#2 and saw that the central tries to upload all of second slot and not just the image size. &lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Is this what you saw too?&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Maybe I should upload with my code the entire slot instead of just the app_update.bin file size?&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Should the padded data be zero or 0xFF?&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;In any case, I got an error at almost the end of the upload from the end unit:&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&lt;pre class="ui-code" data-mode="text"&gt;*** Booting Zephyr OS build v3.2.99-ncs1 ***
I: Starting bootloader
I: Primary image: magic=unset, swap_type=0x1, copy_done=0x3, image_ok=0x3
I: Secondary image: magic=unset, swap_type=0x1, copy_done=0x3, image_ok=0x3
I: Boot source: none
I: Swap type: none
I: Bootloader chainload address offset: 0xc000
*** Booting Zephyr OS build v3.2.99-ncs1 ***
Starting Bluetooth Central SMP Client example
I: SoftDevice Controller build revision:
I: 6d 90 41 2a 38 e8 ad 17 |m.A*8...
I: 29 a5 03 38 39 27 d7 85 |)..89&amp;#39;..
I: 1f 85 d8 e1             |....
I: HW Platform: Nordic Semiconductor (0x0002)
I: HW Variant: nRF52x (0x0002)
I: Firmware: Standard Bluetooth controller (0x00) Version 109.16784 Build 2917677098
I: Identity: DF:EE:12:96:B1:89 (random)
I: HCI: version 5.3 (0x0c) revision 0x11fa, manufacturer 0x0059
I: LMP: version 5.3 (0x0c) subver 0x11fa
Bluetooth initialized
Scanning successfully started
Filters matched. Address: C0:F1:EE:C6:31:44 (random) connectable: yes
Image list command send error (err: -6)
Connected: C0:F1:EE:C6:31:44 (random)
MTU exchange pending
E: pairing failed (peer reason 0x3)
Security failed: C0:F1:EE:C6:31:44 (random) level 1 err 4
MTU exchange successful
Current MTU: 498
The discovery procedure succeeded

-----------PRIMARY IMAGE-----------
      slot: 0
      version: 0.0.0
      hash: 0x67fb72f73a0fda917c78ad444dbdbc7955e1b12842a66a1222f4ca95a6f0
      bootable: true
      pending: false
      confirmed: true
      active: true
      permanent: false

-----------SECONDARY IMAGE-----------
      slot: 1
      version: 0.0.0
      hash: 0x67fb72f73a0fda917c78ad444dbdbc7955e1b12842a66a1222f4ca95a6f0
      bootable: true
      pending: false
      confirmed: false
      active: false
      permanent: false
[  95% ] |===============================================   | (474900/499712 bytes)Error in image upload response: 1

&lt;/pre&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;I tried the nRF52840 Central updating my custom sensor and got the same error:&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;[ 95% ] |=============================================== | (474900/499712 bytes)Error in image upload response: 1&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;So, I can&amp;#39;t reproduce a DFU successfully like you, so it is evident that I am doing more than one thing wrong.&lt;/p&gt;
&lt;p&gt;Thanks David&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nrf52840 S140 Central DFU  Bluetooth Zephyr 2.0.0 nrf52840 peripheral</title><link>https://devzone.nordicsemi.com/thread/412173?ContentTypeID=1</link><pubDate>Mon, 27 Feb 2023 08:27:10 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:a5cf4bfb-b096-484e-97b7-c7e224532945</guid><dc:creator>Sigurd Hellesvik</dc:creator><description>[quote user="DavidKaplan"]What am I missing?[/quote]
&lt;p&gt;To test UART logging from the nRF52840 on the nRF9160, do the following:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;Go to zephyr/samples/hello_world.&lt;/li&gt;
&lt;li&gt;Build for &amp;quot;nrf9160dk_nrf52840&amp;quot;.&lt;/li&gt;
&lt;li&gt;Flip the switch on nRF9160DK to nRF52.&lt;/li&gt;
&lt;li&gt;Program.&lt;/li&gt;
&lt;li&gt;Connect a serial terminal to VCOM1 and see it log &amp;quot;Hello World ...&amp;quot;&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;I did this, and it printed for me.&lt;/p&gt;
[quote user="DavidKaplan"]Could you just post your board files?[/quote]
&lt;p&gt;I just used the default board files for the DKs; see &lt;a href="https://github.com/nrfconnect/sdk-zephyr/tree/main/boards/arm"&gt;Zephyr arm boards&lt;/a&gt;.&lt;br /&gt;For the nRF52840DK, I used nrf52840dk_nrf52840.&lt;/p&gt;
&lt;p&gt;Regards,&lt;br /&gt;Sigurd Hellesvik&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nrf52840 S140 Central DFU  Bluetooth Zephyr 2.0.0 nrf52840 peripheral</title><link>https://devzone.nordicsemi.com/thread/412100?ContentTypeID=1</link><pubDate>Sun, 26 Feb 2023 05:40:50 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:58796e93-e331-4061-b15e-d8b514ffb34b</guid><dc:creator>DavidKaplan</dc:creator><description>&lt;p&gt;Sorry but for some reason I could not get the nRF9160-Dk &amp;#39;s nrf52840 to output anything on its uart.&lt;/p&gt;
&lt;p&gt;According to the documentation, it should output on VCOM1 using uart TX P0.3 &amp;amp; RX P0.5.&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;# ----------------------------------------
# USE Uart Instead of RTT
# ----------------------------------------
CONFIG_UART_CONSOLE=y
CONFIG_LOG_BACKEND_UART=y
CONFIG_SERIAL=y
# ----------------------------------------
# Enable UART console, for printk()
# ----------------------------------------
CONFIG_CONSOLE_HANDLER=n
CONFIG_CONSOLE=y
CONFIG_PRINTK=y

# ----------------------------------------
# USE RTT  Instead of Uart
# ----------------------------------------
#CONFIG_CONSOLE=y
#CONFIG_RTT_CONSOLE=y
#CONFIG_USE_SEGGER_RTT=y
#CONFIG_LOG_BACKEND_RTT=y
&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;What am I missing?&lt;/p&gt;
&lt;p&gt;Could you just post your board files?&lt;/p&gt;
&lt;p&gt;Also, on my central zephyr v2.2.0 complains about not using pin ctrl for the uart.&lt;/p&gt;
&lt;p&gt;I added the&amp;nbsp;ms88sf2-pinctrl.dtsi file which I included in&amp;nbsp;ms88sf2.dts&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;
&amp;amp;uart1 {
	status = &amp;quot;okay&amp;quot;;
	current-speed = &amp;lt;115200&amp;gt;;
	pinctrl-0 = &amp;lt;&amp;amp;uart1_default&amp;gt;;
	pinctrl-1 = &amp;lt;&amp;amp;uart1_sleep&amp;gt;;
	pinctrl-names = &amp;quot;default&amp;quot;, &amp;quot;sleep&amp;quot;;
};
&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;&amp;amp;pinctrl {
	uart1_default: uart1_default {
		group1 {
			psels = &amp;lt;NRF_PSEL(UART_TX, 0, 3)&amp;gt;,
				&amp;lt;NRF_PSEL(UART_RTS, 1, 8)&amp;gt;;
		};
		group2 {
			psels = &amp;lt;NRF_PSEL(UART_RX, 0, 5)&amp;gt;,
				&amp;lt;NRF_PSEL(UART_CTS, 0, 7)&amp;gt;;
			bias-pull-up;
		};
	};

	uart1_sleep: uart1_sleep {
		group1 {
			psels = &amp;lt;NRF_PSEL(UART_TX, 0, 3)&amp;gt;,
				&amp;lt;NRF_PSEL(UART_RX, 0, 5)&amp;gt;,
				&amp;lt;NRF_PSEL(UART_RTS, 1, 8)&amp;gt;,
				&amp;lt;NRF_PSEL(UART_CTS, 0, 7)&amp;gt;;
			low-power-enable;
		};
	};

};
&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;                 from C:\ncs\v2.2.0\zephyr\drivers\serial\uart_nrfx_uarte.c:11:
C:\ncs\v2.2.0\zephyr\include\zephyr\toolchain\gcc.h:77:36: error: static assertion failed: &amp;quot;/soc/uart@40028000 defined without required pin configuration&amp;quot;
   77 | #define BUILD_ASSERT(EXPR, MSG...) _Static_assert(EXPR, &amp;quot;&amp;quot; MSG)
      |                                    ^~~~~~~~~~~~~~
c:\ncs\v2.2.0\zephyr\soc\arm\nordic_nrf\common\soc_nrf_common.h:218:9: note: in expansion of macro &amp;#39;BUILD_ASSERT&amp;#39;
  218 |         BUILD_ASSERT((IS_ENABLED(CONFIG_PINCTRL) &amp;amp;&amp;amp;                     \
      |         ^~~~~~~~~~~~
C:\ncs\v2.2.0\zephyr\drivers\serial\uart_nrfx_uarte.c:2080:9: note: in expansion of macro &amp;#39;NRF_DT_CHECK_PIN_ASSIGNMENTS&amp;#39;
 2080 |         NRF_DT_CHECK_PIN_ASSIGNMENTS(UARTE(idx), 1,                            \
      |         ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
C:\ncs\v2.2.0\zephyr\drivers\serial\uart_nrfx_uarte.c:2189:1: note: in expansion of macro &amp;#39;UART_NRF_UARTE_DEVICE&amp;#39;
 2189 | UART_NRF_UARTE_DEVICE(1);
      | ^~~~~~~~~~~~~~~~~~~~~
C:\ncs\v2.2.0\zephyr\include\zephyr\toolchain\gcc.h:77:36: error: static assertion failed: &amp;quot;/soc/uart@40028000 has pinctrl states defined although PINCTRL is not enabled&amp;quot;
   77 | #define BUILD_ASSERT(EXPR, MSG...) _Static_assert(EXPR, &amp;quot;&amp;quot; MSG)
      |                                    ^~~~~~~~~~~~~~
c:\ncs\v2.2.0\zephyr\soc\arm\nordic_nrf\common\soc_nrf_common.h:234:9: note: in expansion of macro &amp;#39;BUILD_ASSERT&amp;#39;
  234 |         BUILD_ASSERT(IS_ENABLED(CONFIG_PINCTRL) ||                      \
      |         ^~~~~~~~~~~~
C:\ncs\v2.2.0\zephyr\drivers\serial\uart_nrfx_uarte.c:2080:9: note: in expansion of macro &amp;#39;NRF_DT_CHECK_PIN_ASSIGNMENTS&amp;#39;
 2080 |         NRF_DT_CHECK_PIN_ASSIGNMENTS(UARTE(idx), 1,                            \
      |         ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
C:\ncs\v2.2.0\zephyr\drivers\serial\uart_nrfx_uarte.c:2189:1: note: in expansion of macro &amp;#39;UART_NRF_UARTE_DEVICE&amp;#39;
 2189 | UART_NRF_UARTE_DEVICE(1);
      | ^~~~~~~~~~~~~~~~~~~~~&lt;/pre&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nrf52840 S140 Central DFU  Bluetooth Zephyr 2.0.0 nrf52840 peripheral</title><link>https://devzone.nordicsemi.com/thread/411963?ContentTypeID=1</link><pubDate>Fri, 24 Feb 2023 12:48:58 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:dd3fd310-0d27-4d2d-b6b5-f794c893dff5</guid><dc:creator>Sigurd Hellesvik</dc:creator><description>[quote user="DavidKaplan"]&lt;p&gt;&lt;span&gt;I cannot see any bootloader mcuboot&amp;nbsp; information&amp;nbsp;in the nRF9160 RTT log.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;So How did you get it?&amp;nbsp;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;What am I doing wrong?&lt;/span&gt;&lt;/p&gt;[/quote]
&lt;p&gt;Aha, this was a misunderstanding.&lt;/p&gt;
&lt;p&gt;Since working with the Development Kit, I used UART for logging.&lt;/p&gt;
&lt;p&gt;I have used RTT for logging from the Bootloader before, but I remember it to be unstable.&lt;br /&gt;Whether you want to continue trying to make Bootloader RTT work is up to you.&lt;/p&gt;
&lt;p&gt;Have you been able to update the peripheral using the changes I made to the SMP Client?&lt;/p&gt;
&lt;p&gt;Regards,&lt;br /&gt;Sigurd Hellesvik&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nrf52840 S140 Central DFU  Bluetooth Zephyr 2.0.0 nrf52840 peripheral</title><link>https://devzone.nordicsemi.com/thread/411673?ContentTypeID=1</link><pubDate>Thu, 23 Feb 2023 13:42:49 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:cfd46554-4511-45d0-b08e-c1a5696b41a9</guid><dc:creator>DavidKaplan</dc:creator><description>&lt;p&gt;I understand the mcuboot configuration as you explained,&amp;nbsp;&lt;span&gt;mcuboot.conf are additions and&amp;nbsp;prj.conf override.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Then you say that you used my project definitions and get mcuboot information&amp;nbsp;on the peripheral&amp;nbsp;without any changes in the RTT log?&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;I cannot see any bootloader mcuboot&amp;nbsp; information&amp;nbsp;in the nRF9160 RTT log.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;So How did you get it?&amp;nbsp;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;What am I doing wrong?&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Your log:&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&lt;pre class="ui-code" data-mode="text"&gt;*** Booting Zephyr OS build v3.2.99-ncs1 ***
I: Starting bootloader
I: Primary image: magic=good, swap_type=0x2, copy_done=0x1, image_ok=0x1
I: Secondary image: magic=good, swap_type=0x2, copy_done=0x3, image_ok=0x3
I: Boot source: none
I: Swap type: test
I: Starting swap using move algorithm.
I: Bootloader chainload address offset: 0xc000
*** Booting Zephyr OS build v3.2.99-ncs1 ***
[00:00:00.000,610] &amp;lt;inf&amp;gt; mcumgr_zephyr_grp: zephyr_basic_mgmt_init: Registering Zephyr basic mgmt group
FFFFFFFFFFFFFFFFFFFFF
&lt;/pre&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;My log:&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&lt;pre class="ui-code" data-mode="text"&gt;00&amp;gt; SEGGER J-Link V7.66a - Real time terminal output
00&amp;gt; J-Link OB-K22-NordicSemi compiled Nov  7 2022 16:21:34 V1.0, SN=960005601
00&amp;gt; Process: JLinkGDBServerCL.exe
00&amp;gt; [00:00:00.035,827] &amp;lt;err&amp;gt; LSM6DSL: lsm6dsl_init: Failed to initialize chip
00&amp;gt; *** Booting Zephyr OS build v3.2.99-ncs1 ***
00&amp;gt; [00:00:00.036,529] &amp;lt;inf&amp;gt; mcumgr_zephyr_grp: zephyr_basic_mgmt_init: Registering Zephyr basic mgmt group
00&amp;gt; 00/00/0000 00:00:00[ami_main.c: 631] Startup
&lt;/pre&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;When I upload does the&amp;nbsp;peripheral information seem OK?&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&lt;pre class="ui-code" data-mode="text"&gt;00&amp;gt; 22/02/2023 20:31:29[ami_main.c: 175] Connection parameters updated.
00&amp;gt;  interval: 40, latency: 0, timeout: 42
00&amp;gt; ARRAY_SIZE(image_upload_decode): [6]
00&amp;gt; req.off [0]
00&amp;gt; req.size [319026]
00&amp;gt; req.upgrade [0]
00&amp;gt; req.image [0]
00&amp;gt; req.img_data.len [400]
00&amp;gt; req.img_data.value [536969252]
00&amp;gt; req.data_sha.len [5]
00&amp;gt; req.data_sha.value [536969671]
&lt;/pre&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Thanks, and have a good weekend, David&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nrf52840 S140 Central DFU  Bluetooth Zephyr 2.0.0 nrf52840 peripheral</title><link>https://devzone.nordicsemi.com/thread/411671?ContentTypeID=1</link><pubDate>Thu, 23 Feb 2023 13:31:53 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:da718b53-ad04-49cf-bdce-366f0e0b5d19</guid><dc:creator>Sigurd Hellesvik</dc:creator><description>[quote user="DavidKaplan"]Could you please send me your nRF9160-Dk or other board&amp;#39;s child mcuboot.conf file and the prg.conf file that you tested?[/quote]
&lt;p&gt;For the SMP Server, I used code supplied by you,&lt;/p&gt;
&lt;p&gt;I used my &lt;a href="https://github.com/hellesvik-nordic/samples_for_nrf_connect_sdk/tree/main/bootloader_samples/client_smp/smp_client_ble"&gt;Bluetooth: Central SMP Client DFU&lt;/a&gt; sample for the SMP Client. The only change was the UUID to make it connect to your device.&lt;br /&gt;This sample is an edited version of Simon&amp;#39;s example.&lt;/p&gt;
[quote user="DavidKaplan"]Is the child&amp;nbsp;&lt;span&gt;mcuboot.conf file&amp;nbsp;just additions to the default mcuboot prog.conf file?&lt;/span&gt;[/quote]
&lt;p&gt;Yes. child_image/mcuboot.conf is added as extra configurations to the &lt;a href="https://github.com/nrfconnect/sdk-mcuboot/blob/main/boot/zephyr/prj.conf"&gt;MCUboot default prj.conf&lt;/a&gt;.&lt;br /&gt;However, if you use child_image/mcuboot/prj.conf, it will overwrite the MCUboot configuration. I do not recommend using child_image/mcuboot/prj.conf.&lt;/p&gt;
&lt;p&gt;Regards,&lt;br /&gt;Sigurd Hellesvik&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nrf52840 S140 Central DFU  Bluetooth Zephyr 2.0.0 nrf52840 peripheral</title><link>https://devzone.nordicsemi.com/thread/411531?ContentTypeID=1</link><pubDate>Thu, 23 Feb 2023 07:13:55 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:1c047fdf-7b7f-4eb8-b4db-ac024b93fc40</guid><dc:creator>DavidKaplan</dc:creator><description>&lt;p&gt;OK, you are of course correct about the last block and upload_chuck being updated.&lt;/p&gt;
&lt;p&gt;My Central code reports that the DFU goes well but the nRF9160-DK and my custom end units still do not upgrade.&lt;/p&gt;
&lt;p&gt;&amp;nbsp;The image checksum compared to my harddrive is the same.&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;[ami_smp.c: 676] DFU:317200/319026
[ami_smp.c: 676] DFU:317600/319026
[ami_smp.c: 676] DFU:318000/319026
[ami_smp.c: 676] DFU:318400/319026
[ami_smp.c: 676] DFU:318800/319026
[ami_smp.c: 777] ImageChecksum AF3A0C7A
[ami_smp.c: 911] SMP UploadOK
[ami_smp.c:1192] ImageList

-----------PRIMARY IMAGE-----------
      slot: 0
      version: 0.0.0
      hash: 0x76d196d413b84fe1177ba6c33a79744f579a07298a6a282d97ffd7a73d82ee6
      bootable: true
      pending: false
      confirmed: true
      active: true
      permanent: false

-----------SECONDARY IMAGE-----------
      slot: 1
      version: 0.0.0
      hash: 0x4165b6dabeb5dfab85e276b4e927b2e32358d38f1ef8d698617c5f449a095
      bootable: true
      pending: false
      confirmed: false
      active: false
      permanent: false
[ami_smp.c:1195] ImageTest

-----------PRIMARY IMAGE-----------
      slot: 0
      version: 0.0.0
      hash: 0x76d196d413b84fe1177ba6c33a79744f579a07298a6a282d97ffd7a73d82ee6
      bootable: true
      pending: false
      confirmed: true
      active: true
      permanent: false

-----------SECONDARY IMAGE-----------
      slot: 1
      version: 0.0.0
      hash: 0x4165b6dabeb5dfab85e276b4e927b2e32358d38f1ef8d698617c5f449a095
      bootable: true
      pending: true
      confirmed: false
      active: false
      permanent: false
[ami_smp.c:1198] ImageReset
22/02/2023 20:49:50[ami_ble.c: 861] Disconnected: C0:F1:EE:C6:31:44 (random) (reason 8)
[ami_ble.c:2639] DFUConnectFinishedErr:0
&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;#define UPLOAD_CHUNK		400 // (50 worked) This has to be at least 32 bytes, since first it has to send the whole header (which is 32 bytes)
void send_upload2(void)
{
        uint8_t       data[UPLOAD_CHUNK+1]; // One more byte, to store &amp;#39;/0&amp;#39;
	    zcbor_state_t zse[2];
  	    size_t        payload_len;
		int           start_addr   = 0; // AMI_VIBEBT_PM_MCUBOOT_SECONDARY_ADDRESS; 
		int           last_addr    = 0; // AMI_VIBEBT_PM_MCUBOOT_SECONDARY_ADDRESS+ami_state-&amp;gt;dfu.ImageSize.ulong; 
		int           curr_addr    = 0; // AMI_VIBEBT_PM_MCUBOOT_SECONDARY_ADDRESS;
		int           upload_chunk = UPLOAD_CHUNK;
		int           err;
        uint64_t      off = 0;
	    bool          update_complete = false;
        uint8_t       encode_len;

		ami_state-&amp;gt;DFUErr                 = AMI_SMP_DFU_ERR_OK;
        ami_state-&amp;gt;dfu.uAddChecksum.word  = 0;
        ami_state-&amp;gt;dfu.uXORChecksum       = 0;
		while (!update_complete){
			struct smp_buffer smp_cmd;
			zcbor_new_encode_state(zse, ARRAY_SIZE(zse), smp_cmd.payload,sizeof(smp_cmd.payload), 0);
			//-----------------------------------------------------------------
			// Wait until response is received until sending the next chunk
			//-----------------------------------------------------------------
			// ?!? err = k_sem_take(&amp;amp;upload_sem, K_MSEC(AMI_DFU_MAX_SEND_ACK_MS));		    
			k_sem_take(&amp;amp;upload_sem, K_FOREVER);
			last_addr    = ami_state-&amp;gt;dfu.ImageSize.ulong;
            err = 0;
			if (ami_state-&amp;gt;DFUErr){
			  d_printf(LINE_INFO,kDbg_Error|kDbg_Host,&amp;quot;SMPErr:%u&amp;quot;,ami_state-&amp;gt;DFUErr);
			  update_complete = true;
			  break;
			}
			//-------------------------------------------------------
			// Disconnected?
			//-------------------------------------------------------
			if (!atomic_get(&amp;amp;ble_connected)){
			  ami_state-&amp;gt;DFUErr = AMI_DFU_ERR_DISCONNECTED;
			  update_complete = true;
			  break;
			}
			//-----------------------------------------------------------------
			// No Error but semiphore times out!
			//-----------------------------------------------------------------
			if (err){
			  ami_state-&amp;gt;DFUErr = AMI_SMP_DFU_ERR_LOOP_TIMEOUT;
			  update_complete = true;
			  break;
			}
			//-----------------------------------------------------------------
			// Last block?
			//-----------------------------------------------------------------
			if ((curr_addr+UPLOAD_CHUNK) &amp;gt; last_addr){
				upload_chunk = last_addr - curr_addr;
				update_complete = true;
			}
			progress_print(curr_addr-start_addr,last_addr-start_addr);
			//-----------------------------------------------------------------
			// Get the data block from ringbuffer
			//-----------------------------------------------------------------
			ami_state-&amp;gt;DFUErr = ami_smp_RetDataBlock(data,upload_chunk);
			if (ami_state-&amp;gt;DFUErr){ 
			  update_complete = true;
			  break;
			}
			//-----------------------------------------------------------------
			// First block add image size
			//-----------------------------------------------------------------
			off = curr_addr - start_addr;
			if (off == 0){
				encode_len = 8;
			} else {
				encode_len = 6;
			}
			data[upload_chunk] = &amp;#39;\0&amp;#39;;
			zse-&amp;gt;constant_state-&amp;gt;stop_on_error = true;
			zcbor_map_start_encode(zse, encode_len);
			zcbor_tstr_put_lit(zse, &amp;quot;image&amp;quot;);
			zcbor_int64_put(zse, 0);
			zcbor_tstr_put_lit(zse, &amp;quot;data&amp;quot;);
			zcbor_bstr_put_lit(zse, data);
			if(off == 0){
				zcbor_tstr_put_lit(zse, &amp;quot;len&amp;quot;);
				zcbor_uint64_put(zse, (uint64_t)last_addr-start_addr);
			}
			zcbor_tstr_put_lit(zse, &amp;quot;off&amp;quot;);
			zcbor_uint64_put(zse, off);
			if(off == 0){
				zcbor_tstr_put_lit(zse, &amp;quot;sha&amp;quot;);
				zcbor_bstr_put_lit(zse, &amp;quot;12345&amp;quot;);
			}
			zcbor_tstr_put_lit(zse, &amp;quot;upgrade&amp;quot;);
			zcbor_bool_put(zse, false);
			zcbor_map_end_encode(zse, encode_len);

			if (!zcbor_check_error(zse)) {
				d_printf(LINE_INFO,kDbg_Error|kDbg_Host,&amp;quot;Failed to encode SMP test packet, err: %d&amp;quot;, zcbor_pop_error(zse));
				ami_state-&amp;gt;DFUErr = AMI_SMP_DFU_ERR_UPLOAD_ENCODE;
				break;
			}
			curr_addr+=upload_chunk;
			payload_len = (size_t)(zse-&amp;gt;payload - smp_cmd.payload);
			smp_cmd.header.op = 2; /* write request */
			smp_cmd.header.flags = 0;
			smp_cmd.header.len_h8 = (uint8_t)((payload_len &amp;gt;&amp;gt; 8) &amp;amp; 0xFF);
			smp_cmd.header.len_l8 = (uint8_t)((payload_len &amp;gt;&amp;gt; 0) &amp;amp; 0xFF);
			smp_cmd.header.group_h8 = 0;
			smp_cmd.header.group_l8 = 1; /* IMAGE */
			smp_cmd.header.seq = 0;
			smp_cmd.header.id  = 1; /* UPLOAD */
			//-----------------------------------------------------------------
			// ZCBOR error?
			//-----------------------------------------------------------------
			err = bt_dfu_smp_command(&amp;amp;dfu_smp,smp_upload_rsp_proc,sizeof(smp_cmd.header)+payload_len,&amp;amp;smp_cmd); 
			if (err){
			  d_printf(LINE_INFO,kDbg_Error|kDbg_Host,&amp;quot;bt_dfu_smp_command failed with %d&amp;quot;, err);
			  ami_state-&amp;gt;DFUErr = AMI_SMP_DFU_ERR_SEND;
			  break;
			}
		} // while
		if (!ami_state-&amp;gt;DFUErr){
		  ami_smp_PrintChecksums();
		  d_printf(LINE_INFO,kDbg_General|kDbg_Host,&amp;quot;SMP UploadOK&amp;quot;);
		}
  	    atomic_set(&amp;amp;smp_finished,true);
} // send_upload2
&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;Could you please send me your nRF9160-Dk or other board&amp;#39;s child mcuboot.conf file and the prg.conf file that you tested?&lt;/p&gt;
&lt;p&gt;Is the child&amp;nbsp;&lt;span&gt;mcuboot.conf file&amp;nbsp;just additions to the default mcuboot prog.conf file?&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;I still can&amp;#39;t get the bootloader to output anything in the sensor&amp;#39;s RTT log, but I see the additional printks&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;00&amp;gt; ARRAY_SIZE(image_upload_decode): [6]&lt;/strong&gt;&lt;br /&gt;&lt;strong&gt;00&amp;gt; req.off [0]&lt;/strong&gt;&lt;br /&gt;&lt;strong&gt;00&amp;gt; req.size [319026]&lt;/strong&gt;&lt;br /&gt;&lt;strong&gt;00&amp;gt; req.upgrade [0]&lt;/strong&gt;&lt;br /&gt;&lt;strong&gt;00&amp;gt; req.image [0]&lt;/strong&gt;&lt;br /&gt;&lt;strong&gt;00&amp;gt; req.img_data.len [400]&lt;/strong&gt;&lt;br /&gt;&lt;strong&gt;00&amp;gt; req.img_data.value [536969252]&lt;/strong&gt;&lt;br /&gt;&lt;strong&gt;00&amp;gt; req.data_sha.len [5]&lt;/strong&gt;&lt;br /&gt;&lt;strong&gt;00&amp;gt; req.data_sha.value [536969671]&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;(Connection lost)
00&amp;gt; SEGGER J-Link V7.66a - Real time terminal output
00&amp;gt; J-Link OB-K22-NordicSemi compiled Nov  7 2022 16:21:34 V1.0, SN=960005601
00&amp;gt; Process: JLinkGDBServerCL.exe
00&amp;gt; [00:00:00.035,827] &amp;lt;err&amp;gt; LSM6DSL: lsm6dsl_init: Failed to initialize chip
00&amp;gt; *** Booting Zephyr OS build v3.2.99-ncs1 ***
00&amp;gt; [00:00:00.036,529] &amp;lt;inf&amp;gt; mcumgr_zephyr_grp: zephyr_basic_mgmt_init: Registering Zephyr basic mgmt group
00&amp;gt; 00/00/0000 00:00:00[ami_main.c: 631] Startup
00&amp;gt; 00/00/0000 00:00:00[ami_cfg.c: 256] DeviceID:0
00&amp;gt; 00/00/0000 00:00:00[ami_main.c: 448] MainInitErr:4096
00&amp;gt; 00/00/0000 00:00:00[ami_main.c: 657] VaporBLE#0 23-Feb-2023 v1.0.0 1.0 2.23
00&amp;gt; build time: Feb 23 2023 08:27:22
00&amp;gt; [00:00:00.141,448] &amp;lt;inf&amp;gt; sdc_hci_driver: hci_driver_open: SoftDevice Controller build revision:
00&amp;gt;                                          6d 90 41 2a 38 e8 ad 17  29 a5 03 38 39 27 d7 85 |m.A*8... )..89&amp;#39;..
00&amp;gt;                                          1f 85 d8 e1                                      |....
00&amp;gt; [00:00:00.145,721] &amp;lt;inf&amp;gt; bt_hci_core: hci_vs_init: HW Platform: Nordic Semiconductor (0x0002)
00&amp;gt; [00:00:00.146,240] &amp;lt;inf&amp;gt; bt_hci_core: hci_vs_init: HW Variant: nRF52x (0x0002)
00&amp;gt; [00:00:00.146,728] &amp;lt;inf&amp;gt; bt_hci_core: hci_vs_init: Firmware: Standard Bluetooth controller (0x00) Version 109.16784 Build 2917677098
00&amp;gt; [00:00:00.147,827] &amp;lt;inf&amp;gt; bt_hci_core: bt_init: No ID address. App must call settings_load()
00&amp;gt; 00/00/0000 00:00:00[ami_ble.c: 506] ActualTxPwr:8
00&amp;gt; 00/00/0000 00:00:00[ami_ble.c: 788] Bluetooth initialized
00&amp;gt; [00:00:00.149,383] &amp;lt;wrn&amp;gt; bt_hci_core: bt_set_name: Unable to store name
00&amp;gt; [00:00:00.150,299] &amp;lt;inf&amp;gt; bt_hci_core: bt_dev_show_info: Identity: C0:F1:EE:C6:31:44 (random)
00&amp;gt; [00:00:00.150,817] &amp;lt;inf&amp;gt; bt_hci_core: bt_dev_show_info: HCI: version 5.3 (0x0c) revision 0x11fa, manufacturer 0x0059
00&amp;gt; [00:00:00.151,458] &amp;lt;inf&amp;gt; bt_hci_core: bt_dev_show_info: LMP: version 5.3 (0x0c) subver 0x11fa
00&amp;gt; [00:00:00.152,191] &amp;lt;wrn&amp;gt; bt_hci_core: bt_set_name: Unable to store name
00&amp;gt; 00/00/0000 00:00:00[ami_ble.c: 555] UpdateAdv x:0 y:0 z:0 Tmp:0 F:0x20
00&amp;gt; 00/00/0000 00:00:00[ami_ble.c: 593] AdvertisingStarted
00&amp;gt; 00/00/0000 00:00:00[ami_main.c: 676] BootConfirmed
00&amp;gt; 00/00/0000 00:00:00[ami_main.c: 683] ResetCause:1
00&amp;gt; [00:00:00.169,036] &amp;lt;err&amp;gt; bt_gatt: db_hash_store: Failed to save Database Hash (err -2)
00&amp;gt; 01/01/2004 00:00:01[ami_adc.c: 470] RdLSM6DSLThread
00&amp;gt; 01/01/2004 00:00:26[ami_main.c: 143] Connected
00&amp;gt; 01/01/2004 00:00:26[ami_main.c: 198] LE PHY updated: TX PHY LE 2M, RX PHY LE 2M
00&amp;gt; 01/01/2004 00:00:31[ami_main.c: 175] Connection parameters updated.
00&amp;gt;  interval: 40, latency: 0, timeout: 42
00&amp;gt; 01/01/2004 00:00:34[ami_main_serv.c:  58] Received data, handle 0, conn 0x20002860
00&amp;gt; 22/02/2023 20:30:10[ami_main.c: 153] Disconnected reason:19
00&amp;gt; 22/02/2023 20:30:10[ami_ble.c: 555] UpdateAdv x:0 y:0 z:0 Tmp:0 F:0x0
00&amp;gt; 22/02/2023 20:30:10[ami_ble.c: 593] AdvertisingStarted
00&amp;gt; 22/02/2023 20:30:11[ami_ble.c: 555] UpdateAdv x:0 y:0 z:0 Tmp:0 F:0x0
00&amp;gt; 22/02/2023 20:30:35[ami_main.c: 601] NewMin
00&amp;gt; 22/02/2023 20:31:24[ami_main.c: 143] Connected
00&amp;gt; 22/02/2023 20:31:25[ami_main.c: 198] LE PHY updated: TX PHY LE 2M, RX PHY LE 2M
00&amp;gt; 22/02/2023 20:31:29[ami_main.c: 175] Connection parameters updated.
00&amp;gt;  interval: 40, latency: 0, timeout: 42
00&amp;gt; ARRAY_SIZE(image_upload_decode): [6]
00&amp;gt; req.off [0]
00&amp;gt; req.size [319026]
00&amp;gt; req.upgrade [0]
00&amp;gt; req.image [0]
00&amp;gt; req.img_data.len [400]
00&amp;gt; req.img_data.value [536969252]
00&amp;gt; req.data_sha.len [5]
00&amp;gt; req.data_sha.value [536969671]
00&amp;gt; 22/02/2023 20:31:34[ami_main.c: 175] Connection parameters updated.
00&amp;gt;  interval: 9, latency: 0, timeout: 42
00&amp;gt; 22/02/2023 20:31:35[ami_main.c: 601] NewMin
00&amp;gt; 22/02/2023 20:32:35[ami_main.c: 601] NewMin
00&amp;gt; [00:00:00.035,827] &amp;lt;err&amp;gt; LSM6DSL: lsm6dsl_init: Failed to initialize chip
00&amp;gt; *** Booting Zephyr OS build v3.2.99-ncs1 ***
00&amp;gt; [00:00:00.036,499] &amp;lt;inf&amp;gt; mcumgr_zephyr_grp: zephyr_basic_mgmt_init: Registering Zephyr basic mgmt group
00&amp;gt; 00/00/0000 00:00:00[ami_main.c: 631] Startup
00&amp;gt; 00/00/0000 00:00:00[ami_cfg.c: 256] DeviceID:0
00&amp;gt; 00/00/0000 00:00:00[ami_main.c: 448] MainInitErr:4096
00&amp;gt; 00/00/0000 00:00:00[ami_main.c: 657] VaporBLE#0 23-Feb-2023 v1.0.0 1.0 2.23
00&amp;gt; build time: Feb 23 2023 08:27:22
00&amp;gt; [00:00:00.141,448] &amp;lt;inf&amp;gt; sdc_hci_driver: hci_driver_open: SoftDevice Controller build revision:
00&amp;gt;                                          6d 90 41 2a 38 e8 ad 17  29 a5 03 38 39 27 d7 85 |m.A*8... )..89&amp;#39;..
00&amp;gt;                                          1f 85 d8 e1                                      |....
00&amp;gt; [00:00:00.145,721] &amp;lt;inf&amp;gt; bt_hci_core: hci_vs_init: HW Platform: Nordic Semiconductor (0x0002)
00&amp;gt; [00:00:00.146,240] &amp;lt;inf&amp;gt; bt_hci_core: hci_vs_init: HW Variant: nRF52x (0x0002)
00&amp;gt; [00:00:00.146,728] &amp;lt;inf&amp;gt; bt_hci_core: hci_vs_init: Firmware: Standard Bluetooth controller (0x00) Version 109.16784 Build 2917677098
00&amp;gt; [00:00:00.147,827] &amp;lt;inf&amp;gt; bt_hci_core: bt_init: No ID address. App must call settings_load()
00&amp;gt; 00/00/0000 00:00:00[ami_ble.c: 506] ActualTxPwr:8
00&amp;gt; 00/00/0000 00:00:00[ami_ble.c: 788] Bluetooth initialized
00&amp;gt; [00:00:00.149,383] &amp;lt;wrn&amp;gt; bt_hci_core: bt_set_name: Unable to store name
00&amp;gt; [00:00:00.150,299] &amp;lt;inf&amp;gt; bt_hci_core: bt_dev_show_info: Identity: C0:F1:EE:C6:31:44 (random)
00&amp;gt; [00:00:00.150,817] &amp;lt;inf&amp;gt; bt_hci_core: bt_dev_show_info: HCI: version 5.3 (0x0c) revision 0x11fa, manufacturer 0x0059
00&amp;gt; [00:00:00.151,458] &amp;lt;inf&amp;gt; bt_hci_core: bt_dev_show_info: LMP: version 5.3 (0x0c) subver 0x11fa
00&amp;gt; [00:00:00.152,191] &amp;lt;wrn&amp;gt; bt_hci_core: bt_set_name: Unable to store name
00&amp;gt; 00/00/0000 00:00:00[ami_ble.c: 555] UpdateAdv x:0 y:0 z:0 Tmp:0 F:0x20
00&amp;gt; 00/00/0000 00:00:00[ami_ble.c: 593] AdvertisingStarted
00&amp;gt; 00/00/0000 00:00:00[ami_main.c: 676] BootConfirmed
00&amp;gt; 00/00/0000 00:00:00[ami_main.c: 683] ResetCause:1
00&amp;gt; [00:00:00.169,036] &amp;lt;err&amp;gt; bt_gatt: db_hash_store: Failed to save Database Hash (err -2)
00&amp;gt; 01/01/2004 00:00:01[ami_adc.c: 470] RdLSM6DSLThread&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Thanks David&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nrf52840 S140 Central DFU  Bluetooth Zephyr 2.0.0 nrf52840 peripheral</title><link>https://devzone.nordicsemi.com/thread/411421?ContentTypeID=1</link><pubDate>Wed, 22 Feb 2023 14:47:19 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:62942703-d7aa-4551-a69e-d295e40e459a</guid><dc:creator>Sigurd Hellesvik</dc:creator><description>[quote user="DavidKaplan"]So I should use the slot size or the image size in the first packet?[/quote]
&lt;p&gt;From &lt;a href="https://developer.nordicsemi.com/nRF_Connect_SDK/doc/latest/zephyr/services/device_mgmt/smp_groups/smp_group_1.html#image-upload"&gt;SMP: Image upload&lt;/a&gt;: &lt;/p&gt;
&lt;p&gt;&amp;quot;“len”: optional length of an image, it only appears in the first packet of request, where “off” is 0&amp;quot;&lt;/p&gt;
[quote user="DavidKaplan"]&lt;em&gt;&lt;strong&gt;So, I changed this in the SMP Client to use the actual size and not Simon&amp;#39;s static number.&lt;/strong&gt;&lt;/em&gt;[/quote]
&lt;p&gt;Yes, I think that is how we want to do it in the end. For now, I just set len to the entire length of the Secondary Slot (&lt;span&gt;PM_MCUBOOT_SECONDARY_END_ADDRESS -&amp;nbsp;PM_MCUBOOT_SECONDARY_ADDRESS), in case there is some footer set at the end of the slot.&lt;br /&gt;Then when we get the full upload to work, we can try decreasing the length.&lt;/span&gt;&lt;/p&gt;
[quote user="DavidKaplan"]&lt;strong&gt;In the last packet show which is not divisible&amp;nbsp;by&amp;nbsp;upload_chunk, should I pad it by 0xFFs or 0x00 or does it matter?&lt;/strong&gt;[/quote]
&lt;p&gt;I think this is handled by the code already?&lt;br /&gt;&lt;pre class="ui-code" data-mode="text"&gt;		if(curr_addr+UPLOAD_CHUNK &amp;gt; last_addr){
			upload_chunk = last_addr - curr_addr;
			update_complete = true;
		}
&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Regards,&lt;br /&gt;Sigurd Hellesvik&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nrf52840 S140 Central DFU  Bluetooth Zephyr 2.0.0 nrf52840 peripheral</title><link>https://devzone.nordicsemi.com/thread/411398?ContentTypeID=1</link><pubDate>Wed, 22 Feb 2023 14:00:46 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:865d1609-4706-45a3-80f6-d8850ec9e576</guid><dc:creator>DavidKaplan</dc:creator><description>&lt;p&gt;I tried to duplicate your changes in my central code, but it did not help for some reason.&lt;/p&gt;
&lt;p&gt;&lt;em&gt;&lt;strong&gt;So, I changed this in the SMP Client to use the actual size and not Simon&amp;#39;s static number.&lt;/strong&gt;&lt;/em&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;In your code you use the constant slot start &amp;amp; end addresses from the pm. &lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;The&amp;nbsp;&lt;/span&gt;&lt;span&gt;flash_read() function will return, I think, when there is nothing more to read from the actual image.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt; The&amp;nbsp;upload_chunk is not changed from&amp;nbsp;&amp;nbsp;UPLOAD_CHUNK during the upload.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;The length you write seems to be the size of the slot and not the image size.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;I could be wrong here.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;In any case doing something similar did not give an error but did not work.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;I did not add anything in the sensor code to try to see what is happening&amp;nbsp;in the log yet.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;I changed only the central code.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;I hope to continue on this tomorrow.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;So I should use the slot size or the image size in the first packet?&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;In the last packet show which is not divisible&amp;nbsp;by&amp;nbsp;upload_chunk, should I pad it by 0xFFs or 0x00 or does it matter?&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Thank you, David&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt; if(off == 0){&lt;br /&gt;&amp;nbsp; zcbor_tstr_put_lit(zse, &amp;quot;len&amp;quot;);&lt;br /&gt;&amp;nbsp; zcbor_uint64_put(zse, (uint64_t)last_addr-start_addr); &lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&amp;nbsp; // ?!?&amp;nbsp;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&amp;nbsp; //&amp;nbsp; PM_MCUBOOT_SECONDARY_END_ADDRESS-&amp;nbsp;PM_MCUBOOT_SECONDARY_ADDRESS&lt;br /&gt; }&lt;br /&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt; int last_addr = PM_MCUBOOT_SECONDARY_END_ADDRESS; &lt;br /&gt; int start_addr = PM_MCUBOOT_SECONDARY_ADDRESS;&lt;br /&gt;&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nrf52840 S140 Central DFU  Bluetooth Zephyr 2.0.0 nrf52840 peripheral</title><link>https://devzone.nordicsemi.com/thread/411310?ContentTypeID=1</link><pubDate>Wed, 22 Feb 2023 10:17:39 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:d9ea8d49-3886-45fc-8416-985e025b47ec</guid><dc:creator>Sigurd Hellesvik</dc:creator><description>[quote user="DavidKaplan"]Almost always I got some messages dropped.[/quote]
&lt;p&gt;This is related to the Zephyr Logging module. If you lof too fast, some of the logs will get dropped. You can fix this by tweaking &lt;a href="https://developer.nordicsemi.com/nRF_Connect_SDK/doc/2.2.0/zephyr/services/logging/index.html#global-kconfig-options"&gt;Logging configurations&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;On to the DFU issue:&lt;/p&gt;
&lt;p&gt;Since DFU works using mobile but not the SMP Client, I figure it must be the SMP Client with the error.&lt;br /&gt;So I added some logging to the mcumgr receiving end to compare messages received from mobile vs SMP Client:&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;diff --git a/subsys/mgmt/mcumgr/lib/cmd/img_mgmt/src/img_mgmt.c b/subsys/mgmt/mcumgr/lib/cmd/img_mgmt/src/img_mgmt.c
index 8c7dc330db..c5b7818bb8 100644
--- a/subsys/mgmt/mcumgr/lib/cmd/img_mgmt/src/img_mgmt.c
+++ b/subsys/mgmt/mcumgr/lib/cmd/img_mgmt/src/img_mgmt.c
@@ -371,6 +371,20 @@ img_mgmt_upload(struct mgmt_ctxt *ctxt)
        ok = zcbor_map_decode_bulk(zsd, image_upload_decode,
                ARRAY_SIZE(image_upload_decode), &amp;amp;decoded) == 0;
 
+    static int once = 1;
+    if(once){
+        once = 0;
+        printk(&amp;quot;ARRAY_SIZE(image_upload_decode): [%d]\n&amp;quot;,ARRAY_SIZE(image_upload_decode));
+        printk(&amp;quot;req.off [%d]\n&amp;quot;, req.off);
+        printk(&amp;quot;req.size [%ld]\n&amp;quot;, req.size);
+        printk(&amp;quot;req.upgrade [%d]\n&amp;quot;, req.upgrade);
+        printk(&amp;quot;req.image [%d]\n&amp;quot;, req.image);
+        printk(&amp;quot;req.img_data.len [%d]\n&amp;quot;, req.img_data.len);
+        printk(&amp;quot;req.img_data.value [%d]\n&amp;quot;, req.img_data.value);
+        printk(&amp;quot;req.data_sha.len [%d]\n&amp;quot;, req.data_sha.len);
+        printk(&amp;quot;req.data_sha.value [%d]\n&amp;quot;, req.data_sha.value);
+    }
+
        IMG_MGMT_UPLOAD_ACTION_SET_RC_RSN(&amp;amp;action, NULL);
 
        if (!ok) {
&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;I found that the upload size/len in the &lt;a href="https://developer.nordicsemi.com/nRF_Connect_SDK/doc/latest/zephyr/services/device_mgmt/smp_groups/smp_group_1.html#image-upload-request"&gt;smp message&lt;/a&gt; is the most significant difference here.&lt;/p&gt;
&lt;p&gt;So I changed this in the SMP Client to use the actual size and not Simon&amp;#39;s static number. &lt;br /&gt;Now DFU works from the SMP Client to your sample:&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;*** Booting Zephyr OS build v3.2.99-ncs1 ***
I: Starting bootloader
I: Primary image: magic=good, swap_type=0x2, copy_done=0x1, image_ok=0x1
I: Secondary image: magic=good, swap_type=0x2, copy_done=0x3, image_ok=0x3
I: Boot source: none
I: Swap type: test
I: Starting swap using move algorithm.
I: Bootloader chainload address offset: 0xc000
*** Booting Zephyr OS build v3.2.99-ncs1 ***
[00:00:00.000,610] &amp;lt;inf&amp;gt; mcumgr_zephyr_grp: zephyr_basic_mgmt_init: Registering Zephyr basic mgmt group
FFFFFFFFFFFFFFFFFFFFF
00/00/0000 00:00:00[ami_main.c: 635] Startup
00/00/0000 00:00:00[ami_cfg.c: 256] DeviceID:0
00/00/0000 00:00:00[ami_main.c: 448] MainInitErr:4096
[00:00:00.106,719] &amp;lt;inf&amp;gt; bt_hci_core: hci_vs_init: HW Platform: Nordic Semiconductor (0x0002)
--- 3 messages dropped ---
[00:00:00.106,750] &amp;lt;inf&amp;gt; bt_hci_core: hci_vs_init: HW Variant: nRF52x (0x0002)
&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;I put the change that I made in git:&lt;/p&gt;
&lt;p&gt;&lt;a href="https://github.com/hellesvik-nordic/samples_for_nrf_connect_sdk/commit/f593bf073f609d76038f2b668783e5b0f485138e"&gt;https://github.com/hellesvik-nordic/samples_for_nrf_connect_sdk/commit/f593bf073f609d76038f2b668783e5b0f485138e&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;Can you try this change and see if it also fixes the DFU for you?&lt;/p&gt;
&lt;p&gt;Regards,&lt;br /&gt;Sigurd Hellesvik&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nrf52840 S140 Central DFU  Bluetooth Zephyr 2.0.0 nrf52840 peripheral</title><link>https://devzone.nordicsemi.com/thread/411232?ContentTypeID=1</link><pubDate>Wed, 22 Feb 2023 04:15:04 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:c9be5399-68ed-46f5-bf8f-6c513cee43a0</guid><dc:creator>DavidKaplan</dc:creator><description>&lt;p&gt;&amp;nbsp;This is to me very good news which means you can reproduce my problem so it is most likely not central related or your fix on your central can be easily copied.&lt;/p&gt;
&lt;p&gt;&amp;nbsp;Whenever the DFU works, I will need to change the key and I think a signature.&lt;/p&gt;
&lt;p&gt;On my sensor board I don&amp;#39;t have any uart interface. With the SWD debugger interface, I do not see any bootloader messages regarding the bootloader but maybe you added a define.&lt;/p&gt;
&lt;p&gt;Almost always I got some messages dropped.&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;*** Booting Zephyr OS build v3.2.99-ncs1 ***
[00:00:00.036,773] &#x1B;[0m&amp;lt;inf&amp;gt; mcumgr_zephyr_grp: zephyr_basic_mgmt_init: Registering Zephyr basic mgmt group&#x1B;[0m
00/00/0000 00:00:00[ami_main.c: 628] Startup
00/00/0000 00:00:00[ami_cfg.c: 256] DeviceID:51
00/00/0000 00:00:00[ami_lsm6dsl.c:1905] Sensor x:32724 y:32742 z:11246
00/00/0000 00:00:00[ami_lsm6dsl.c:1931] accel x: ms/2 y: ms/2 z: ms/2
00/00/0000 00:00:00[ami_led.c: 139] LedThread
00/00/0000 00:00:00[ami_lsm6dsl.c: 120] RdLSM6DSLThread
00/00/0000 00:00:00[ami_lsm6dsl.c: 153] NewSample
00/00/0000 00:00:00[ami_adc.c: 470] RdLSM6DSLThread
[00:00:03.496,063] &#x1B;[0m&amp;lt;inf&amp;gt; bt_hci_core: hci_vs_init: HW Platform: Nordic Semiconductor (0x0002)&#x1B;[0m
&#x1B;[1;31m--- 3 messages dropped ---
&#x1B;[0m[00:00:03.496,093] &#x1B;[0m&amp;lt;inf&amp;gt; bt_hci_core: hci_vs_init: HW Variant: nRF52x (0x0002)&#x1B;[0m
[00:00:03.496,124] &#x1B;[0m&amp;lt;inf&amp;gt; bt_hci_core: hci_vs_init: Firmware: Standard Bluetooth controller (0x00) Version 109.16784 Build 2917677098&#x1B;[0m
[00:00:03.496,582] &#x1B;[0m&amp;lt;inf&amp;gt; bt_[0m
8
0m
&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;Thanks David&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nrf52840 S140 Central DFU  Bluetooth Zephyr 2.0.0 nrf52840 peripheral</title><link>https://devzone.nordicsemi.com/thread/410929?ContentTypeID=1</link><pubDate>Mon, 20 Feb 2023 14:13:28 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:0f054bb2-12b9-4328-9288-0f561952171e</guid><dc:creator>Sigurd Hellesvik</dc:creator><description>&lt;p&gt;I will continue here:&lt;/p&gt;
&lt;p&gt;I have now run your project with two nRF52840DKs.&lt;/p&gt;
&lt;p&gt;The DFU uploads fine, but the MCUboot verification of the project fails with the error:&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;*** Booting Zephyr OS build v3.2.99-ncs1 ***
I: Starting bootloader
I: Primary image: magic=unset, swap_type=0x1, copy_done=0x3, image_ok=0x3
I: Secondary image: magic=good, swap_type=0x2, copy_done=0x3, image_ok=0x3
I: Boot source: none
I: Swap type: test
E: Image in the secondary slot is not valid!
I: Bootloader chainload address offset: 0xc000
*** Booting Zephyr OS build v3.2.99-ncs1 ***
&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;Is this the same error that you get?&lt;/p&gt;
&lt;p&gt;Tomorrow, I will try to do some more testing with this.&lt;/p&gt;
&lt;p&gt;Regards,&lt;br /&gt;Sigurd Hellesvik&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nrf52840 S140 Central DFU  Bluetooth Zephyr 2.0.0 nrf52840 peripheral</title><link>https://devzone.nordicsemi.com/thread/410365?ContentTypeID=1</link><pubDate>Thu, 16 Feb 2023 13:28:43 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:ffdad472-9176-4e19-996c-7dbe9fbebced</guid><dc:creator>Sigurd Hellesvik</dc:creator><description>&lt;p&gt;Hi David,&lt;/p&gt;
&lt;p&gt;That sounds good to me!&lt;/p&gt;
&lt;p&gt;Please create a &lt;a href="https://devzone.nordicsemi.com/support/add"&gt;new private ticket&lt;/a&gt; to upload your project and tag me with &lt;a href="https://devzone.nordicsemi.com/members/sigurd-hellesvik"&gt;Sigurd Hellesvik&lt;/a&gt; in the new ticket.&lt;/p&gt;
&lt;p&gt;Regards,&lt;br /&gt;Sigurd Hellesvik&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nrf52840 S140 Central DFU  Bluetooth Zephyr 2.0.0 nrf52840 peripheral</title><link>https://devzone.nordicsemi.com/thread/410212?ContentTypeID=1</link><pubDate>Thu, 16 Feb 2023 04:51:10 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:9593fdd4-7d98-4dfe-8ddc-d07db6081e32</guid><dc:creator>DavidKaplan</dc:creator><description>&lt;p&gt;This morning I programmed my nRF9160-DK with our sensor code with the hardware specific code commented out. I performed a nRF52840 BLE DFU by SMP which reported that all went well but the unit was not updated. I suggest, if possible, I send the sensor code which runs on the &lt;span&gt;nRF9160-DK and you build two images with different Device Information, one which you flash by the programmer and the other that you program to your Central&amp;#39;s flash as you did in the Generic SMP BLE DFU test you performed.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;This way we could pinpoint&amp;nbsp;if the problem is in my Central or Sensor code.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Using the nRF Connect phone app you can verify the DFU and see in my code if the problem exists in my peripheral sensor code or not.&amp;nbsp;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;My code uses ncs V2.2.0 with a local&amp;nbsp;ms88sf2 board definition&amp;nbsp;which should run on any nRF52840 board.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;I can only upload my code in a private session.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Thanks David&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&lt;pre class="ui-code" data-mode="text"&gt;static int settings_runtime_load(void)
{
  char sTemp[32];	
  eight_bytes unique_64;
  
#if defined(CONFIG_BT_DIS_SETTINGS)
#ifdef TBD
	settings_runtime_set(&amp;quot;bt/dis/model&amp;quot;,
			     &amp;quot;Zephyr Model&amp;quot;,
			     sizeof(&amp;quot;Zephyr Model&amp;quot;));
	settings_runtime_set(&amp;quot;bt/dis/manuf&amp;quot;,
			     &amp;quot;Zephyr Manufacturer&amp;quot;,
			     sizeof(&amp;quot;Zephyr Manufacturer&amp;quot;));
#endif				 
#if defined(CONFIG_BT_DIS_SERIAL_NUMBER)
    //-------------------------------------------------------------------------
    // Use nRF52840&amp;#39;s DeviceID as serial number
    //-------------------------------------------------------------------------
    unique_64.u32[0] = NRF_FICR-&amp;gt;DEVICEID[0];
    unique_64.u32[1] = NRF_FICR-&amp;gt;DEVICEID[1];
    sprintf(sTemp,&amp;quot;%08X%08X&amp;quot;,unique_64.u32[1],unique_64.u32[0]);
	settings_runtime_set(&amp;quot;bt/dis/serial&amp;quot;,
			     sTemp,
			     strlen(sTemp));
#endif
#if defined(CONFIG_BT_DIS_SW_REV)
    //-------------------------------------------------------------------------
	// Set the software version
    //-------------------------------------------------------------------------
    sprintf(sTemp,&amp;quot;%u.%u %u.%u&amp;quot;,
            AMI_VERSION_MAJOR,AMI_VERSION_MINOR,
            AQUA_DEVEL_VERSION_MAJOR,AQUA_DEVEL_VERSION_MINOR);
	settings_runtime_set(&amp;quot;bt/dis/sw&amp;quot;,
			     sTemp,
			     strlen(sTemp));
#endif
#if defined(CONFIG_BT_DIS_FW_REV)
    //-------------------------------------------------------------------------
	// Set Date as the Firmware version
    //-------------------------------------------------------------------------
    sprintf(sTemp,&amp;quot;%s&amp;quot;,__DATE__);
	settings_runtime_set(&amp;quot;bt/dis/fw&amp;quot;,
			     sTemp,
			     strlen(sTemp));
#endif
#if defined(CONFIG_BT_DIS_HW_REV)
	settings_runtime_set(&amp;quot;bt/dis/hw&amp;quot;,
			     CONFIG_BT_DIS_HW_REV_STR,
			     sizeof(CONFIG_BT_DIS_HW_REV_STR));
#endif
#endif
	return 0;
} // settings_runtime_load

&lt;/pre&gt;&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nrf52840 S140 Central DFU  Bluetooth Zephyr 2.0.0 nrf52840 peripheral</title><link>https://devzone.nordicsemi.com/thread/409978?ContentTypeID=1</link><pubDate>Wed, 15 Feb 2023 06:09:22 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:3913c534-ebe6-4793-9882-3ad3df1880ec</guid><dc:creator>DavidKaplan</dc:creator><description>&lt;p&gt;I have a nRF9160-DK which has a nRF52480 chip on it and according to the documentation, one of its uarts is always routed to the board&amp;#39;s virtual com port. I wanted to use it as my Central device while writing a PC program that would simulate our host for streaming the image. I could see the messages coming from the DK on my PC but nothing I sent arrived at the Central. I selected the nrf9160dk_nrf52840 Nordic board for this build. I guess something is wrong with my hardware, so I could not write and debug the host simulator.&lt;/p&gt;
&lt;p&gt;&amp;nbsp;I also have a nRF52840-DK which it nRF USB does not work (no recognition now on PC but previously had worked) so I could not also use it for the Central.&lt;/p&gt;
&lt;p&gt;&amp;nbsp;I can send you the sensor (peripheral) code in a private session in which I remarked the hardware stuff.&lt;/p&gt;
&lt;p&gt;As for the current drain when compiled with V2.2.0 I will have to recheck the comparison, since I remember that management wanted to up the default tx power.&lt;/p&gt;
&lt;p&gt;Currently I manipulate only the I2C &amp;amp; SPI interfaces. Our LC512 EEPROM is I2C and the LSM6DSL sensor is connected by SPI. I also use the ADC which is used only every 5 to 15 minutes which taking a vibration sample. I use the code below&amp;nbsp;pm_device_action_run() &amp;amp;&amp;nbsp;pm_device_busy_set() &amp;amp;&amp;nbsp;pm_device_busy_clear()&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;//-----------------------------------------------------------------------------
// ami_boardPMActivate
//  Description
//    Changes the  I2C&amp;#39;s or SPI&amp;#39;s PM activate state 
//  Parameters
//   which
//   bActivate  -
//  Returns
//    true if OK
//-----------------------------------------------------------------------------
bool ami_boardPMActivate(unsigned char which,bool bActivate)
{
#ifdef CONFIG_PM_DEVICE
  int err = 1;
  enum pm_device_action action = bActivate?PM_DEVICE_ACTION_TURN_ON:PM_DEVICE_ACTION_TURN_OFF;
  switch (which){
    case AMI_BOARD_DEV_SPI1:
      err = pm_device_action_run((const struct device*)spi_dev,action);
      if (err!=-EALREADY &amp;amp;&amp;amp; err!=-ENOTSUP){
          d_printf(LINE_INFO,kDbg_Error|kDbg_Display,&amp;quot;SPI state Err:%d&amp;quot;,err);
      }
      break;
    case AMI_BOARD_DEV_I2C0:
      err = pm_device_action_run((const struct device*)i2c_dev,action);
      if (err!=-EALREADY &amp;amp;&amp;amp; err!=-ENOTSUP){
          d_printf(LINE_INFO,kDbg_Error|kDbg_Display,&amp;quot;I2C state Err:%d&amp;quot;,err);
      }
      break;
  } // switch
  return (err==0 || (err==-EALREADY));
#endif       
} // ami_boardPMActivate

//-----------------------------------------------------------------------------
// ami_boardChangeBusyState
//  Description
//    Changes the  I2C&amp;#39;s or SPI&amp;#39;s PM Busy state 
//  Parameters
//   which
//   bSetBusy  -
//  Returns
//-----------------------------------------------------------------------------
void ami_boardChangeBusyState(unsigned char which,bool bSetBusy)
{
#ifdef CONFIG_PM_DEVICE
  switch (which){
    case AMI_BOARD_DEV_SPI1:
      //-------------------------------------------------------------------
      // Mark a device as busy.
      // Devices marked as busy will not be suspended when the system goes into low-power states. 
      // This can be useful if, for example, the device is in the middle of a transaction.
      //-------------------------------------------------------------------
      if (bSetBusy){
        pm_device_busy_set(spi_dev);
      }else{
            pm_device_busy_clear(spi_dev);
      }
      break;
    case AMI_BOARD_DEV_I2C0:
      //-------------------------------------------------------------------
      // Mark a device as busy.
      // Devices marked as busy will not be suspended when the system goes into low-power states. 
      // This can be useful if, for example, the device is in the middle of a transaction.
      //-------------------------------------------------------------------
      if (bSetBusy){
        pm_device_busy_set(i2c_dev);
      }else{
            pm_device_busy_clear(i2c_dev);
      }
      break;
    case AMI_BOARD_DEV_GPIO0:
      if (bSetBusy){
        pm_device_busy_set(gpio_0_dev);
      }else{
            pm_device_busy_clear(gpio_0_dev);
      }
      break;
    case AMI_BOARD_DEV_GPIO1:
      if (bSetBusy){
        pm_device_busy_set(gpio_1_dev);
      }else{
            pm_device_busy_clear(gpio_1_dev);
      }
      break;
  } // switch
   
#endif
} // ami_boardChangeBusyState
&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;After not really getting anywhere yesterday on the BLE DFU issue, this morning I had some interesting findings. It seems that the DFU upload reports OK but the code is NOT written anywhere, assuming that readcode reads the whole internal code flash.&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;1) Tool Chain V2.2.0 Update SDK
2) Erase board with programmer
3) Flash LastUpdate ={&amp;quot;14-Feb-2023 v1.0.0&amp;quot;}; merged file with programmer EraseAll Erase&amp;amp;Write
4) nrfjprog --family nRF52 --readcode code1.hex
5) DFU with gateway
	00&amp;gt; [ami_smp.c: 690] DFU:316800/319026
	00&amp;gt; [ami_smp.c: 690] DFU:317200/319026
	00&amp;gt; [ami_smp.c: 690] DFU:317600/319026
	00&amp;gt; [ami_smp.c: 690] DFU:318000/319026
	00&amp;gt; [ami_smp.c: 690] DFU:318400/319026
	00&amp;gt; [ami_smp.c: 690] DFU:318800/319026
	00&amp;gt; [ami_smp.c: 791] ImageChecksum AF3A0C7A
	00&amp;gt; [ami_smp.c: 917] SMP UploadOK
	00&amp;gt; [ami_smp.c:1198] ImageList
	00&amp;gt;
	00&amp;gt; -----------PRIMARY IMAGE-----------
	00&amp;gt;       slot: 0
	00&amp;gt;       version: 0.0.0
	00&amp;gt;       hash: 0xb34a6ec0abb87ccee95d838d9dbe4e5c33fae249c4ce955adc9a5297a8655d
	00&amp;gt;       bootable: true
	00&amp;gt;       pending: false
	00&amp;gt;       confirmed: true
	00&amp;gt;       active: true
	00&amp;gt;       permanent: false
	00&amp;gt;
	00&amp;gt; -----------SECONDARY IMAGE-----------
	00&amp;gt;       slot: 1
	00&amp;gt;       version: 0.0.0
	00&amp;gt;       hash: 0x4165b6dabeb5dfab85e276b4e927b2e32358d38f1ef8d698617c5f449a095
	00&amp;gt;       bootable: true
	00&amp;gt;       pending: false
	00&amp;gt;       confirmed: false
	00&amp;gt;       active: false
	00&amp;gt;       permanent: false
	00&amp;gt; [ami_smp.c:1201] ImageTest
	00&amp;gt;
	00&amp;gt; -----------PRIMARY IMAGE-----------
	00&amp;gt;       slot: 0
	00&amp;gt;       version: 0.0.0
	00&amp;gt;       hash: 0xb34a6ec0abb87ccee95d838d9dbe4e5c33fae249c4ce955adc9a5297a8655d
	00&amp;gt;       bootable: true
	00&amp;gt;       pending: false
	00&amp;gt;       confirmed: true
	00&amp;gt;       active: true
	00&amp;gt;       permanent: false
	00&amp;gt;
	00&amp;gt; -----------SECONDARY IMAGE-----------
	00&amp;gt;       slot: 1
	00&amp;gt;       version: 0.0.0
	00&amp;gt;       hash: 0x4165b6dabeb5dfab85e276b4e927b2e32358d38f1ef8d698617c5f449a095
	00&amp;gt;       bootable: true
	00&amp;gt;       pending: true
	00&amp;gt;       confirmed: false
	00&amp;gt;       active: false
	00&amp;gt;       permanent: false
	00&amp;gt; [ami_smp.c:1204] ImageReset
	00&amp;gt; 14/02/2023 19:17:31[ami_ble.c: 861] Disconnected: D4:FD:9F:BF:4A:27 (random) (reason 8)
	00&amp;gt; [ami_ble.c:2639] DFUConnectFinishedErr:0
6) nrfjprog --family nRF52 --readcode code2.hex
 code1.hex &amp;amp; code2.hex are exactly the same.
 This means that the SMP upload reported OK but did not write anything.
5) Phone Test only (which works)
 In the sensor code after reset, I confirm the image, so test is like confirm, if the code runs.
  //---------------------------------------------------------------------------
  // DFU upgraded and not confirmed, confirm
  //---------------------------------------------------------------------------
  if (!boot_is_img_confirmed()){
    err = boot_write_img_confirmed();
	  if (err) {
		  d_printf(LINE_INFO,kDbg_Error|kDbg_Display,&amp;quot;BootConfirmErr:%d&amp;quot;,err);
    }else{
          d_printf(LINE_INFO,kDbg_Error|kDbg_Display,&amp;quot;BootConfirmed&amp;quot;);
    }
  }
4) nrfjprog --family nRF52 --readcode code3.hex
  code3.hex is entirely different from code1.hex and code2.hex which were the same.

&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;Thanks&lt;/p&gt;
&lt;p&gt;David&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nrf52840 S140 Central DFU  Bluetooth Zephyr 2.0.0 nrf52840 peripheral</title><link>https://devzone.nordicsemi.com/thread/409647?ContentTypeID=1</link><pubDate>Mon, 13 Feb 2023 14:50:59 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:10702159-c575-46c9-bf4a-c2302dfe0bec</guid><dc:creator>Sigurd Hellesvik</dc:creator><description>[quote user="DavidKaplan"]If I understand you wanted to try the upload, list, confirm(fails) &amp;amp; again list sequence?[/quote]
&lt;p&gt;Yes.&lt;/p&gt;
[quote user="DavidKaplan"]Like I wrote I calculated a checksum on the data buffers sent with the&amp;nbsp;bt_dfu_smp_command() function and verified it was correct.[/quote]
&lt;p&gt;Thanks, it is nice to know this, for reference.&lt;/p&gt;
[quote user="DavidKaplan"]When I do a upload, list, test, reset sequence no problems are reported but the image is not updated after reset[/quote]
&lt;p&gt;When doing &amp;quot;list&amp;quot;, we can see that &amp;quot;pending: true&amp;quot;. If an image is set as &amp;quot;pending&amp;quot;, MCUboot should swap the image into the primary slot on reboot.&lt;br /&gt;It is odd that MCUboot does not do so.&lt;/p&gt;
&lt;p&gt;As I do not have your devices, I can not replicate this exactly.&lt;br /&gt;However, it worked on nRF52840DKs for me.&lt;br /&gt;Do you have 2x nRF52840DKs by chance? (Or other nordic developement kits?)&lt;br /&gt;I am thinking that if you can try on the DKs VS you custom board, we can find if it is the hardware or the software which is the issue here.&lt;/p&gt;
[quote user="DavidKaplan"]Like I wrote I calculated a checksum on the data buffers sent with the&amp;nbsp;bt_dfu_smp_command() function and verified it was correct.[/quote]
&lt;p&gt;This reinforces my &amp;quot;this should work, why does it not?&amp;quot; thoughts.&lt;/p&gt;
[quote user="DavidKaplan"]&lt;p&gt;I also used the &amp;quot;nrfjprog --family nRF52 --readcode code.hex&amp;quot; command so I could try to compare part of the code with the app_update.bin or merged.hex.&lt;/p&gt;
&lt;p&gt;I see in my sensor bootloader map that it does not have the littlefs mapped.&lt;/p&gt;
&lt;p&gt;Should this matter since if the phone app works ours should too?&lt;/p&gt;[/quote]
&lt;p&gt;Good thinking!&lt;/p&gt;
&lt;p&gt;It is likely not app_update.bin itself, as the phone app works.&lt;/p&gt;
&lt;p&gt;But maybe it is a difference to which address the application is uploaded to?&lt;br /&gt;In that case, the &amp;quot;test&amp;quot; tag could maybe be in the wrong place for MCUboot to find it?&lt;/p&gt;
&lt;p&gt;Can you try to see if there is any difference to the code if you upload it using a mobile and the SMP Client?&lt;br /&gt;To get the image into secondary slot using mobile, upload it and &amp;quot;test only&amp;quot;. Then restart twice to make it swap back into the secondary slot.&lt;/p&gt;
&lt;p&gt;After reading out the code, can you try to list the mobile-uploaded image using the SMP Client?&lt;br /&gt;Then also try to &amp;quot;confirm&amp;quot; the mobile-uploaded image using the SMP client?&lt;br /&gt;That way we can learn if it is the &amp;quot;upload&amp;quot; or &amp;quot;test&amp;quot; that fails.&lt;/p&gt;
[quote user="DavidKaplan"]&lt;p&gt;By the way do you know if there were any changes to power management from v2.0.2 to v2.2.0?&lt;/p&gt;
&lt;p&gt;It seems that v2.2.0 consumes more current for&lt;/p&gt;[/quote]
&lt;p&gt;I might ask you to open a new ticket on this. &lt;br /&gt;But I want to give it a try first. &lt;br /&gt;Do you have numbers on the current draw before and after?&lt;/p&gt;
&lt;p&gt;Regards,&lt;br /&gt;Sigurd Hellesvik&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nrf52840 S140 Central DFU  Bluetooth Zephyr 2.0.0 nrf52840 peripheral</title><link>https://devzone.nordicsemi.com/thread/409449?ContentTypeID=1</link><pubDate>Sun, 12 Feb 2023 07:45:10 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:7540f866-b1e8-4e8e-9e3c-08115a7f0f33</guid><dc:creator>DavidKaplan</dc:creator><description>&lt;p&gt;Yes, the upload &amp;amp; list commands now return without any reported problem.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;If I understand you wanted to try the upload, list, confirm(fails) &amp;amp; again list sequence?&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;11/02/2023 19:05:19[ami_com.c:  89] MsgReply:a Len:10
[ami_smp.c: 692] DFU:316800/319026
[ami_smp.c: 692] DFU:317200/319026
[ami_smp.c: 692] DFU:317600/319026
[ami_smp.c: 692] DFU:318000/319026
[ami_smp.c: 692] DFU:318400/319026
[ami_smp.c: 692] DFU:318800/319026
[ami_smp.c: 793] ImageChecksum AF3A0C7A
[ami_smp.c: 919] SMP UploadOK
[ami_smp.c:1200] ImageList

-----------PRIMARY IMAGE-----------
      slot: 0
      version: 0.0.0
      hash: 0x3e5866fbd4c56ae99a04f724b513c9e358f13a576d9e9a63b2e41b46f36d43
      bootable: true
      pending: false
      confirmed: true
      active: true
      permanent: false

-----------SECONDARY IMAGE-----------
      slot: 1
      version: 0.0.0
      hash: 0x4165b6dabeb5dfab85e276b4e927b2e32358d38f1ef8d698617c5f449a095
      bootable: true
      pending: false
      confirmed: false
      active: false
      permanent: false
[ami_smp.c:1203] ImageTest

-----------PRIMARY IMAGE-----------
      slot: 0
      version: 0.0.0
      hash: 0x3e5866fbd4c56ae99a04f724b513c9e358f13a576d9e9a63b2e41b46f36d43
      bootable: true
      pending: false
      confirmed: true
      active: true
      permanent: false

-----------SECONDARY IMAGE-----------
      slot: 1
      version: 0.0.0
      hash: 0x4165b6dabeb5dfab85e276b4e927b2e32358d38f1ef8d698617c5f449a095
      bootable: true
      pending: true
      confirmed: false
      active: false
      permanent: false
[ami_smp.c:1209] ImageConfirm
Decoding error, start_decode images-&amp;gt;list  (err: 10)
[ami_smp.c:1200] ImageList

-----------PRIMARY IMAGE-----------
      slot: 0
      version: 0.0.0
      hash: 0x3e5866fbd4c56ae99a04f724b513c9e358f13a576d9e9a63b2e41b46f36d43
      bootable: true
      pending: false
      confirmed: true
      active: true
      permanent: false

-----------SECONDARY IMAGE-----------
      slot: 1
      version: 0.0.0
      hash: 0x4165b6dabeb5dfab85e276b4e927b2e32358d38f1ef8d698617c5f449a095
      bootable: true
      pending: true
      confirmed: false
      active: false
      permanent: false
11/02/2023 19:05:22[ami_ble.c: 861] Disconnected: D4:FD:9F:BF:4A:27 (random) (reason 22)
[ami_ble.c:2639] DFUConnectFinishedErr:105
11/02/2023 19:05:22[ami_ble.c:1545] ret:0 atomic_ev:32768 index:15
11/02/2023 19:05:22[ami_ble.c:1545] ret:0 atomic_ev:1 index:0&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;When I do a upload, list, test, reset sequence no problems are reported but the image is not updated after reset, but from my phone DFU works.&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;[ami_smp.c: 690] DFU:318000/319026
[ami_smp.c: 690] DFU:318400/319026
[ami_smp.c: 690] DFU:318800/319026
[ami_smp.c: 791] ImageChecksum AF3A0C7A
[ami_smp.c: 917] SMP UploadOK
[ami_smp.c:1198] ImageList

-----------PRIMARY IMAGE-----------
      slot: 0
      version: 0.0.0
      hash: 0x8711f5297221c184e2f0a9a65d2ad3985be5bba9877fc829834c276a0986263
      bootable: true
      pending: false
      confirmed: true
      active: true
      permanent: false

-----------SECONDARY IMAGE-----------
      slot: 1
      version: 0.0.0
      hash: 0x4165b6dabeb5dfab85e276b4e927b2e32358d38f1ef8d698617c5f449a095
      bootable: true
      pending: false
      confirmed: false
      active: false
      permanent: false
[ami_smp.c:1201] ImageTest

-----------PRIMARY IMAGE-----------
      slot: 0
      version: 0.0.0
      hash: 0x8711f5297221c184e2f0a9a65d2ad3985be5bba9877fc829834c276a0986263
      bootable: true
      pending: false
      confirmed: true
      active: true
      permanent: false

-----------SECONDARY IMAGE-----------
      slot: 1
      version: 0.0.0
      hash: 0x4165b6dabeb5dfab85e276b4e927b2e32358d38f1ef8d698617c5f449a095
      bootable: true
      pending: true
      confirmed: false
      active: false
      permanent: false
[ami_smp.c:1204] ImageReset
11/02/2023 21:03:24[ami_ble.c: 861] Disconnected: D4:FD:9F:BF:4A:27 (random) (reason 8)
[ami_ble.c:2639] DFUConnectFinishedErr:0
11/02/2023 21:03:24[ami_ble.c:1545] ret:0 atomic_ev:32768 index:15
11/02/2023 21:03:24[ami_ble.c:1545] ret:0 atomic_ev:1 index:0&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;Like I wrote I calculated a checksum on the data buffers sent with the&amp;nbsp;bt_dfu_smp_command() function and verified it was correct.&lt;/p&gt;
&lt;p&gt;I also used the &amp;quot;nrfjprog --family nRF52 --readcode code.hex&amp;quot; command so I could try to compare part of the code with the app_update.bin or merged.hex.&lt;/p&gt;
&lt;p&gt;I see in my sensor bootloader map that it does not have the littlefs mapped.&lt;/p&gt;
&lt;p&gt;Should this matter since if the phone app works ours should too?&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;Central&amp;#39;s map:
#define PM_APP_DEV_NAME &amp;quot;NRF_FLASH_DRV_NAME&amp;quot;
#define PM_MCUBOOT_PRIMARY_APP_OFFSET 0xc200
#define PM_MCUBOOT_PRIMARY_APP_ADDRESS 0xc200
#define PM_MCUBOOT_PRIMARY_APP_END_ADDRESS 0x80000
#define PM_MCUBOOT_PRIMARY_APP_SIZE 0x73e00
#define PM_MCUBOOT_PRIMARY_APP_NAME mcuboot_primary_app
#define PM_MCUBOOT_PRIMARY_APP_ID 4
#define PM_mcuboot_primary_app_ID PM_MCUBOOT_PRIMARY_APP_ID
#define PM_mcuboot_primary_app_IS_ENABLED 1
#define PM_4_LABEL MCUBOOT_PRIMARY_APP
#define PM_MCUBOOT_PRIMARY_APP_DEV_NAME &amp;quot;NRF_FLASH_DRV_NAME&amp;quot;
#define PM_MCUBOOT_SECONDARY_OFFSET 0x80000
#define PM_MCUBOOT_SECONDARY_ADDRESS 0x80000
#define PM_MCUBOOT_SECONDARY_END_ADDRESS 0xf4000
#define PM_MCUBOOT_SECONDARY_SIZE 0x74000
#define PM_MCUBOOT_SECONDARY_NAME mcuboot_secondary
#define PM_MCUBOOT_SECONDARY_ID 5
#define PM_mcuboot_secondary_ID PM_MCUBOOT_SECONDARY_ID
#define PM_mcuboot_secondary_IS_ENABLED 1
#define PM_5_LABEL MCUBOOT_SECONDARY
#define PM_MCUBOOT_SECONDARY_DEV_NAME &amp;quot;NRF_FLASH_DRV_NAME&amp;quot;
#define PM_LITTLEFS_STORAGE_OFFSET 0xf4000
#define PM_LITTLEFS_STORAGE_ADDRESS 0xf4000
#define PM_LITTLEFS_STORAGE_END_ADDRESS 0xfa000
#define PM_LITTLEFS_STORAGE_SIZE 0x6000
#define PM_LITTLEFS_STORAGE_NAME littlefs_storage
#define PM_LITTLEFS_STORAGE_ID 6
#define PM_littlefs_storage_ID PM_LITTLEFS_STORAGE_ID
#define PM_littlefs_storage_IS_ENABLED 1

Sensor&amp;#39;s map:
#define PM_MCUBOOT_PRIMARY_APP_OFFSET 0xc200
#define PM_MCUBOOT_PRIMARY_APP_ADDRESS 0xc200
#define PM_MCUBOOT_PRIMARY_APP_END_ADDRESS 0x80000
#define PM_MCUBOOT_PRIMARY_APP_SIZE 0x73e00
#define PM_MCUBOOT_PRIMARY_APP_NAME mcuboot_primary_app
#define PM_MCUBOOT_PRIMARY_APP_ID 4
#define PM_mcuboot_primary_app_ID PM_MCUBOOT_PRIMARY_APP_ID
#define PM_mcuboot_primary_app_IS_ENABLED 1
#define PM_4_LABEL MCUBOOT_PRIMARY_APP
#define PM_MCUBOOT_PRIMARY_APP_DEV flash_controller
#define PM_MCUBOOT_PRIMARY_APP_DEFAULT_DRIVER_KCONFIG CONFIG_SOC_FLASH_NRF
#define PM_MCUBOOT_SECONDARY_OFFSET 0x80000
#define PM_MCUBOOT_SECONDARY_ADDRESS 0x80000
#define PM_MCUBOOT_SECONDARY_END_ADDRESS 0xf4000
#define PM_MCUBOOT_SECONDARY_SIZE 0x74000
#define PM_MCUBOOT_SECONDARY_NAME mcuboot_secondary
#define PM_MCUBOOT_SECONDARY_ID 5
#define PM_mcuboot_secondary_ID PM_MCUBOOT_SECONDARY_ID
#define PM_mcuboot_secondary_IS_ENABLED 1

&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;By the way do you know if there were any changes to power management from v2.0.2 to v2.2.0?&lt;/p&gt;
&lt;p&gt;It seems that v2.2.0 consumes more current for some reason.&lt;/p&gt;
&lt;p&gt;Thanks David&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nrf52840 S140 Central DFU  Bluetooth Zephyr 2.0.0 nrf52840 peripheral</title><link>https://devzone.nordicsemi.com/thread/409293?ContentTypeID=1</link><pubDate>Fri, 10 Feb 2023 08:52:49 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:acee997b-75ef-41cc-99d2-5f75973cc83b</guid><dc:creator>Sigurd Hellesvik</dc:creator><description>&lt;p&gt;Since the list command works, I also assume that the upload worked.&lt;br /&gt;Then we can assume that the &amp;quot;confirm&amp;quot; command fails.&lt;/p&gt;
[quote user="DavidKaplan"]I tried to&amp;nbsp;&lt;span&gt;SMP upload and issued the SMP confirm command instead of the test and got an error 10 as shown below when debugging the central. Maybe this will help?&lt;/span&gt;[/quote]
&lt;p&gt;The error is from the response handler.&lt;br /&gt;From the code, it seems like the &amp;quot;list&amp;quot; handler is used for responses from the &amp;quot;confirm&amp;quot; command.&lt;br /&gt;This makes sense, though, as &lt;a href="https://developer.nordicsemi.com/nRF_Connect_SDK/doc/latest/zephyr/services/device_mgmt/smp_groups/smp_group_1.html#set-state-of-image-response"&gt;The response takes the same format as Get state of images response&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;You see if your &amp;quot;confirm&amp;quot; command worked if the image is tagged as &amp;quot;pending = true&amp;quot;.&lt;br /&gt;If you send a &amp;quot;list&amp;quot; command after doing the &amp;quot;confirm&amp;quot;, is the image tagged as &amp;quot;pending&amp;quot; in that case?&lt;/p&gt;
&lt;p&gt;Regards,&lt;br /&gt;Sigurd Hellesvik&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nrf52840 S140 Central DFU  Bluetooth Zephyr 2.0.0 nrf52840 peripheral</title><link>https://devzone.nordicsemi.com/thread/409178?ContentTypeID=1</link><pubDate>Thu, 09 Feb 2023 13:40:09 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:a74aae56-4f79-447f-991d-d3dc66c46fe0</guid><dc:creator>DavidKaplan</dc:creator><description>&lt;p&gt;I calculate now a checksum (on the fly) of all of the&amp;nbsp;data sent in&amp;nbsp;send_upload2() and verified that my streamed image is NOT getting corrupted as its checksum is the same as on my PC hard drive before being uploaded to our host by cellular modem and being streamed to the Nordic nRF52840 Central and on to our sensor.&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;I tried just SMP uploading and issue the SMP test without the SMP reset. I powered on and off the sensor but that image was not swapped.&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;I tried to&amp;nbsp;&lt;span&gt;SMP upload and issued the SMP confirm command instead of the test and got an error 10 as shown below when debugging the central. Maybe this will help?&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&lt;pre class="ui-code" data-mode="text"&gt;[ami_smp.c: 690] DFU:318000/319026
[ami_smp.c: 690] DFU:318400/319026
[ami_smp.c: 690] DFU:318800/319026
[ami_smp.c: 880] SMP UploadOK
[ami_smp.c:1161] ImageList

-----------PRIMARY IMAGE-----------
      slot: 0
      version: 0.0.0
      hash: 0x28e54c8886d01dddf92457333eede4405517aba9e7aeca3bbdd43f8475975993
      bootable: true
      pending: false
      confirmed: true
      active: true
      permanent: false

-----------SECONDARY IMAGE-----------
      slot: 1
      version: 0.0.0
      hash: 0x4165b6dabeb5dfab85e276b4e927b2e32358d38f1ef8d698617c5f449a095
      bootable: true
      pending: false
      confirmed: false
      active: false
      permanent: false
[ami_smp.c:1170] ImageConfirm
Decoding error, start_decode images-&amp;gt;list  (err: 10)
&lt;/pre&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;This is my upload function. It finishes correctly. I could not see any problem in the function that is much different than the example code.&lt;pre class="ui-code" data-mode="text"&gt;#define UPLOAD_CHUNK		400 // (50 worked) This has to be at least 32 bytes, since first it has to send the whole header (which is 32 bytes)
void send_upload2(void)
{
  uint8_t       data[UPLOAD_CHUNK+1]; // One more byte, to store &amp;#39;/0&amp;#39;
  zcbor_state_t zse[2];
  size_t        payload_len;
  int           start_addr   = PM_MCUBOOT_SECONDARY_ADDRESS;
  int           last_addr    = PM_MCUBOOT_SECONDARY_ADDRESS+ami_state-&amp;gt;dfu.ImageSize.ulong;
  int           curr_addr    = start_addr;
  int           upload_chunk = UPLOAD_CHUNK;
  int           err;
  bool          update_complete = false;
  uint8_t       wait_timeouts = 0;

  ami_state-&amp;gt;DFUErr                 = AMI_SMP_DFU_ERR_OK;
  ami_state-&amp;gt;dfu.uAddChecksum.word  = 0;
  ami_state-&amp;gt;dfu.uXORChecksum       = 0;
  while (!update_complete){
      struct smp_buffer smp_cmd;
      zcbor_new_encode_state(zse, ARRAY_SIZE(zse), smp_cmd.payload,sizeof(smp_cmd.payload), 0);
      k_sem_take(&amp;amp;upload_sem, K_FOREVER);
      err = 0;
      last_addr    = (PM_MCUBOOT_SECONDARY_ADDRESS+ami_state-&amp;gt;dfu.ImageSize.ulong);
      if (ami_state-&amp;gt;DFUErr){
        update_complete = true;
        break;
      }
      //-------------------------------------------------------
      // Disconnected?
      //-------------------------------------------------------
      if (!atomic_get(&amp;amp;ble_connected)){
        ami_state-&amp;gt;DFUErr = AMI_DFU_ERR_DISCONNECTED;
        update_complete = true;
        break;
      }
      if ((curr_addr+UPLOAD_CHUNK) &amp;gt; last_addr){
	upload_chunk = last_addr - curr_addr;
	update_complete = true;
      }
      //-----------------------------------------------------------------
      // Get the data block from ringbuffer
      //-----------------------------------------------------------------
      ami_state-&amp;gt;DFUErr = ami_smp_RetDataBlock(data,upload_chunk);
      if (ami_state-&amp;gt;DFUErr){ 
        update_complete = true;
        break;
      }
      progress_print(curr_addr-start_addr, last_addr-start_addr);
      data[upload_chunk] = &amp;#39;\0&amp;#39;;
      zse-&amp;gt;constant_state-&amp;gt;stop_on_error = true;
      zcbor_map_start_encode(zse, 20);
      zcbor_tstr_put_lit(zse, &amp;quot;image&amp;quot;);
      zcbor_int64_put(zse, 0);
      zcbor_tstr_put_lit(zse, &amp;quot;data&amp;quot;);
      zcbor_bstr_put_lit(zse, data);
      zcbor_tstr_put_lit(zse, &amp;quot;len&amp;quot;);
//          zcbor_uint64_put(zse, (uint64_t)ami_state-&amp;gt;dfu.ImageSize.ulong);
      zcbor_uint64_put(zse, (uint64_t)0x5B68);
      zcbor_tstr_put_lit(zse, &amp;quot;off&amp;quot;);
      zcbor_uint64_put(zse, curr_addr - start_addr);
      zcbor_tstr_put_lit(zse, &amp;quot;sha&amp;quot;);
      zcbor_bstr_put_lit(zse, &amp;quot;12345&amp;quot;);
      zcbor_tstr_put_lit(zse, &amp;quot;upgrade&amp;quot;);
      zcbor_bool_put(zse, false);
      zcbor_map_end_encode(zse, 20);
      //-----------------------------------------------------------------
      // ZCBOR error?
      //-----------------------------------------------------------------
      if (!zcbor_check_error(zse)) {
        d_printf(LINE_INFO,kDbg_Error|kDbg_Host,&amp;quot;Failed to encode SMP test packet, err: %d&amp;quot;, zcbor_pop_error(zse));
        ami_state-&amp;gt;DFUErr = AMI_SMP_DFU_ERR_UPLOAD_ENCODE;
        break;
      }
      curr_addr+=upload_chunk;
      payload_len = (size_t)(zse-&amp;gt;payload - smp_cmd.payload);
      smp_cmd.header.op = 2; /* write request */
      smp_cmd.header.flags = 0;
      smp_cmd.header.len_h8 = (uint8_t)((payload_len &amp;gt;&amp;gt; 8) &amp;amp; 0xFF);
      smp_cmd.header.len_l8 = (uint8_t)((payload_len &amp;gt;&amp;gt; 0) &amp;amp; 0xFF);
      smp_cmd.header.group_h8 = 0;
      smp_cmd.header.group_l8 = 1; /* IMAGE */
      smp_cmd.header.seq = 0;
      smp_cmd.header.id  = 1; /* UPLOAD */
      //-----------------------------------------------------------------
      // ZCBOR error?
      //-----------------------------------------------------------------
      err = bt_dfu_smp_command(&amp;amp;dfu_smp,smp_upload_rsp_proc,sizeof(smp_cmd.header)+payload_len,&amp;amp;smp_cmd); 
      if (err){
          d_printf(LINE_INFO,kDbg_Error|kDbg_Host,&amp;quot;bt_dfu_smp_command failed with %d&amp;quot;, err);
          ami_state-&amp;gt;DFUErr = AMI_SMP_DFU_ERR_SEND;
          break;
      }
  } // while
  if (!ami_state-&amp;gt;DFUErr){
    ami_smp_PrintChecksums();
    d_printf(LINE_INFO,kDbg_General|kDbg_Host,&amp;quot;SMP UploadOK&amp;quot;);
  }
  atomic_set(&amp;amp;smp_finished,true);
} // send_upload2

&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;I tried several additions to my child_image&amp;nbsp;mcuboot.conf file, but nothing I did showed any RTT bootloader information. It does say 4 messages dropped.&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;*** Booting Zephyr OS build v3.2.99-ncs1 ***
[00:00:00.036,834] &#x1B;[0m&amp;lt;inf&amp;gt; mcumgr_zephyr_grp: zephyr_basic_mgmt_init: Registering Zephyr basic mgmt group&#x1B;[0m
00/00/0000 00:00:00[ami_main.c: 628] Startup
00/00/0000 00:00:00[ami_cfg.c: 256] DeviceID:51
build time: Feb  9 2023 15:07:18
&#x1B;[1;31m--- 4 messages dropped ---
&#x1B;[0m[00:00:00.485,168] &#x1B;[0m&amp;lt;inf&amp;gt; sdc_hci_driver: hci_driver_open: SoftDevice Controller build revision: 
                                         6d 90 41 2a 38 e8 ad 17  29 a5 03 38 39 27 d7 85 |m.A*8... )..89&amp;#39;..
                                         1f 85 d8 e1                                      |....             &#x1B;[0m
[00:00:00.487,609] &#x1B;[0m&amp;lt;inf&amp;gt; bt_hci_core: hci_vs_init: HW Platform: Nordic Semiconductor (0x0002)&#x1B;[0m
[00:00:00.487,640] &#x1B;[0m&amp;lt;inf&amp;gt; bt_hci_core: hci_vs_init: HW Variant: nRF52x (0x0002)&#x1B;[0m
[00:00:00.487,670] &#x1B;[0m&amp;lt;inf&amp;gt; bt_hci_core: hci_vs_init: Firmware: Standard Bluetooth controller (0x00) Version 109.16784 Build 2917677098&#x1B;[0m
[00:00:00.488,098] &#x1B;[0m&amp;lt;inf&amp;gt; bt_[0m
*** Booting Zephyr OS build v3.2.99-ncs1 ***
[00:00:00.036,804] &#x1B;[0m&amp;lt;inf&amp;gt; mcumgr_zephyr_grp: zephyr_basic_mgmt_init: Registering Zephyr basic mgmt group&#x1B;[0m
00/00/0000 00:00:00[ami_main.c: 628] Startup
00/00/0000 00:00:00[ami_cfg.c: 256] DeviceID:51
build time: Feb  9 2023 15:07:18
&#x1B;[1;31m--- 4 messages dropped ---
&#x1B;[0m[00:00:00.473,876] &#x1B;[0m&amp;lt;inf&amp;gt; sdc_hci_driver: hci_driver_open: SoftDevice Controller build revision: 
                                         6d 90 41 2a 38 e8 ad 17  29 a5 03 38 39 27 d7 85 |m.A*8... )..89&amp;#39;..
                                         1f 85 d8 e1                                      |....             &#x1B;[0m
[00:00:00.476,318] &#x1B;[0m&amp;lt;inf&amp;gt; bt_hci_core: hci_vs_init: HW Platform: Nordic Semiconductor (0x0002)&#x1B;[0m
[00:00:00.476,348] &#x1B;[0m&amp;lt;inf&amp;gt; bt_hci_core: hci_vs_init: HW Variant: nRF52x (0x0002)&#x1B;[0m
[00:00:00.476,379] &#x1B;[0m&amp;lt;inf&amp;gt; bt_hci_core: hci_vs_init: Firmware: Standard Bluetooth controller (0x00) Version 109.16784 Build 2917677098&#x1B;[0m
[00:00:00.476,806] &#x1B;[0m&amp;lt;inf&amp;gt; bt_hci_core: bt_init: No ID address. App must call settings_load()&#x1B;[0m
00/00/0000 00:00:00[ami_ble.c: 506] ActualTxPwr:8
00/00/0000 00:00:00[ami_ble.c: 788] Bluetooth initialized
[00:00:00.477,508] &#x1B;[1;33m&amp;lt;wrn&amp;gt; bt_hci_core: bt_set_name: Unable to store name&#x1B;[0m
[00:00:00.478,057] &#x1B;[0m&amp;lt;inf&amp;gt; bt_hci_core: bt_dev_show_info: Identity: D4:FD:9F:BF:4A:27 (random)&#x1B;[0m
[00:00:00.478,088] &#x1B;[0m&amp;lt;inf&amp;gt; bt_hci_core: bt_dev_show_info: HCI: version 5.3 (0x0c) revision 0x11fa, manufacturer 0x0059&#x1B;[0m
[00:00:00.478,118] &#x1B;[0m&amp;lt;inf&amp;gt; bt_hci_core: bt_dev_show_info: LMP: version 5.3 (0x0c) subver 0x11fa&#x1B;[0m
[00:00:00.478,363] &#x1B;[1;33m&amp;lt;wrn&amp;gt; bt_hci_core: bt_set_name: Unable to store name&#x1B;[0m
00/00/0000 00:00:00[ami_ble.c: 555] UpdateAdv x:0 y:0 z:0 Tmp:21 F:0x20
00/00/0000 00:00:00[ami_ble.c: 593] AdvertisingStarted
00/00/0000 00:00:00[ami_main.c: 680] ResetCause:1
[00:00:00.493,591] &#x1B;[1;31m&amp;lt;err&amp;gt; bt_gatt: db_hash_store: Failed to save Database Hash (err -2)&#x1B;[0m
01/01/2004 00:00:01[ami_adc.c: 470] RdLSM6DSLThread
01/01/2004 00:00:01[ami_lsm6dsl.c: 120] RdLSM6DSLThread
01/01/2004 00:00:01[ami_lsm6dsl.c: 153] NewSample
01/01/2004 00:00:04[ami_lsm6dsl.c: 406] RMS x:0 y:2 z:0 ov:0 Temp:1869 Bat:625
01/01/2004 00:00:05[ami_ble.c: 555] UpdateAdv x:0 y:2 z:0 Tmp:19 F:0x20&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Any other suggestions?&lt;/p&gt;
&lt;p&gt;Have a good week end&lt;/p&gt;
&lt;p&gt;Thanks David&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nrf52840 S140 Central DFU  Bluetooth Zephyr 2.0.0 nrf52840 peripheral</title><link>https://devzone.nordicsemi.com/thread/409084?ContentTypeID=1</link><pubDate>Thu, 09 Feb 2023 09:28:52 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:b92e31f4-9b5a-42d1-abe0-3dcfbb0187f5</guid><dc:creator>Sigurd Hellesvik</dc:creator><description>&lt;p&gt;I were able to get some unstable RTT logging from MCUboot using the configurations from &amp;nbsp;&lt;a href="https://devzone.nordicsemi.com/f/nordic-q-a/84936/add-rtt-logs-to-mcuboot"&gt;Add RTT Logs to mcuboot&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;(You can just set LOG_MODE in child_image/mcuboot.conf I think)&lt;/p&gt;
&lt;p&gt;Regards,&lt;br /&gt;Sigurd Hellesvik&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>