NRF5340 simultaneous multi-image FOTA DFU: works with initial firmware update, but can't upload any revised new version

I'm trying to use simultaneous FOTA update of both cores with NRF5340DK, and there is a strange behavior with any update with modification - the uploading from mobile app just doesn't start. My setup:

1) NRF5340DK

2) mobile phone with Android NRF connect app for updating via Bluetooth

3) sample project https://github.com/hellesvik-nordic/samples_for_nrf_connect_sdk/tree/main/bootloader_samples/nrf5340/mcuboot_smp_ble_simultaneous  compiled with NRF Connect SDK 2.1.2

After firmware initial flashing with "west flash --force --erase" the firmware works as expected. I'm able to make DFU via Bluetooth with dfu_application.zip from build/zephyr folder - and I can do it multiple times without problems.

But if I change something in firmware (for example a log message), compile a new build and try to make DFU with this the new dfu_application.zip - uploading doesn't start. The NRF Connect Android app immediately disconnects after "Starting DFU". 

What I'm doing wrong? How to make DFU with a modified firmware, and why it works only with initial firmware

  • Are you seeing the initial build, or the updated build after rebooting the nRF device after the image has been sent and the request has timed out?

    I am seeing the original build after the time out.

    If you're seeing the initial build, can you verify that you're not using the dfu_application zip that corresponds to the same build that is on the initial device?

    I can confirm that I am using a different dfu_application.zip file when the application times out.

    I am working with an app developer that uses your DFU library in his iOS apps, and he mentioned 2 things:

    There has been a case with the nrfConnect app recently with several users mentioning a known bug. He says that the nrfConnect iOS app does not use the latest DFU library code yet that just came out?

    Secondly, I am using a 9th Gen iPad which (I believe) is specified for BLE 4.2. While I don't understand why it would work only sometimes, would BLE 4.2 cause an issue if the app is using BLE 5?

    Thanks for your help!

  • Thank you for verifying the questions regarding the DFU process

    Robert de Brum said:
    There has been a case with the nrfConnect app recently with several users mentioning a known bug. He says that the nrfConnect iOS app does not use the latest DFU library code yet that just came out?

    I've asked the Mobile app team some questions about the issue and your two questions:

    Robert de Brum said:

    Note some of these images that occur when I use nrfConnect to DFU.

    This sequence happens on a successful DFU with the 9th Gen iPad. Notice the final images says that the DFU failed, but on reset, the device is running the new image.

    Regarding the time out message the developers suspect that we're missing a message that should've been sent. The device should reply with a response in both cases. Both the "confirm" request and "validate" (which is "image list" request) should be replied with a notification. They recommend checking if the notification is not sent or lost somewhere, so if possible you could perform a BLE Sniff and see if you can find the messages while performing the DFU.

    It might be the sample I suggested to you that is missing something, so I also recommend you to have a look at the zigbee light switch sample, which the simultanous DFU sample is based upon and attempt to do DFU with that sample to see if you observe the same behavior.

    Robert de Brum said:

    There has been a case with the nrfConnect app recently with several users mentioning a known bug. He says that the nrfConnect iOS app does not use the latest DFU library code yet that just came out?

    nRF Connect for iOS will be released in couple of days, the currently available version may not use the latest library. However, we have "nRF Connect Device Manager" app on AppStore, which is a "sample app for the library" and that one is using by design the latest versions - https://apps.apple.com/us/app/nrf-connect-device-manager/id1519423539. There will be plenty of improvements in the upcoming nRF Connect app for iOS.

    Robert de Brum said:
    Secondly, I am using a 9th Gen iPad which (I believe) is specified for BLE 4.2. While I don't understand why it would work only sometimes, would BLE 4.2 cause an issue if the app is using BLE 5?

    As long as you're using the same BLE features, the version should not matter as the BLE versions accumulate features over the generations and keeps on building on the previous versions while keeping backwards compatability. The only exeption is as I mentioned if you intend to use features only supported on one of two devices, then you will only be able to use one of them. An example is that you can not do coded PHY/2M data transmission between a 4.2 and 5.0 device as that's only supported for BLE 5.x.

    Kind regards,
    Andreas

Related